-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmodel_company_payout_destination_response.go
347 lines (286 loc) · 9.9 KB
/
model_company_payout_destination_response.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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
/*
Conekta API
Conekta sdk
API version: 2.1.0
Contact: engineering@conekta.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package conekta
import (
"encoding/json"
)
// checks if the CompanyPayoutDestinationResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CompanyPayoutDestinationResponse{}
// CompanyPayoutDestinationResponse Company payout destination model
type CompanyPayoutDestinationResponse struct {
// The resource's type
Object *string `json:"object,omitempty"`
// currency of the receiving account
Currency *string `json:"currency,omitempty"`
// Name of the account holder
AccountHolderName *string `json:"account_holder_name,omitempty"`
// Name of the bank
Bank *string `json:"bank,omitempty"`
// Type of the payout destination
Type *string `json:"type,omitempty"`
// Account number of the receiving account
AccountNumber *string `json:"account_number,omitempty"`
AdditionalProperties map[string]interface{}
}
type _CompanyPayoutDestinationResponse CompanyPayoutDestinationResponse
// NewCompanyPayoutDestinationResponse instantiates a new CompanyPayoutDestinationResponse 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 NewCompanyPayoutDestinationResponse() *CompanyPayoutDestinationResponse {
this := CompanyPayoutDestinationResponse{}
return &this
}
// NewCompanyPayoutDestinationResponseWithDefaults instantiates a new CompanyPayoutDestinationResponse 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 NewCompanyPayoutDestinationResponseWithDefaults() *CompanyPayoutDestinationResponse {
this := CompanyPayoutDestinationResponse{}
return &this
}
// GetObject returns the Object field value if set, zero value otherwise.
func (o *CompanyPayoutDestinationResponse) GetObject() string {
if o == nil || IsNil(o.Object) {
var ret string
return ret
}
return *o.Object
}
// GetObjectOk returns a tuple with the Object field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CompanyPayoutDestinationResponse) GetObjectOk() (*string, bool) {
if o == nil || IsNil(o.Object) {
return nil, false
}
return o.Object, true
}
// HasObject returns a boolean if a field has been set.
func (o *CompanyPayoutDestinationResponse) HasObject() bool {
if o != nil && !IsNil(o.Object) {
return true
}
return false
}
// SetObject gets a reference to the given string and assigns it to the Object field.
func (o *CompanyPayoutDestinationResponse) SetObject(v string) {
o.Object = &v
}
// GetCurrency returns the Currency field value if set, zero value otherwise.
func (o *CompanyPayoutDestinationResponse) GetCurrency() string {
if o == nil || IsNil(o.Currency) {
var ret string
return ret
}
return *o.Currency
}
// GetCurrencyOk returns a tuple with the Currency field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CompanyPayoutDestinationResponse) GetCurrencyOk() (*string, bool) {
if o == nil || IsNil(o.Currency) {
return nil, false
}
return o.Currency, true
}
// HasCurrency returns a boolean if a field has been set.
func (o *CompanyPayoutDestinationResponse) HasCurrency() bool {
if o != nil && !IsNil(o.Currency) {
return true
}
return false
}
// SetCurrency gets a reference to the given string and assigns it to the Currency field.
func (o *CompanyPayoutDestinationResponse) SetCurrency(v string) {
o.Currency = &v
}
// GetAccountHolderName returns the AccountHolderName field value if set, zero value otherwise.
func (o *CompanyPayoutDestinationResponse) GetAccountHolderName() string {
if o == nil || IsNil(o.AccountHolderName) {
var ret string
return ret
}
return *o.AccountHolderName
}
// GetAccountHolderNameOk returns a tuple with the AccountHolderName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CompanyPayoutDestinationResponse) GetAccountHolderNameOk() (*string, bool) {
if o == nil || IsNil(o.AccountHolderName) {
return nil, false
}
return o.AccountHolderName, true
}
// HasAccountHolderName returns a boolean if a field has been set.
func (o *CompanyPayoutDestinationResponse) HasAccountHolderName() bool {
if o != nil && !IsNil(o.AccountHolderName) {
return true
}
return false
}
// SetAccountHolderName gets a reference to the given string and assigns it to the AccountHolderName field.
func (o *CompanyPayoutDestinationResponse) SetAccountHolderName(v string) {
o.AccountHolderName = &v
}
// GetBank returns the Bank field value if set, zero value otherwise.
func (o *CompanyPayoutDestinationResponse) GetBank() string {
if o == nil || IsNil(o.Bank) {
var ret string
return ret
}
return *o.Bank
}
// GetBankOk returns a tuple with the Bank field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CompanyPayoutDestinationResponse) GetBankOk() (*string, bool) {
if o == nil || IsNil(o.Bank) {
return nil, false
}
return o.Bank, true
}
// HasBank returns a boolean if a field has been set.
func (o *CompanyPayoutDestinationResponse) HasBank() bool {
if o != nil && !IsNil(o.Bank) {
return true
}
return false
}
// SetBank gets a reference to the given string and assigns it to the Bank field.
func (o *CompanyPayoutDestinationResponse) SetBank(v string) {
o.Bank = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *CompanyPayoutDestinationResponse) GetType() string {
if o == nil || IsNil(o.Type) {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CompanyPayoutDestinationResponse) GetTypeOk() (*string, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *CompanyPayoutDestinationResponse) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *CompanyPayoutDestinationResponse) SetType(v string) {
o.Type = &v
}
// GetAccountNumber returns the AccountNumber field value if set, zero value otherwise.
func (o *CompanyPayoutDestinationResponse) GetAccountNumber() string {
if o == nil || IsNil(o.AccountNumber) {
var ret string
return ret
}
return *o.AccountNumber
}
// GetAccountNumberOk returns a tuple with the AccountNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CompanyPayoutDestinationResponse) GetAccountNumberOk() (*string, bool) {
if o == nil || IsNil(o.AccountNumber) {
return nil, false
}
return o.AccountNumber, true
}
// HasAccountNumber returns a boolean if a field has been set.
func (o *CompanyPayoutDestinationResponse) HasAccountNumber() bool {
if o != nil && !IsNil(o.AccountNumber) {
return true
}
return false
}
// SetAccountNumber gets a reference to the given string and assigns it to the AccountNumber field.
func (o *CompanyPayoutDestinationResponse) SetAccountNumber(v string) {
o.AccountNumber = &v
}
func (o CompanyPayoutDestinationResponse) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CompanyPayoutDestinationResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Object) {
toSerialize["object"] = o.Object
}
if !IsNil(o.Currency) {
toSerialize["currency"] = o.Currency
}
if !IsNil(o.AccountHolderName) {
toSerialize["account_holder_name"] = o.AccountHolderName
}
if !IsNil(o.Bank) {
toSerialize["bank"] = o.Bank
}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
if !IsNil(o.AccountNumber) {
toSerialize["account_number"] = o.AccountNumber
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *CompanyPayoutDestinationResponse) UnmarshalJSON(data []byte) (err error) {
varCompanyPayoutDestinationResponse := _CompanyPayoutDestinationResponse{}
err = json.Unmarshal(data, &varCompanyPayoutDestinationResponse)
if err != nil {
return err
}
*o = CompanyPayoutDestinationResponse(varCompanyPayoutDestinationResponse)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "object")
delete(additionalProperties, "currency")
delete(additionalProperties, "account_holder_name")
delete(additionalProperties, "bank")
delete(additionalProperties, "type")
delete(additionalProperties, "account_number")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableCompanyPayoutDestinationResponse struct {
value *CompanyPayoutDestinationResponse
isSet bool
}
func (v NullableCompanyPayoutDestinationResponse) Get() *CompanyPayoutDestinationResponse {
return v.value
}
func (v *NullableCompanyPayoutDestinationResponse) Set(val *CompanyPayoutDestinationResponse) {
v.value = val
v.isSet = true
}
func (v NullableCompanyPayoutDestinationResponse) IsSet() bool {
return v.isSet
}
func (v *NullableCompanyPayoutDestinationResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCompanyPayoutDestinationResponse(val *CompanyPayoutDestinationResponse) *NullableCompanyPayoutDestinationResponse {
return &NullableCompanyPayoutDestinationResponse{value: val, isSet: true}
}
func (v NullableCompanyPayoutDestinationResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCompanyPayoutDestinationResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}