Class: UltracartClient::ItemShipping

Inherits:
Object
  • Object
show all
Defined in:
lib/ultracart_api/models/item_shipping.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ItemShipping

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
# File 'lib/ultracart_api/models/item_shipping.rb', line 267

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'allow_back_order')
    self.allow_back_order = attributes[:'allow_back_order']
  end

  if attributes.has_key?(:'amazon_fba')
    self.amazon_fba = attributes[:'amazon_fba']
  end

  if attributes.has_key?(:'case_inner_packs')
    self.case_inner_packs = attributes[:'case_inner_packs']
  end

  if attributes.has_key?(:'case_units')
    self.case_units = attributes[:'case_units']
  end

  if attributes.has_key?(:'cases')
    if (value = attributes[:'cases']).is_a?(Array)
      self.cases = value
    end
  end

  if attributes.has_key?(:'collect_serial_numbers')
    self.collect_serial_numbers = attributes[:'collect_serial_numbers']
  end

  if attributes.has_key?(:'country_code_of_origin')
    self.country_code_of_origin = attributes[:'country_code_of_origin']
  end

  if attributes.has_key?(:'customs_description')
    self.customs_description = attributes[:'customs_description']
  end

  if attributes.has_key?(:'customs_value')
    self.customs_value = attributes[:'customs_value']
  end

  if attributes.has_key?(:'delivery_on_friday')
    self.delivery_on_friday = attributes[:'delivery_on_friday']
  end

  if attributes.has_key?(:'delivery_on_monday')
    self.delivery_on_monday = attributes[:'delivery_on_monday']
  end

  if attributes.has_key?(:'delivery_on_saturday')
    self.delivery_on_saturday = attributes[:'delivery_on_saturday']
  end

  if attributes.has_key?(:'delivery_on_sunday')
    self.delivery_on_sunday = attributes[:'delivery_on_sunday']
  end

  if attributes.has_key?(:'delivery_on_thursday')
    self.delivery_on_thursday = attributes[:'delivery_on_thursday']
  end

  if attributes.has_key?(:'delivery_on_tuesday')
    self.delivery_on_tuesday = attributes[:'delivery_on_tuesday']
  end

  if attributes.has_key?(:'delivery_on_wednesday')
    self.delivery_on_wednesday = attributes[:'delivery_on_wednesday']
  end

  if attributes.has_key?(:'destination_markups')
    if (value = attributes[:'destination_markups']).is_a?(Array)
      self.destination_markups = value
    end
  end

  if attributes.has_key?(:'destination_restrictions')
    if (value = attributes[:'destination_restrictions']).is_a?(Array)
      self.destination_restrictions = value
    end
  end

  if attributes.has_key?(:'distribution_centers')
    if (value = attributes[:'distribution_centers']).is_a?(Array)
      self.distribution_centers = value
    end
  end

  if attributes.has_key?(:'eta')
    self.eta = attributes[:'eta']
  end

  if attributes.has_key?(:'free_shipping')
    self.free_shipping = attributes[:'free_shipping']
  end

  if attributes.has_key?(:'freight_class')
    self.freight_class = attributes[:'freight_class']
  end

  if attributes.has_key?(:'hazmat')
    self.hazmat = attributes[:'hazmat']
  end

  if attributes.has_key?(:'made_to_order')
    self.made_to_order = attributes[:'made_to_order']
  end

  if attributes.has_key?(:'made_to_order_lead_time')
    self.made_to_order_lead_time = attributes[:'made_to_order_lead_time']
  end

  if attributes.has_key?(:'max_days_time_in_transit')
    self.max_days_time_in_transit = attributes[:'max_days_time_in_transit']
  end

  if attributes.has_key?(:'methods')
    if (value = attributes[:'methods']).is_a?(Array)
      self.methods = value
    end
  end

  if attributes.has_key?(:'no_shipping_discount')
    self.no_shipping_discount = attributes[:'no_shipping_discount']
  end

  if attributes.has_key?(:'package_requirements')
    if (value = attributes[:'package_requirements']).is_a?(Array)
      self.package_requirements = value
    end
  end

  if attributes.has_key?(:'perishable_class_name')
    self.perishable_class_name = attributes[:'perishable_class_name']
  end

  if attributes.has_key?(:'perishable_class_oid')
    self.perishable_class_oid = attributes[:'perishable_class_oid']
  end

  if attributes.has_key?(:'preorder')
    self.preorder = attributes[:'preorder']
  end

  if attributes.has_key?(:'require_delivery_date')
    self.require_delivery_date = attributes[:'require_delivery_date']
  end

  if attributes.has_key?(:'restrict_shipment_on_friday')
    self.restrict_shipment_on_friday = attributes[:'restrict_shipment_on_friday']
  end

  if attributes.has_key?(:'restrict_shipment_on_monday')
    self.restrict_shipment_on_monday = attributes[:'restrict_shipment_on_monday']
  end

  if attributes.has_key?(:'restrict_shipment_on_saturday')
    self.restrict_shipment_on_saturday = attributes[:'restrict_shipment_on_saturday']
  end

  if attributes.has_key?(:'restrict_shipment_on_sunday')
    self.restrict_shipment_on_sunday = attributes[:'restrict_shipment_on_sunday']
  end

  if attributes.has_key?(:'restrict_shipment_on_thursday')
    self.restrict_shipment_on_thursday = attributes[:'restrict_shipment_on_thursday']
  end

  if attributes.has_key?(:'restrict_shipment_on_tuesday')
    self.restrict_shipment_on_tuesday = attributes[:'restrict_shipment_on_tuesday']
  end

  if attributes.has_key?(:'restrict_shipment_on_wednesday')
    self.restrict_shipment_on_wednesday = attributes[:'restrict_shipment_on_wednesday']
  end

  if attributes.has_key?(:'ship_separately')
    self.ship_separately = attributes[:'ship_separately']
  end

  if attributes.has_key?(:'ship_separately_additional_weight')
    self.ship_separately_additional_weight = attributes[:'ship_separately_additional_weight']
  end

  if attributes.has_key?(:'ship_separately_height')
    self.ship_separately_height = attributes[:'ship_separately_height']
  end

  if attributes.has_key?(:'ship_separately_length')
    self.ship_separately_length = attributes[:'ship_separately_length']
  end

  if attributes.has_key?(:'ship_separately_package_special_type')
    self.ship_separately_package_special_type = attributes[:'ship_separately_package_special_type']
  end

  if attributes.has_key?(:'ship_separately_width')
    self.ship_separately_width = attributes[:'ship_separately_width']
  end

  if attributes.has_key?(:'special_product_type')
    self.special_product_type = attributes[:'special_product_type']
  end

  if attributes.has_key?(:'track_inventory')
    self.track_inventory = attributes[:'track_inventory']
  end
