-
Notifications
You must be signed in to change notification settings - Fork 3
/
model_order_entity.go
723 lines (616 loc) · 20.2 KB
/
model_order_entity.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
/*
Cashfree Payment Gateway APIs
Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites.
API version: 2022-09-01
Contact: developers@cashfree.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package cashfree_pg
import (
"encoding/json"
"time"
)
// checks if the OrderEntity type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &OrderEntity{}
// OrderEntity The complete order entity
type OrderEntity struct {
// unique id generated by cashfree for your order
CfOrderId *int64 `json:"cf_order_id,omitempty"`
// order_id sent during the api request
OrderId *string `json:"order_id,omitempty"`
// Type of the entity.
Entity *string `json:"entity,omitempty"`
// Currency of the order. Example INR
OrderCurrency *string `json:"order_currency,omitempty"`
OrderAmount *float32 `json:"order_amount,omitempty"`
// Possible values are - `ACTIVE`: Order does not have a sucessful transaction yet - `PAID`: Order is PAID with one successful transaction - `EXPIRED`: Order was not PAID and not it has expired. No transaction can be initiated for an EXPIRED order.
OrderStatus *string `json:"order_status,omitempty"`
PaymentSessionId *string `json:"payment_session_id,omitempty"`
OrderExpiryTime *time.Time `json:"order_expiry_time,omitempty"`
// Additional note for order
OrderNote NullableString `json:"order_note,omitempty"`
// When the order was created at cashfree's server
CreatedAt *time.Time `json:"created_at,omitempty"`
OrderSplits []VendorSplit `json:"order_splits,omitempty"`
CustomerDetails *CustomerDetails `json:"customer_details,omitempty"`
OrderMeta *OrderMeta `json:"order_meta,omitempty"`
Payments *PaymentURLObject `json:"payments,omitempty"`
Settlements *SettlementURLObject `json:"settlements,omitempty"`
Refunds *RefundURLObject `json:"refunds,omitempty"`
// Custom Tags in thr form of {\"key\":\"value\"} which can be passed for an order. A maximum of 10 tags can be added
OrderTags map[string]string `json:"order_tags,omitempty"`
}
// NewOrderEntity instantiates a new OrderEntity 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 NewOrderEntity() *OrderEntity {
this := OrderEntity{}
return &this
}
// NewOrderEntityWithDefaults instantiates a new OrderEntity 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 NewOrderEntityWithDefaults() *OrderEntity {
this := OrderEntity{}
return &this
}
// GetCfOrderId returns the CfOrderId field value if set, zero value otherwise.
func (o *OrderEntity) GetCfOrderId() int64 {
if o == nil || IsNil(o.CfOrderId) {
var ret int64
return ret
}
return *o.CfOrderId
}
// GetCfOrderIdOk returns a tuple with the CfOrderId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderEntity) GetCfOrderIdOk() (*int64, bool) {
if o == nil || IsNil(o.CfOrderId) {
return nil, false
}
return o.CfOrderId, true
}
// HasCfOrderId returns a boolean if a field has been set.
func (o *OrderEntity) HasCfOrderId() bool {
if o != nil && !IsNil(o.CfOrderId) {
return true
}
return false
}
// SetCfOrderId gets a reference to the given int64 and assigns it to the CfOrderId field.
func (o *OrderEntity) SetCfOrderId(v int64) {
o.CfOrderId = &v
}
// GetOrderId returns the OrderId field value if set, zero value otherwise.
func (o *OrderEntity) GetOrderId() string {
if o == nil || IsNil(o.OrderId) {
var ret string
return ret
}
return *o.OrderId
}
// GetOrderIdOk returns a tuple with the OrderId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderEntity) GetOrderIdOk() (*string, bool) {
if o == nil || IsNil(o.OrderId) {
return nil, false
}
return o.OrderId, true
}
// HasOrderId returns a boolean if a field has been set.
func (o *OrderEntity) HasOrderId() bool {
if o != nil && !IsNil(o.OrderId) {
return true
}
return false
}
// SetOrderId gets a reference to the given string and assigns it to the OrderId field.
func (o *OrderEntity) SetOrderId(v string) {
o.OrderId = &v
}
// GetEntity returns the Entity field value if set, zero value otherwise.
func (o *OrderEntity) GetEntity() string {
if o == nil || IsNil(o.Entity) {
var ret string
return ret
}
return *o.Entity
}
// GetEntityOk returns a tuple with the Entity field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderEntity) GetEntityOk() (*string, bool) {
if o == nil || IsNil(o.Entity) {
return nil, false
}
return o.Entity, true
}
// HasEntity returns a boolean if a field has been set.
func (o *OrderEntity) HasEntity() bool {
if o != nil && !IsNil(o.Entity) {
return true
}
return false
}
// SetEntity gets a reference to the given string and assigns it to the Entity field.
func (o *OrderEntity) SetEntity(v string) {
o.Entity = &v
}
// GetOrderCurrency returns the OrderCurrency field value if set, zero value otherwise.
func (o *OrderEntity) GetOrderCurrency() string {
if o == nil || IsNil(o.OrderCurrency) {
var ret string
return ret
}
return *o.OrderCurrency
}
// GetOrderCurrencyOk returns a tuple with the OrderCurrency field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderEntity) GetOrderCurrencyOk() (*string, bool) {
if o == nil || IsNil(o.OrderCurrency) {
return nil, false
}
return o.OrderCurrency, true
}
// HasOrderCurrency returns a boolean if a field has been set.
func (o *OrderEntity) HasOrderCurrency() bool {
if o != nil && !IsNil(o.OrderCurrency) {
return true
}
return false
}
// SetOrderCurrency gets a reference to the given string and assigns it to the OrderCurrency field.
func (o *OrderEntity) SetOrderCurrency(v string) {
o.OrderCurrency = &v
}
// GetOrderAmount returns the OrderAmount field value if set, zero value otherwise.
func (o *OrderEntity) GetOrderAmount() float32 {
if o == nil || IsNil(o.OrderAmount) {
var ret float32
return ret
}
return *o.OrderAmount
}
// GetOrderAmountOk returns a tuple with the OrderAmount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderEntity) GetOrderAmountOk() (*float32, bool) {
if o == nil || IsNil(o.OrderAmount) {
return nil, false
}
return o.OrderAmount, true
}
// HasOrderAmount returns a boolean if a field has been set.
func (o *OrderEntity) HasOrderAmount() bool {
if o != nil && !IsNil(o.OrderAmount) {
return true
}
return false
}
// SetOrderAmount gets a reference to the given float32 and assigns it to the OrderAmount field.
func (o *OrderEntity) SetOrderAmount(v float32) {
o.OrderAmount = &v
}
// GetOrderStatus returns the OrderStatus field value if set, zero value otherwise.
func (o *OrderEntity) GetOrderStatus() string {
if o == nil || IsNil(o.OrderStatus) {
var ret string
return ret
}
return *o.OrderStatus
}
// GetOrderStatusOk returns a tuple with the OrderStatus field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderEntity) GetOrderStatusOk() (*string, bool) {
if o == nil || IsNil(o.OrderStatus) {
return nil, false
}
return o.OrderStatus, true
}
// HasOrderStatus returns a boolean if a field has been set.
func (o *OrderEntity) HasOrderStatus() bool {
if o != nil && !IsNil(o.OrderStatus) {
return true
}
return false
}
// SetOrderStatus gets a reference to the given string and assigns it to the OrderStatus field.
func (o *OrderEntity) SetOrderStatus(v string) {
o.OrderStatus = &v
}
// GetPaymentSessionId returns the PaymentSessionId field value if set, zero value otherwise.
func (o *OrderEntity) GetPaymentSessionId() string {
if o == nil || IsNil(o.PaymentSessionId) {
var ret string
return ret
}
return *o.PaymentSessionId
}
// GetPaymentSessionIdOk returns a tuple with the PaymentSessionId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderEntity) GetPaymentSessionIdOk() (*string, bool) {
if o == nil || IsNil(o.PaymentSessionId) {
return nil, false
}
return o.PaymentSessionId, true
}
// HasPaymentSessionId returns a boolean if a field has been set.
func (o *OrderEntity) HasPaymentSessionId() bool {
if o != nil && !IsNil(o.PaymentSessionId) {
return true
}
return false
}
// SetPaymentSessionId gets a reference to the given string and assigns it to the PaymentSessionId field.
func (o *OrderEntity) SetPaymentSessionId(v string) {
o.PaymentSessionId = &v
}
// GetOrderExpiryTime returns the OrderExpiryTime field value if set, zero value otherwise.
func (o *OrderEntity) GetOrderExpiryTime() time.Time {
if o == nil || IsNil(o.OrderExpiryTime) {
var ret time.Time
return ret
}
return *o.OrderExpiryTime
}
// GetOrderExpiryTimeOk returns a tuple with the OrderExpiryTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderEntity) GetOrderExpiryTimeOk() (*time.Time, bool) {
if o == nil || IsNil(o.OrderExpiryTime) {
return nil, false
}
return o.OrderExpiryTime, true
}
// HasOrderExpiryTime returns a boolean if a field has been set.
func (o *OrderEntity) HasOrderExpiryTime() bool {
if o != nil && !IsNil(o.OrderExpiryTime) {
return true
}
return false
}
// SetOrderExpiryTime gets a reference to the given time.Time and assigns it to the OrderExpiryTime field.
func (o *OrderEntity) SetOrderExpiryTime(v time.Time) {
o.OrderExpiryTime = &v
}
// GetOrderNote returns the OrderNote field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *OrderEntity) GetOrderNote() string {
if o == nil || IsNil(o.OrderNote.Get()) {
var ret string
return ret
}
return *o.OrderNote.Get()
}
// GetOrderNoteOk returns a tuple with the OrderNote 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 *OrderEntity) GetOrderNoteOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.OrderNote.Get(), o.OrderNote.IsSet()
}
// HasOrderNote returns a boolean if a field has been set.
func (o *OrderEntity) HasOrderNote() bool {
if o != nil && o.OrderNote.IsSet() {
return true
}
return false
}
// SetOrderNote gets a reference to the given NullableString and assigns it to the OrderNote field.
func (o *OrderEntity) SetOrderNote(v string) {
o.OrderNote.Set(&v)
}
// SetOrderNoteNil sets the value for OrderNote to be an explicit nil
func (o *OrderEntity) SetOrderNoteNil() {
o.OrderNote.Set(nil)
}
// UnsetOrderNote ensures that no value is present for OrderNote, not even an explicit nil
func (o *OrderEntity) UnsetOrderNote() {
o.OrderNote.Unset()
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *OrderEntity) GetCreatedAt() time.Time {
if o == nil || IsNil(o.CreatedAt) {
var ret time.Time
return ret
}
return *o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderEntity) GetCreatedAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.CreatedAt) {
return nil, false
}
return o.CreatedAt, true
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *OrderEntity) HasCreatedAt() bool {
if o != nil && !IsNil(o.CreatedAt) {
return true
}
return false
}
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
func (o *OrderEntity) SetCreatedAt(v time.Time) {
o.CreatedAt = &v
}
// GetOrderSplits returns the OrderSplits field value if set, zero value otherwise.
func (o *OrderEntity) GetOrderSplits() []VendorSplit {
if o == nil || IsNil(o.OrderSplits) {
var ret []VendorSplit
return ret
}
return o.OrderSplits
}
// GetOrderSplitsOk returns a tuple with the OrderSplits field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderEntity) GetOrderSplitsOk() ([]VendorSplit, bool) {
if o == nil || IsNil(o.OrderSplits) {
return nil, false
}
return o.OrderSplits, true
}
// HasOrderSplits returns a boolean if a field has been set.
func (o *OrderEntity) HasOrderSplits() bool {
if o != nil && !IsNil(o.OrderSplits) {
return true
}
return false
}
// SetOrderSplits gets a reference to the given []VendorSplit and assigns it to the OrderSplits field.
func (o *OrderEntity) SetOrderSplits(v []VendorSplit) {
o.OrderSplits = v
}
// GetCustomerDetails returns the CustomerDetails field value if set, zero value otherwise.
func (o *OrderEntity) GetCustomerDetails() CustomerDetails {
if o == nil || IsNil(o.CustomerDetails) {
var ret CustomerDetails
return ret
}
return *o.CustomerDetails
}
// GetCustomerDetailsOk returns a tuple with the CustomerDetails field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderEntity) GetCustomerDetailsOk() (*CustomerDetails, bool) {
if o == nil || IsNil(o.CustomerDetails) {
return nil, false
}
return o.CustomerDetails, true
}
// HasCustomerDetails returns a boolean if a field has been set.
func (o *OrderEntity) HasCustomerDetails() bool {
if o != nil && !IsNil(o.CustomerDetails) {
return true
}
return false
}
// SetCustomerDetails gets a reference to the given CustomerDetails and assigns it to the CustomerDetails field.
func (o *OrderEntity) SetCustomerDetails(v CustomerDetails) {
o.CustomerDetails = &v
}
// GetOrderMeta returns the OrderMeta field value if set, zero value otherwise.
func (o *OrderEntity) GetOrderMeta() OrderMeta {
if o == nil || IsNil(o.OrderMeta) {
var ret OrderMeta
return ret
}
return *o.OrderMeta
}
// GetOrderMetaOk returns a tuple with the OrderMeta field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderEntity) GetOrderMetaOk() (*OrderMeta, bool) {
if o == nil || IsNil(o.OrderMeta) {
return nil, false
}
return o.OrderMeta, true
}
// HasOrderMeta returns a boolean if a field has been set.
func (o *OrderEntity) HasOrderMeta() bool {
if o != nil && !IsNil(o.OrderMeta) {
return true
}
return false
}
// SetOrderMeta gets a reference to the given OrderMeta and assigns it to the OrderMeta field.
func (o *OrderEntity) SetOrderMeta(v OrderMeta) {
o.OrderMeta = &v
}
// GetPayments returns the Payments field value if set, zero value otherwise.
func (o *OrderEntity) GetPayments() PaymentURLObject {
if o == nil || IsNil(o.Payments) {
var ret PaymentURLObject
return ret
}
return *o.Payments
}
// GetPaymentsOk returns a tuple with the Payments field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderEntity) GetPaymentsOk() (*PaymentURLObject, bool) {
if o == nil || IsNil(o.Payments) {
return nil, false
}
return o.Payments, true
}
// HasPayments returns a boolean if a field has been set.
func (o *OrderEntity) HasPayments() bool {
if o != nil && !IsNil(o.Payments) {
return true
}
return false
}
// SetPayments gets a reference to the given PaymentURLObject and assigns it to the Payments field.
func (o *OrderEntity) SetPayments(v PaymentURLObject) {
o.Payments = &v
}
// GetSettlements returns the Settlements field value if set, zero value otherwise.
func (o *OrderEntity) GetSettlements() SettlementURLObject {
if o == nil || IsNil(o.Settlements) {
var ret SettlementURLObject
return ret
}
return *o.Settlements
}
// GetSettlementsOk returns a tuple with the Settlements field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderEntity) GetSettlementsOk() (*SettlementURLObject, bool) {
if o == nil || IsNil(o.Settlements) {
return nil, false
}
return o.Settlements, true
}
// HasSettlements returns a boolean if a field has been set.
func (o *OrderEntity) HasSettlements() bool {
if o != nil && !IsNil(o.Settlements) {
return true
}
return false
}
// SetSettlements gets a reference to the given SettlementURLObject and assigns it to the Settlements field.
func (o *OrderEntity) SetSettlements(v SettlementURLObject) {
o.Settlements = &v
}
// GetRefunds returns the Refunds field value if set, zero value otherwise.
func (o *OrderEntity) GetRefunds() RefundURLObject {
if o == nil || IsNil(o.Refunds) {
var ret RefundURLObject
return ret
}
return *o.Refunds
}
// GetRefundsOk returns a tuple with the Refunds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderEntity) GetRefundsOk() (*RefundURLObject, bool) {
if o == nil || IsNil(o.Refunds) {
return nil, false
}
return o.Refunds, true
}
// HasRefunds returns a boolean if a field has been set.
func (o *OrderEntity) HasRefunds() bool {
if o != nil && !IsNil(o.Refunds) {
return true
}
return false
}
// SetRefunds gets a reference to the given RefundURLObject and assigns it to the Refunds field.
func (o *OrderEntity) SetRefunds(v RefundURLObject) {
o.Refunds = &v
}
// GetOrderTags returns the OrderTags field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *OrderEntity) GetOrderTags() map[string]string {
if o == nil {
var ret map[string]string
return ret
}
return o.OrderTags
}
// GetOrderTagsOk returns a tuple with the OrderTags 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 *OrderEntity) GetOrderTagsOk() (*map[string]string, bool) {
if o == nil || IsNil(o.OrderTags) {
return nil, false
}
return &o.OrderTags, true
}
// HasOrderTags returns a boolean if a field has been set.
func (o *OrderEntity) HasOrderTags() bool {
if o != nil && IsNil(o.OrderTags) {
return true
}
return false
}
// SetOrderTags gets a reference to the given map[string]string and assigns it to the OrderTags field.
func (o *OrderEntity) SetOrderTags(v map[string]string) {
o.OrderTags = v
}
func (o OrderEntity) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o OrderEntity) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CfOrderId) {
toSerialize["cf_order_id"] = o.CfOrderId
}
if !IsNil(o.OrderId) {
toSerialize["order_id"] = o.OrderId
}
if !IsNil(o.Entity) {
toSerialize["entity"] = o.Entity
}
if !IsNil(o.OrderCurrency) {
toSerialize["order_currency"] = o.OrderCurrency
}
if !IsNil(o.OrderAmount) {
toSerialize["order_amount"] = o.OrderAmount
}
if !IsNil(o.OrderStatus) {
toSerialize["order_status"] = o.OrderStatus
}
if !IsNil(o.PaymentSessionId) {
toSerialize["payment_session_id"] = o.PaymentSessionId
}
if !IsNil(o.OrderExpiryTime) {
toSerialize["order_expiry_time"] = o.OrderExpiryTime
}
if o.OrderNote.IsSet() {
toSerialize["order_note"] = o.OrderNote.Get()
}
if !IsNil(o.CreatedAt) {
toSerialize["created_at"] = o.CreatedAt
}
if !IsNil(o.OrderSplits) {
toSerialize["order_splits"] = o.OrderSplits
}
if !IsNil(o.CustomerDetails) {
toSerialize["customer_details"] = o.CustomerDetails
}
if !IsNil(o.OrderMeta) {
toSerialize["order_meta"] = o.OrderMeta
}
if !IsNil(o.Payments) {
toSerialize["payments"] = o.Payments
}
if !IsNil(o.Settlements) {
toSerialize["settlements"] = o.Settlements
}
if !IsNil(o.Refunds) {
toSerialize["refunds"] = o.Refunds
}
if o.OrderTags != nil {
toSerialize["order_tags"] = o.OrderTags
}
return toSerialize, nil
}
type NullableOrderEntity struct {
value *OrderEntity
isSet bool
}
func (v NullableOrderEntity) Get() *OrderEntity {
return v.value
}
func (v *NullableOrderEntity) Set(val *OrderEntity) {
v.value = val
v.isSet = true
}
func (v NullableOrderEntity) IsSet() bool {
return v.isSet
}
func (v *NullableOrderEntity) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableOrderEntity(val *OrderEntity) *NullableOrderEntity {
return &NullableOrderEntity{value: val, isSet: true}
}
func (v NullableOrderEntity) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableOrderEntity) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}