-
Notifications
You must be signed in to change notification settings - Fork 28
/
model_card_details.go
821 lines (706 loc) · 25.5 KB
/
model_card_details.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
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
/*
Adyen Checkout API
API version: 71
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package checkout
import (
"encoding/json"
"github.com/adyen/adyen-go-api-library/v8/src/common"
)
// checks if the CardDetails type satisfies the MappedNullable interface at compile time
var _ common.MappedNullable = &CardDetails{}
// CardDetails struct for CardDetails
type CardDetails struct {
// Secondary brand of the card. For example: **plastix**, **hmclub**.
Brand *string `json:"brand,omitempty"`
// The checkout attempt identifier.
CheckoutAttemptId *string `json:"checkoutAttemptId,omitempty"`
// Deprecated
CupsecureplusSmscode *string `json:"cupsecureplus.smscode,omitempty"`
// The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
Cvc *string `json:"cvc,omitempty"`
// The encrypted card number.
EncryptedCardNumber *string `json:"encryptedCardNumber,omitempty"`
// The encrypted card expiry month.
EncryptedExpiryMonth *string `json:"encryptedExpiryMonth,omitempty"`
// The encrypted card expiry year.
EncryptedExpiryYear *string `json:"encryptedExpiryYear,omitempty"`
// The encrypted card verification code.
EncryptedSecurityCode *string `json:"encryptedSecurityCode,omitempty"`
// The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
ExpiryMonth *string `json:"expiryMonth,omitempty"`
// The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
ExpiryYear *string `json:"expiryYear,omitempty"`
// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.
FundingSource *string `json:"fundingSource,omitempty"`
// The name of the card holder.
HolderName *string `json:"holderName,omitempty"`
// The network token reference. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment.
NetworkPaymentReference *string `json:"networkPaymentReference,omitempty"`
// The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
Number *string `json:"number,omitempty"`
// This is the `recurringDetailReference` returned in the response when you created the token.
// Deprecated
RecurringDetailReference *string `json:"recurringDetailReference,omitempty"`
// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used only for recurring payments in India.
ShopperNotificationReference *string `json:"shopperNotificationReference,omitempty"`
// This is the `recurringDetailReference` returned in the response when you created the token.
StoredPaymentMethodId *string `json:"storedPaymentMethodId,omitempty"`
// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK.
ThreeDS2SdkVersion *string `json:"threeDS2SdkVersion,omitempty"`
// Default payment method details. Common for scheme payment methods, and for simple payment method details.
Type *string `json:"type,omitempty"`
}
// NewCardDetails instantiates a new CardDetails 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 NewCardDetails() *CardDetails {
this := CardDetails{}
var type_ string = "scheme"
this.Type = &type_
return &this
}
// NewCardDetailsWithDefaults instantiates a new CardDetails 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 NewCardDetailsWithDefaults() *CardDetails {
this := CardDetails{}
var type_ string = "scheme"
this.Type = &type_
return &this
}
// GetBrand returns the Brand field value if set, zero value otherwise.
func (o *CardDetails) GetBrand() string {
if o == nil || common.IsNil(o.Brand) {
var ret string
return ret
}
return *o.Brand
}
// GetBrandOk returns a tuple with the Brand field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CardDetails) GetBrandOk() (*string, bool) {
if o == nil || common.IsNil(o.Brand) {
return nil, false
}
return o.Brand, true
}
// HasBrand returns a boolean if a field has been set.
func (o *CardDetails) HasBrand() bool {
if o != nil && !common.IsNil(o.Brand) {
return true
}
return false
}
// SetBrand gets a reference to the given string and assigns it to the Brand field.
func (o *CardDetails) SetBrand(v string) {
o.Brand = &v
}
// GetCheckoutAttemptId returns the CheckoutAttemptId field value if set, zero value otherwise.
func (o *CardDetails) GetCheckoutAttemptId() string {
if o == nil || common.IsNil(o.CheckoutAttemptId) {
var ret string
return ret
}
return *o.CheckoutAttemptId
}
// GetCheckoutAttemptIdOk returns a tuple with the CheckoutAttemptId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CardDetails) GetCheckoutAttemptIdOk() (*string, bool) {
if o == nil || common.IsNil(o.CheckoutAttemptId) {
return nil, false
}
return o.CheckoutAttemptId, true
}
// HasCheckoutAttemptId returns a boolean if a field has been set.
func (o *CardDetails) HasCheckoutAttemptId() bool {
if o != nil && !common.IsNil(o.CheckoutAttemptId) {
return true
}
return false
}
// SetCheckoutAttemptId gets a reference to the given string and assigns it to the CheckoutAttemptId field.
func (o *CardDetails) SetCheckoutAttemptId(v string) {
o.CheckoutAttemptId = &v
}
// GetCupsecureplusSmscode returns the CupsecureplusSmscode field value if set, zero value otherwise.
// Deprecated
func (o *CardDetails) GetCupsecureplusSmscode() string {
if o == nil || common.IsNil(o.CupsecureplusSmscode) {
var ret string
return ret
}
return *o.CupsecureplusSmscode
}
// GetCupsecureplusSmscodeOk returns a tuple with the CupsecureplusSmscode field value if set, nil otherwise
// and a boolean to check if the value has been set.
// Deprecated
func (o *CardDetails) GetCupsecureplusSmscodeOk() (*string, bool) {
if o == nil || common.IsNil(o.CupsecureplusSmscode) {
return nil, false
}
return o.CupsecureplusSmscode, true
}
// HasCupsecureplusSmscode returns a boolean if a field has been set.
func (o *CardDetails) HasCupsecureplusSmscode() bool {
if o != nil && !common.IsNil(o.CupsecureplusSmscode) {
return true
}
return false
}
// SetCupsecureplusSmscode gets a reference to the given string and assigns it to the CupsecureplusSmscode field.
// Deprecated
func (o *CardDetails) SetCupsecureplusSmscode(v string) {
o.CupsecureplusSmscode = &v
}
// GetCvc returns the Cvc field value if set, zero value otherwise.
func (o *CardDetails) GetCvc() string {
if o == nil || common.IsNil(o.Cvc) {
var ret string
return ret
}
return *o.Cvc
}
// GetCvcOk returns a tuple with the Cvc field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CardDetails) GetCvcOk() (*string, bool) {
if o == nil || common.IsNil(o.Cvc) {
return nil, false
}
return o.Cvc, true
}
// HasCvc returns a boolean if a field has been set.
func (o *CardDetails) HasCvc() bool {
if o != nil && !common.IsNil(o.Cvc) {
return true
}
return false
}
// SetCvc gets a reference to the given string and assigns it to the Cvc field.
func (o *CardDetails) SetCvc(v string) {
o.Cvc = &v
}
// GetEncryptedCardNumber returns the EncryptedCardNumber field value if set, zero value otherwise.
func (o *CardDetails) GetEncryptedCardNumber() string {
if o == nil || common.IsNil(o.EncryptedCardNumber) {
var ret string
return ret
}
return *o.EncryptedCardNumber
}
// GetEncryptedCardNumberOk returns a tuple with the EncryptedCardNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CardDetails) GetEncryptedCardNumberOk() (*string, bool) {
if o == nil || common.IsNil(o.EncryptedCardNumber) {
return nil, false
}
return o.EncryptedCardNumber, true
}
// HasEncryptedCardNumber returns a boolean if a field has been set.
func (o *CardDetails) HasEncryptedCardNumber() bool {
if o != nil && !common.IsNil(o.EncryptedCardNumber) {
return true
}
return false
}
// SetEncryptedCardNumber gets a reference to the given string and assigns it to the EncryptedCardNumber field.
func (o *CardDetails) SetEncryptedCardNumber(v string) {
o.EncryptedCardNumber = &v
}
// GetEncryptedExpiryMonth returns the EncryptedExpiryMonth field value if set, zero value otherwise.
func (o *CardDetails) GetEncryptedExpiryMonth() string {
if o == nil || common.IsNil(o.EncryptedExpiryMonth) {
var ret string
return ret
}
return *o.EncryptedExpiryMonth
}
// GetEncryptedExpiryMonthOk returns a tuple with the EncryptedExpiryMonth field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CardDetails) GetEncryptedExpiryMonthOk() (*string, bool) {
if o == nil || common.IsNil(o.EncryptedExpiryMonth) {
return nil, false
}
return o.EncryptedExpiryMonth, true
}
// HasEncryptedExpiryMonth returns a boolean if a field has been set.
func (o *CardDetails) HasEncryptedExpiryMonth() bool {
if o != nil && !common.IsNil(o.EncryptedExpiryMonth) {
return true
}
return false
}
// SetEncryptedExpiryMonth gets a reference to the given string and assigns it to the EncryptedExpiryMonth field.
func (o *CardDetails) SetEncryptedExpiryMonth(v string) {
o.EncryptedExpiryMonth = &v
}
// GetEncryptedExpiryYear returns the EncryptedExpiryYear field value if set, zero value otherwise.
func (o *CardDetails) GetEncryptedExpiryYear() string {
if o == nil || common.IsNil(o.EncryptedExpiryYear) {
var ret string
return ret
}
return *o.EncryptedExpiryYear
}
// GetEncryptedExpiryYearOk returns a tuple with the EncryptedExpiryYear field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CardDetails) GetEncryptedExpiryYearOk() (*string, bool) {
if o == nil || common.IsNil(o.EncryptedExpiryYear) {
return nil, false
}
return o.EncryptedExpiryYear, true
}
// HasEncryptedExpiryYear returns a boolean if a field has been set.
func (o *CardDetails) HasEncryptedExpiryYear() bool {
if o != nil && !common.IsNil(o.EncryptedExpiryYear) {
return true
}
return false
}
// SetEncryptedExpiryYear gets a reference to the given string and assigns it to the EncryptedExpiryYear field.
func (o *CardDetails) SetEncryptedExpiryYear(v string) {
o.EncryptedExpiryYear = &v
}
// GetEncryptedSecurityCode returns the EncryptedSecurityCode field value if set, zero value otherwise.
func (o *CardDetails) GetEncryptedSecurityCode() string {
if o == nil || common.IsNil(o.EncryptedSecurityCode) {
var ret string
return ret
}
return *o.EncryptedSecurityCode
}
// GetEncryptedSecurityCodeOk returns a tuple with the EncryptedSecurityCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CardDetails) GetEncryptedSecurityCodeOk() (*string, bool) {
if o == nil || common.IsNil(o.EncryptedSecurityCode) {
return nil, false
}
return o.EncryptedSecurityCode, true
}
// HasEncryptedSecurityCode returns a boolean if a field has been set.
func (o *CardDetails) HasEncryptedSecurityCode() bool {
if o != nil && !common.IsNil(o.EncryptedSecurityCode) {
return true
}
return false
}
// SetEncryptedSecurityCode gets a reference to the given string and assigns it to the EncryptedSecurityCode field.
func (o *CardDetails) SetEncryptedSecurityCode(v string) {
o.EncryptedSecurityCode = &v
}
// GetExpiryMonth returns the ExpiryMonth field value if set, zero value otherwise.
func (o *CardDetails) GetExpiryMonth() string {
if o == nil || common.IsNil(o.ExpiryMonth) {
var ret string
return ret
}
return *o.ExpiryMonth
}
// GetExpiryMonthOk returns a tuple with the ExpiryMonth field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CardDetails) GetExpiryMonthOk() (*string, bool) {
if o == nil || common.IsNil(o.ExpiryMonth) {
return nil, false
}
return o.ExpiryMonth, true
}
// HasExpiryMonth returns a boolean if a field has been set.
func (o *CardDetails) HasExpiryMonth() bool {
if o != nil && !common.IsNil(o.ExpiryMonth) {
return true
}
return false
}
// SetExpiryMonth gets a reference to the given string and assigns it to the ExpiryMonth field.
func (o *CardDetails) SetExpiryMonth(v string) {
o.ExpiryMonth = &v
}
// GetExpiryYear returns the ExpiryYear field value if set, zero value otherwise.
func (o *CardDetails) GetExpiryYear() string {
if o == nil || common.IsNil(o.ExpiryYear) {
var ret string
return ret
}
return *o.ExpiryYear
}
// GetExpiryYearOk returns a tuple with the ExpiryYear field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CardDetails) GetExpiryYearOk() (*string, bool) {
if o == nil || common.IsNil(o.ExpiryYear) {
return nil, false
}
return o.ExpiryYear, true
}
// HasExpiryYear returns a boolean if a field has been set.
func (o *CardDetails) HasExpiryYear() bool {
if o != nil && !common.IsNil(o.ExpiryYear) {
return true
}
return false
}
// SetExpiryYear gets a reference to the given string and assigns it to the ExpiryYear field.
func (o *CardDetails) SetExpiryYear(v string) {
o.ExpiryYear = &v
}
// GetFundingSource returns the FundingSource field value if set, zero value otherwise.
func (o *CardDetails) GetFundingSource() string {
if o == nil || common.IsNil(o.FundingSource) {
var ret string
return ret
}
return *o.FundingSource
}
// GetFundingSourceOk returns a tuple with the FundingSource field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CardDetails) GetFundingSourceOk() (*string, bool) {
if o == nil || common.IsNil(o.FundingSource) {
return nil, false
}
return o.FundingSource, true
}
// HasFundingSource returns a boolean if a field has been set.
func (o *CardDetails) HasFundingSource() bool {
if o != nil && !common.IsNil(o.FundingSource) {
return true
}
return false
}
// SetFundingSource gets a reference to the given string and assigns it to the FundingSource field.
func (o *CardDetails) SetFundingSource(v string) {
o.FundingSource = &v
}
// GetHolderName returns the HolderName field value if set, zero value otherwise.
func (o *CardDetails) GetHolderName() string {
if o == nil || common.IsNil(o.HolderName) {
var ret string
return ret
}
return *o.HolderName
}
// GetHolderNameOk returns a tuple with the HolderName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CardDetails) GetHolderNameOk() (*string, bool) {
if o == nil || common.IsNil(o.HolderName) {
return nil, false
}
return o.HolderName, true
}
// HasHolderName returns a boolean if a field has been set.
func (o *CardDetails) HasHolderName() bool {
if o != nil && !common.IsNil(o.HolderName) {
return true
}
return false
}
// SetHolderName gets a reference to the given string and assigns it to the HolderName field.
func (o *CardDetails) SetHolderName(v string) {
o.HolderName = &v
}
// GetNetworkPaymentReference returns the NetworkPaymentReference field value if set, zero value otherwise.
func (o *CardDetails) GetNetworkPaymentReference() string {
if o == nil || common.IsNil(o.NetworkPaymentReference) {
var ret string
return ret
}
return *o.NetworkPaymentReference
}
// GetNetworkPaymentReferenceOk returns a tuple with the NetworkPaymentReference field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CardDetails) GetNetworkPaymentReferenceOk() (*string, bool) {
if o == nil || common.IsNil(o.NetworkPaymentReference) {
return nil, false
}
return o.NetworkPaymentReference, true
}
// HasNetworkPaymentReference returns a boolean if a field has been set.
func (o *CardDetails) HasNetworkPaymentReference() bool {
if o != nil && !common.IsNil(o.NetworkPaymentReference) {
return true
}
return false
}
// SetNetworkPaymentReference gets a reference to the given string and assigns it to the NetworkPaymentReference field.
func (o *CardDetails) SetNetworkPaymentReference(v string) {
o.NetworkPaymentReference = &v
}
// GetNumber returns the Number field value if set, zero value otherwise.
func (o *CardDetails) GetNumber() string {
if o == nil || common.IsNil(o.Number) {
var ret string
return ret
}
return *o.Number
}
// GetNumberOk returns a tuple with the Number field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CardDetails) GetNumberOk() (*string, bool) {
if o == nil || common.IsNil(o.Number) {
return nil, false
}
return o.Number, true
}
// HasNumber returns a boolean if a field has been set.
func (o *CardDetails) HasNumber() bool {
if o != nil && !common.IsNil(o.Number) {
return true
}
return false
}
// SetNumber gets a reference to the given string and assigns it to the Number field.
func (o *CardDetails) SetNumber(v string) {
o.Number = &v
}
// GetRecurringDetailReference returns the RecurringDetailReference field value if set, zero value otherwise.
// Deprecated
func (o *CardDetails) GetRecurringDetailReference() string {
if o == nil || common.IsNil(o.RecurringDetailReference) {
var ret string
return ret
}
return *o.RecurringDetailReference
}
// GetRecurringDetailReferenceOk returns a tuple with the RecurringDetailReference field value if set, nil otherwise
// and a boolean to check if the value has been set.
// Deprecated
func (o *CardDetails) GetRecurringDetailReferenceOk() (*string, bool) {
if o == nil || common.IsNil(o.RecurringDetailReference) {
return nil, false
}
return o.RecurringDetailReference, true
}
// HasRecurringDetailReference returns a boolean if a field has been set.
func (o *CardDetails) HasRecurringDetailReference() bool {
if o != nil && !common.IsNil(o.RecurringDetailReference) {
return true
}
return false
}
// SetRecurringDetailReference gets a reference to the given string and assigns it to the RecurringDetailReference field.
// Deprecated
func (o *CardDetails) SetRecurringDetailReference(v string) {
o.RecurringDetailReference = &v
}
// GetShopperNotificationReference returns the ShopperNotificationReference field value if set, zero value otherwise.
func (o *CardDetails) GetShopperNotificationReference() string {
if o == nil || common.IsNil(o.ShopperNotificationReference) {
var ret string
return ret
}
return *o.ShopperNotificationReference
}
// GetShopperNotificationReferenceOk returns a tuple with the ShopperNotificationReference field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CardDetails) GetShopperNotificationReferenceOk() (*string, bool) {
if o == nil || common.IsNil(o.ShopperNotificationReference) {
return nil, false
}
return o.ShopperNotificationReference, true
}
// HasShopperNotificationReference returns a boolean if a field has been set.
func (o *CardDetails) HasShopperNotificationReference() bool {
if o != nil && !common.IsNil(o.ShopperNotificationReference) {
return true
}
return false
}
// SetShopperNotificationReference gets a reference to the given string and assigns it to the ShopperNotificationReference field.
func (o *CardDetails) SetShopperNotificationReference(v string) {
o.ShopperNotificationReference = &v
}
// GetStoredPaymentMethodId returns the StoredPaymentMethodId field value if set, zero value otherwise.
func (o *CardDetails) GetStoredPaymentMethodId() string {
if o == nil || common.IsNil(o.StoredPaymentMethodId) {
var ret string
return ret
}
return *o.StoredPaymentMethodId
}
// GetStoredPaymentMethodIdOk returns a tuple with the StoredPaymentMethodId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CardDetails) GetStoredPaymentMethodIdOk() (*string, bool) {
if o == nil || common.IsNil(o.StoredPaymentMethodId) {
return nil, false
}
return o.StoredPaymentMethodId, true
}
// HasStoredPaymentMethodId returns a boolean if a field has been set.
func (o *CardDetails) HasStoredPaymentMethodId() bool {
if o != nil && !common.IsNil(o.StoredPaymentMethodId) {
return true
}
return false
}
// SetStoredPaymentMethodId gets a reference to the given string and assigns it to the StoredPaymentMethodId field.
func (o *CardDetails) SetStoredPaymentMethodId(v string) {
o.StoredPaymentMethodId = &v
}
// GetThreeDS2SdkVersion returns the ThreeDS2SdkVersion field value if set, zero value otherwise.
func (o *CardDetails) GetThreeDS2SdkVersion() string {
if o == nil || common.IsNil(o.ThreeDS2SdkVersion) {
var ret string
return ret
}
return *o.ThreeDS2SdkVersion
}
// GetThreeDS2SdkVersionOk returns a tuple with the ThreeDS2SdkVersion field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CardDetails) GetThreeDS2SdkVersionOk() (*string, bool) {
if o == nil || common.IsNil(o.ThreeDS2SdkVersion) {
return nil, false
}
return o.ThreeDS2SdkVersion, true
}
// HasThreeDS2SdkVersion returns a boolean if a field has been set.
func (o *CardDetails) HasThreeDS2SdkVersion() bool {
if o != nil && !common.IsNil(o.ThreeDS2SdkVersion) {
return true
}
return false
}
// SetThreeDS2SdkVersion gets a reference to the given string and assigns it to the ThreeDS2SdkVersion field.
func (o *CardDetails) SetThreeDS2SdkVersion(v string) {
o.ThreeDS2SdkVersion = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *CardDetails) GetType() string {
if o == nil || common.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 *CardDetails) GetTypeOk() (*string, bool) {
if o == nil || common.IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *CardDetails) HasType() bool {
if o != nil && !common.IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *CardDetails) SetType(v string) {
o.Type = &v
}
func (o CardDetails) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CardDetails) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !common.IsNil(o.Brand) {
toSerialize["brand"] = o.Brand
}
if !common.IsNil(o.CheckoutAttemptId) {
toSerialize["checkoutAttemptId"] = o.CheckoutAttemptId
}
if !common.IsNil(o.CupsecureplusSmscode) {
toSerialize["cupsecureplus.smscode"] = o.CupsecureplusSmscode
}
if !common.IsNil(o.Cvc) {
toSerialize["cvc"] = o.Cvc
}
if !common.IsNil(o.EncryptedCardNumber) {
toSerialize["encryptedCardNumber"] = o.EncryptedCardNumber
}
if !common.IsNil(o.EncryptedExpiryMonth) {
toSerialize["encryptedExpiryMonth"] = o.EncryptedExpiryMonth
}
if !common.IsNil(o.EncryptedExpiryYear) {
toSerialize["encryptedExpiryYear"] = o.EncryptedExpiryYear
}
if !common.IsNil(o.EncryptedSecurityCode) {
toSerialize["encryptedSecurityCode"] = o.EncryptedSecurityCode
}
if !common.IsNil(o.ExpiryMonth) {
toSerialize["expiryMonth"] = o.ExpiryMonth
}
if !common.IsNil(o.ExpiryYear) {
toSerialize["expiryYear"] = o.ExpiryYear
}
if !common.IsNil(o.FundingSource) {
toSerialize["fundingSource"] = o.FundingSource
}
if !common.IsNil(o.HolderName) {
toSerialize["holderName"] = o.HolderName
}
if !common.IsNil(o.NetworkPaymentReference) {
toSerialize["networkPaymentReference"] = o.NetworkPaymentReference
}
if !common.IsNil(o.Number) {
toSerialize["number"] = o.Number
}
if !common.IsNil(o.RecurringDetailReference) {
toSerialize["recurringDetailReference"] = o.RecurringDetailReference
}
if !common.IsNil(o.ShopperNotificationReference) {
toSerialize["shopperNotificationReference"] = o.ShopperNotificationReference
}
if !common.IsNil(o.StoredPaymentMethodId) {
toSerialize["storedPaymentMethodId"] = o.StoredPaymentMethodId
}
if !common.IsNil(o.ThreeDS2SdkVersion) {
toSerialize["threeDS2SdkVersion"] = o.ThreeDS2SdkVersion
}
if !common.IsNil(o.Type) {
toSerialize["type"] = o.Type
}
return toSerialize, nil
}
type NullableCardDetails struct {
value *CardDetails
isSet bool
}
func (v NullableCardDetails) Get() *CardDetails {
return v.value
}
func (v *NullableCardDetails) Set(val *CardDetails) {
v.value = val
v.isSet = true
}
func (v NullableCardDetails) IsSet() bool {
return v.isSet
}
func (v *NullableCardDetails) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCardDetails(val *CardDetails) *NullableCardDetails {
return &NullableCardDetails{value: val, isSet: true}
}
func (v NullableCardDetails) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCardDetails) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
func (o *CardDetails) isValidFundingSource() bool {
var allowedEnumValues = []string{"credit", "debit"}
for _, allowed := range allowedEnumValues {
if o.GetFundingSource() == allowed {
return true
}
}
return false
}
func (o *CardDetails) isValidType() bool {
var allowedEnumValues = []string{"scheme", "networkToken", "card"}
for _, allowed := range allowedEnumValues {
if o.GetType() == allowed {
return true
}
}
return false
}