end

Instance Attribute Details

#allow_back_orderObject

Allow back order



18
19
20
# File 'lib/ultracart_api/models/item_shipping.rb', line 18

def allow_back_order
  @allow_back_order
end

#amazon_fbaObject

Fulfillment by Amazon.com



21
22
23
# File 'lib/ultracart_api/models/item_shipping.rb', line 21

def amazon_fba
  @amazon_fba
end

#case_inner_packsObject

Case inner packs



24
25
26
# File 'lib/ultracart_api/models/item_shipping.rb', line 24

def case_inner_packs
  @case_inner_packs
end

#case_unitsObject

Case units



27
28
29
# File 'lib/ultracart_api/models/item_shipping.rb', line 27

def case_units
  @case_units
end

#casesObject

Cases



30
31
32
# File 'lib/ultracart_api/models/item_shipping.rb', line 30

def cases
  @cases
end

#collect_serial_numbersObject

This item is on pre-order



33
34
35
# File 'lib/ultracart_api/models/item_shipping.rb', line 33

def collect_serial_numbers
  @collect_serial_numbers
end

#country_code_of_originObject

Country code of origin for customs forms. (ISO-3166 two letter code)



36
37
38
# File 'lib/ultracart_api/models/item_shipping.rb', line 36

def country_code_of_origin
  @country_code_of_origin
