/
model_installment_plan_create_response.go
606 lines (514 loc) · 17.9 KB
/
model_installment_plan_create_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
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
/*
splitit-web-api-v3
Splitit's Web API
API version: 1.0.0
*/
// Code generated by Konfig (https://konfigthis.com); DO NOT EDIT.
package splitit
import (
"encoding/json"
"time"
)
// InstallmentPlanCreateResponse struct for InstallmentPlanCreateResponse
type InstallmentPlanCreateResponse struct {
InstallmentPlanNumber *string `json:"InstallmentPlanNumber,omitempty"`
DateCreated time.Time `json:"DateCreated"`
RefOrderNumber *string `json:"RefOrderNumber,omitempty"`
PurchaseMethod *PurchaseMethod `json:"PurchaseMethod,omitempty"`
Status PlanStatus `json:"Status"`
Currency *string `json:"Currency,omitempty"`
OriginalAmount *float32 `json:"OriginalAmount,omitempty"`
Amount *float32 `json:"Amount,omitempty"`
ExtendedParams *map[string]string `json:"ExtendedParams,omitempty"`
Authorization *AuthorizationModel `json:"Authorization,omitempty"`
Shopper *ShopperData `json:"Shopper,omitempty"`
BillingAddress *AddressData `json:"BillingAddress,omitempty"`
PaymentMethod *PaymentMethodModel `json:"PaymentMethod,omitempty"`
Installments []Installment `json:"Installments,omitempty"`
Links *LinksData `json:"Links,omitempty"`
}
// NewInstallmentPlanCreateResponse instantiates a new InstallmentPlanCreateResponse 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 NewInstallmentPlanCreateResponse(dateCreated time.Time, status PlanStatus) *InstallmentPlanCreateResponse {
this := InstallmentPlanCreateResponse{}
this.DateCreated = dateCreated
this.Status = status
return &this
}
// NewInstallmentPlanCreateResponseWithDefaults instantiates a new InstallmentPlanCreateResponse 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 NewInstallmentPlanCreateResponseWithDefaults() *InstallmentPlanCreateResponse {
this := InstallmentPlanCreateResponse{}
return &this
}
// GetInstallmentPlanNumber returns the InstallmentPlanNumber field value if set, zero value otherwise.
func (o *InstallmentPlanCreateResponse) GetInstallmentPlanNumber() string {
if o == nil || isNil(o.InstallmentPlanNumber) {
var ret string
return ret
}
return *o.InstallmentPlanNumber
}
// GetInstallmentPlanNumberOk returns a tuple with the InstallmentPlanNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InstallmentPlanCreateResponse) GetInstallmentPlanNumberOk() (*string, bool) {
if o == nil || isNil(o.InstallmentPlanNumber) {
return nil, false
}
return o.InstallmentPlanNumber, true
}
// HasInstallmentPlanNumber returns a boolean if a field has been set.
func (o *InstallmentPlanCreateResponse) HasInstallmentPlanNumber() bool {
if o != nil && !isNil(o.InstallmentPlanNumber) {
return true
}
return false
}
// SetInstallmentPlanNumber gets a reference to the given string and assigns it to the InstallmentPlanNumber field.
func (o *InstallmentPlanCreateResponse) SetInstallmentPlanNumber(v string) {
o.InstallmentPlanNumber = &v
}
// GetDateCreated returns the DateCreated field value
func (o *InstallmentPlanCreateResponse) GetDateCreated() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.DateCreated
}
// GetDateCreatedOk returns a tuple with the DateCreated field value
// and a boolean to check if the value has been set.
func (o *InstallmentPlanCreateResponse) GetDateCreatedOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.DateCreated, true
}
// SetDateCreated sets field value
func (o *InstallmentPlanCreateResponse) SetDateCreated(v time.Time) {
o.DateCreated = v
}
// GetRefOrderNumber returns the RefOrderNumber field value if set, zero value otherwise.
func (o *InstallmentPlanCreateResponse) GetRefOrderNumber() string {
if o == nil || isNil(o.RefOrderNumber) {
var ret string
return ret
}
return *o.RefOrderNumber
}
// GetRefOrderNumberOk returns a tuple with the RefOrderNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InstallmentPlanCreateResponse) GetRefOrderNumberOk() (*string, bool) {
if o == nil || isNil(o.RefOrderNumber) {
return nil, false
}
return o.RefOrderNumber, true
}
// HasRefOrderNumber returns a boolean if a field has been set.
func (o *InstallmentPlanCreateResponse) HasRefOrderNumber() bool {
if o != nil && !isNil(o.RefOrderNumber) {
return true
}
return false
}
// SetRefOrderNumber gets a reference to the given string and assigns it to the RefOrderNumber field.
func (o *InstallmentPlanCreateResponse) SetRefOrderNumber(v string) {
o.RefOrderNumber = &v
}
// GetPurchaseMethod returns the PurchaseMethod field value if set, zero value otherwise.
func (o *InstallmentPlanCreateResponse) GetPurchaseMethod() PurchaseMethod {
if o == nil || isNil(o.PurchaseMethod) {
var ret PurchaseMethod
return ret
}
return *o.PurchaseMethod
}
// GetPurchaseMethodOk returns a tuple with the PurchaseMethod field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InstallmentPlanCreateResponse) GetPurchaseMethodOk() (*PurchaseMethod, bool) {
if o == nil || isNil(o.PurchaseMethod) {
return nil, false
}
return o.PurchaseMethod, true
}
// HasPurchaseMethod returns a boolean if a field has been set.
func (o *InstallmentPlanCreateResponse) HasPurchaseMethod() bool {
if o != nil && !isNil(o.PurchaseMethod) {
return true
}
return false
}
// SetPurchaseMethod gets a reference to the given PurchaseMethod and assigns it to the PurchaseMethod field.
func (o *InstallmentPlanCreateResponse) SetPurchaseMethod(v PurchaseMethod) {
o.PurchaseMethod = &v
}
// GetStatus returns the Status field value
func (o *InstallmentPlanCreateResponse) GetStatus() PlanStatus {
if o == nil {
var ret PlanStatus
return ret
}
return o.Status
}
// GetStatusOk returns a tuple with the Status field value
// and a boolean to check if the value has been set.
func (o *InstallmentPlanCreateResponse) GetStatusOk() (*PlanStatus, bool) {
if o == nil {
return nil, false
}
return &o.Status, true
}
// SetStatus sets field value
func (o *InstallmentPlanCreateResponse) SetStatus(v PlanStatus) {
o.Status = v
}
// GetCurrency returns the Currency field value if set, zero value otherwise.
func (o *InstallmentPlanCreateResponse) 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 *InstallmentPlanCreateResponse) 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 *InstallmentPlanCreateResponse) 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 *InstallmentPlanCreateResponse) SetCurrency(v string) {
o.Currency = &v
}
// GetOriginalAmount returns the OriginalAmount field value if set, zero value otherwise.
func (o *InstallmentPlanCreateResponse) GetOriginalAmount() float32 {
if o == nil || isNil(o.OriginalAmount) {
var ret float32
return ret
}
return *o.OriginalAmount
}
// GetOriginalAmountOk returns a tuple with the OriginalAmount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InstallmentPlanCreateResponse) GetOriginalAmountOk() (*float32, bool) {
if o == nil || isNil(o.OriginalAmount) {
return nil, false
}
return o.OriginalAmount, true
}
// HasOriginalAmount returns a boolean if a field has been set.
func (o *InstallmentPlanCreateResponse) HasOriginalAmount() bool {
if o != nil && !isNil(o.OriginalAmount) {
return true
}
return false
}
// SetOriginalAmount gets a reference to the given float32 and assigns it to the OriginalAmount field.
func (o *InstallmentPlanCreateResponse) SetOriginalAmount(v float32) {
o.OriginalAmount = &v
}
// GetAmount returns the Amount field value if set, zero value otherwise.
func (o *InstallmentPlanCreateResponse) GetAmount() float32 {
if o == nil || isNil(o.Amount) {
var ret float32
return ret
}
return *o.Amount
}
// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InstallmentPlanCreateResponse) GetAmountOk() (*float32, bool) {
if o == nil || isNil(o.Amount) {
return nil, false
}
return o.Amount, true
}
// HasAmount returns a boolean if a field has been set.
func (o *InstallmentPlanCreateResponse) HasAmount() bool {
if o != nil && !isNil(o.Amount) {
return true
}
return false
}
// SetAmount gets a reference to the given float32 and assigns it to the Amount field.
func (o *InstallmentPlanCreateResponse) SetAmount(v float32) {
o.Amount = &v
}
// GetExtendedParams returns the ExtendedParams field value if set, zero value otherwise.
func (o *InstallmentPlanCreateResponse) GetExtendedParams() map[string]string {
if o == nil || isNil(o.ExtendedParams) {
var ret map[string]string
return ret
}
return *o.ExtendedParams
}
// GetExtendedParamsOk returns a tuple with the ExtendedParams field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InstallmentPlanCreateResponse) GetExtendedParamsOk() (*map[string]string, bool) {
if o == nil || isNil(o.ExtendedParams) {
return nil, false
}
return o.ExtendedParams, true
}
// HasExtendedParams returns a boolean if a field has been set.
func (o *InstallmentPlanCreateResponse) HasExtendedParams() bool {
if o != nil && !isNil(o.ExtendedParams) {
return true
}
return false
}
// SetExtendedParams gets a reference to the given map[string]string and assigns it to the ExtendedParams field.
func (o *InstallmentPlanCreateResponse) SetExtendedParams(v map[string]string) {
o.ExtendedParams = &v
}
// GetAuthorization returns the Authorization field value if set, zero value otherwise.
func (o *InstallmentPlanCreateResponse) GetAuthorization() AuthorizationModel {
if o == nil || isNil(o.Authorization) {
var ret AuthorizationModel
return ret
}
return *o.Authorization
}
// GetAuthorizationOk returns a tuple with the Authorization field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InstallmentPlanCreateResponse) GetAuthorizationOk() (*AuthorizationModel, bool) {
if o == nil || isNil(o.Authorization) {
return nil, false
}
return o.Authorization, true
}
// HasAuthorization returns a boolean if a field has been set.
func (o *InstallmentPlanCreateResponse) HasAuthorization() bool {
if o != nil && !isNil(o.Authorization) {
return true
}
return false
}
// SetAuthorization gets a reference to the given AuthorizationModel and assigns it to the Authorization field.
func (o *InstallmentPlanCreateResponse) SetAuthorization(v AuthorizationModel) {
o.Authorization = &v
}
// GetShopper returns the Shopper field value if set, zero value otherwise.
func (o *InstallmentPlanCreateResponse) GetShopper() ShopperData {
if o == nil || isNil(o.Shopper) {
var ret ShopperData
return ret
}
return *o.Shopper
}
// GetShopperOk returns a tuple with the Shopper field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InstallmentPlanCreateResponse) GetShopperOk() (*ShopperData, bool) {
if o == nil || isNil(o.Shopper) {
return nil, false
}
return o.Shopper, true
}
// HasShopper returns a boolean if a field has been set.
func (o *InstallmentPlanCreateResponse) HasShopper() bool {
if o != nil && !isNil(o.Shopper) {
return true
}
return false
}
// SetShopper gets a reference to the given ShopperData and assigns it to the Shopper field.
func (o *InstallmentPlanCreateResponse) SetShopper(v ShopperData) {
o.Shopper = &v
}
// GetBillingAddress returns the BillingAddress field value if set, zero value otherwise.
func (o *InstallmentPlanCreateResponse) GetBillingAddress() AddressData {
if o == nil || isNil(o.BillingAddress) {
var ret AddressData
return ret
}
return *o.BillingAddress
}
// GetBillingAddressOk returns a tuple with the BillingAddress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InstallmentPlanCreateResponse) GetBillingAddressOk() (*AddressData, bool) {
if o == nil || isNil(o.BillingAddress) {
return nil, false
}
return o.BillingAddress, true
}
// HasBillingAddress returns a boolean if a field has been set.
func (o *InstallmentPlanCreateResponse) HasBillingAddress() bool {
if o != nil && !isNil(o.BillingAddress) {
return true
}
return false
}
// SetBillingAddress gets a reference to the given AddressData and assigns it to the BillingAddress field.
func (o *InstallmentPlanCreateResponse) SetBillingAddress(v AddressData) {
o.BillingAddress = &v
}
// GetPaymentMethod returns the PaymentMethod field value if set, zero value otherwise.
func (o *InstallmentPlanCreateResponse) GetPaymentMethod() PaymentMethodModel {
if o == nil || isNil(o.PaymentMethod) {
var ret PaymentMethodModel
return ret
}
return *o.PaymentMethod
}
// GetPaymentMethodOk returns a tuple with the PaymentMethod field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InstallmentPlanCreateResponse) GetPaymentMethodOk() (*PaymentMethodModel, bool) {
if o == nil || isNil(o.PaymentMethod) {
return nil, false
}
return o.PaymentMethod, true
}
// HasPaymentMethod returns a boolean if a field has been set.
func (o *InstallmentPlanCreateResponse) HasPaymentMethod() bool {
if o != nil && !isNil(o.PaymentMethod) {
return true
}
return false
}
// SetPaymentMethod gets a reference to the given PaymentMethodModel and assigns it to the PaymentMethod field.
func (o *InstallmentPlanCreateResponse) SetPaymentMethod(v PaymentMethodModel) {
o.PaymentMethod = &v
}
// GetInstallments returns the Installments field value if set, zero value otherwise.
func (o *InstallmentPlanCreateResponse) GetInstallments() []Installment {
if o == nil || isNil(o.Installments) {
var ret []Installment
return ret
}
return o.Installments
}
// GetInstallmentsOk returns a tuple with the Installments field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InstallmentPlanCreateResponse) GetInstallmentsOk() ([]Installment, bool) {
if o == nil || isNil(o.Installments) {
return nil, false
}
return o.Installments, true
}
// HasInstallments returns a boolean if a field has been set.
func (o *InstallmentPlanCreateResponse) HasInstallments() bool {
if o != nil && !isNil(o.Installments) {
return true
}
return false
}
// SetInstallments gets a reference to the given []Installment and assigns it to the Installments field.
func (o *InstallmentPlanCreateResponse) SetInstallments(v []Installment) {
o.Installments = v
}
// GetLinks returns the Links field value if set, zero value otherwise.
func (o *InstallmentPlanCreateResponse) GetLinks() LinksData {
if o == nil || isNil(o.Links) {
var ret LinksData
return ret
}
return *o.Links
}
// GetLinksOk returns a tuple with the Links field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InstallmentPlanCreateResponse) GetLinksOk() (*LinksData, bool) {
if o == nil || isNil(o.Links) {
return nil, false
}
return o.Links, true
}
// HasLinks returns a boolean if a field has been set.
func (o *InstallmentPlanCreateResponse) HasLinks() bool {
if o != nil && !isNil(o.Links) {
return true
}
return false
}
// SetLinks gets a reference to the given LinksData and assigns it to the Links field.
func (o *InstallmentPlanCreateResponse) SetLinks(v LinksData) {
o.Links = &v
}
func (o InstallmentPlanCreateResponse) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if !isNil(o.InstallmentPlanNumber) {
toSerialize["InstallmentPlanNumber"] = o.InstallmentPlanNumber
}
if true {
toSerialize["DateCreated"] = o.DateCreated
}
if !isNil(o.RefOrderNumber) {
toSerialize["RefOrderNumber"] = o.RefOrderNumber
}
if !isNil(o.PurchaseMethod) {
toSerialize["PurchaseMethod"] = o.PurchaseMethod
}
if true {
toSerialize["Status"] = o.Status
}
if !isNil(o.Currency) {
toSerialize["Currency"] = o.Currency
}
if !isNil(o.OriginalAmount) {
toSerialize["OriginalAmount"] = o.OriginalAmount
}
if !isNil(o.Amount) {
toSerialize["Amount"] = o.Amount
}
if !isNil(o.ExtendedParams) {
toSerialize["ExtendedParams"] = o.ExtendedParams
}
if !isNil(o.Authorization) {
toSerialize["Authorization"] = o.Authorization
}
if !isNil(o.Shopper) {
toSerialize["Shopper"] = o.Shopper
}
if !isNil(o.BillingAddress) {
toSerialize["BillingAddress"] = o.BillingAddress
}
if !isNil(o.PaymentMethod) {
toSerialize["PaymentMethod"] = o.PaymentMethod
}
if !isNil(o.Installments) {
toSerialize["Installments"] = o.Installments
}
if !isNil(o.Links) {
toSerialize["Links"] = o.Links
}
return json.Marshal(toSerialize)
}
type NullableInstallmentPlanCreateResponse struct {
value *InstallmentPlanCreateResponse
isSet bool
}
func (v NullableInstallmentPlanCreateResponse) Get() *InstallmentPlanCreateResponse {
return v.value
}
func (v *NullableInstallmentPlanCreateResponse) Set(val *InstallmentPlanCreateResponse) {
v.value = val
v.isSet = true
}
func (v NullableInstallmentPlanCreateResponse) IsSet() bool {
return v.isSet
}
func (v *NullableInstallmentPlanCreateResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInstallmentPlanCreateResponse(val *InstallmentPlanCreateResponse) *NullableInstallmentPlanCreateResponse {
return &NullableInstallmentPlanCreateResponse{value: val, isSet: true}
}
func (v NullableInstallmentPlanCreateResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInstallmentPlanCreateResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}