Class: AmzSpApi::OrdersApiModel::Order
- Inherits:
-
Object
- Object
- AmzSpApi::OrdersApiModel::Order
- Defined in:
- lib/orders-api-model/models/order.rb
Overview
Order information.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#amazon_order_id ⇒ Object
An Amazon-defined order identifier, in 3-7-7 format.
-
#automated_shipping_settings ⇒ Object
Returns the value of attribute automated_shipping_settings.
-
#buyer_info ⇒ Object
Returns the value of attribute buyer_info.
-
#buyer_invoice_preference ⇒ Object
The buyer’s invoicing preference.
-
#buyer_tax_information ⇒ Object
Returns the value of attribute buyer_tax_information.
-
#cba_displayable_shipping_label ⇒ Object
Custom ship label for Checkout by Amazon (CBA).
-
#default_ship_from_location_address ⇒ Object
Returns the value of attribute default_ship_from_location_address.
-
#earliest_delivery_date ⇒ Object
The start of the time period within which you have committed to fulfill the order.
-
#earliest_ship_date ⇒ Object
The start of the time period within which you have committed to ship the order.
-
#easy_ship_shipment_status ⇒ Object
Returns the value of attribute easy_ship_shipment_status.
-
#electronic_invoice_status ⇒ Object
Returns the value of attribute electronic_invoice_status.
-
#fulfillment_channel ⇒ Object
Whether the order was fulfilled by Amazon (AFN) or by the seller (MFN).
-
#fulfillment_instruction ⇒ Object
Returns the value of attribute fulfillment_instruction.
-
#has_regulated_items ⇒ Object
Whether the order contains regulated items which may require additional approval steps before being fulfilled.
-
#is_access_point_order ⇒ Object
When true, this order is marked to be delivered to an Access Point.
-
#is_business_order ⇒ Object
When true, the order is an Amazon Business order.
-
#is_estimated_ship_date_set ⇒ Object
When true, the estimated ship date is set for the order.
-
#is_global_express_enabled ⇒ Object
When true, the order is a GlobalExpress order.
-
#is_iba ⇒ Object
When true, the item within this order was bought and re-sold by Amazon Business EU SARL (ABEU).
-
#is_ispu ⇒ Object
When true, this order is marked to be picked up from a store rather than delivered.
-
#is_premium_order ⇒ Object
When true, the order has a Premium Shipping Service Level Agreement.
-
#is_prime ⇒ Object
When true, the order is a seller-fulfilled Amazon Prime order.
-
#is_replacement_order ⇒ Object
When true, this is a replacement order.
-
#is_sold_by_ab ⇒ Object
When true, the item within this order was bought and re-sold by Amazon Business EU SARL (ABEU).
-
#last_update_date ⇒ Object
The date when the order was last updated.
-
#latest_delivery_date ⇒ Object
The end of the time period within which you have committed to fulfill the order.
-
#latest_ship_date ⇒ Object
The end of the time period within which you have committed to ship the order.
-
#marketplace_id ⇒ Object
The identifier for the marketplace where the order was placed.
-
#marketplace_tax_info ⇒ Object
Returns the value of attribute marketplace_tax_info.
-
#number_of_items_shipped ⇒ Object
The number of items shipped.
-
#number_of_items_unshipped ⇒ Object
The number of items unshipped.
-
#order_channel ⇒ Object
The order channel of the first item in the order.
-
#order_status ⇒ Object
The current order status.
-
#order_total ⇒ Object
Returns the value of attribute order_total.
-
#order_type ⇒ Object
The type of the order.
-
#payment_execution_detail ⇒ Object
Returns the value of attribute payment_execution_detail.
-
#payment_method ⇒ Object
The payment method for the order.
-
#payment_method_details ⇒ Object
Returns the value of attribute payment_method_details.
-
#promise_response_due_date ⇒ Object
Indicates the date by which the seller must respond to the buyer with an estimated ship date.
-
#purchase_date ⇒ Object
The date when the order was created.
-
#replaced_order_id ⇒ Object
The order ID value for the order that is being replaced.
-
#sales_channel ⇒ Object
The sales channel of the first item in the order.
-
#seller_display_name ⇒ Object
The seller’s friendly name registered in the marketplace.
-
#seller_order_id ⇒ Object
A seller-defined order identifier.
-
#ship_service_level ⇒ Object
The shipment service level of the order.
-
#shipment_service_level_category ⇒ Object
The shipment service level category of the order.
-
#shipping_address ⇒ Object
Returns the value of attribute shipping_address.
Class Method Summary collapse
-
.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 = {}) ⇒ Order
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 = {}) ⇒ Order
Initializes the object
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 |
# File 'lib/orders-api-model/models/order.rb', line 282 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `AmzSpApi::OrdersApiModel::Order` 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 `AmzSpApi::OrdersApiModel::Order`. 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?(:'amazon_order_id') self.amazon_order_id = attributes[:'amazon_order_id'] end if attributes.key?(:'seller_order_id') self.seller_order_id = attributes[:'seller_order_id'] end if attributes.key?(:'purchase_date') self.purchase_date = attributes[:'purchase_date'] end if attributes.key?(:'last_update_date') self.last_update_date = attributes[:'last_update_date'] end if attributes.key?(:'order_status') self.order_status = attributes[:'order_status'] end if attributes.key?(:'fulfillment_channel') self.fulfillment_channel = attributes[:'fulfillment_channel'] end if attributes.key?(:'sales_channel') self.sales_channel = attributes[:'sales_channel'] end if attributes.key?(:'order_channel') self.order_channel = attributes[:'order_channel'] end if attributes.key?(:'ship_service_level') self.ship_service_level = attributes[:'ship_service_level'] end if attributes.key?(:'order_total') self.order_total = attributes[:'order_total'] end if attributes.key?(:'number_of_items_shipped') self.number_of_items_shipped = attributes[:'number_of_items_shipped'] end if attributes.key?(:'number_of_items_unshipped') self.number_of_items_unshipped = attributes[:'number_of_items_unshipped'] end if attributes.key?(:'payment_execution_detail') self.payment_execution_detail = attributes[:'payment_execution_detail'] end if attributes.key?(:'payment_method') self.payment_method = attributes[:'payment_method'] end if attributes.key?(:'payment_method_details') self.payment_method_details = attributes[:'payment_method_details'] end if attributes.key?(:'marketplace_id') self.marketplace_id = attributes[:'marketplace_id'] end if attributes.key?(:'shipment_service_level_category') self.shipment_service_level_category = attributes[:'shipment_service_level_category'] end if attributes.key?(:'easy_ship_shipment_status') self.easy_ship_shipment_status = attributes[:'easy_ship_shipment_status'] end if attributes.key?(:'cba_displayable_shipping_label') self.cba_displayable_shipping_label = attributes[:'cba_displayable_shipping_label'] end if attributes.key?(:'order_type') self.order_type = attributes[:'order_type'] end if attributes.key?(:'earliest_ship_date') self.earliest_ship_date = attributes[:'earliest_ship_date'] end if attributes.key?(:'latest_ship_date') self.latest_ship_date = attributes[:'latest_ship_date'] end if attributes.key?(:'earliest_delivery_date') self.earliest_delivery_date = attributes[:'earliest_delivery_date'] end if attributes.key?(:'latest_delivery_date') self.latest_delivery_date = attributes[:'latest_delivery_date'] end if attributes.key?(:'is_business_order') self.is_business_order = attributes[:'is_business_order'] end if attributes.key?(:'is_prime') self.is_prime = attributes[:'is_prime'] end if attributes.key?(:'is_premium_order') self.is_premium_order = attributes[:'is_premium_order'] end if attributes.key?(:'is_global_express_enabled') self.is_global_express_enabled = attributes[:'is_global_express_enabled'] end if attributes.key?(:'replaced_order_id') self.replaced_order_id = attributes[:'replaced_order_id'] end if attributes.key?(:'is_replacement_order') self.is_replacement_order = attributes[:'is_replacement_order'] end if attributes.key?(:'promise_response_due_date') self.promise_response_due_date = attributes[:'promise_response_due_date'] end if attributes.key?(:'is_estimated_ship_date_set') self.is_estimated_ship_date_set = attributes[:'is_estimated_ship_date_set'] end if attributes.key?(:'is_sold_by_ab') self.is_sold_by_ab = attributes[:'is_sold_by_ab'] end if attributes.key?(:'is_iba') self.is_iba = attributes[:'is_iba'] end if attributes.key?(:'default_ship_from_location_address') self.default_ship_from_location_address = attributes[:'default_ship_from_location_address'] end if attributes.key?(:'buyer_invoice_preference') self.buyer_invoice_preference = attributes[:'buyer_invoice_preference'] end if attributes.key?(:'buyer_tax_information') self.buyer_tax_information = attributes[:'buyer_tax_information'] end if attributes.key?(:'fulfillment_instruction') self.fulfillment_instruction = attributes[:'fulfillment_instruction'] end if attributes.key?(:'is_ispu') self.is_ispu = attributes[:'is_ispu'] end if attributes.key?(:'is_access_point_order') self.is_access_point_order = attributes[:'is_access_point_order'] end if attributes.key?(:'marketplace_tax_info') self.marketplace_tax_info = attributes[:'marketplace_tax_info'] end if attributes.key?(:'seller_display_name') self.seller_display_name = attributes[:'seller_display_name'] end if attributes.key?(:'shipping_address') self.shipping_address = attributes[:'shipping_address'] end if attributes.key?(:'buyer_info') self.buyer_info = attributes[:'buyer_info'] end if attributes.key?(:'automated_shipping_settings') self.automated_shipping_settings = attributes[:'automated_shipping_settings'] end if attributes.key?(:'has_regulated_items') self.has_regulated_items = attributes[:'has_regulated_items'] end if attributes.key?(:'electronic_invoice_status') self.electronic_invoice_status = attributes[:'electronic_invoice_status'] end end |
Instance Attribute Details
#amazon_order_id ⇒ Object
An Amazon-defined order identifier, in 3-7-7 format.
18 19 20 |
# File 'lib/orders-api-model/models/order.rb', line 18 def amazon_order_id @amazon_order_id end |
#automated_shipping_settings ⇒ Object
Returns the value of attribute automated_shipping_settings.
139 140 141 |
# File 'lib/orders-api-model/models/order.rb', line 139 def automated_shipping_settings @automated_shipping_settings end |
#buyer_info ⇒ Object
Returns the value of attribute buyer_info.
137 138 139 |
# File 'lib/orders-api-model/models/order.rb', line 137 def buyer_info @buyer_info end |
#buyer_invoice_preference ⇒ Object
The buyer’s invoicing preference. Available only in the TR marketplace.
118 119 120 |
# File 'lib/orders-api-model/models/order.rb', line 118 def buyer_invoice_preference @buyer_invoice_preference end |
#buyer_tax_information ⇒ Object
Returns the value of attribute buyer_tax_information.
120 121 122 |
# File 'lib/orders-api-model/models/order.rb', line 120 def buyer_tax_information @buyer_tax_information end |
#cba_displayable_shipping_label ⇒ Object
Custom ship label for Checkout by Amazon (CBA).
68 69 70 |
# File 'lib/orders-api-model/models/order.rb', line 68 def cba_displayable_shipping_label @cba_displayable_shipping_label end |
#default_ship_from_location_address ⇒ Object
Returns the value of attribute default_ship_from_location_address.
115 116 117 |
# File 'lib/orders-api-model/models/order.rb', line 115 def default_ship_from_location_address @default_ship_from_location_address end |
#earliest_delivery_date ⇒ Object
The start of the time period within which you have committed to fulfill the order. In ISO 8601 date time format. Returned only for seller-fulfilled orders.
80 81 82 |
# File 'lib/orders-api-model/models/order.rb', line 80 def earliest_delivery_date @earliest_delivery_date end |
#earliest_ship_date ⇒ Object
The start of the time period within which you have committed to ship the order. In ISO 8601 date time format. Returned only for seller-fulfilled orders. __Note__: EarliestShipDate might not be returned for orders placed before February 1, 2013.
74 75 76 |
# File 'lib/orders-api-model/models/order.rb', line 74 def earliest_ship_date @earliest_ship_date end |
#easy_ship_shipment_status ⇒ Object
Returns the value of attribute easy_ship_shipment_status.
65 66 67 |
# File 'lib/orders-api-model/models/order.rb', line 65 def easy_ship_shipment_status @easy_ship_shipment_status end |
#electronic_invoice_status ⇒ Object
Returns the value of attribute electronic_invoice_status.
144 145 146 |
# File 'lib/orders-api-model/models/order.rb', line 144 def electronic_invoice_status @electronic_invoice_status end |
#fulfillment_channel ⇒ Object
Whether the order was fulfilled by Amazon (AFN) or by the seller (MFN).
33 34 35 |
# File 'lib/orders-api-model/models/order.rb', line 33 def fulfillment_channel @fulfillment_channel end |
#fulfillment_instruction ⇒ Object
Returns the value of attribute fulfillment_instruction.
122 123 124 |
# File 'lib/orders-api-model/models/order.rb', line 122 def fulfillment_instruction @fulfillment_instruction end |
#has_regulated_items ⇒ Object
Whether the order contains regulated items which may require additional approval steps before being fulfilled.
142 143 144 |
# File 'lib/orders-api-model/models/order.rb', line 142 def has_regulated_items @has_regulated_items end |
#is_access_point_order ⇒ Object
When true, this order is marked to be delivered to an Access Point. The access location is chosen by the customer. Access Points include Amazon Hub Lockers, Amazon Hub Counters, and pickup points operated by carriers.
128 129 130 |
# File 'lib/orders-api-model/models/order.rb', line 128 def is_access_point_order @is_access_point_order end |
#is_business_order ⇒ Object
When true, the order is an Amazon Business order. An Amazon Business order is an order where the buyer is a Verified Business Buyer.
86 87 88 |
# File 'lib/orders-api-model/models/order.rb', line 86 def is_business_order @is_business_order end |
#is_estimated_ship_date_set ⇒ Object
When true, the estimated ship date is set for the order. Returned only for Sourcing on Demand orders.
107 108 109 |
# File 'lib/orders-api-model/models/order.rb', line 107 def is_estimated_ship_date_set @is_estimated_ship_date_set end |
#is_global_express_enabled ⇒ Object
When true, the order is a GlobalExpress order.
95 96 97 |
# File 'lib/orders-api-model/models/order.rb', line 95 def is_global_express_enabled @is_global_express_enabled end |
#is_iba ⇒ Object
When true, the item within this order was bought and re-sold by Amazon Business EU SARL (ABEU). By buying and instantly re-selling your items, ABEU becomes the seller of record, making your inventory available for sale to customers who would not otherwise purchase from a third-party seller.
113 114 115 |
# File 'lib/orders-api-model/models/order.rb', line 113 def is_iba @is_iba end |
#is_ispu ⇒ Object
When true, this order is marked to be picked up from a store rather than delivered.
125 126 127 |
# File 'lib/orders-api-model/models/order.rb', line 125 def is_ispu @is_ispu end |
#is_premium_order ⇒ Object
When true, the order has a Premium Shipping Service Level Agreement. For more information about Premium Shipping orders, see "Premium Shipping Options" in the Seller Central Help for your marketplace.
92 93 94 |
# File 'lib/orders-api-model/models/order.rb', line 92 def is_premium_order @is_premium_order end |
#is_prime ⇒ Object
When true, the order is a seller-fulfilled Amazon Prime order.
89 90 91 |
# File 'lib/orders-api-model/models/order.rb', line 89 def is_prime @is_prime end |
#is_replacement_order ⇒ Object
When true, this is a replacement order.
101 102 103 |
# File 'lib/orders-api-model/models/order.rb', line 101 def is_replacement_order @is_replacement_order end |
#is_sold_by_ab ⇒ Object
When true, the item within this order was bought and re-sold by Amazon Business EU SARL (ABEU). By buying and instantly re-selling your items, ABEU becomes the seller of record, making your inventory available for sale to customers who would not otherwise purchase from a third-party seller.
110 111 112 |
# File 'lib/orders-api-model/models/order.rb', line 110 def is_sold_by_ab @is_sold_by_ab end |
#last_update_date ⇒ Object
The date when the order was last updated. __Note__: LastUpdateDate is returned with an incorrect date for orders that were last updated before 2009-04-01.
27 28 29 |
# File 'lib/orders-api-model/models/order.rb', line 27 def last_update_date @last_update_date end |
#latest_delivery_date ⇒ Object
The end of the time period within which you have committed to fulfill the order. In ISO 8601 date time format. Returned only for seller-fulfilled orders that do not have a PendingAvailability, Pending, or Canceled status.
83 84 85 |
# File 'lib/orders-api-model/models/order.rb', line 83 def latest_delivery_date @latest_delivery_date end |
#latest_ship_date ⇒ Object
The end of the time period within which you have committed to ship the order. In ISO 8601 date time format. Returned only for seller-fulfilled orders. __Note__: LatestShipDate might not be returned for orders placed before February 1, 2013.
77 78 79 |
# File 'lib/orders-api-model/models/order.rb', line 77 def latest_ship_date @latest_ship_date end |
#marketplace_id ⇒ Object
The identifier for the marketplace where the order was placed.
60 61 62 |
# File 'lib/orders-api-model/models/order.rb', line 60 def marketplace_id @marketplace_id end |
#marketplace_tax_info ⇒ Object
Returns the value of attribute marketplace_tax_info.
130 131 132 |
# File 'lib/orders-api-model/models/order.rb', line 130 def marketplace_tax_info @marketplace_tax_info end |
#number_of_items_shipped ⇒ Object
The number of items shipped.
47 48 49 |
# File 'lib/orders-api-model/models/order.rb', line 47 def number_of_items_shipped @number_of_items_shipped end |
#number_of_items_unshipped ⇒ Object
The number of items unshipped.
50 51 52 |
# File 'lib/orders-api-model/models/order.rb', line 50 def number_of_items_unshipped @number_of_items_unshipped end |
#order_channel ⇒ Object
The order channel of the first item in the order.
39 40 41 |
# File 'lib/orders-api-model/models/order.rb', line 39 def order_channel @order_channel end |
#order_status ⇒ Object
The current order status.
30 31 32 |
# File 'lib/orders-api-model/models/order.rb', line 30 def order_status @order_status end |
#order_total ⇒ Object
Returns the value of attribute order_total.
44 45 46 |
# File 'lib/orders-api-model/models/order.rb', line 44 def order_total @order_total end |
#order_type ⇒ Object
The type of the order.
71 72 73 |
# File 'lib/orders-api-model/models/order.rb', line 71 def order_type @order_type end |
#payment_execution_detail ⇒ Object
Returns the value of attribute payment_execution_detail.
52 53 54 |
# File 'lib/orders-api-model/models/order.rb', line 52 def payment_execution_detail @payment_execution_detail end |
#payment_method ⇒ Object
The payment method for the order. This property is limited to Cash On Delivery (COD) and Convenience Store (CVS) payment methods. Unless you need the specific COD payment information provided by the PaymentExecutionDetailItem object, we recommend using the PaymentMethodDetails property to get payment method information.
55 56 57 |
# File 'lib/orders-api-model/models/order.rb', line 55 def payment_method @payment_method end |
#payment_method_details ⇒ Object
Returns the value of attribute payment_method_details.
57 58 59 |
# File 'lib/orders-api-model/models/order.rb', line 57 def payment_method_details @payment_method_details end |
#promise_response_due_date ⇒ Object
Indicates the date by which the seller must respond to the buyer with an estimated ship date. Returned only for Sourcing on Demand orders.
104 105 106 |
# File 'lib/orders-api-model/models/order.rb', line 104 def promise_response_due_date @promise_response_due_date end |
#purchase_date ⇒ Object
The date when the order was created.
24 25 26 |
# File 'lib/orders-api-model/models/order.rb', line 24 def purchase_date @purchase_date end |
#replaced_order_id ⇒ Object
The order ID value for the order that is being replaced. Returned only if IsReplacementOrder = true.
98 99 100 |
# File 'lib/orders-api-model/models/order.rb', line 98 def replaced_order_id @replaced_order_id end |
#sales_channel ⇒ Object
The sales channel of the first item in the order.
36 37 38 |
# File 'lib/orders-api-model/models/order.rb', line 36 def sales_channel @sales_channel end |
#seller_display_name ⇒ Object
The seller’s friendly name registered in the marketplace.
133 134 135 |
# File 'lib/orders-api-model/models/order.rb', line 133 def seller_display_name @seller_display_name end |
#seller_order_id ⇒ Object
A seller-defined order identifier.
21 22 23 |
# File 'lib/orders-api-model/models/order.rb', line 21 def seller_order_id @seller_order_id end |
#ship_service_level ⇒ Object
The shipment service level of the order.
42 43 44 |
# File 'lib/orders-api-model/models/order.rb', line 42 def ship_service_level @ship_service_level end |
#shipment_service_level_category ⇒ Object
The shipment service level category of the order. Possible values: Expedited, FreeEconomy, NextDay, SameDay, SecondDay, Scheduled, Standard.
63 64 65 |
# File 'lib/orders-api-model/models/order.rb', line 63 def shipment_service_level_category @shipment_service_level_category end |
#shipping_address ⇒ Object
Returns the value of attribute shipping_address.
135 136 137 |
# File 'lib/orders-api-model/models/order.rb', line 135 def shipping_address @shipping_address end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/orders-api-model/models/order.rb', line 169 def self.attribute_map { :'amazon_order_id' => :'AmazonOrderId', :'seller_order_id' => :'SellerOrderId', :'purchase_date' => :'PurchaseDate', :'last_update_date' => :'LastUpdateDate', :'order_status' => :'OrderStatus', :'fulfillment_channel' => :'FulfillmentChannel', :'sales_channel' => :'SalesChannel', :'order_channel' => :'OrderChannel', :'ship_service_level' => :'ShipServiceLevel', :'order_total' => :'OrderTotal', :'number_of_items_shipped' => :'NumberOfItemsShipped', :'number_of_items_unshipped' => :'NumberOfItemsUnshipped', :'payment_execution_detail' => :'PaymentExecutionDetail', :'payment_method' => :'PaymentMethod', :'payment_method_details' => :'PaymentMethodDetails', :'marketplace_id' => :'MarketplaceId', :'shipment_service_level_category' => :'ShipmentServiceLevelCategory', :'easy_ship_shipment_status' => :'EasyShipShipmentStatus', :'cba_displayable_shipping_label' => :'CbaDisplayableShippingLabel', :'order_type' => :'OrderType', :'earliest_ship_date' => :'EarliestShipDate', :'latest_ship_date' => :'LatestShipDate', :'earliest_delivery_date' => :'EarliestDeliveryDate', :'latest_delivery_date' => :'LatestDeliveryDate', :'is_business_order' => :'IsBusinessOrder', :'is_prime' => :'IsPrime', :'is_premium_order' => :'IsPremiumOrder', :'is_global_express_enabled' => :'IsGlobalExpressEnabled', :'replaced_order_id' => :'ReplacedOrderId', :'is_replacement_order' => :'IsReplacementOrder', :'promise_response_due_date' => :'PromiseResponseDueDate', :'is_estimated_ship_date_set' => :'IsEstimatedShipDateSet', :'is_sold_by_ab' => :'IsSoldByAB', :'is_iba' => :'IsIBA', :'default_ship_from_location_address' => :'DefaultShipFromLocationAddress', :'buyer_invoice_preference' => :'BuyerInvoicePreference', :'buyer_tax_information' => :'BuyerTaxInformation', :'fulfillment_instruction' => :'FulfillmentInstruction', :'is_ispu' => :'IsISPU', :'is_access_point_order' => :'IsAccessPointOrder', :'marketplace_tax_info' => :'MarketplaceTaxInfo', :'seller_display_name' => :'SellerDisplayName', :'shipping_address' => :'ShippingAddress', :'buyer_info' => :'BuyerInfo', :'automated_shipping_settings' => :'AutomatedShippingSettings', :'has_regulated_items' => :'HasRegulatedItems', :'electronic_invoice_status' => :'ElectronicInvoiceStatus' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
646 647 648 |
# File 'lib/orders-api-model/models/order.rb', line 646 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
275 276 277 278 |
# File 'lib/orders-api-model/models/order.rb', line 275 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/orders-api-model/models/order.rb', line 222 def self.openapi_types { :'amazon_order_id' => :'Object', :'seller_order_id' => :'Object', :'purchase_date' => :'Object', :'last_update_date' => :'Object', :'order_status' => :'Object', :'fulfillment_channel' => :'Object', :'sales_channel' => :'Object', :'order_channel' => :'Object', :'ship_service_level' => :'Object', :'order_total' => :'Object', :'number_of_items_shipped' => :'Object', :'number_of_items_unshipped' => :'Object', :'payment_execution_detail' => :'Object', :'payment_method' => :'Object', :'payment_method_details' => :'Object', :'marketplace_id' => :'Object', :'shipment_service_level_category' => :'Object', :'easy_ship_shipment_status' => :'Object', :'cba_displayable_shipping_label' => :'Object', :'order_type' => :'Object', :'earliest_ship_date' => :'Object', :'latest_ship_date' => :'Object', :'earliest_delivery_date' => :'Object', :'latest_delivery_date' => :'Object', :'is_business_order' => :'Object', :'is_prime' => :'Object', :'is_premium_order' => :'Object', :'is_global_express_enabled' => :'Object', :'replaced_order_id' => :'Object', :'is_replacement_order' => :'Object', :'promise_response_due_date' => :'Object', :'is_estimated_ship_date_set' => :'Object', :'is_sold_by_ab' => :'Object', :'is_iba' => :'Object', :'default_ship_from_location_address' => :'Object', :'buyer_invoice_preference' => :'Object', :'buyer_tax_information' => :'Object', :'fulfillment_instruction' => :'Object', :'is_ispu' => :'Object', :'is_access_point_order' => :'Object', :'marketplace_tax_info' => :'Object', :'seller_display_name' => :'Object', :'shipping_address' => :'Object', :'buyer_info' => :'Object', :'automated_shipping_settings' => :'Object', :'has_regulated_items' => :'Object', :'electronic_invoice_status' => :'Object' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 |
# File 'lib/orders-api-model/models/order.rb', line 579 def ==(o) return true if self.equal?(o) self.class == o.class && amazon_order_id == o.amazon_order_id && seller_order_id == o.seller_order_id && purchase_date == o.purchase_date && last_update_date == o.last_update_date && order_status == o.order_status && fulfillment_channel == o.fulfillment_channel && sales_channel == o.sales_channel && order_channel == o.order_channel && ship_service_level == o.ship_service_level && order_total == o.order_total && number_of_items_shipped == o.number_of_items_shipped && number_of_items_unshipped == o.number_of_items_unshipped && payment_execution_detail == o.payment_execution_detail && payment_method == o.payment_method && payment_method_details == o.payment_method_details && marketplace_id == o.marketplace_id && shipment_service_level_category == o.shipment_service_level_category && easy_ship_shipment_status == o.easy_ship_shipment_status && cba_displayable_shipping_label == o.cba_displayable_shipping_label && order_type == o.order_type && earliest_ship_date == o.earliest_ship_date && latest_ship_date == o.latest_ship_date && earliest_delivery_date == o.earliest_delivery_date && latest_delivery_date == o.latest_delivery_date && is_business_order == o.is_business_order && is_prime == o.is_prime && is_premium_order == o.is_premium_order && is_global_express_enabled == o.is_global_express_enabled && replaced_order_id == o.replaced_order_id && is_replacement_order == o.is_replacement_order && promise_response_due_date == o.promise_response_due_date && is_estimated_ship_date_set == o.is_estimated_ship_date_set && is_sold_by_ab == o.is_sold_by_ab && is_iba == o.is_iba && default_ship_from_location_address == o.default_ship_from_location_address && buyer_invoice_preference == o.buyer_invoice_preference && buyer_tax_information == o.buyer_tax_information && fulfillment_instruction == o.fulfillment_instruction && is_ispu == o.is_ispu && is_access_point_order == o.is_access_point_order && marketplace_tax_info == o.marketplace_tax_info && seller_display_name == o.seller_display_name && shipping_address == o.shipping_address && buyer_info == o.buyer_info && automated_shipping_settings == o.automated_shipping_settings && has_regulated_items == o.has_regulated_items && electronic_invoice_status == o.electronic_invoice_status end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 |
# File 'lib/orders-api-model/models/order.rb', line 676 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 AmzSpApi::OrdersApiModel.const_get(type).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
745 746 747 748 749 750 751 752 753 754 755 756 757 |
# File 'lib/orders-api-model/models/order.rb', line 745 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
653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 |
# File 'lib/orders-api-model/models/order.rb', line 653 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_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]])) elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) end end self end |
#eql?(o) ⇒ Boolean
633 634 635 |
# File 'lib/orders-api-model/models/order.rb', line 633 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
639 640 641 |
# File 'lib/orders-api-model/models/order.rb', line 639 def hash [amazon_order_id, seller_order_id, purchase_date, last_update_date, order_status, fulfillment_channel, sales_channel, order_channel, ship_service_level, order_total, number_of_items_shipped, number_of_items_unshipped, payment_execution_detail, payment_method, payment_method_details, marketplace_id, shipment_service_level_category, easy_ship_shipment_status, cba_displayable_shipping_label, order_type, earliest_ship_date, latest_ship_date, earliest_delivery_date, latest_delivery_date, is_business_order, is_prime, is_premium_order, is_global_express_enabled, replaced_order_id, is_replacement_order, promise_response_due_date, is_estimated_ship_date_set, is_sold_by_ab, is_iba, default_ship_from_location_address, buyer_invoice_preference, buyer_tax_information, fulfillment_instruction, is_ispu, is_access_point_order, marketplace_tax_info, seller_display_name, shipping_address, buyer_info, automated_shipping_settings, has_regulated_items, electronic_invoice_status].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 |
# File 'lib/orders-api-model/models/order.rb', line 486 def list_invalid_properties invalid_properties = Array.new if @amazon_order_id.nil? invalid_properties.push('invalid value for "amazon_order_id", amazon_order_id cannot be nil.') end if @purchase_date.nil? invalid_properties.push('invalid value for "purchase_date", purchase_date cannot be nil.') end if @last_update_date.nil? invalid_properties.push('invalid value for "last_update_date", last_update_date cannot be nil.') end if @order_status.nil? invalid_properties.push('invalid value for "order_status", order_status cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
721 722 723 |
# File 'lib/orders-api-model/models/order.rb', line 721 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
727 728 729 730 731 732 733 734 735 736 737 738 739 |
# File 'lib/orders-api-model/models/order.rb', line 727 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
715 716 717 |
# File 'lib/orders-api-model/models/order.rb', line 715 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 |
# File 'lib/orders-api-model/models/order.rb', line 509 def valid? return false if @amazon_order_id.nil? return false if @purchase_date.nil? return false if @last_update_date.nil? return false if @order_status.nil? order_status_validator = EnumAttributeValidator.new('Object', ['Pending', 'Unshipped', 'PartiallyShipped', 'Shipped', 'Canceled', 'Unfulfillable', 'InvoiceUnconfirmed', 'PendingAvailability']) return false unless order_status_validator.valid?(@order_status) fulfillment_channel_validator = EnumAttributeValidator.new('Object', ['MFN', 'AFN']) return false unless fulfillment_channel_validator.valid?(@fulfillment_channel) payment_method_validator = EnumAttributeValidator.new('Object', ['COD', 'CVS', 'Other']) return false unless payment_method_validator.valid?(@payment_method) order_type_validator = EnumAttributeValidator.new('Object', ['StandardOrder', 'LongLeadTimeOrder', 'Preorder', 'BackOrder', 'SourcingOnDemandOrder']) return false unless order_type_validator.valid?(@order_type) buyer_invoice_preference_validator = EnumAttributeValidator.new('Object', ['INDIVIDUAL', 'BUSINESS']) return false unless buyer_invoice_preference_validator.valid?(@buyer_invoice_preference) true end |