/
model_order_detail_b2_b_lines_inner_shipment_details_inner.go
459 lines (388 loc) · 15.8 KB
/
model_order_detail_b2_b_lines_inner_shipment_details_inner.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
/*
XI Sdk Resellers
For Resellers. Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers.
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package xi_sdk_resellers
import (
"encoding/json"
)
// checks if the OrderDetailB2BLinesInnerShipmentDetailsInner type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &OrderDetailB2BLinesInnerShipmentDetailsInner{}
// OrderDetailB2BLinesInnerShipmentDetailsInner struct for OrderDetailB2BLinesInnerShipmentDetailsInner
type OrderDetailB2BLinesInnerShipmentDetailsInner struct {
// The quantity shipped of the line item.
Quantity *int32 `json:"quantity,omitempty"`
// The actual date of delivery of the line item.
DeliveryNumber *string `json:"deliveryNumber,omitempty"`
// The date the line item is expected to be shipped.
EstimatedShipDate *string `json:"estimatedShipDate,omitempty"`
ShippedDate *string `json:"shippedDate,omitempty"`
EstimatedDeliveryDate *string `json:"estimatedDeliveryDate,omitempty"`
// The ID of the warehouse the product will ship from.
ShipFromWarehouseId *string `json:"shipFromWarehouseId,omitempty"`
// The city and state the line item ships from.
ShipFromLocation *string `json:"shipFromLocation,omitempty"`
// The Ingram Micro invoice number for the line item.
InvoiceNumber *string `json:"invoiceNumber,omitempty"`
// The date the IngramMicro invoice was created for the line item.
InvoiceDate *string `json:"invoiceDate,omitempty"`
// The shipment carrier details for the line item.
CarrierDetails []OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner `json:"carrierDetails,omitempty"`
}
// NewOrderDetailB2BLinesInnerShipmentDetailsInner instantiates a new OrderDetailB2BLinesInnerShipmentDetailsInner 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 NewOrderDetailB2BLinesInnerShipmentDetailsInner() *OrderDetailB2BLinesInnerShipmentDetailsInner {
this := OrderDetailB2BLinesInnerShipmentDetailsInner{}
return &this
}
// NewOrderDetailB2BLinesInnerShipmentDetailsInnerWithDefaults instantiates a new OrderDetailB2BLinesInnerShipmentDetailsInner 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 NewOrderDetailB2BLinesInnerShipmentDetailsInnerWithDefaults() *OrderDetailB2BLinesInnerShipmentDetailsInner {
this := OrderDetailB2BLinesInnerShipmentDetailsInner{}
return &this
}
// GetQuantity returns the Quantity field value if set, zero value otherwise.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetQuantity() int32 {
if o == nil || IsNil(o.Quantity) {
var ret int32
return ret
}
return *o.Quantity
}
// GetQuantityOk returns a tuple with the Quantity field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetQuantityOk() (*int32, bool) {
if o == nil || IsNil(o.Quantity) {
return nil, false
}
return o.Quantity, true
}
// HasQuantity returns a boolean if a field has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) HasQuantity() bool {
if o != nil && !IsNil(o.Quantity) {
return true
}
return false
}
// SetQuantity gets a reference to the given int32 and assigns it to the Quantity field.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) SetQuantity(v int32) {
o.Quantity = &v
}
// GetDeliveryNumber returns the DeliveryNumber field value if set, zero value otherwise.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetDeliveryNumber() string {
if o == nil || IsNil(o.DeliveryNumber) {
var ret string
return ret
}
return *o.DeliveryNumber
}
// GetDeliveryNumberOk returns a tuple with the DeliveryNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetDeliveryNumberOk() (*string, bool) {
if o == nil || IsNil(o.DeliveryNumber) {
return nil, false
}
return o.DeliveryNumber, true
}
// HasDeliveryNumber returns a boolean if a field has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) HasDeliveryNumber() bool {
if o != nil && !IsNil(o.DeliveryNumber) {
return true
}
return false
}
// SetDeliveryNumber gets a reference to the given string and assigns it to the DeliveryNumber field.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) SetDeliveryNumber(v string) {
o.DeliveryNumber = &v
}
// GetEstimatedShipDate returns the EstimatedShipDate field value if set, zero value otherwise.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetEstimatedShipDate() string {
if o == nil || IsNil(o.EstimatedShipDate) {
var ret string
return ret
}
return *o.EstimatedShipDate
}
// GetEstimatedShipDateOk returns a tuple with the EstimatedShipDate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetEstimatedShipDateOk() (*string, bool) {
if o == nil || IsNil(o.EstimatedShipDate) {
return nil, false
}
return o.EstimatedShipDate, true
}
// HasEstimatedShipDate returns a boolean if a field has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) HasEstimatedShipDate() bool {
if o != nil && !IsNil(o.EstimatedShipDate) {
return true
}
return false
}
// SetEstimatedShipDate gets a reference to the given string and assigns it to the EstimatedShipDate field.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) SetEstimatedShipDate(v string) {
o.EstimatedShipDate = &v
}
// GetShippedDate returns the ShippedDate field value if set, zero value otherwise.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetShippedDate() string {
if o == nil || IsNil(o.ShippedDate) {
var ret string
return ret
}
return *o.ShippedDate
}
// GetShippedDateOk returns a tuple with the ShippedDate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetShippedDateOk() (*string, bool) {
if o == nil || IsNil(o.ShippedDate) {
return nil, false
}
return o.ShippedDate, true
}
// HasShippedDate returns a boolean if a field has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) HasShippedDate() bool {
if o != nil && !IsNil(o.ShippedDate) {
return true
}
return false
}
// SetShippedDate gets a reference to the given string and assigns it to the ShippedDate field.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) SetShippedDate(v string) {
o.ShippedDate = &v
}
// GetEstimatedDeliveryDate returns the EstimatedDeliveryDate field value if set, zero value otherwise.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetEstimatedDeliveryDate() string {
if o == nil || IsNil(o.EstimatedDeliveryDate) {
var ret string
return ret
}
return *o.EstimatedDeliveryDate
}
// GetEstimatedDeliveryDateOk returns a tuple with the EstimatedDeliveryDate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetEstimatedDeliveryDateOk() (*string, bool) {
if o == nil || IsNil(o.EstimatedDeliveryDate) {
return nil, false
}
return o.EstimatedDeliveryDate, true
}
// HasEstimatedDeliveryDate returns a boolean if a field has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) HasEstimatedDeliveryDate() bool {
if o != nil && !IsNil(o.EstimatedDeliveryDate) {
return true
}
return false
}
// SetEstimatedDeliveryDate gets a reference to the given string and assigns it to the EstimatedDeliveryDate field.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) SetEstimatedDeliveryDate(v string) {
o.EstimatedDeliveryDate = &v
}
// GetShipFromWarehouseId returns the ShipFromWarehouseId field value if set, zero value otherwise.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetShipFromWarehouseId() string {
if o == nil || IsNil(o.ShipFromWarehouseId) {
var ret string
return ret
}
return *o.ShipFromWarehouseId
}
// GetShipFromWarehouseIdOk returns a tuple with the ShipFromWarehouseId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetShipFromWarehouseIdOk() (*string, bool) {
if o == nil || IsNil(o.ShipFromWarehouseId) {
return nil, false
}
return o.ShipFromWarehouseId, true
}
// HasShipFromWarehouseId returns a boolean if a field has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) HasShipFromWarehouseId() bool {
if o != nil && !IsNil(o.ShipFromWarehouseId) {
return true
}
return false
}
// SetShipFromWarehouseId gets a reference to the given string and assigns it to the ShipFromWarehouseId field.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) SetShipFromWarehouseId(v string) {
o.ShipFromWarehouseId = &v
}
// GetShipFromLocation returns the ShipFromLocation field value if set, zero value otherwise.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetShipFromLocation() string {
if o == nil || IsNil(o.ShipFromLocation) {
var ret string
return ret
}
return *o.ShipFromLocation
}
// GetShipFromLocationOk returns a tuple with the ShipFromLocation field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetShipFromLocationOk() (*string, bool) {
if o == nil || IsNil(o.ShipFromLocation) {
return nil, false
}
return o.ShipFromLocation, true
}
// HasShipFromLocation returns a boolean if a field has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) HasShipFromLocation() bool {
if o != nil && !IsNil(o.ShipFromLocation) {
return true
}
return false
}
// SetShipFromLocation gets a reference to the given string and assigns it to the ShipFromLocation field.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) SetShipFromLocation(v string) {
o.ShipFromLocation = &v
}
// GetInvoiceNumber returns the InvoiceNumber field value if set, zero value otherwise.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetInvoiceNumber() string {
if o == nil || IsNil(o.InvoiceNumber) {
var ret string
return ret
}
return *o.InvoiceNumber
}
// GetInvoiceNumberOk returns a tuple with the InvoiceNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetInvoiceNumberOk() (*string, bool) {
if o == nil || IsNil(o.InvoiceNumber) {
return nil, false
}
return o.InvoiceNumber, true
}
// HasInvoiceNumber returns a boolean if a field has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) HasInvoiceNumber() bool {
if o != nil && !IsNil(o.InvoiceNumber) {
return true
}
return false
}
// SetInvoiceNumber gets a reference to the given string and assigns it to the InvoiceNumber field.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) SetInvoiceNumber(v string) {
o.InvoiceNumber = &v
}
// GetInvoiceDate returns the InvoiceDate field value if set, zero value otherwise.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetInvoiceDate() string {
if o == nil || IsNil(o.InvoiceDate) {
var ret string
return ret
}
return *o.InvoiceDate
}
// GetInvoiceDateOk returns a tuple with the InvoiceDate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetInvoiceDateOk() (*string, bool) {
if o == nil || IsNil(o.InvoiceDate) {
return nil, false
}
return o.InvoiceDate, true
}
// HasInvoiceDate returns a boolean if a field has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) HasInvoiceDate() bool {
if o != nil && !IsNil(o.InvoiceDate) {
return true
}
return false
}
// SetInvoiceDate gets a reference to the given string and assigns it to the InvoiceDate field.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) SetInvoiceDate(v string) {
o.InvoiceDate = &v
}
// GetCarrierDetails returns the CarrierDetails field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) GetCarrierDetails() []OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner {
if o == nil {
var ret []OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner
return ret
}
return o.CarrierDetails
}
// GetCarrierDetailsOk returns a tuple with the CarrierDetails 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 *OrderDetailB2BLinesInnerShipmentDetailsInner) GetCarrierDetailsOk() ([]OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner, bool) {
if o == nil || IsNil(o.CarrierDetails) {
return nil, false
}
return o.CarrierDetails, true
}
// HasCarrierDetails returns a boolean if a field has been set.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) HasCarrierDetails() bool {
if o != nil && IsNil(o.CarrierDetails) {
return true
}
return false
}
// SetCarrierDetails gets a reference to the given []OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner and assigns it to the CarrierDetails field.
func (o *OrderDetailB2BLinesInnerShipmentDetailsInner) SetCarrierDetails(v []OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner) {
o.CarrierDetails = v
}
func (o OrderDetailB2BLinesInnerShipmentDetailsInner) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o OrderDetailB2BLinesInnerShipmentDetailsInner) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Quantity) {
toSerialize["quantity"] = o.Quantity
}
if !IsNil(o.DeliveryNumber) {
toSerialize["deliveryNumber"] = o.DeliveryNumber
}
if !IsNil(o.EstimatedShipDate) {
toSerialize["estimatedShipDate"] = o.EstimatedShipDate
}
if !IsNil(o.ShippedDate) {
toSerialize["shippedDate"] = o.ShippedDate
}
if !IsNil(o.EstimatedDeliveryDate) {
toSerialize["estimatedDeliveryDate"] = o.EstimatedDeliveryDate
}
if !IsNil(o.ShipFromWarehouseId) {
toSerialize["shipFromWarehouseId"] = o.ShipFromWarehouseId
}
if !IsNil(o.ShipFromLocation) {
toSerialize["shipFromLocation"] = o.ShipFromLocation
}
if !IsNil(o.InvoiceNumber) {
toSerialize["invoiceNumber"] = o.InvoiceNumber
}
if !IsNil(o.InvoiceDate) {
toSerialize["invoiceDate"] = o.InvoiceDate
}
if o.CarrierDetails != nil {
toSerialize["carrierDetails"] = o.CarrierDetails
}
return toSerialize, nil
}
type NullableOrderDetailB2BLinesInnerShipmentDetailsInner struct {
value *OrderDetailB2BLinesInnerShipmentDetailsInner
isSet bool
}
func (v NullableOrderDetailB2BLinesInnerShipmentDetailsInner) Get() *OrderDetailB2BLinesInnerShipmentDetailsInner {
return v.value
}
func (v *NullableOrderDetailB2BLinesInnerShipmentDetailsInner) Set(val *OrderDetailB2BLinesInnerShipmentDetailsInner) {
v.value = val
v.isSet = true
}
func (v NullableOrderDetailB2BLinesInnerShipmentDetailsInner) IsSet() bool {
return v.isSet
}
func (v *NullableOrderDetailB2BLinesInnerShipmentDetailsInner) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableOrderDetailB2BLinesInnerShipmentDetailsInner(val *OrderDetailB2BLinesInnerShipmentDetailsInner) *NullableOrderDetailB2BLinesInnerShipmentDetailsInner {
return &NullableOrderDetailB2BLinesInnerShipmentDetailsInner{value: val, isSet: true}
}
func (v NullableOrderDetailB2BLinesInnerShipmentDetailsInner) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableOrderDetailB2BLinesInnerShipmentDetailsInner) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}