end

#customs_descriptionObject

Customs description



39
40
41
# File 'lib/ultracart_api/models/item_shipping.rb', line 39

def customs_description
  @customs_description
end

#customs_valueObject

Customs value



42
43
44
# File 'lib/ultracart_api/models/item_shipping.rb', line 42

def customs_value
  @customs_value
end

#delivery_on_fridayObject

Delivery on Friday



45
46
47
# File 'lib/ultracart_api/models/item_shipping.rb', line 45

def delivery_on_friday
  @delivery_on_friday
end

#delivery_on_mondayObject

Delivery on Monday



48
49
50
# File 'lib/ultracart_api/models/item_shipping.rb', line 48

def delivery_on_monday
  @delivery_on_monday
end

#delivery_on_saturdayObject

Delivery on Saturday



51
52
53
# File 'lib/ultracart_api/models/item_shipping.rb', line 51

def delivery_on_saturday
  @delivery_on_saturday
end

#delivery_on_sundayObject

Delivery on Sunday



54
55
56
# File 'lib/ultracart_api/models/item_shipping.rb', line 54

def delivery_on_sunday
  @delivery_on_sunday
end

#delivery_on_thursdayObject

Delivery on Thursday



57
58
59
# File 'lib/ultracart_api/models/item_shipping.rb', line 57

def delivery_on_thursday
  @delivery_on_thursday
end

#delivery_on_tuesdayObject

Delivery on Tuesday



60
61
62
# File 'lib/ultracart_api/models/item_shipping.rb', line 60

def delivery_on_tuesday
  @delivery_on_tuesday
end

#delivery_on_wednesdayObject

Delivery on Wednesday



63
64
65
# File 'lib/ultracart_api/models/item_shipping.rb', line 63

def delivery_on_wednesday
  @delivery_on_wednesday
end

#destination_markupsObject

Destination markups



66
67
68
# File 'lib/ultracart_api/models/item_shipping.rb', line 66

def destination_markups
  @destination_markups
end

#destination_restrictionsObject

Destination restrictions



69
70
71
# File 'lib/ultracart_api/models/item_shipping.rb', line 69

def destination_restrictions
  @destination_restrictions
end

#distribution_centersObject

Distribution centers



72
73
74
# File 'lib/ultracart_api/models/item_shipping.rb', line 72

def distribution_centers
  @distribution_centers
end

#etaObject

Estimated time of arrival



75
76
77
# File 'lib/ultracart_api/models/item_shipping.rb', line 75

def eta
  @eta
end

#free_shippingObject

Qualifies for free shipping



78
79
80
# File 'lib/ultracart_api/models/item_shipping.rb', line 78

def free_shipping
  @free_shipping
end

#freight_classObject

Freight class



81
82
83
# File 'lib/ultracart_api/models/item_shipping.rb', line 81

def freight_class
  @freight_class
end

#hazmatObject

Hazardous material



84
85
86
# File 'lib/ultracart_api/models/item_shipping.rb', line 84

def hazmat
  @hazmat
end

#made_to_orderObject

True if this item is made to order



87
88
89
# File 'lib/ultracart_api/models/item_shipping.rb', line 87

def made_to_order
  @made_to_order
end

#made_to_order_lead_timeObject

Number of days lead time it takes to make the item before ite can ship



90
91
92
# File 'lib/ultracart_api/models/item_shipping.rb', line 90

def made_to_order_lead_time
  @made_to_order_lead_time
end

#max_days_time_in_transitObject

Maximum days allowed in transit



93
94
95
# File 'lib/ultracart_api/models/item_shipping.rb', line 93

def max_days_time_in_transit
  @max_days_time_in_transit
