Class: UltracartClient::ItemShipping
- Inherits:
-
Object
- Object
- UltracartClient::ItemShipping
- Defined in:
- lib/ultracart_api/models/item_shipping.rb
Instance Attribute Summary collapse
-
#allow_back_order ⇒ Object
Allow back order.
-
#amazon_fba ⇒ Object
Fulfillment by Amazon.com.
-
#case_inner_packs ⇒ Object
Case inner packs.
-
#case_units ⇒ Object
Case units.
-
#cases ⇒ Object
Cases.
-
#collect_serial_numbers ⇒ Object
This item is on pre-order.
-
#country_code_of_origin ⇒ Object
Country code of origin for customs forms.
-
#customs_description ⇒ Object
Customs description.
-
#customs_value ⇒ Object
Customs value.
-
#delivery_on_friday ⇒ Object
Delivery on Friday.
-
#delivery_on_monday ⇒ Object
Delivery on Monday.
-
#delivery_on_saturday ⇒ Object
Delivery on Saturday.
-
#delivery_on_sunday ⇒ Object
Delivery on Sunday.
-
#delivery_on_thursday ⇒ Object
Delivery on Thursday.
-
#delivery_on_tuesday ⇒ Object
Delivery on Tuesday.
-
#delivery_on_wednesday ⇒ Object
Delivery on Wednesday.
-
#destination_markups ⇒ Object
Destination markups.
-
#destination_restrictions ⇒ Object
Destination restrictions.
-
#distribution_centers ⇒ Object
Distribution centers.
-
#eta ⇒ Object
Estimated time of arrival.
-
#free_shipping ⇒ Object
Qualifies for free shipping.
-
#freight_class ⇒ Object
Freight class.
-
#hazmat ⇒ Object
Hazardous material.
-
#hold_for_transmission ⇒ Object
Hold for transmission.
-
#include_on_packing_slip ⇒ Object
Force this item onto the packing slip even if there is no weight.
-
#made_to_order ⇒ Object
True if this item is made to order.
-
#made_to_order_lead_time ⇒ Object
Number of days lead time it takes to make the item before ite can ship.
-
#max_days_time_in_transit ⇒ Object
Maximum days allowed in transit.
-
#methods ⇒ Object
Methods.
-
#no_shipping_discount ⇒ Object
No shipping discounts.
-
#package_requirements ⇒ Object
Package requirements.
-
#perishable_class_name ⇒ Object
Perishable class name.
-
#perishable_class_oid ⇒ Object
Perishable class object identifier.
-
#preorder ⇒ Object
This item is on pre-order.
-
#require_delivery_date ⇒ Object
True to require customer to select a delivery date.
-
#restrict_shipment_on_friday ⇒ Object
Restrict shipment on Friday.
-
#restrict_shipment_on_monday ⇒ Object
Restrict shipment on Monday.
-
#restrict_shipment_on_saturday ⇒ Object
Restrict shipment on Saturday.
-
#restrict_shipment_on_sunday ⇒ Object
Restrict shipment on Sunday.
-
#restrict_shipment_on_thursday ⇒ Object
Restrict shipment on Thursday.
-
#restrict_shipment_on_tuesday ⇒ Object
Restrict shipment on Tuesday.
-
#restrict_shipment_on_wednesday ⇒ Object
Restrict shipment on Wednesday.
-
#ship_separately ⇒ Object
Ship this item in a separate box.
-
#ship_separately_additional_weight ⇒ Object
Returns the value of attribute ship_separately_additional_weight.
-
#ship_separately_height ⇒ Object
Returns the value of attribute ship_separately_height.
-
#ship_separately_length ⇒ Object
Returns the value of attribute ship_separately_length.
-
#ship_separately_package_special_type ⇒ Object
Ship separately package special type.
-
#ship_separately_width ⇒ Object
Returns the value of attribute ship_separately_width.
-
#special_product_type ⇒ Object
Special product type (USPS Media Mail).
-
#track_inventory ⇒ Object
Track inventory.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ItemShipping
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ ItemShipping
Initializes the object
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 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 289 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ItemShipping` 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::ItemShipping`. 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?(:'allow_back_order') self.allow_back_order = attributes[:'allow_back_order'] end if attributes.key?(:'amazon_fba') self.amazon_fba = attributes[:'amazon_fba'] end if attributes.key?(:'case_inner_packs') self.case_inner_packs = attributes[:'case_inner_packs'] end if attributes.key?(:'case_units') self.case_units = attributes[:'case_units'] end if attributes.key?(:'cases') if (value = attributes[:'cases']).is_a?(Array) self.cases = value end end if attributes.key?(:'collect_serial_numbers') self.collect_serial_numbers = attributes[:'collect_serial_numbers'] end if attributes.key?(:'country_code_of_origin') self.country_code_of_origin = attributes[:'country_code_of_origin'] end if attributes.key?(:'customs_description') self.customs_description = attributes[:'customs_description'] end if attributes.key?(:'customs_value') self.customs_value = attributes[:'customs_value'] end if attributes.key?(:'delivery_on_friday') self.delivery_on_friday = attributes[:'delivery_on_friday'] end if attributes.key?(:'delivery_on_monday') self.delivery_on_monday = attributes[:'delivery_on_monday'] end if attributes.key?(:'delivery_on_saturday') self.delivery_on_saturday = attributes[:'delivery_on_saturday'] end if attributes.key?(:'delivery_on_sunday') self.delivery_on_sunday = attributes[:'delivery_on_sunday'] end if attributes.key?(:'delivery_on_thursday') self.delivery_on_thursday = attributes[:'delivery_on_thursday'] end if attributes.key?(:'delivery_on_tuesday') self.delivery_on_tuesday = attributes[:'delivery_on_tuesday'] end if attributes.key?(:'delivery_on_wednesday') self.delivery_on_wednesday = attributes[:'delivery_on_wednesday'] end if attributes.key?(:'destination_markups') if (value = attributes[:'destination_markups']).is_a?(Array) self.destination_markups = value end end if attributes.key?(:'destination_restrictions') if (value = attributes[:'destination_restrictions']).is_a?(Array) self.destination_restrictions = value end end if attributes.key?(:'distribution_centers') if (value = attributes[:'distribution_centers']).is_a?(Array) self.distribution_centers = value end end if attributes.key?(:'eta') self.eta = attributes[:'eta'] end if attributes.key?(:'free_shipping') self.free_shipping = attributes[:'free_shipping'] end if attributes.key?(:'freight_class') self.freight_class = attributes[:'freight_class'] end if attributes.key?(:'hazmat') self.hazmat = attributes[:'hazmat'] end if attributes.key?(:'hold_for_transmission') self.hold_for_transmission = attributes[:'hold_for_transmission'] end if attributes.key?(:'include_on_packing_slip') self.include_on_packing_slip = attributes[:'include_on_packing_slip'] end if attributes.key?(:'made_to_order') self.made_to_order = attributes[:'made_to_order'] end if attributes.key?(:'made_to_order_lead_time') self.made_to_order_lead_time = attributes[:'made_to_order_lead_time'] end if attributes.key?(:'max_days_time_in_transit') self.max_days_time_in_transit = attributes[:'max_days_time_in_transit'] end if attributes.key?(:'methods') if (value = attributes[:'methods']).is_a?(Array) self.methods = value end end if attributes.key?(:'no_shipping_discount') self.no_shipping_discount = attributes[:'no_shipping_discount'] end if attributes.key?(:'package_requirements') if (value = attributes[:'package_requirements']).is_a?(Array) self.package_requirements = value end end if attributes.key?(:'perishable_class_name') self.perishable_class_name = attributes[:'perishable_class_name'] end if attributes.key?(:'perishable_class_oid') self.perishable_class_oid = attributes[:'perishable_class_oid'] end if attributes.key?(:'preorder') self.preorder = attributes[:'preorder'] end if attributes.key?(:'require_delivery_date') self.require_delivery_date = attributes[:'require_delivery_date'] end if attributes.key?(:'restrict_shipment_on_friday') self.restrict_shipment_on_friday = attributes[:'restrict_shipment_on_friday'] end if attributes.key?(:'restrict_shipment_on_monday') self.restrict_shipment_on_monday = attributes[:'restrict_shipment_on_monday'] end if attributes.key?(:'restrict_shipment_on_saturday') self.restrict_shipment_on_saturday = attributes[:'restrict_shipment_on_saturday'] end if attributes.key?(:'restrict_shipment_on_sunday') self.restrict_shipment_on_sunday = attributes[:'restrict_shipment_on_sunday'] end if attributes.key?(:'restrict_shipment_on_thursday') self.restrict_shipment_on_thursday = attributes[:'restrict_shipment_on_thursday'] end if attributes.key?(:'restrict_shipment_on_tuesday') self.restrict_shipment_on_tuesday = attributes[:'restrict_shipment_on_tuesday'] end if attributes.key?(:'restrict_shipment_on_wednesday') self.restrict_shipment_on_wednesday = attributes[:'restrict_shipment_on_wednesday'] end if attributes.key?(:'ship_separately') self.ship_separately = attributes[:'ship_separately'] end if attributes.key?(:'ship_separately_additional_weight') self.ship_separately_additional_weight = attributes[:'ship_separately_additional_weight'] end if attributes.key?(:'ship_separately_height') self.ship_separately_height = attributes[:'ship_separately_height'] end if attributes.key?(:'ship_separately_length') self.ship_separately_length = attributes[:'ship_separately_length'] end if attributes.key?(:'ship_separately_package_special_type') self.ship_separately_package_special_type = attributes[:'ship_separately_package_special_type'] end if attributes.key?(:'ship_separately_width') self.ship_separately_width = attributes[:'ship_separately_width'] end if attributes.key?(:'special_product_type') self.special_product_type = attributes[:'special_product_type'] end if attributes.key?(:'track_inventory') self.track_inventory = attributes[:'track_inventory'] end end |
Instance Attribute Details
#allow_back_order ⇒ Object
Allow back order
19 20 21 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 19 def allow_back_order @allow_back_order end |
#amazon_fba ⇒ Object
Fulfillment by Amazon.com
22 23 24 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 22 def amazon_fba @amazon_fba end |
#case_inner_packs ⇒ Object
Case inner packs
25 26 27 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 25 def case_inner_packs @case_inner_packs end |
#case_units ⇒ Object
Case units
28 29 30 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 28 def case_units @case_units end |
#cases ⇒ Object
Cases
31 32 33 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 31 def cases @cases end |
#collect_serial_numbers ⇒ Object
This item is on pre-order
34 35 36 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 34 def collect_serial_numbers @collect_serial_numbers end |
#country_code_of_origin ⇒ Object
Country code of origin for customs forms. (ISO-3166 two letter code)
37 38 39 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 37 def country_code_of_origin @country_code_of_origin end |
#customs_description ⇒ Object
Customs description
40 41 42 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 40 def customs_description @customs_description end |
#customs_value ⇒ Object
Customs value
43 44 45 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 43 def customs_value @customs_value end |
#delivery_on_friday ⇒ Object
Delivery on Friday
46 47 48 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 46 def delivery_on_friday @delivery_on_friday end |
#delivery_on_monday ⇒ Object
Delivery on Monday
49 50 51 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 49 def delivery_on_monday @delivery_on_monday end |
#delivery_on_saturday ⇒ Object
Delivery on Saturday
52 53 54 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 52 def delivery_on_saturday @delivery_on_saturday end |
#delivery_on_sunday ⇒ Object
Delivery on Sunday
55 56 57 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 55 def delivery_on_sunday @delivery_on_sunday end |
#delivery_on_thursday ⇒ Object
Delivery on Thursday
58 59 60 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 58 def delivery_on_thursday @delivery_on_thursday end |
#delivery_on_tuesday ⇒ Object
Delivery on Tuesday
61 62 63 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 61 def delivery_on_tuesday @delivery_on_tuesday end |
#delivery_on_wednesday ⇒ Object
Delivery on Wednesday
64 65 66 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 64 def delivery_on_wednesday @delivery_on_wednesday end |
#destination_markups ⇒ Object
Destination markups
67 68 69 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 67 def destination_markups @destination_markups end |
#destination_restrictions ⇒ Object
Destination restrictions
70 71 72 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 70 def destination_restrictions @destination_restrictions end |
#distribution_centers ⇒ Object
Distribution centers
73 74 75 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 73 def distribution_centers @distribution_centers end |
#eta ⇒ Object
Estimated time of arrival
76 77 78 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 76 def eta @eta end |
#free_shipping ⇒ Object
Qualifies for free shipping
79 80 81 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 79 def free_shipping @free_shipping end |
#freight_class ⇒ Object
Freight class
82 83 84 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 82 def freight_class @freight_class end |
#hazmat ⇒ Object
Hazardous material
85 86 87 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 85 def hazmat @hazmat end |
#hold_for_transmission ⇒ Object
Hold for transmission
88 89 90 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 88 def hold_for_transmission @hold_for_transmission end |
#include_on_packing_slip ⇒ Object
Force this item onto the packing slip even if there is no weight.
91 92 93 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 91 def include_on_packing_slip @include_on_packing_slip end |
#made_to_order ⇒ Object
True if this item is made to order
94 95 96 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 94 def made_to_order @made_to_order end |
#made_to_order_lead_time ⇒ Object
Number of days lead time it takes to make the item before ite can ship
97 98 99 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 97 def made_to_order_lead_time @made_to_order_lead_time end |
#max_days_time_in_transit ⇒ Object
Maximum days allowed in transit
100 101 102 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 100 def max_days_time_in_transit @max_days_time_in_transit end |
#methods ⇒ Object
Methods
103 104 105 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 103 def methods @methods end |
#no_shipping_discount ⇒ Object
No shipping discounts
106 107 108 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 106 def no_shipping_discount @no_shipping_discount end |
#package_requirements ⇒ Object
Package requirements
109 110 111 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 109 def package_requirements @package_requirements end |
#perishable_class_name ⇒ Object
Perishable class name
112 113 114 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 112 def perishable_class_name @perishable_class_name end |
#perishable_class_oid ⇒ Object
Perishable class object identifier
115 116 117 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 115 def perishable_class_oid @perishable_class_oid end |
#preorder ⇒ Object
This item is on pre-order
118 119 120 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 118 def preorder @preorder end |
#require_delivery_date ⇒ Object
True to require customer to select a delivery date
121 122 123 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 121 def require_delivery_date @require_delivery_date end |
#restrict_shipment_on_friday ⇒ Object
Restrict shipment on Friday
124 125 126 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 124 def restrict_shipment_on_friday @restrict_shipment_on_friday end |
#restrict_shipment_on_monday ⇒ Object
Restrict shipment on Monday
127 128 129 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 127 def restrict_shipment_on_monday @restrict_shipment_on_monday end |
#restrict_shipment_on_saturday ⇒ Object
Restrict shipment on Saturday
130 131 132 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 130 def restrict_shipment_on_saturday @restrict_shipment_on_saturday end |
#restrict_shipment_on_sunday ⇒ Object
Restrict shipment on Sunday
133 134 135 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 133 def restrict_shipment_on_sunday @restrict_shipment_on_sunday end |
#restrict_shipment_on_thursday ⇒ Object
Restrict shipment on Thursday
136 137 138 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 136 def restrict_shipment_on_thursday @restrict_shipment_on_thursday end |
#restrict_shipment_on_tuesday ⇒ Object
Restrict shipment on Tuesday
139 140 141 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 139 def restrict_shipment_on_tuesday @restrict_shipment_on_tuesday end |
#restrict_shipment_on_wednesday ⇒ Object
Restrict shipment on Wednesday
142 143 144 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 142 def restrict_shipment_on_wednesday @restrict_shipment_on_wednesday end |
#ship_separately ⇒ Object
Ship this item in a separate box
145 146 147 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 145 def ship_separately @ship_separately end |
#ship_separately_additional_weight ⇒ Object
Returns the value of attribute ship_separately_additional_weight.
147 148 149 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 147 def ship_separately_additional_weight @ship_separately_additional_weight end |
#ship_separately_height ⇒ Object
Returns the value of attribute ship_separately_height.
149 150 151 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 149 def ship_separately_height @ship_separately_height end |
#ship_separately_length ⇒ Object
Returns the value of attribute ship_separately_length.
151 152 153 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 151 def ship_separately_length @ship_separately_length end |
#ship_separately_package_special_type ⇒ Object
Ship separately package special type
154 155 156 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 154 def ship_separately_package_special_type @ship_separately_package_special_type end |
#ship_separately_width ⇒ Object
Returns the value of attribute ship_separately_width.
156 157 158 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 156 def ship_separately_width @ship_separately_width end |
#special_product_type ⇒ Object
Special product type (USPS Media Mail)
159 160 161 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 159 def special_product_type @special_product_type end |
#track_inventory ⇒ Object
Track inventory
162 163 164 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 162 def track_inventory @track_inventory end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
221 222 223 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 221 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 165 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', :'hold_for_transmission' => :'hold_for_transmission', :'include_on_packing_slip' => :'include_on_packing_slip', :'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 |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
615 616 617 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 615 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
282 283 284 285 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 282 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 226 def self.openapi_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', :'hold_for_transmission' => :'Boolean', :'include_on_packing_slip' => :'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.
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 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 545 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 && hold_for_transmission == o.hold_for_transmission && include_on_packing_slip == o.include_on_packing_slip && 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
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 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 646 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
717 718 719 720 721 722 723 724 725 726 727 728 729 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 717 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
622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 622 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
602 603 604 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 602 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
608 609 610 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 608 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, hold_for_transmission, include_on_packing_slip, 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_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
517 518 519 520 521 522 523 524 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 517 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_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
693 694 695 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 693 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
699 700 701 702 703 704 705 706 707 708 709 710 711 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 699 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_s ⇒ String
Returns the string representation of the object
687 688 689 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 687 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
528 529 530 531 |
# File 'lib/ultracart_api/models/item_shipping.rb', line 528 def valid? return false if !@country_code_of_origin.nil? && @country_code_of_origin.to_s.length > 2 true end |