-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmodel_create_customer_request.go
More file actions
1091 lines (933 loc) · 33.5 KB
/
Copy pathmodel_create_customer_request.go
File metadata and controls
1091 lines (933 loc) · 33.5 KB
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
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
OpenPay API
super charge your subscription management.
API version: 1.2.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package getopenpay
import (
"encoding/json"
"fmt"
)
// checks if the CreateCustomerRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateCustomerRequest{}
// CreateCustomerRequest struct for CreateCustomerRequest
type CreateCustomerRequest struct {
BillingEmail NullableString `json:"billing_email,omitempty"`
BusinessName NullableString `json:"business_name,omitempty"`
City NullableString `json:"city,omitempty"`
Country NullableString `json:"country,omitempty"`
CouponId NullableString `json:"coupon_id,omitempty"`
CustomFields map[string]interface{} `json:"custom_fields,omitempty"`
CustomerBillingAddress NullableCompleteAddress `json:"customer_billing_address,omitempty"`
// The customer’s email address.
Email string `json:"email"`
FirstName NullableString `json:"first_name,omitempty"`
InvoiceSettings NullableCustomerInvoiceSettings `json:"invoice_settings,omitempty"`
Language NullableCustomerLanguage `json:"language,omitempty"`
LastName NullableString `json:"last_name,omitempty"`
Line1 NullableString `json:"line1,omitempty"`
Line2 NullableString `json:"line2,omitempty"`
Line3 NullableString `json:"line3,omitempty"`
Notes NullableString `json:"notes,omitempty"`
PhoneNumber NullableString `json:"phone_number,omitempty"`
PromotionCodeId NullableString `json:"promotion_code_id,omitempty"`
// List of the customer’s shipping addresses.
ShippingAddresses []CompleteAddress `json:"shipping_addresses,omitempty"`
State NullableString `json:"state,omitempty"`
ZipCode NullableString `json:"zip_code,omitempty"`
AdditionalProperties map[string]interface{}
}
type _CreateCustomerRequest CreateCustomerRequest
// NewCreateCustomerRequest instantiates a new CreateCustomerRequest 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 NewCreateCustomerRequest(email string) *CreateCustomerRequest {
this := CreateCustomerRequest{}
this.Email = email
return &this
}
// NewCreateCustomerRequestWithDefaults instantiates a new CreateCustomerRequest 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 NewCreateCustomerRequestWithDefaults() *CreateCustomerRequest {
this := CreateCustomerRequest{}
return &this
}
// GetBillingEmail returns the BillingEmail field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetBillingEmail() string {
if o == nil || IsNil(o.BillingEmail.Get()) {
var ret string
return ret
}
return *o.BillingEmail.Get()
}
// GetBillingEmailOk returns a tuple with the BillingEmail 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 *CreateCustomerRequest) GetBillingEmailOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.BillingEmail.Get(), o.BillingEmail.IsSet()
}
// HasBillingEmail returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasBillingEmail() bool {
if o != nil && o.BillingEmail.IsSet() {
return true
}
return false
}
// SetBillingEmail gets a reference to the given NullableString and assigns it to the BillingEmail field.
func (o *CreateCustomerRequest) SetBillingEmail(v string) {
o.BillingEmail.Set(&v)
}
// SetBillingEmailNil sets the value for BillingEmail to be an explicit nil
func (o *CreateCustomerRequest) SetBillingEmailNil() {
o.BillingEmail.Set(nil)
}
// UnsetBillingEmail ensures that no value is present for BillingEmail, not even an explicit nil
func (o *CreateCustomerRequest) UnsetBillingEmail() {
o.BillingEmail.Unset()
}
// GetBusinessName returns the BusinessName field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetBusinessName() string {
if o == nil || IsNil(o.BusinessName.Get()) {
var ret string
return ret
}
return *o.BusinessName.Get()
}
// GetBusinessNameOk returns a tuple with the BusinessName 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 *CreateCustomerRequest) GetBusinessNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.BusinessName.Get(), o.BusinessName.IsSet()
}
// HasBusinessName returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasBusinessName() bool {
if o != nil && o.BusinessName.IsSet() {
return true
}
return false
}
// SetBusinessName gets a reference to the given NullableString and assigns it to the BusinessName field.
func (o *CreateCustomerRequest) SetBusinessName(v string) {
o.BusinessName.Set(&v)
}
// SetBusinessNameNil sets the value for BusinessName to be an explicit nil
func (o *CreateCustomerRequest) SetBusinessNameNil() {
o.BusinessName.Set(nil)
}
// UnsetBusinessName ensures that no value is present for BusinessName, not even an explicit nil
func (o *CreateCustomerRequest) UnsetBusinessName() {
o.BusinessName.Unset()
}
// GetCity returns the City field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetCity() string {
if o == nil || IsNil(o.City.Get()) {
var ret string
return ret
}
return *o.City.Get()
}
// GetCityOk returns a tuple with the City 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 *CreateCustomerRequest) GetCityOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.City.Get(), o.City.IsSet()
}
// HasCity returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasCity() bool {
if o != nil && o.City.IsSet() {
return true
}
return false
}
// SetCity gets a reference to the given NullableString and assigns it to the City field.
func (o *CreateCustomerRequest) SetCity(v string) {
o.City.Set(&v)
}
// SetCityNil sets the value for City to be an explicit nil
func (o *CreateCustomerRequest) SetCityNil() {
o.City.Set(nil)
}
// UnsetCity ensures that no value is present for City, not even an explicit nil
func (o *CreateCustomerRequest) UnsetCity() {
o.City.Unset()
}
// GetCountry returns the Country field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetCountry() string {
if o == nil || IsNil(o.Country.Get()) {
var ret string
return ret
}
return *o.Country.Get()
}
// GetCountryOk returns a tuple with the Country 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 *CreateCustomerRequest) GetCountryOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Country.Get(), o.Country.IsSet()
}
// HasCountry returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasCountry() bool {
if o != nil && o.Country.IsSet() {
return true
}
return false
}
// SetCountry gets a reference to the given NullableString and assigns it to the Country field.
func (o *CreateCustomerRequest) SetCountry(v string) {
o.Country.Set(&v)
}
// SetCountryNil sets the value for Country to be an explicit nil
func (o *CreateCustomerRequest) SetCountryNil() {
o.Country.Set(nil)
}
// UnsetCountry ensures that no value is present for Country, not even an explicit nil
func (o *CreateCustomerRequest) UnsetCountry() {
o.Country.Unset()
}
// GetCouponId returns the CouponId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetCouponId() string {
if o == nil || IsNil(o.CouponId.Get()) {
var ret string
return ret
}
return *o.CouponId.Get()
}
// GetCouponIdOk returns a tuple with the CouponId 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 *CreateCustomerRequest) GetCouponIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.CouponId.Get(), o.CouponId.IsSet()
}
// HasCouponId returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasCouponId() bool {
if o != nil && o.CouponId.IsSet() {
return true
}
return false
}
// SetCouponId gets a reference to the given NullableString and assigns it to the CouponId field.
func (o *CreateCustomerRequest) SetCouponId(v string) {
o.CouponId.Set(&v)
}
// SetCouponIdNil sets the value for CouponId to be an explicit nil
func (o *CreateCustomerRequest) SetCouponIdNil() {
o.CouponId.Set(nil)
}
// UnsetCouponId ensures that no value is present for CouponId, not even an explicit nil
func (o *CreateCustomerRequest) UnsetCouponId() {
o.CouponId.Unset()
}
// GetCustomFields returns the CustomFields field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetCustomFields() map[string]interface{} {
if o == nil {
var ret map[string]interface{}
return ret
}
return o.CustomFields
}
// GetCustomFieldsOk returns a tuple with the CustomFields 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 *CreateCustomerRequest) GetCustomFieldsOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.CustomFields) {
return map[string]interface{}{}, false
}
return o.CustomFields, true
}
// HasCustomFields returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasCustomFields() bool {
if o != nil && !IsNil(o.CustomFields) {
return true
}
return false
}
// SetCustomFields gets a reference to the given map[string]interface{} and assigns it to the CustomFields field.
func (o *CreateCustomerRequest) SetCustomFields(v map[string]interface{}) {
o.CustomFields = v
}
// GetCustomerBillingAddress returns the CustomerBillingAddress field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetCustomerBillingAddress() CompleteAddress {
if o == nil || IsNil(o.CustomerBillingAddress.Get()) {
var ret CompleteAddress
return ret
}
return *o.CustomerBillingAddress.Get()
}
// GetCustomerBillingAddressOk returns a tuple with the CustomerBillingAddress 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 *CreateCustomerRequest) GetCustomerBillingAddressOk() (*CompleteAddress, bool) {
if o == nil {
return nil, false
}
return o.CustomerBillingAddress.Get(), o.CustomerBillingAddress.IsSet()
}
// HasCustomerBillingAddress returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasCustomerBillingAddress() bool {
if o != nil && o.CustomerBillingAddress.IsSet() {
return true
}
return false
}
// SetCustomerBillingAddress gets a reference to the given NullableCompleteAddress and assigns it to the CustomerBillingAddress field.
func (o *CreateCustomerRequest) SetCustomerBillingAddress(v CompleteAddress) {
o.CustomerBillingAddress.Set(&v)
}
// SetCustomerBillingAddressNil sets the value for CustomerBillingAddress to be an explicit nil
func (o *CreateCustomerRequest) SetCustomerBillingAddressNil() {
o.CustomerBillingAddress.Set(nil)
}
// UnsetCustomerBillingAddress ensures that no value is present for CustomerBillingAddress, not even an explicit nil
func (o *CreateCustomerRequest) UnsetCustomerBillingAddress() {
o.CustomerBillingAddress.Unset()
}
// GetEmail returns the Email field value
func (o *CreateCustomerRequest) GetEmail() string {
if o == nil {
var ret string
return ret
}
return o.Email
}
// GetEmailOk returns a tuple with the Email field value
// and a boolean to check if the value has been set.
func (o *CreateCustomerRequest) GetEmailOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Email, true
}
// SetEmail sets field value
func (o *CreateCustomerRequest) SetEmail(v string) {
o.Email = v
}
// GetFirstName returns the FirstName field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetFirstName() string {
if o == nil || IsNil(o.FirstName.Get()) {
var ret string
return ret
}
return *o.FirstName.Get()
}
// GetFirstNameOk returns a tuple with the FirstName 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 *CreateCustomerRequest) GetFirstNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.FirstName.Get(), o.FirstName.IsSet()
}
// HasFirstName returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasFirstName() bool {
if o != nil && o.FirstName.IsSet() {
return true
}
return false
}
// SetFirstName gets a reference to the given NullableString and assigns it to the FirstName field.
func (o *CreateCustomerRequest) SetFirstName(v string) {
o.FirstName.Set(&v)
}
// SetFirstNameNil sets the value for FirstName to be an explicit nil
func (o *CreateCustomerRequest) SetFirstNameNil() {
o.FirstName.Set(nil)
}
// UnsetFirstName ensures that no value is present for FirstName, not even an explicit nil
func (o *CreateCustomerRequest) UnsetFirstName() {
o.FirstName.Unset()
}
// GetInvoiceSettings returns the InvoiceSettings field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetInvoiceSettings() CustomerInvoiceSettings {
if o == nil || IsNil(o.InvoiceSettings.Get()) {
var ret CustomerInvoiceSettings
return ret
}
return *o.InvoiceSettings.Get()
}
// GetInvoiceSettingsOk returns a tuple with the InvoiceSettings 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 *CreateCustomerRequest) GetInvoiceSettingsOk() (*CustomerInvoiceSettings, bool) {
if o == nil {
return nil, false
}
return o.InvoiceSettings.Get(), o.InvoiceSettings.IsSet()
}
// HasInvoiceSettings returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasInvoiceSettings() bool {
if o != nil && o.InvoiceSettings.IsSet() {
return true
}
return false
}
// SetInvoiceSettings gets a reference to the given NullableCustomerInvoiceSettings and assigns it to the InvoiceSettings field.
func (o *CreateCustomerRequest) SetInvoiceSettings(v CustomerInvoiceSettings) {
o.InvoiceSettings.Set(&v)
}
// SetInvoiceSettingsNil sets the value for InvoiceSettings to be an explicit nil
func (o *CreateCustomerRequest) SetInvoiceSettingsNil() {
o.InvoiceSettings.Set(nil)
}
// UnsetInvoiceSettings ensures that no value is present for InvoiceSettings, not even an explicit nil
func (o *CreateCustomerRequest) UnsetInvoiceSettings() {
o.InvoiceSettings.Unset()
}
// GetLanguage returns the Language field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetLanguage() CustomerLanguage {
if o == nil || IsNil(o.Language.Get()) {
var ret CustomerLanguage
return ret
}
return *o.Language.Get()
}
// GetLanguageOk returns a tuple with the Language 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 *CreateCustomerRequest) GetLanguageOk() (*CustomerLanguage, bool) {
if o == nil {
return nil, false
}
return o.Language.Get(), o.Language.IsSet()
}
// HasLanguage returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasLanguage() bool {
if o != nil && o.Language.IsSet() {
return true
}
return false
}
// SetLanguage gets a reference to the given NullableCustomerLanguage and assigns it to the Language field.
func (o *CreateCustomerRequest) SetLanguage(v CustomerLanguage) {
o.Language.Set(&v)
}
// SetLanguageNil sets the value for Language to be an explicit nil
func (o *CreateCustomerRequest) SetLanguageNil() {
o.Language.Set(nil)
}
// UnsetLanguage ensures that no value is present for Language, not even an explicit nil
func (o *CreateCustomerRequest) UnsetLanguage() {
o.Language.Unset()
}
// GetLastName returns the LastName field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetLastName() string {
if o == nil || IsNil(o.LastName.Get()) {
var ret string
return ret
}
return *o.LastName.Get()
}
// GetLastNameOk returns a tuple with the LastName 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 *CreateCustomerRequest) GetLastNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.LastName.Get(), o.LastName.IsSet()
}
// HasLastName returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasLastName() bool {
if o != nil && o.LastName.IsSet() {
return true
}
return false
}
// SetLastName gets a reference to the given NullableString and assigns it to the LastName field.
func (o *CreateCustomerRequest) SetLastName(v string) {
o.LastName.Set(&v)
}
// SetLastNameNil sets the value for LastName to be an explicit nil
func (o *CreateCustomerRequest) SetLastNameNil() {
o.LastName.Set(nil)
}
// UnsetLastName ensures that no value is present for LastName, not even an explicit nil
func (o *CreateCustomerRequest) UnsetLastName() {
o.LastName.Unset()
}
// GetLine1 returns the Line1 field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetLine1() string {
if o == nil || IsNil(o.Line1.Get()) {
var ret string
return ret
}
return *o.Line1.Get()
}
// GetLine1Ok returns a tuple with the Line1 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 *CreateCustomerRequest) GetLine1Ok() (*string, bool) {
if o == nil {
return nil, false
}
return o.Line1.Get(), o.Line1.IsSet()
}
// HasLine1 returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasLine1() bool {
if o != nil && o.Line1.IsSet() {
return true
}
return false
}
// SetLine1 gets a reference to the given NullableString and assigns it to the Line1 field.
func (o *CreateCustomerRequest) SetLine1(v string) {
o.Line1.Set(&v)
}
// SetLine1Nil sets the value for Line1 to be an explicit nil
func (o *CreateCustomerRequest) SetLine1Nil() {
o.Line1.Set(nil)
}
// UnsetLine1 ensures that no value is present for Line1, not even an explicit nil
func (o *CreateCustomerRequest) UnsetLine1() {
o.Line1.Unset()
}
// GetLine2 returns the Line2 field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetLine2() string {
if o == nil || IsNil(o.Line2.Get()) {
var ret string
return ret
}
return *o.Line2.Get()
}
// GetLine2Ok returns a tuple with the Line2 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 *CreateCustomerRequest) GetLine2Ok() (*string, bool) {
if o == nil {
return nil, false
}
return o.Line2.Get(), o.Line2.IsSet()
}
// HasLine2 returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasLine2() bool {
if o != nil && o.Line2.IsSet() {
return true
}
return false
}
// SetLine2 gets a reference to the given NullableString and assigns it to the Line2 field.
func (o *CreateCustomerRequest) SetLine2(v string) {
o.Line2.Set(&v)
}
// SetLine2Nil sets the value for Line2 to be an explicit nil
func (o *CreateCustomerRequest) SetLine2Nil() {
o.Line2.Set(nil)
}
// UnsetLine2 ensures that no value is present for Line2, not even an explicit nil
func (o *CreateCustomerRequest) UnsetLine2() {
o.Line2.Unset()
}
// GetLine3 returns the Line3 field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetLine3() string {
if o == nil || IsNil(o.Line3.Get()) {
var ret string
return ret
}
return *o.Line3.Get()
}
// GetLine3Ok returns a tuple with the Line3 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 *CreateCustomerRequest) GetLine3Ok() (*string, bool) {
if o == nil {
return nil, false
}
return o.Line3.Get(), o.Line3.IsSet()
}
// HasLine3 returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasLine3() bool {
if o != nil && o.Line3.IsSet() {
return true
}
return false
}
// SetLine3 gets a reference to the given NullableString and assigns it to the Line3 field.
func (o *CreateCustomerRequest) SetLine3(v string) {
o.Line3.Set(&v)
}
// SetLine3Nil sets the value for Line3 to be an explicit nil
func (o *CreateCustomerRequest) SetLine3Nil() {
o.Line3.Set(nil)
}
// UnsetLine3 ensures that no value is present for Line3, not even an explicit nil
func (o *CreateCustomerRequest) UnsetLine3() {
o.Line3.Unset()
}
// GetNotes returns the Notes field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetNotes() string {
if o == nil || IsNil(o.Notes.Get()) {
var ret string
return ret
}
return *o.Notes.Get()
}
// GetNotesOk returns a tuple with the Notes 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 *CreateCustomerRequest) GetNotesOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Notes.Get(), o.Notes.IsSet()
}
// HasNotes returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasNotes() bool {
if o != nil && o.Notes.IsSet() {
return true
}
return false
}
// SetNotes gets a reference to the given NullableString and assigns it to the Notes field.
func (o *CreateCustomerRequest) SetNotes(v string) {
o.Notes.Set(&v)
}
// SetNotesNil sets the value for Notes to be an explicit nil
func (o *CreateCustomerRequest) SetNotesNil() {
o.Notes.Set(nil)
}
// UnsetNotes ensures that no value is present for Notes, not even an explicit nil
func (o *CreateCustomerRequest) UnsetNotes() {
o.Notes.Unset()
}
// GetPhoneNumber returns the PhoneNumber field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetPhoneNumber() string {
if o == nil || IsNil(o.PhoneNumber.Get()) {
var ret string
return ret
}
return *o.PhoneNumber.Get()
}
// GetPhoneNumberOk returns a tuple with the PhoneNumber 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 *CreateCustomerRequest) GetPhoneNumberOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.PhoneNumber.Get(), o.PhoneNumber.IsSet()
}
// HasPhoneNumber returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasPhoneNumber() bool {
if o != nil && o.PhoneNumber.IsSet() {
return true
}
return false
}
// SetPhoneNumber gets a reference to the given NullableString and assigns it to the PhoneNumber field.
func (o *CreateCustomerRequest) SetPhoneNumber(v string) {
o.PhoneNumber.Set(&v)
}
// SetPhoneNumberNil sets the value for PhoneNumber to be an explicit nil
func (o *CreateCustomerRequest) SetPhoneNumberNil() {
o.PhoneNumber.Set(nil)
}
// UnsetPhoneNumber ensures that no value is present for PhoneNumber, not even an explicit nil
func (o *CreateCustomerRequest) UnsetPhoneNumber() {
o.PhoneNumber.Unset()
}
// GetPromotionCodeId returns the PromotionCodeId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetPromotionCodeId() string {
if o == nil || IsNil(o.PromotionCodeId.Get()) {
var ret string
return ret
}
return *o.PromotionCodeId.Get()
}
// GetPromotionCodeIdOk returns a tuple with the PromotionCodeId 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 *CreateCustomerRequest) GetPromotionCodeIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.PromotionCodeId.Get(), o.PromotionCodeId.IsSet()
}
// HasPromotionCodeId returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasPromotionCodeId() bool {
if o != nil && o.PromotionCodeId.IsSet() {
return true
}
return false
}
// SetPromotionCodeId gets a reference to the given NullableString and assigns it to the PromotionCodeId field.
func (o *CreateCustomerRequest) SetPromotionCodeId(v string) {
o.PromotionCodeId.Set(&v)
}
// SetPromotionCodeIdNil sets the value for PromotionCodeId to be an explicit nil
func (o *CreateCustomerRequest) SetPromotionCodeIdNil() {
o.PromotionCodeId.Set(nil)
}
// UnsetPromotionCodeId ensures that no value is present for PromotionCodeId, not even an explicit nil
func (o *CreateCustomerRequest) UnsetPromotionCodeId() {
o.PromotionCodeId.Unset()
}
// GetShippingAddresses returns the ShippingAddresses field value if set, zero value otherwise.
func (o *CreateCustomerRequest) GetShippingAddresses() []CompleteAddress {
if o == nil || IsNil(o.ShippingAddresses) {
var ret []CompleteAddress
return ret
}
return o.ShippingAddresses
}
// GetShippingAddressesOk returns a tuple with the ShippingAddresses field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateCustomerRequest) GetShippingAddressesOk() ([]CompleteAddress, bool) {
if o == nil || IsNil(o.ShippingAddresses) {
return nil, false
}
return o.ShippingAddresses, true
}
// HasShippingAddresses returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasShippingAddresses() bool {
if o != nil && !IsNil(o.ShippingAddresses) {
return true
}
return false
}
// SetShippingAddresses gets a reference to the given []CompleteAddress and assigns it to the ShippingAddresses field.
func (o *CreateCustomerRequest) SetShippingAddresses(v []CompleteAddress) {
o.ShippingAddresses = v
}
// GetState returns the State field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetState() string {
if o == nil || IsNil(o.State.Get()) {
var ret string
return ret
}
return *o.State.Get()
}
// GetStateOk returns a tuple with the State 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 *CreateCustomerRequest) GetStateOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.State.Get(), o.State.IsSet()
}
// HasState returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasState() bool {
if o != nil && o.State.IsSet() {
return true
}
return false
}
// SetState gets a reference to the given NullableString and assigns it to the State field.
func (o *CreateCustomerRequest) SetState(v string) {
o.State.Set(&v)
}
// SetStateNil sets the value for State to be an explicit nil
func (o *CreateCustomerRequest) SetStateNil() {
o.State.Set(nil)
}
// UnsetState ensures that no value is present for State, not even an explicit nil
func (o *CreateCustomerRequest) UnsetState() {
o.State.Unset()
}
// GetZipCode returns the ZipCode field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateCustomerRequest) GetZipCode() string {
if o == nil || IsNil(o.ZipCode.Get()) {
var ret string
return ret
}
return *o.ZipCode.Get()
}
// GetZipCodeOk returns a tuple with the ZipCode 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 *CreateCustomerRequest) GetZipCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ZipCode.Get(), o.ZipCode.IsSet()
}
// HasZipCode returns a boolean if a field has been set.
func (o *CreateCustomerRequest) HasZipCode() bool {
if o != nil && o.ZipCode.IsSet() {
return true
}
return false
}
// SetZipCode gets a reference to the given NullableString and assigns it to the ZipCode field.
func (o *CreateCustomerRequest) SetZipCode(v string) {
o.ZipCode.Set(&v)
}
// SetZipCodeNil sets the value for ZipCode to be an explicit nil
func (o *CreateCustomerRequest) SetZipCodeNil() {
o.ZipCode.Set(nil)
}
// UnsetZipCode ensures that no value is present for ZipCode, not even an explicit nil
func (o *CreateCustomerRequest) UnsetZipCode() {
o.ZipCode.Unset()
}
func (o CreateCustomerRequest) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CreateCustomerRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.BillingEmail.IsSet() {
toSerialize["billing_email"] = o.BillingEmail.Get()
}
if o.BusinessName.IsSet() {
toSerialize["business_name"] = o.BusinessName.Get()
}
if o.City.IsSet() {
toSerialize["city"] = o.City.Get()
}
if o.Country.IsSet() {
toSerialize["country"] = o.Country.Get()
}
if o.CouponId.IsSet() {
toSerialize["coupon_id"] = o.CouponId.Get()
}
if o.CustomFields != nil {
toSerialize["custom_fields"] = o.CustomFields
}
if o.CustomerBillingAddress.IsSet() {
toSerialize["customer_billing_address"] = o.CustomerBillingAddress.Get()
}
toSerialize["email"] = o.Email
if o.FirstName.IsSet() {
toSerialize["first_name"] = o.FirstName.Get()
}
if o.InvoiceSettings.IsSet() {
toSerialize["invoice_settings"] = o.InvoiceSettings.Get()
}
if o.Language.IsSet() {
toSerialize["language"] = o.Language.Get()
}
if o.LastName.IsSet() {
toSerialize["last_name"] = o.LastName.Get()
}
if o.Line1.IsSet() {
toSerialize["line1"] = o.Line1.Get()
}
if o.Line2.IsSet() {
toSerialize["line2"] = o.Line2.Get()
}
if o.Line3.IsSet() {
toSerialize["line3"] = o.Line3.Get()
}
if o.Notes.IsSet() {
toSerialize["notes"] = o.Notes.Get()
}
if o.PhoneNumber.IsSet() {
toSerialize["phone_number"] = o.PhoneNumber.Get()
}
if o.PromotionCodeId.IsSet() {
toSerialize["promotion_code_id"] = o.PromotionCodeId.Get()
}
if !IsNil(o.ShippingAddresses) {
toSerialize["shipping_addresses"] = o.ShippingAddresses
}
if o.State.IsSet() {
toSerialize["state"] = o.State.Get()
}
if o.ZipCode.IsSet() {
toSerialize["zip_code"] = o.ZipCode.Get()
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *CreateCustomerRequest) UnmarshalJSON(data []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"email",
}