end

#methodsObject

Methods



96
97
98
# File 'lib/ultracart_api/models/item_shipping.rb', line 96

def methods
  @methods
end

#no_shipping_discountObject

No shipping discounts



99
100
101
# File 'lib/ultracart_api/models/item_shipping.rb', line 99

def no_shipping_discount
  @no_shipping_discount
end

#package_requirementsObject

Package requirements



102
103
104
# File 'lib/ultracart_api/models/item_shipping.rb', line 102

def package_requirements
  @package_requirements
end

#perishable_class_nameObject

Perishable class name



105
106
107
# File 'lib/ultracart_api/models/item_shipping.rb', line 105

def perishable_class_name
  @perishable_class_name
end

#perishable_class_oidObject

Perishable class object identifier



108
109
110
# File 'lib/ultracart_api/models/item_shipping.rb', line 108

def perishable_class_oid
  @perishable_class_oid
end

#preorderObject

This item is on pre-order



111
112
113
# File 'lib/ultracart_api/models/item_shipping.rb', line 111

def preorder
  @preorder
end

#require_delivery_dateObject

True to require customer to select a delivery date



114
115
116
# File 'lib/ultracart_api/models/item_shipping.rb', line 114

def require_delivery_date
  @require_delivery_date
end

#restrict_shipment_on_fridayObject

Restrict shipment on Friday



117
118
119
# File 'lib/ultracart_api/models/item_shipping.rb', line 117

def restrict_shipment_on_friday
  @restrict_shipment_on_friday
end

#restrict_shipment_on_mondayObject

Restrict shipment on Monday



120
121
122
# File 'lib/ultracart_api/models/item_shipping.rb', line 120

def restrict_shipment_on_monday
  @restrict_shipment_on_monday
end

#restrict_shipment_on_saturdayObject

Restrict shipment on Saturday



123
124
125
# File 'lib/ultracart_api/models/item_shipping.rb', line 123

def restrict_shipment_on_saturday
  @restrict_shipment_on_saturday
end

#restrict_shipment_on_sundayObject

Restrict shipment on Sunday



126
127
128
# File 'lib/ultracart_api/models/item_shipping.rb', line 126

def restrict_shipment_on_sunday
  @restrict_shipment_on_sunday
end

#restrict_shipment_on_thursdayObject

Restrict shipment on Thursday



129
130
131
# File 'lib/ultracart_api/models/item_shipping.rb', line 129

def restrict_shipment_on_thursday
  @restrict_shipment_on_thursday
end

#restrict_shipment_on_tuesdayObject

Restrict shipment on Tuesday



132
133
134
# File 'lib/ultracart_api/models/item_shipping.rb', line 132

def restrict_shipment_on_tuesday
  @restrict_shipment_on_tuesday
end

#restrict_shipment_on_wednesdayObject

Restrict shipment on Wednesday



135
136
137
# File 'lib/ultracart_api/models/item_shipping.rb', line 135

def restrict_shipment_on_wednesday
  @restrict_shipment_on_wednesday
end

#ship_separatelyObject

Ship this item in a separate box



138
139
140
# File 'lib/ultracart_api/models/item_shipping.rb', line 138

def ship_separately
  @ship_separately
end

#ship_separately_additional_weightObject

Returns the value of attribute ship_separately_additional_weight.



140
141
142
# File 'lib/ultracart_api/models/item_shipping.rb', line 140

def ship_separately_additional_weight
  @ship_separately_additional_weight
end

#ship_separately_heightObject

Returns the value of attribute ship_separately_height.



142
143
144
# File 'lib/ultracart_api/models/item_shipping.rb', line 142

def ship_separately_height
  @ship_separately_height
end

#ship_separately_lengthObject

Returns the value of attribute ship_separately_length.



144
145
146
# File 'lib/ultracart_api/models/item_shipping.rb', line 144

def ship_separately_length
  @ship_separately_length
end

#ship_separately_package_special_typeObject

