-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmodel_customer.go
734 lines (620 loc) · 21 KB
/
model_customer.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
/*
Conekta API
Conekta sdk
API version: 2.1.0
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package conekta
import (
"encoding/json"
"fmt"
)
// checks if the Customer type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Customer{}
// Customer a customer
type Customer struct {
AntifraudInfo NullableCustomerAntifraudInfo `json:"antifraud_info,omitempty"`
// It is a value that allows identifying if the email is corporate or not.
Corporate *bool `json:"corporate,omitempty"`
// It is an undefined value.
CustomReference *string `json:"custom_reference,omitempty"`
// It is a parameter that allows to identify the date of birth of the client.
DateOfBirth *string `json:"date_of_birth,omitempty"`
// An email address is a series of customizable characters followed by a universal Internet symbol, the at symbol (@), the name of a host server, and a web domain ending (.mx, .com, .org, . net, etc).
Email string `json:"email"`
// It is a parameter that allows to identify in the response, the Conekta ID of a payment method (payment_id)
DefaultPaymentSourceId *string `json:"default_payment_source_id,omitempty"`
// It is a parameter that allows to identify in the response, the Conekta ID of the shipping address (shipping_contact)
DefaultShippingContactId *string `json:"default_shipping_contact_id,omitempty"`
FiscalEntities []CustomerFiscalEntitiesRequest `json:"fiscal_entities,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
// Client's name
Name string `json:"name"`
// It is a parameter that allows to identify the national identification number of the client.
NationalId *string `json:"national_id,omitempty"`
// Contains details of the payment methods that the customer has active or has used in Conekta
PaymentSources []CustomerPaymentMethodsRequest `json:"payment_sources,omitempty"`
// Is the customer's phone number
Phone string `json:"phone"`
// Contains the ID of a plan, which could together with name, email and phone create a client directly to a subscription
PlanId *string `json:"plan_id,omitempty"`
// Contains the detail of the shipping addresses that the client has active or has used in Conekta
ShippingContacts []CustomerShippingContacts `json:"shipping_contacts,omitempty"`
Subscription *SubscriptionRequest `json:"subscription,omitempty"`
AdditionalProperties map[string]interface{}
}
type _Customer Customer
// NewCustomer instantiates a new Customer 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 NewCustomer(email string, name string, phone string) *Customer {
this := Customer{}
var corporate bool = false
this.Corporate = &corporate
this.Email = email
this.Name = name
this.Phone = phone
return &this
}
// NewCustomerWithDefaults instantiates a new Customer 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 NewCustomerWithDefaults() *Customer {
this := Customer{}
var corporate bool = false
this.Corporate = &corporate
return &this
}
// GetAntifraudInfo returns the AntifraudInfo field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Customer) GetAntifraudInfo() CustomerAntifraudInfo {
if o == nil || IsNil(o.AntifraudInfo.Get()) {
var ret CustomerAntifraudInfo
return ret
}
return *o.AntifraudInfo.Get()
}
// GetAntifraudInfoOk returns a tuple with the AntifraudInfo 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 *Customer) GetAntifraudInfoOk() (*CustomerAntifraudInfo, bool) {
if o == nil {
return nil, false
}
return o.AntifraudInfo.Get(), o.AntifraudInfo.IsSet()
}
// HasAntifraudInfo returns a boolean if a field has been set.
func (o *Customer) HasAntifraudInfo() bool {
if o != nil && o.AntifraudInfo.IsSet() {
return true
}
return false
}
// SetAntifraudInfo gets a reference to the given NullableCustomerAntifraudInfo and assigns it to the AntifraudInfo field.
func (o *Customer) SetAntifraudInfo(v CustomerAntifraudInfo) {
o.AntifraudInfo.Set(&v)
}
// SetAntifraudInfoNil sets the value for AntifraudInfo to be an explicit nil
func (o *Customer) SetAntifraudInfoNil() {
o.AntifraudInfo.Set(nil)
}
// UnsetAntifraudInfo ensures that no value is present for AntifraudInfo, not even an explicit nil
func (o *Customer) UnsetAntifraudInfo() {
o.AntifraudInfo.Unset()
}
// GetCorporate returns the Corporate field value if set, zero value otherwise.
func (o *Customer) GetCorporate() bool {
if o == nil || IsNil(o.Corporate) {
var ret bool
return ret
}
return *o.Corporate
}
// GetCorporateOk returns a tuple with the Corporate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Customer) GetCorporateOk() (*bool, bool) {
if o == nil || IsNil(o.Corporate) {
return nil, false
}
return o.Corporate, true
}
// HasCorporate returns a boolean if a field has been set.
func (o *Customer) HasCorporate() bool {
if o != nil && !IsNil(o.Corporate) {
return true
}
return false
}
// SetCorporate gets a reference to the given bool and assigns it to the Corporate field.
func (o *Customer) SetCorporate(v bool) {
o.Corporate = &v
}
// GetCustomReference returns the CustomReference field value if set, zero value otherwise.
func (o *Customer) GetCustomReference() string {
if o == nil || IsNil(o.CustomReference) {
var ret string
return ret
}
return *o.CustomReference
}
// GetCustomReferenceOk returns a tuple with the CustomReference field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Customer) GetCustomReferenceOk() (*string, bool) {
if o == nil || IsNil(o.CustomReference) {
return nil, false
}
return o.CustomReference, true
}
// HasCustomReference returns a boolean if a field has been set.
func (o *Customer) HasCustomReference() bool {
if o != nil && !IsNil(o.CustomReference) {
return true
}
return false
}
// SetCustomReference gets a reference to the given string and assigns it to the CustomReference field.
func (o *Customer) SetCustomReference(v string) {
o.CustomReference = &v
}
// GetDateOfBirth returns the DateOfBirth field value if set, zero value otherwise.
func (o *Customer) GetDateOfBirth() string {
if o == nil || IsNil(o.DateOfBirth) {
var ret string
return ret
}
return *o.DateOfBirth
}
// GetDateOfBirthOk returns a tuple with the DateOfBirth field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Customer) GetDateOfBirthOk() (*string, bool) {
if o == nil || IsNil(o.DateOfBirth) {
return nil, false
}
return o.DateOfBirth, true
}
// HasDateOfBirth returns a boolean if a field has been set.
func (o *Customer) HasDateOfBirth() bool {
if o != nil && !IsNil(o.DateOfBirth) {
return true
}
return false
}
// SetDateOfBirth gets a reference to the given string and assigns it to the DateOfBirth field.
func (o *Customer) SetDateOfBirth(v string) {
o.DateOfBirth = &v
}
// GetEmail returns the Email field value
func (o *Customer) 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 *Customer) GetEmailOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Email, true
}
// SetEmail sets field value
func (o *Customer) SetEmail(v string) {
o.Email = v
}
// GetDefaultPaymentSourceId returns the DefaultPaymentSourceId field value if set, zero value otherwise.
func (o *Customer) GetDefaultPaymentSourceId() string {
if o == nil || IsNil(o.DefaultPaymentSourceId) {
var ret string
return ret
}
return *o.DefaultPaymentSourceId
}
// GetDefaultPaymentSourceIdOk returns a tuple with the DefaultPaymentSourceId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Customer) GetDefaultPaymentSourceIdOk() (*string, bool) {
if o == nil || IsNil(o.DefaultPaymentSourceId) {
return nil, false
}
return o.DefaultPaymentSourceId, true
}
// HasDefaultPaymentSourceId returns a boolean if a field has been set.
func (o *Customer) HasDefaultPaymentSourceId() bool {
if o != nil && !IsNil(o.DefaultPaymentSourceId) {
return true
}
return false
}
// SetDefaultPaymentSourceId gets a reference to the given string and assigns it to the DefaultPaymentSourceId field.
func (o *Customer) SetDefaultPaymentSourceId(v string) {
o.DefaultPaymentSourceId = &v
}
// GetDefaultShippingContactId returns the DefaultShippingContactId field value if set, zero value otherwise.
func (o *Customer) GetDefaultShippingContactId() string {
if o == nil || IsNil(o.DefaultShippingContactId) {
var ret string
return ret
}
return *o.DefaultShippingContactId
}
// GetDefaultShippingContactIdOk returns a tuple with the DefaultShippingContactId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Customer) GetDefaultShippingContactIdOk() (*string, bool) {
if o == nil || IsNil(o.DefaultShippingContactId) {
return nil, false
}
return o.DefaultShippingContactId, true
}
// HasDefaultShippingContactId returns a boolean if a field has been set.
func (o *Customer) HasDefaultShippingContactId() bool {
if o != nil && !IsNil(o.DefaultShippingContactId) {
return true
}
return false
}
// SetDefaultShippingContactId gets a reference to the given string and assigns it to the DefaultShippingContactId field.
func (o *Customer) SetDefaultShippingContactId(v string) {
o.DefaultShippingContactId = &v
}
// GetFiscalEntities returns the FiscalEntities field value if set, zero value otherwise.
func (o *Customer) GetFiscalEntities() []CustomerFiscalEntitiesRequest {
if o == nil || IsNil(o.FiscalEntities) {
var ret []CustomerFiscalEntitiesRequest
return ret
}
return o.FiscalEntities
}
// GetFiscalEntitiesOk returns a tuple with the FiscalEntities field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Customer) GetFiscalEntitiesOk() ([]CustomerFiscalEntitiesRequest, bool) {
if o == nil || IsNil(o.FiscalEntities) {
return nil, false
}
return o.FiscalEntities, true
}
// HasFiscalEntities returns a boolean if a field has been set.
func (o *Customer) HasFiscalEntities() bool {
if o != nil && !IsNil(o.FiscalEntities) {
return true
}
return false
}
// SetFiscalEntities gets a reference to the given []CustomerFiscalEntitiesRequest and assigns it to the FiscalEntities field.
func (o *Customer) SetFiscalEntities(v []CustomerFiscalEntitiesRequest) {
o.FiscalEntities = v
}
// GetMetadata returns the Metadata field value if set, zero value otherwise.
func (o *Customer) GetMetadata() map[string]interface{} {
if o == nil || IsNil(o.Metadata) {
var ret map[string]interface{}
return ret
}
return o.Metadata
}
// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Customer) GetMetadataOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.Metadata) {
return map[string]interface{}{}, false
}
return o.Metadata, true
}
// HasMetadata returns a boolean if a field has been set.
func (o *Customer) HasMetadata() bool {
if o != nil && !IsNil(o.Metadata) {
return true
}
return false
}
// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field.
func (o *Customer) SetMetadata(v map[string]interface{}) {
o.Metadata = v
}
// GetName returns the Name field value
func (o *Customer) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *Customer) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *Customer) SetName(v string) {
o.Name = v
}
// GetNationalId returns the NationalId field value if set, zero value otherwise.
func (o *Customer) GetNationalId() string {
if o == nil || IsNil(o.NationalId) {
var ret string
return ret
}
return *o.NationalId
}
// GetNationalIdOk returns a tuple with the NationalId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Customer) GetNationalIdOk() (*string, bool) {
if o == nil || IsNil(o.NationalId) {
return nil, false
}
return o.NationalId, true
}
// HasNationalId returns a boolean if a field has been set.
func (o *Customer) HasNationalId() bool {
if o != nil && !IsNil(o.NationalId) {
return true
}
return false
}
// SetNationalId gets a reference to the given string and assigns it to the NationalId field.
func (o *Customer) SetNationalId(v string) {
o.NationalId = &v
}
// GetPaymentSources returns the PaymentSources field value if set, zero value otherwise.
func (o *Customer) GetPaymentSources() []CustomerPaymentMethodsRequest {
if o == nil || IsNil(o.PaymentSources) {
var ret []CustomerPaymentMethodsRequest
return ret
}
return o.PaymentSources
}
// GetPaymentSourcesOk returns a tuple with the PaymentSources field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Customer) GetPaymentSourcesOk() ([]CustomerPaymentMethodsRequest, bool) {
if o == nil || IsNil(o.PaymentSources) {
return nil, false
}
return o.PaymentSources, true
}
// HasPaymentSources returns a boolean if a field has been set.
func (o *Customer) HasPaymentSources() bool {
if o != nil && !IsNil(o.PaymentSources) {
return true
}
return false
}
// SetPaymentSources gets a reference to the given []CustomerPaymentMethodsRequest and assigns it to the PaymentSources field.
func (o *Customer) SetPaymentSources(v []CustomerPaymentMethodsRequest) {
o.PaymentSources = v
}
// GetPhone returns the Phone field value
func (o *Customer) GetPhone() string {
if o == nil {
var ret string
return ret
}
return o.Phone
}
// GetPhoneOk returns a tuple with the Phone field value
// and a boolean to check if the value has been set.
func (o *Customer) GetPhoneOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Phone, true
}
// SetPhone sets field value
func (o *Customer) SetPhone(v string) {
o.Phone = v
}
// GetPlanId returns the PlanId field value if set, zero value otherwise.
func (o *Customer) GetPlanId() string {
if o == nil || IsNil(o.PlanId) {
var ret string
return ret
}
return *o.PlanId
}
// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Customer) GetPlanIdOk() (*string, bool) {
if o == nil || IsNil(o.PlanId) {
return nil, false
}
return o.PlanId, true
}
// HasPlanId returns a boolean if a field has been set.
func (o *Customer) HasPlanId() bool {
if o != nil && !IsNil(o.PlanId) {
return true
}
return false
}
// SetPlanId gets a reference to the given string and assigns it to the PlanId field.
func (o *Customer) SetPlanId(v string) {
o.PlanId = &v
}
// GetShippingContacts returns the ShippingContacts field value if set, zero value otherwise.
func (o *Customer) GetShippingContacts() []CustomerShippingContacts {
if o == nil || IsNil(o.ShippingContacts) {
var ret []CustomerShippingContacts
return ret
}
return o.ShippingContacts
}
// GetShippingContactsOk returns a tuple with the ShippingContacts field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Customer) GetShippingContactsOk() ([]CustomerShippingContacts, bool) {
if o == nil || IsNil(o.ShippingContacts) {
return nil, false
}
return o.ShippingContacts, true
}
// HasShippingContacts returns a boolean if a field has been set.
func (o *Customer) HasShippingContacts() bool {
if o != nil && !IsNil(o.ShippingContacts) {
return true
}
return false
}
// SetShippingContacts gets a reference to the given []CustomerShippingContacts and assigns it to the ShippingContacts field.
func (o *Customer) SetShippingContacts(v []CustomerShippingContacts) {
o.ShippingContacts = v
}
// GetSubscription returns the Subscription field value if set, zero value otherwise.
func (o *Customer) GetSubscription() SubscriptionRequest {
if o == nil || IsNil(o.Subscription) {
var ret SubscriptionRequest
return ret
}
return *o.Subscription
}
// GetSubscriptionOk returns a tuple with the Subscription field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Customer) GetSubscriptionOk() (*SubscriptionRequest, bool) {
if o == nil || IsNil(o.Subscription) {
return nil, false
}
return o.Subscription, true
}
// HasSubscription returns a boolean if a field has been set.
func (o *Customer) HasSubscription() bool {
if o != nil && !IsNil(o.Subscription) {
return true
}
return false
}
// SetSubscription gets a reference to the given SubscriptionRequest and assigns it to the Subscription field.
func (o *Customer) SetSubscription(v SubscriptionRequest) {
o.Subscription = &v
}
func (o Customer) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Customer) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.AntifraudInfo.IsSet() {
toSerialize["antifraud_info"] = o.AntifraudInfo.Get()
}
if !IsNil(o.Corporate) {
toSerialize["corporate"] = o.Corporate
}
if !IsNil(o.CustomReference) {
toSerialize["custom_reference"] = o.CustomReference
}
if !IsNil(o.DateOfBirth) {
toSerialize["date_of_birth"] = o.DateOfBirth
}
toSerialize["email"] = o.Email
if !IsNil(o.DefaultPaymentSourceId) {
toSerialize["default_payment_source_id"] = o.DefaultPaymentSourceId
}
if !IsNil(o.DefaultShippingContactId) {
toSerialize["default_shipping_contact_id"] = o.DefaultShippingContactId
}
if !IsNil(o.FiscalEntities) {
toSerialize["fiscal_entities"] = o.FiscalEntities
}
if !IsNil(o.Metadata) {
toSerialize["metadata"] = o.Metadata
}
toSerialize["name"] = o.Name
if !IsNil(o.NationalId) {
toSerialize["national_id"] = o.NationalId
}
if !IsNil(o.PaymentSources) {
toSerialize["payment_sources"] = o.PaymentSources
}
toSerialize["phone"] = o.Phone
if !IsNil(o.PlanId) {
toSerialize["plan_id"] = o.PlanId
}
if !IsNil(o.ShippingContacts) {
toSerialize["shipping_contacts"] = o.ShippingContacts
}
if !IsNil(o.Subscription) {
toSerialize["subscription"] = o.Subscription
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *Customer) 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",
"name",
"phone",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(data, &allProperties)
if err != nil {
return err;
}
for _, requiredProperty := range(requiredProperties) {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varCustomer := _Customer{}
err = json.Unmarshal(data, &varCustomer)
if err != nil {
return err
}
*o = Customer(varCustomer)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "antifraud_info")
delete(additionalProperties, "corporate")
delete(additionalProperties, "custom_reference")
delete(additionalProperties, "date_of_birth")
delete(additionalProperties, "email")
delete(additionalProperties, "default_payment_source_id")
delete(additionalProperties, "default_shipping_contact_id")
delete(additionalProperties, "fiscal_entities")
delete(additionalProperties, "metadata")
delete(additionalProperties, "name")
delete(additionalProperties, "national_id")
delete(additionalProperties, "payment_sources")
delete(additionalProperties, "phone")
delete(additionalProperties, "plan_id")
delete(additionalProperties, "shipping_contacts")
delete(additionalProperties, "subscription")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableCustomer struct {
value *Customer
isSet bool
}
func (v NullableCustomer) Get() *Customer {
return v.value
}
func (v *NullableCustomer) Set(val *Customer) {
v.value = val
v.isSet = true
}
func (v NullableCustomer) IsSet() bool {
return v.isSet
}
func (v *NullableCustomer) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCustomer(val *Customer) *NullableCustomer {
return &NullableCustomer{value: val, isSet: true}
}
func (v NullableCustomer) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCustomer) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}