Class: UltracartClient::DistributionCenter

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ DistributionCenter

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::DistributionCenter` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::DistributionCenter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'address1')
    self.address1 = attributes[:'address1']
  end

  if attributes.key?(:'address2')
    self.address2 = attributes[:'address2']
  end

  if attributes.key?(:'city')
    self.city = attributes[:'city']
  end

  if attributes.key?(:'code')
    self.code = attributes[:'code']
  end

  if attributes.key?(:'country_code')
    self.country_code = attributes[:'country_code']
  end

  if attributes.key?(:'default_center')
    self.default_center = attributes[:'default_center']
  end

  if attributes.key?(:'default_handles_all_items')
    self.default_handles_all_items = attributes[:'default_handles_all_items']
  end

  if attributes.key?(:'distribution_center_oid')
    self.distribution_center_oid = attributes[:'distribution_center_oid']
  end

  if attributes.key?(:'duns')
    self.duns = attributes[:'duns']
  end

  if attributes.key?(:'estimate_from_distribution_center_oid')
    self.estimate_from_distribution_center_oid = attributes[:'estimate_from_distribution_center_oid']
  end

  if attributes.key?(:'ftp_password')
    self.ftp_password = attributes[:'ftp_password']
  end

  if attributes.key?(:'hold_before_shipment_minutes')
    self.hold_before_shipment_minutes = attributes[:'hold_before_shipment_minutes']
  end

  if attributes.key?(:'hold_before_transmission')
    self.hold_before_transmission = attributes[:'hold_before_transmission']
  end

  if attributes.key?(:'hold_auto_order_before_shipment_minutes')
    self.hold_auto_order_before_shipment_minutes = attributes[:'hold_auto_order_before_shipment_minutes']
  end

  if attributes.key?(:'latitude')
    self.latitude = attributes[:'latitude']
  end

  if attributes.key?(:'longitude')
    self.longitude = attributes[:'longitude']
  end

  if attributes.key?(:'name')
    self.name = attributes[:'name']
  end

  if attributes.key?(:'no_customer_direct_shipments')
    self.no_customer_direct_shipments = attributes[:'no_customer_direct_shipments']
  end

  if attributes.key?(:'no_split_shipment')
    self.no_split_shipment = attributes[:'no_split_shipment']
  end

  if attributes.key?(:'pickup_cutoff_time_friday')
    self.pickup_cutoff_time_friday = attributes[:'pickup_cutoff_time_friday']
  end

  if attributes.key?(:'pickup_cutoff_time_monday')
    self.pickup_cutoff_time_monday = attributes[:'pickup_cutoff_time_monday']
  end

  if attributes.key?(:'pickup_cutoff_time_saturday')
    self.pickup_cutoff_time_saturday = attributes[:'pickup_cutoff_time_saturday']
  end

  if attributes.key?(:'pickup_cutoff_time_sunday')
    self.pickup_cutoff_time_sunday = attributes[:'pickup_cutoff_time_sunday']
  end

  if attributes.key?(:'pickup_cutoff_time_thursday')
    self.pickup_cutoff_time_thursday = attributes[:'pickup_cutoff_time_thursday']
  end

  if attributes.key?(:'pickup_cutoff_time_tuesday')
    self.pickup_cutoff_time_tuesday = attributes[:'pickup_cutoff_time_tuesday']
  end

  if attributes.key?(:'pickup_cutoff_time_wednesday')
    self.pickup_cutoff_time_wednesday = attributes[:'pickup_cutoff_time_wednesday']
  end

  if attributes.key?(:'pickup_start_time_friday')
    self.pickup_start_time_friday = attributes[:'pickup_start_time_friday']
  end

  if attributes.key?(:'pickup_start_time_monday')
    self.pickup_start_time_monday = attributes[:'pickup_start_time_monday']
  end

  if attributes.key?(:'pickup_start_time_saturday')
    self.pickup_start_time_saturday = attributes[:'pickup_start_time_saturday']
  end

  if attributes.key?(:'pickup_start_time_sunday')
    self.pickup_start_time_sunday = attributes[:'pickup_start_time_sunday']
  end

  if attributes.key?(:'pickup_start_time_thursday')
    self.pickup_start_time_thursday = attributes[:'pickup_start_time_thursday']
  end

  if attributes.key?(:'pickup_start_time_tuesday')
    self.pickup_start_time_tuesday = attributes[:'pickup_start_time_tuesday']
  end

  if attributes.key?(:'pickup_start_time_wednesday')
    self.pickup_start_time_wednesday = attributes[:'pickup_start_time_wednesday']
  end

  if attributes.key?(:'pickup_tz')
    self.pickup_tz = attributes[:'pickup_tz']
  end

  if attributes.key?(:'postal_code')
    self.postal_code = attributes[:'postal_code']
  end

  if attributes.key?(:'process_days')
    self.process_days = attributes[:'process_days']
  end

  if attributes.key?(:'process_inventory_start_time')
    self.process_inventory_start_time = attributes[:'process_inventory_start_time']
  end

  if attributes.key?(:'process_inventory_stop_time')
    self.process_inventory_stop_time = attributes[:'process_inventory_stop_time']
  end

  if attributes.key?(:'require_asn')
    self.require_asn = attributes[:'require_asn']
  end

  if attributes.key?(:'send_kit_instead_of_components')
    self.send_kit_instead_of_components = attributes[:'send_kit_instead_of_components']
  end

  if attributes.key?(:'shipment_cutoff_time_friday')
    self.shipment_cutoff_time_friday = attributes[:'shipment_cutoff_time_friday']
  end

  if attributes.key?(:'shipment_cutoff_time_monday')
    self.shipment_cutoff_time_monday = attributes[:'shipment_cutoff_time_monday']
  end

  if attributes.key?(:'shipment_cutoff_time_saturday')
    self.shipment_cutoff_time_saturday = attributes[:'shipment_cutoff_time_saturday']
  end

  if attributes.key?(:'shipment_cutoff_time_sunday')
    self.shipment_cutoff_time_sunday = attributes[:'shipment_cutoff_time_sunday']
  end

  if attributes.key?(:'shipment_cutoff_time_thursday')
    self.shipment_cutoff_time_thursday = attributes[:'shipment_cutoff_time_thursday']
  end

  if attributes.key?(:'shipment_cutoff_time_tuesday')
    self.shipment_cutoff_time_tuesday = attributes[:'shipment_cutoff_time_tuesday']
  end

  if attributes.key?(:'shipment_cutoff_time_wednesday')
    self.shipment_cutoff_time_wednesday = attributes[:'shipment_cutoff_time_wednesday']
  end

  if attributes.key?(:'state')
    self.state = attributes[:'state']
  end

  if attributes.key?(:'transmit_blank_costs')
    self.transmit_blank_costs = attributes[:'transmit_blank_costs']
  end

  if attributes.key?(:'transport')
    self.transport = attributes[:'transport']
  end
end

Instance Attribute Details

#address1Object

Address line 1 of the distribution center



19
20
21
# File 'lib/ultracart_api/models/distribution_center.rb', line 19

def address1
  @address1
end

#address2Object

Address line 2 of the distribution center



22
23
24
# File 'lib/ultracart_api/models/distribution_center.rb', line 22

def address2
  @address2
end

#cityObject

City of the distribution center



25
26
27
# File 'lib/ultracart_api/models/distribution_center.rb', line 25

def city
  @city
end

#codeObject

Unique code for this distribution center



28
29
30
# File 'lib/ultracart_api/models/distribution_center.rb', line 28

def code
  @code
end

#country_codeObject

Country code of the distribution center



31
32
33
# File 'lib/ultracart_api/models/distribution_center.rb', line 31

def country_code
  @country_code
end

#default_centerObject

True if this is the default distribution center on the account



34
35
36
# File 'lib/ultracart_api/models/distribution_center.rb', line 34

def default_center
  @default_center
end

#default_handles_all_itemsObject

True if this distribution center handles all new items by default



37
38
39
# File 'lib/ultracart_api/models/distribution_center.rb', line 37

def default_handles_all_items
  @default_handles_all_items
end

#distribution_center_oidObject

Distribution center object identifier



40
41
42
# File 'lib/ultracart_api/models/distribution_center.rb', line 40

def distribution_center_oid
  @distribution_center_oid
end

#dunsObject

DUNS number assigned to this distribution center (EDI)



43
44
45
# File 'lib/ultracart_api/models/distribution_center.rb', line 43

def duns
  @duns
end

#estimate_from_distribution_center_oidObject

Estimate shipments for this distribution center as if they came from the other distribution center



46
47
48
# File 'lib/ultracart_api/models/distribution_center.rb', line 46

def estimate_from_distribution_center_oid
  @estimate_from_distribution_center_oid
end

#ftp_passwordObject

Password associated with the virtual FTP



49
50
51
# File 'lib/ultracart_api/models/distribution_center.rb', line 49

def ftp_password
  @ftp_password
end

#hold_auto_order_before_shipment_minutesObject

Returns the value of attribute hold_auto_order_before_shipment_minutes.



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

def hold_auto_order_before_shipment_minutes
  @hold_auto_order_before_shipment_minutes
end

#hold_before_shipment_minutesObject

The number of minutes to hold a shipment



52
53
54
# File 'lib/ultracart_api/models/distribution_center.rb', line 52

def hold_before_shipment_minutes
  @hold_before_shipment_minutes
end

#hold_before_transmissionObject

True if the shipment should be held before transmission and require a manual release



55
56
57
# File 'lib/ultracart_api/models/distribution_center.rb', line 55

def hold_before_transmission
  @hold_before_transmission
end

#latitudeObject

Latitude where the distribution center is located



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

def latitude
  @latitude
end

#longitudeObject

Longitude where the distribution center is located



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

def longitude
  @longitude
end

#nameObject

Name of this distribution center



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

def name
  @name
end

#no_customer_direct_shipmentsObject

True if this distribution center does not handle customer direct shipments



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

def no_customer_direct_shipments
  @no_customer_direct_shipments
end

#no_split_shipmentObject

True if this distribution center is not allowed to participate in a split shipment.



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

def no_split_shipment
  @no_split_shipment
end

#pickup_cutoff_time_fridayObject

The time (EST) after which pickups will not be available on Friday



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

def pickup_cutoff_time_friday
  @pickup_cutoff_time_friday
end

#pickup_cutoff_time_mondayObject

The time (EST) after which pickups will not be available on Monday



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

def pickup_cutoff_time_monday
  @pickup_cutoff_time_monday
end

#pickup_cutoff_time_saturdayObject

The time (EST) after which pickups will not be available on Saturday



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

def pickup_cutoff_time_saturday
  @pickup_cutoff_time_saturday
end

#pickup_cutoff_time_sundayObject

The time (EST) after which pickups will not be available on Sunday



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

def pickup_cutoff_time_sunday
  @pickup_cutoff_time_sunday
end

#pickup_cutoff_time_thursdayObject

The time (EST) after which pickups will not be available on Thursday



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

def pickup_cutoff_time_thursday
  @pickup_cutoff_time_thursday
end

#pickup_cutoff_time_tuesdayObject

The time (EST) after which pickups will not be available on Tuesday



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

def pickup_cutoff_time_tuesday
  @pickup_cutoff_time_tuesday
end

#pickup_cutoff_time_wednesdayObject

The time (EST) after which pickups will not be available on Wednesday



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

def pickup_cutoff_time_wednesday
  @pickup_cutoff_time_wednesday
end

#pickup_start_time_fridayObject

The time (EST) after which pickups are available on Friday



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

def pickup_start_time_friday
  @pickup_start_time_friday
end

#pickup_start_time_mondayObject

The time (EST) after which pickups are available on Monday



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

def pickup_start_time_monday
  @pickup_start_time_monday
end

#pickup_start_time_saturdayObject

The time (EST) after which pickups are available on Saturday



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

def pickup_start_time_saturday
  @pickup_start_time_saturday
end

#pickup_start_time_sundayObject

The time (EST) after which pickups are available on Sunday



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

def pickup_start_time_sunday
  @pickup_start_time_sunday
end

#pickup_start_time_thursdayObject

The time (EST) after which pickups are available on Thursday



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

def pickup_start_time_thursday
  @pickup_start_time_thursday
end

#pickup_start_time_tuesdayObject

The time (EST) after which pickups are available on Tuesday



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

def pickup_start_time_tuesday
  @pickup_start_time_tuesday
end

#pickup_start_time_wednesdayObject

The time (EST) after which pickups are available on Wednesday



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

def pickup_start_time_wednesday
  @pickup_start_time_wednesday
end

#pickup_tzObject

The IANA timezone for all pickup times



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

def pickup_tz
  @pickup_tz
end

#postal_codeObject

Postal code of the distribution center



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

def postal_code
  @postal_code
end

#process_daysObject

The number of processing days required before an order ships



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

def process_days
  @process_days
end

#process_inventory_start_timeObject

The time (EST) after which inventory updates will be processed



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

def process_inventory_start_time
  @process_inventory_start_time
end

#process_inventory_stop_timeObject

The time (EST) before which inventory updates will be processed



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

def process_inventory_stop_time
  @process_inventory_stop_time
end

#require_asnObject

True if ASNs are required for this distribution center (EDI)



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

def require_asn
  @require_asn
end

#send_kit_instead_of_componentsObject

True if we should send the kit instead of the components



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

def send_kit_instead_of_components
  @send_kit_instead_of_components
end

#shipment_cutoff_time_fridayObject

The time (EST) after which shipments will not be processed on Friday



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

def shipment_cutoff_time_friday
  @shipment_cutoff_time_friday
end

#shipment_cutoff_time_mondayObject

The time (EST) after which shipments will not be processed on Monday



141
142
143
# File 'lib/ultracart_api/models/distribution_center.rb', line 141

def shipment_cutoff_time_monday
  @shipment_cutoff_time_monday
end

#shipment_cutoff_time_saturdayObject

The time (EST) after which shipments will not be processed on Saturday



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

def shipment_cutoff_time_saturday
  @shipment_cutoff_time_saturday
end

#shipment_cutoff_time_sundayObject

The time (EST) after which shipments will not be processed on Sunday



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

def shipment_cutoff_time_sunday
  @shipment_cutoff_time_sunday
end

#shipment_cutoff_time_thursdayObject

The time (EST) after which shipments will not be processed on Thursday



150
151
152
# File 'lib/ultracart_api/models/distribution_center.rb', line 150

def shipment_cutoff_time_thursday
  @shipment_cutoff_time_thursday
end

#shipment_cutoff_time_tuesdayObject

The time (EST) after which shipments will not be processed on Tuesday



153
154
155
# File 'lib/ultracart_api/models/distribution_center.rb', line 153

def shipment_cutoff_time_tuesday
  @shipment_cutoff_time_tuesday
end

#shipment_cutoff_time_wednesdayObject

The time (EST) after which shipments will not be processed on Wednesday



156
157
158
# File 'lib/ultracart_api/models/distribution_center.rb', line 156

def shipment_cutoff_time_wednesday
  @shipment_cutoff_time_wednesday
end

#stateObject

State of the distribution center



159
160
161
# File 'lib/ultracart_api/models/distribution_center.rb', line 159

def state
  @state
end

#transmit_blank_costsObject

True if monetary amounts should be zeroed before transmission



162
163
164
# File 'lib/ultracart_api/models/distribution_center.rb', line 162

def transmit_blank_costs
  @transmit_blank_costs
end

#transportObject

Transport mechanism for this distribution center



165
166
167
# File 'lib/ultracart_api/models/distribution_center.rb', line 165

def transport
  @transport
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



224
225
226
# File 'lib/ultracart_api/models/distribution_center.rb', line 224

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



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

def self.attribute_map
  {
    :'address1' => :'address1',
    :'address2' => :'address2',
    :'city' => :'city',
    :'code' => :'code',
    :'country_code' => :'country_code',
    :'default_center' => :'default_center',
    :'default_handles_all_items' => :'default_handles_all_items',
    :'distribution_center_oid' => :'distribution_center_oid',
    :'duns' => :'duns',
    :'estimate_from_distribution_center_oid' => :'estimate_from_distribution_center_oid',
    :'ftp_password' => :'ftp_password',
    :'hold_before_shipment_minutes' => :'hold_before_shipment_minutes',
    :'hold_before_transmission' => :'hold_before_transmission',
    :'hold_auto_order_before_shipment_minutes' => :'holdAutoOrderBeforeShipmentMinutes',
    :'latitude' => :'latitude',
    :'longitude' => :'longitude',
    :'name' => :'name',
    :'no_customer_direct_shipments' => :'no_customer_direct_shipments',
    :'no_split_shipment' => :'no_split_shipment',
    :'pickup_cutoff_time_friday' => :'pickup_cutoff_time_friday',
    :'pickup_cutoff_time_monday' => :'pickup_cutoff_time_monday',
    :'pickup_cutoff_time_saturday' => :'pickup_cutoff_time_saturday',
    :'pickup_cutoff_time_sunday' => :'pickup_cutoff_time_sunday',
    :'pickup_cutoff_time_thursday' => :'pickup_cutoff_time_thursday',
    :'pickup_cutoff_time_tuesday' => :'pickup_cutoff_time_tuesday',
    :'pickup_cutoff_time_wednesday' => :'pickup_cutoff_time_wednesday',
    :'pickup_start_time_friday' => :'pickup_start_time_friday',
    :'pickup_start_time_monday' => :'pickup_start_time_monday',
    :'pickup_start_time_saturday' => :'pickup_start_time_saturday',
    :'pickup_start_time_sunday' => :'pickup_start_time_sunday',
    :'pickup_start_time_thursday' => :'pickup_start_time_thursday',
    :'pickup_start_time_tuesday' => :'pickup_start_time_tuesday',
    :'pickup_start_time_wednesday' => :'pickup_start_time_wednesday',
    :'pickup_tz' => :'pickup_tz',
    :'postal_code' => :'postal_code',
    :'process_days' => :'process_days',
    :'process_inventory_start_time' => :'process_inventory_start_time',
    :'process_inventory_stop_time' => :'process_inventory_stop_time',
    :'require_asn' => :'require_asn',
    :'send_kit_instead_of_components' => :'send_kit_instead_of_components',
    :'shipment_cutoff_time_friday' => :'shipment_cutoff_time_friday',
    :'shipment_cutoff_time_monday' => :'shipment_cutoff_time_monday',
    :'shipment_cutoff_time_saturday' => :'shipment_cutoff_time_saturday',
    :'shipment_cutoff_time_sunday' => :'shipment_cutoff_time_sunday',
    :'shipment_cutoff_time_thursday' => :'shipment_cutoff_time_thursday',
    :'shipment_cutoff_time_tuesday' => :'shipment_cutoff_time_tuesday',
    :'shipment_cutoff_time_wednesday' => :'shipment_cutoff_time_wednesday',
    :'state' => :'state',
    :'transmit_blank_costs' => :'transmit_blank_costs',
    :'transport' => :'transport'
  }
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



591
592
593
# File 'lib/ultracart_api/models/distribution_center.rb', line 591

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



285
286
287
288
# File 'lib/ultracart_api/models/distribution_center.rb', line 285

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



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

def self.openapi_types
  {
    :'address1' => :'String',
    :'address2' => :'String',
    :'city' => :'String',
    :'code' => :'String',
    :'country_code' => :'String',
    :'default_center' => :'Boolean',
    :'default_handles_all_items' => :'Boolean',
    :'distribution_center_oid' => :'Integer',
    :'duns' => :'String',
    :'estimate_from_distribution_center_oid' => :'Integer',
    :'ftp_password' => :'String',
    :'hold_before_shipment_minutes' => :'Integer',
    :'hold_before_transmission' => :'Boolean',
    :'hold_auto_order_before_shipment_minutes' => :'Integer',
    :'latitude' => :'Float',
    :'longitude' => :'Float',
    :'name' => :'String',
    :'no_customer_direct_shipments' => :'Boolean',
    :'no_split_shipment' => :'Boolean',
    :'pickup_cutoff_time_friday' => :'String',
    :'pickup_cutoff_time_monday' => :'String',
    :'pickup_cutoff_time_saturday' => :'String',
    :'pickup_cutoff_time_sunday' => :'String',
    :'pickup_cutoff_time_thursday' => :'String',
    :'pickup_cutoff_time_tuesday' => :'String',
    :'pickup_cutoff_time_wednesday' => :'String',
    :'pickup_start_time_friday' => :'String',
    :'pickup_start_time_monday' => :'String',
    :'pickup_start_time_saturday' => :'String',
    :'pickup_start_time_sunday' => :'String',
    :'pickup_start_time_thursday' => :'String',
    :'pickup_start_time_tuesday' => :'String',
    :'pickup_start_time_wednesday' => :'String',
    :'pickup_tz' => :'String',
    :'postal_code' => :'String',
    :'process_days' => :'Integer',
    :'process_inventory_start_time' => :'String',
    :'process_inventory_stop_time' => :'String',
    :'require_asn' => :'Boolean',
    :'send_kit_instead_of_components' => :'Boolean',
    :'shipment_cutoff_time_friday' => :'String',
    :'shipment_cutoff_time_monday' => :'String',
    :'shipment_cutoff_time_saturday' => :'String',
    :'shipment_cutoff_time_sunday' => :'String',
    :'shipment_cutoff_time_thursday' => :'String',
    :'shipment_cutoff_time_tuesday' => :'String',
    :'shipment_cutoff_time_wednesday' => :'String',
    :'state' => :'String',
    :'transmit_blank_costs' => :'Boolean',
    :'transport' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      address1 == o.address1 &&
      address2 == o.address2 &&
      city == o.city &&
      code == o.code &&
      country_code == o.country_code &&
      default_center == o.default_center &&
      default_handles_all_items == o.default_handles_all_items &&
      distribution_center_oid == o.distribution_center_oid &&
      duns == o.duns &&
      estimate_from_distribution_center_oid == o.estimate_from_distribution_center_oid &&
      ftp_password == o.ftp_password &&
      hold_before_shipment_minutes == o.hold_before_shipment_minutes &&
      hold_before_transmission == o.hold_before_transmission &&
      hold_auto_order_before_shipment_minutes == o.hold_auto_order_before_shipment_minutes &&
      latitude == o.latitude &&
      longitude == o.longitude &&
      name == o.name &&
      no_customer_direct_shipments == o.no_customer_direct_shipments &&
      no_split_shipment == o.no_split_shipment &&
      pickup_cutoff_time_friday == o.pickup_cutoff_time_friday &&
      pickup_cutoff_time_monday == o.pickup_cutoff_time_monday &&
      pickup_cutoff_time_saturday == o.pickup_cutoff_time_saturday &&
      pickup_cutoff_time_sunday == o.pickup_cutoff_time_sunday &&
      pickup_cutoff_time_thursday == o.pickup_cutoff_time_thursday &&
      pickup_cutoff_time_tuesday == o.pickup_cutoff_time_tuesday &&
      pickup_cutoff_time_wednesday == o.pickup_cutoff_time_wednesday &&
      pickup_start_time_friday == o.pickup_start_time_friday &&
      pickup_start_time_monday == o.pickup_start_time_monday &&
      pickup_start_time_saturday == o.pickup_start_time_saturday &&
      pickup_start_time_sunday == o.pickup_start_time_sunday &&
      pickup_start_time_thursday == o.pickup_start_time_thursday &&
      pickup_start_time_tuesday == o.pickup_start_time_tuesday &&
      pickup_start_time_wednesday == o.pickup_start_time_wednesday &&
      pickup_tz == o.pickup_tz &&
      postal_code == o.postal_code &&
      process_days == o.process_days &&
      process_inventory_start_time == o.process_inventory_start_time &&
      process_inventory_stop_time == o.process_inventory_stop_time &&
      require_asn == o.require_asn &&
      send_kit_instead_of_components == o.send_kit_instead_of_components &&
      shipment_cutoff_time_friday == o.shipment_cutoff_time_friday &&
      shipment_cutoff_time_monday == o.shipment_cutoff_time_monday &&
      shipment_cutoff_time_saturday == o.shipment_cutoff_time_saturday &&
      shipment_cutoff_time_sunday == o.shipment_cutoff_time_sunday &&
      shipment_cutoff_time_thursday == o.shipment_cutoff_time_thursday &&
      shipment_cutoff_time_tuesday == o.shipment_cutoff_time_tuesday &&
      shipment_cutoff_time_wednesday == o.shipment_cutoff_time_wednesday &&
      state == o.state &&
      transmit_blank_costs == o.transmit_blank_costs &&
      transport == o.transport
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



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

def _deserialize(type, value)
  case type.to_sym
  when :Time
    Time.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
    # models (e.g. Pet) or oneOf
    klass = UltracartClient.const_get(type)
    klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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



693
694
695
696
697
698
699
700
701
702
703
704
705
# File 'lib/ultracart_api/models/distribution_center.rb', line 693

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



598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
# File 'lib/ultracart_api/models/distribution_center.rb', line 598

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  self.class.openapi_types.each_pair do |key, type|
    if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      self.send("#{key}=", nil)
    elsif 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
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


578
579
580
# File 'lib/ultracart_api/models/distribution_center.rb', line 578

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



584
585
586
# File 'lib/ultracart_api/models/distribution_center.rb', line 584

def hash
  [address1, address2, city, code, country_code, default_center, default_handles_all_items, distribution_center_oid, duns, estimate_from_distribution_center_oid, ftp_password, hold_before_shipment_minutes, hold_before_transmission, hold_auto_order_before_shipment_minutes, latitude, longitude, name, no_customer_direct_shipments, no_split_shipment, pickup_cutoff_time_friday, pickup_cutoff_time_monday, pickup_cutoff_time_saturday, pickup_cutoff_time_sunday, pickup_cutoff_time_thursday, pickup_cutoff_time_tuesday, pickup_cutoff_time_wednesday, pickup_start_time_friday, pickup_start_time_monday, pickup_start_time_saturday, pickup_start_time_sunday, pickup_start_time_thursday, pickup_start_time_tuesday, pickup_start_time_wednesday, pickup_tz, postal_code, process_days, process_inventory_start_time, process_inventory_stop_time, require_asn, send_kit_instead_of_components, shipment_cutoff_time_friday, shipment_cutoff_time_monday, shipment_cutoff_time_saturday, shipment_cutoff_time_sunday, shipment_cutoff_time_thursday, shipment_cutoff_time_tuesday, shipment_cutoff_time_wednesday, state, transmit_blank_costs, transport].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



508
509
510
511
# File 'lib/ultracart_api/models/distribution_center.rb', line 508

def list_invalid_properties
  invalid_properties = Array.new
  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



669
670
671
# File 'lib/ultracart_api/models/distribution_center.rb', line 669

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



675
676
677
678
679
680
681
682
683
684
685
686
687
# File 'lib/ultracart_api/models/distribution_center.rb', line 675

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



663
664
665
# File 'lib/ultracart_api/models/distribution_center.rb', line 663

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



515
516
517
# File 'lib/ultracart_api/models/distribution_center.rb', line 515

def valid?
  true
end