Ship separately package special type



147
148
149
# File 'lib/ultracart_api/models/item_shipping.rb', line 147

def ship_separately_package_special_type
  @ship_separately_package_special_type
end

#ship_separately_widthObject

Returns the value of attribute ship_separately_width.



149
150
151
# File 'lib/ultracart_api/models/item_shipping.rb', line 149

def ship_separately_width
  @ship_separately_width
end

#special_product_typeObject

Special product type (USPS Media Mail)



152
153
154
# File 'lib/ultracart_api/models/item_shipping.rb', line 152

def special_product_type
  @special_product_type
end

#track_inventoryObject

Track inventory



155
156
157
# File 'lib/ultracart_api/models/item_shipping.rb', line 155

def track_inventory
  @track_inventory
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



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
# File 'lib/ultracart_api/models/item_shipping.rb', line 158

def self.attribute_map
  {
    :'allow_back_order' => :'allow_back_order',
    :'amazon_fba' => :'amazon_fba',
    :'case_inner_packs' => :'case_inner_packs',
    :'case_units' => :'case_units',
    :'cases' => :'cases',
    :'collect_serial_numbers' => :'collect_serial_numbers',
    :'country_code_of_origin' => :'country_code_of_origin',
    :'customs_description' => :'customs_description',
    :'customs_value' => :'customs_value',
    :'delivery_on_friday' => :'delivery_on_friday',
    :'delivery_on_monday' => :'delivery_on_monday',
    :'delivery_on_saturday' => :'delivery_on_saturday',
    :'delivery_on_sunday' => :'delivery_on_sunday',
    :'delivery_on_thursday' => :'delivery_on_thursday',
    :'delivery_on_tuesday' => :'delivery_on_tuesday',
    :'delivery_on_wednesday' => :'delivery_on_wednesday',
    :'destination_markups' => :'destination_markups',
    :'destination_restrictions' => :'destination_restrictions',
    :'distribution_centers' => :'distribution_centers',
    :'eta' => :'eta',
    :'free_shipping' => :'free_shipping',
    :'freight_class' => :'freight_class',
    :'hazmat' => :'hazmat',
    :'made_to_order' => :'made_to_order',
    :'made_to_order_lead_time' => :'made_to_order_lead_time',
    :'max_days_time_in_transit' => :'max_days_time_in_transit',
    :'methods' => :'methods',
    :'no_shipping_discount' => :'no_shipping_discount',
    :'package_requirements' => :'package_requirements',
    :'perishable_class_name' => :'perishable_class_name',
    :'perishable_class_oid' => :'perishable_class_oid',
    :'preorder' => :'preorder',
    :'require_delivery_date' => :'require_delivery_date',
    :'restrict_shipment_on_friday' => :'restrict_shipment_on_friday',
    :'restrict_shipment_on_monday' => :'restrict_shipment_on_monday',
    :'restrict_shipment_on_saturday' => :'restrict_shipment_on_saturday',
    :'restrict_shipment_on_sunday' => :'restrict_shipment_on_sunday',
    :'restrict_shipment_on_thursday' => :'restrict_shipment_on_thursday',
    :'restrict_shipment_on_tuesday' => :'restrict_shipment_on_tuesday',
    :'restrict_shipment_on_wednesday' => :'restrict_shipment_on_wednesday',
    :'ship_separately' => :'ship_separately',
    :'ship_separately_additional_weight' => :'ship_separately_additional_weight',
    :'ship_separately_height' => :'ship_separately_height',
    :'ship_separately_length' => :'ship_separately_length',
    :'ship_separately_package_special_type' => :'ship_separately_package_special_type',
    :'ship_separately_width' => :'ship_separately_width',
    :'special_product_type' => :'special_product_type',
    :'track_inventory' => :'track_inventory'
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/ultracart_api/models/item_shipping.rb', line 212

def self.swagger_types
  {
    :'allow_back_order' => :'BOOLEAN',
    :'amazon_fba' => :'BOOLEAN',
    :'case_inner_packs' => :'Integer',
    :'case_units' => :'Integer',
    :'cases' => :'Array<ItemShippingCase>',
    :'collect_serial_numbers' => :'BOOLEAN',
    :'country_code_of_origin' => :'String',
    :'customs_description' => :'String',
    :'customs_value' => :'Float',
    :'delivery_on_friday' => :'BOOLEAN',
    :'delivery_on_monday' => :'BOOLEAN',
    :'delivery_on_saturday' => :'BOOLEAN',
    :'delivery_on_sunday' => :'BOOLEAN',
    :'delivery_on_thursday' => :'BOOLEAN',
    :'delivery_on_tuesday' => :'BOOLEAN',
    :'delivery_on_wednesday' => :'BOOLEAN',
    :'destination_markups' => :'Array<ItemShippingDestinationMarkup>',
    :'destination_restrictions' => :'Array<ItemShippingDestinationRestriction>',
    :'distribution_centers' => :'Array<ItemShippingDistributionCenter>',
    :'eta' => :'String',
    :'free_shipping' => :'BOOLEAN',
    :'freight_class' => :'String',
    :'hazmat' => :'BOOLEAN',
    :'made_to_order' => :'BOOLEAN',
    :'made_to_order_lead_time' => :'Integer',
    :'max_days_time_in_transit' => :'Integer',
    :'methods' => :'Array<ItemShippingMethod>',
    :'no_shipping_discount' => :'BOOLEAN',
    :'package_requirements' => :'Array<ItemShippingPackageRequirement>',
    :'perishable_class_name' => :'String',
    :'perishable_class_oid' => :'Integer',
    :'preorder' => :'BOOLEAN',
    :'require_delivery_date' => :'BOOLEAN',
    :'restrict_shipment_on_friday' => :'BOOLEAN',
    :'restrict_shipment_on_monday' => :'BOOLEAN',
    :'restrict_shipment_on_saturday' => :'BOOLEAN',
    :'restrict_shipment_on_sunday' => :'BOOLEAN',
    :'restrict_shipment_on_thursday' => :'BOOLEAN',
    :'restrict_shipment_on_tuesday' => :'BOOLEAN',
    :'restrict_shipment_on_wednesday' => :'BOOLEAN',
    :'ship_separately' => :'BOOLEAN',
    :'ship_separately_additional_weight' => :'Weight',
    :'ship_separately_height' => :'Distance',
    :'ship_separately_length' => :'Distance',
    :'ship_separately_package_special_type' => :'String',
    :'ship_separately_width' => :'Distance',
    :'special_product_type' => :'String',
    :'track_inventory' => :'BOOLEAN'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
# File 'lib/ultracart_api/models/item_shipping.rb', line 508

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      allow_back_order == o.allow_back_order &&
      amazon_fba == o.amazon_fba &&
      case_inner_packs == o.case_inner_packs &&
      case_units == o.case_units &&
      cases == o.cases &&
      collect_serial_numbers == o.collect_serial_numbers &&
      country_code_of_origin == o.country_code_of_origin &&
      customs_description == o.customs_description &&
      customs_value == o.customs_value &&
      delivery_on_friday == o.delivery_on_friday &&
      delivery_on_monday == o.delivery_on_monday &&
      delivery_on_saturday == o.delivery_on_saturday &&
      delivery_on_sunday == o.delivery_on_sunday &&
      delivery_on_thursday == o.delivery_on_thursday &&
      delivery_on_tuesday == o.delivery_on_tuesday &&
      delivery_on_wednesday == o.delivery_on_wednesday &&
      destination_markups == o.destination_markups &&
      destination_restrictions == o.destination_restrictions &&
      distribution_centers == o.distribution_centers &&
      eta == o.eta &&
      free_shipping == o.free_shipping &&
      freight_class == o.freight_class &&
      hazmat == o.hazmat &&
      made_to_order == o.made_to_order &&
      made_to_order_lead_time == o.made_to_order_lead_time &&
      max_days_time_in_transit == o.max_days_time_in_transit &&
      methods == o.methods &&
      no_shipping_discount == o.no_shipping_discount &&
      package_requirements == o.package_requirements &&
      perishable_class_name == o.perishable_class_name &&
      perishable_class_oid == o.perishable_class_oid &&
      preorder == o.preorder &&
      require_delivery_date == o.require_delivery_date &&
      restrict_shipment_on_friday == o.restrict_shipment_on_friday &&
      restrict_shipment_on_monday == o.restrict_shipment_on_monday &&
      restrict_shipment_on_saturday == o.restrict_shipment_on_saturday &&
      restrict_shipment_on_sunday == o.restrict_shipment_on_sunday &&
      restrict_shipment_on_thursday == o.restrict_shipment_on_thursday &&
      restrict_shipment_on_tuesday == o.restrict_shipment_on_tuesday &&
      restrict_shipment_on_wednesday == o.restrict_shipment_on_wednesday &&
      ship_separately == o.ship_separately &&
      ship_separately_additional_weight == o.ship_separately_additional_weight &&
      ship_separately_height == o.ship_separately_height &&
      ship_separately_length == o.ship_separately_length &&
      ship_separately_package_special_type == o.ship_separately_package_special_type &&
      ship_separately_width == o.ship_separately_width &&
      special_product_type == o.special_product_type &&
      track_inventory == o.track_inventory
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



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
# File 'lib/ultracart_api/models/item_shipping.rb', line 597

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = UltracartClient.const_get(type).new
    temp_model.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



663
664
665
666
667
668
669
670
671
672
673
674
675
# File 'lib/ultracart_api/models/item_shipping.rb', line 663

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
# File 'lib/ultracart_api/models/item_shipping.rb', line 576

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


563
564
565
# File 'lib/ultracart_api/models/item_shipping.rb', line 563

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



569
570
571
# File 'lib/ultracart_api/models/item_shipping.rb', line 569

def hash
  [allow_back_order, amazon_fba, case_inner_packs, case_units, cases, collect_serial_numbers, country_code_of_origin, customs_description, customs_value, delivery_on_friday, delivery_on_monday, delivery_on_saturday, delivery_on_sunday, delivery_on_thursday, delivery_on_tuesday, delivery_on_wednesday, destination_markups, destination_restrictions, distribution_centers, eta, free_shipping, freight_class, hazmat, made_to_order, made_to_order_lead_time, max_days_time_in_transit, methods, no_shipping_discount, package_requirements, perishable_class_name, perishable_class_oid, preorder, require_delivery_date, restrict_shipment_on_friday, restrict_shipment_on_monday, restrict_shipment_on_saturday, restrict_shipment_on_sunday, restrict_shipment_on_thursday, restrict_shipment_on_tuesday, restrict_shipment_on_wednesday, ship_separately, ship_separately_additional_weight, ship_separately_height, ship_separately_length, ship_separately_package_special_type, ship_separately_width, special_product_type, track_inventory].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



480
481
482
483
484
485
486
487
# File 'lib/ultracart_api/models/item_shipping.rb', line 480

def list_invalid_properties
  invalid_properties = Array.new
  if !@country_code_of_origin.nil? && @country_code_of_origin.to_s.length > 2
    invalid_properties.push('invalid value for "country_code_of_origin", the character length must be smaller than or equal to 2.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



643
644
645
# File 'lib/ultracart_api/models/item_shipping.rb', line 643

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



649
650
651
652
653
654
655
656
657
# File 'lib/ultracart_api/models/item_shipping.rb', line 649

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



637
638
639
# File 'lib/ultracart_api/models/item_shipping.rb', line 637

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



491
492
493
494
# File 'lib/ultracart_api/models/item_shipping.rb', line 491

def valid?
  return false if !@country_code_of_origin.nil? && @country_code_of_origin.to_s.length > 2
  true
end