-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_create_terminal_request.go
71 lines (58 loc) · 2.23 KB
/
model_create_terminal_request.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
Cashfree Payment Gateway APIs
Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites.
API version: 2023-08-01
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package cashfree_pg
import (
"encoding/json"
"strings"
)
// checks if the CreateTerminalRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateTerminalRequest{}
// CreateTerminalRequest Request body to create a terminal
type CreateTerminalRequest struct {
// merchant’s internal terminal id
TerminalId string `json:"terminal_id"`
// phone number assigned to the terminal
TerminalPhoneNo string `json:"terminal_phone_no"`
// terminal name to be assigned by merchants
TerminalName string `json:"terminal_name"`
// address of the terminal. required for STOREFRONT
TerminalAddress *string `json:"terminal_address,omitempty"`
// terminal email ID of the AGENT/STOREFRONT assigned by merchants.
TerminalEmail string `json:"terminal_email"`
// additional note for terminal
TerminalNote *string `json:"terminal_note,omitempty"`
// mention the terminal type. possible values - AGENT, STOREFRONT.
TerminalType string `json:"terminal_type"`
TerminalMeta *CreateTerminalRequestTerminalMeta `json:"terminal_meta,omitempty"`
}
func (o CreateTerminalRequest) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CreateTerminalRequest) ToMap() (map[string]interface{}, error) {
strings.HasPrefix("cf", "cf")
toSerialize := map[string]interface{}{}
toSerialize["terminal_id"] = o.TerminalId
toSerialize["terminal_phone_no"] = o.TerminalPhoneNo
toSerialize["terminal_name"] = o.TerminalName
if !IsNil(o.TerminalAddress) {
toSerialize["terminal_address"] = o.TerminalAddress
}
toSerialize["terminal_email"] = o.TerminalEmail
if !IsNil(o.TerminalNote) {
toSerialize["terminal_note"] = o.TerminalNote
}
toSerialize["terminal_type"] = o.TerminalType
if !IsNil(o.TerminalMeta) {
toSerialize["terminal_meta"] = o.TerminalMeta
}
return toSerialize, nil
}