-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmodel_create_order_request_order_meta.go
223 lines (185 loc) · 7.6 KB
/
model_create_order_request_order_meta.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
/*
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: 2022-09-01
Contact: developers@cashfree.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package cashfree_pg
import (
"encoding/json"
)
// checks if the CreateOrderRequestOrderMeta type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateOrderRequestOrderMeta{}
// CreateOrderRequestOrderMeta struct for CreateOrderRequestOrderMeta
type CreateOrderRequestOrderMeta struct {
// The URL to which user will be redirected to after the payment on bank OTP page. Maximum length: 250. The return_url must contain placeholder {order_id}. When redirecting the customer back to the return url from the bank’s OTP page, Cashfree will replace this placeholder with the actual value for that order.
ReturnUrl NullableString `json:"return_url,omitempty"`
// Notification URL for server-server communication. Useful when user's connection drops while re-directing. NotifyUrl should be an https URL. Maximum length: 250.
NotifyUrl NullableString `json:"notify_url,omitempty"`
// Allowed payment modes for this order. Pass comma-separated values among following options - \"cc\", \"dc\", \"ccc\", \"ppc\",\"nb\",\"upi\",\"paypal\",\"app\",\"paylater\",\"cardlessemi\",\"dcemi\",\"ccemi\",\"banktransfer\". Leave it blank to show all available payment methods
PaymentMethods interface{} `json:"payment_methods,omitempty"`
}
// NewCreateOrderRequestOrderMeta instantiates a new CreateOrderRequestOrderMeta object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCreateOrderRequestOrderMeta() *CreateOrderRequestOrderMeta {
this := CreateOrderRequestOrderMeta{}
return &this
}
// NewCreateOrderRequestOrderMetaWithDefaults instantiates a new CreateOrderRequestOrderMeta object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCreateOrderRequestOrderMetaWithDefaults() *CreateOrderRequestOrderMeta {
this := CreateOrderRequestOrderMeta{}
return &this
}
// GetReturnUrl returns the ReturnUrl field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateOrderRequestOrderMeta) GetReturnUrl() string {
if o == nil || IsNil(o.ReturnUrl.Get()) {
var ret string
return ret
}
return *o.ReturnUrl.Get()
}
// GetReturnUrlOk returns a tuple with the ReturnUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *CreateOrderRequestOrderMeta) GetReturnUrlOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ReturnUrl.Get(), o.ReturnUrl.IsSet()
}
// HasReturnUrl returns a boolean if a field has been set.
func (o *CreateOrderRequestOrderMeta) HasReturnUrl() bool {
if o != nil && o.ReturnUrl.IsSet() {
return true
}
return false
}
// SetReturnUrl gets a reference to the given NullableString and assigns it to the ReturnUrl field.
func (o *CreateOrderRequestOrderMeta) SetReturnUrl(v string) {
o.ReturnUrl.Set(&v)
}
// SetReturnUrlNil sets the value for ReturnUrl to be an explicit nil
func (o *CreateOrderRequestOrderMeta) SetReturnUrlNil() {
o.ReturnUrl.Set(nil)
}
// UnsetReturnUrl ensures that no value is present for ReturnUrl, not even an explicit nil
func (o *CreateOrderRequestOrderMeta) UnsetReturnUrl() {
o.ReturnUrl.Unset()
}
// GetNotifyUrl returns the NotifyUrl field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateOrderRequestOrderMeta) GetNotifyUrl() string {
if o == nil || IsNil(o.NotifyUrl.Get()) {
var ret string
return ret
}
return *o.NotifyUrl.Get()
}
// GetNotifyUrlOk returns a tuple with the NotifyUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *CreateOrderRequestOrderMeta) GetNotifyUrlOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.NotifyUrl.Get(), o.NotifyUrl.IsSet()
}
// HasNotifyUrl returns a boolean if a field has been set.
func (o *CreateOrderRequestOrderMeta) HasNotifyUrl() bool {
if o != nil && o.NotifyUrl.IsSet() {
return true
}
return false
}
// SetNotifyUrl gets a reference to the given NullableString and assigns it to the NotifyUrl field.
func (o *CreateOrderRequestOrderMeta) SetNotifyUrl(v string) {
o.NotifyUrl.Set(&v)
}
// SetNotifyUrlNil sets the value for NotifyUrl to be an explicit nil
func (o *CreateOrderRequestOrderMeta) SetNotifyUrlNil() {
o.NotifyUrl.Set(nil)
}
// UnsetNotifyUrl ensures that no value is present for NotifyUrl, not even an explicit nil
func (o *CreateOrderRequestOrderMeta) UnsetNotifyUrl() {
o.NotifyUrl.Unset()
}
// GetPaymentMethods returns the PaymentMethods field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateOrderRequestOrderMeta) GetPaymentMethods() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.PaymentMethods
}
// GetPaymentMethodsOk returns a tuple with the PaymentMethods field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *CreateOrderRequestOrderMeta) GetPaymentMethodsOk() (*interface{}, bool) {
if o == nil || IsNil(o.PaymentMethods) {
return nil, false
}
return &o.PaymentMethods, true
}
// HasPaymentMethods returns a boolean if a field has been set.
func (o *CreateOrderRequestOrderMeta) HasPaymentMethods() bool {
if o != nil && IsNil(o.PaymentMethods) {
return true
}
return false
}
// SetPaymentMethods gets a reference to the given interface{} and assigns it to the PaymentMethods field.
func (o *CreateOrderRequestOrderMeta) SetPaymentMethods(v interface{}) {
o.PaymentMethods = v
}
func (o CreateOrderRequestOrderMeta) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CreateOrderRequestOrderMeta) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.ReturnUrl.IsSet() {
toSerialize["return_url"] = o.ReturnUrl.Get()
}
if o.NotifyUrl.IsSet() {
toSerialize["notify_url"] = o.NotifyUrl.Get()
}
if o.PaymentMethods != nil {
toSerialize["payment_methods"] = o.PaymentMethods
}
return toSerialize, nil
}
type NullableCreateOrderRequestOrderMeta struct {
value *CreateOrderRequestOrderMeta
isSet bool
}
func (v NullableCreateOrderRequestOrderMeta) Get() *CreateOrderRequestOrderMeta {
return v.value
}
func (v *NullableCreateOrderRequestOrderMeta) Set(val *CreateOrderRequestOrderMeta) {
v.value = val
v.isSet = true
}
func (v NullableCreateOrderRequestOrderMeta) IsSet() bool {
return v.isSet
}
func (v *NullableCreateOrderRequestOrderMeta) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateOrderRequestOrderMeta(val *CreateOrderRequestOrderMeta) *NullableCreateOrderRequestOrderMeta {
return &NullableCreateOrderRequestOrderMeta{value: val, isSet: true}
}
func (v NullableCreateOrderRequestOrderMeta) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateOrderRequestOrderMeta) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}