Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::Order
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::Order
- Defined in:
- lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb
Overview
Order Model.
Instance Attribute Summary collapse
-
#buyer_id ⇒ String
TODO: Write general description for this method.
-
#customer_email_id ⇒ String
TODO: Write general description for this method.
-
#customer_order_id ⇒ String
TODO: Write general description for this method.
-
#is_guest ⇒ String
TODO: Write general description for this method.
-
#mart ⇒ String
TODO: Write general description for this method.
-
#order_date ⇒ String
TODO: Write general description for this method.
-
#order_lines ⇒ OrderLines1
TODO: Write general description for this method.
-
#order_summary ⇒ OrderSummary
TODO: Write general description for this method.
-
#order_type ⇒ String
TODO: Write general description for this method.
-
#original_customer_order_id ⇒ String
TODO: Write general description for this method.
-
#payment_types ⇒ Array[String]
TODO: Write general description for this method.
-
#pickup_persons ⇒ Array[PickupPerson]
TODO: Write general description for this method.
-
#purchase_order_id ⇒ String
TODO: Write general description for this method.
-
#ship_node ⇒ ShippingTemplate
TODO: Write general description for this method.
-
#shipping_info ⇒ ShippingInfo
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(customer_email_id = nil, customer_order_id = nil, order_date = nil, order_lines = nil, purchase_order_id = nil, shipping_info = nil, order_type = nil, original_customer_order_id = nil, buyer_id = nil, mart = nil, is_guest = nil, payment_types = nil, order_summary = nil, pickup_persons = nil, ship_node = nil) ⇒ Order
constructor
A new instance of Order.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(customer_email_id = nil, customer_order_id = nil, order_date = nil, order_lines = nil, purchase_order_id = nil, shipping_info = nil, order_type = nil, original_customer_order_id = nil, buyer_id = nil, mart = nil, is_guest = nil, payment_types = nil, order_summary = nil, pickup_persons = nil, ship_node = nil) ⇒ Order
Returns a new instance of Order.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 104 def initialize(customer_email_id = nil, customer_order_id = nil, order_date = nil, order_lines = nil, purchase_order_id = nil, shipping_info = nil, order_type = nil, original_customer_order_id = nil, buyer_id = nil, mart = nil, is_guest = nil, payment_types = nil, order_summary = nil, pickup_persons = nil, ship_node = nil) @customer_email_id = customer_email_id @customer_order_id = customer_order_id @order_date = order_date @order_lines = order_lines @purchase_order_id = purchase_order_id @shipping_info = shipping_info @order_type = order_type @original_customer_order_id = original_customer_order_id @buyer_id = buyer_id @mart = mart @is_guest = is_guest @payment_types = payment_types @order_summary = order_summary @pickup_persons = pickup_persons @ship_node = ship_node end |
Instance Attribute Details
#buyer_id ⇒ String
TODO: Write general description for this method
47 48 49 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 47 def buyer_id @buyer_id end |
#customer_email_id ⇒ String
TODO: Write general description for this method
15 16 17 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 15 def customer_email_id @customer_email_id end |
#customer_order_id ⇒ String
TODO: Write general description for this method
19 20 21 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 19 def customer_order_id @customer_order_id end |
#is_guest ⇒ String
TODO: Write general description for this method
55 56 57 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 55 def is_guest @is_guest end |
#mart ⇒ String
TODO: Write general description for this method
51 52 53 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 51 def mart @mart end |
#order_date ⇒ String
TODO: Write general description for this method
23 24 25 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 23 def order_date @order_date end |
#order_lines ⇒ OrderLines1
TODO: Write general description for this method
27 28 29 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 27 def order_lines @order_lines end |
#order_summary ⇒ OrderSummary
TODO: Write general description for this method
63 64 65 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 63 def order_summary @order_summary end |
#order_type ⇒ String
TODO: Write general description for this method
39 40 41 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 39 def order_type @order_type end |
#original_customer_order_id ⇒ String
TODO: Write general description for this method
43 44 45 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 43 def original_customer_order_id @original_customer_order_id end |
#payment_types ⇒ Array[String]
TODO: Write general description for this method
59 60 61 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 59 def payment_types @payment_types end |
#pickup_persons ⇒ Array[PickupPerson]
TODO: Write general description for this method
67 68 69 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 67 def pickup_persons @pickup_persons end |
#purchase_order_id ⇒ String
TODO: Write general description for this method
31 32 33 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 31 def purchase_order_id @purchase_order_id end |
#ship_node ⇒ ShippingTemplate
TODO: Write general description for this method
71 72 73 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 71 def ship_node @ship_node end |
#shipping_info ⇒ ShippingInfo
TODO: Write general description for this method
35 36 37 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 35 def shipping_info @shipping_info end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 128 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. customer_email_id = hash.key?('customerEmailId') ? hash['customerEmailId'] : nil customer_order_id = hash.key?('customerOrderId') ? hash['customerOrderId'] : nil order_date = hash.key?('orderDate') ? hash['orderDate'] : nil order_lines = OrderLines1.from_hash(hash['orderLines']) if hash['orderLines'] purchase_order_id = hash.key?('purchaseOrderId') ? hash['purchaseOrderId'] : nil shipping_info = ShippingInfo.from_hash(hash['shippingInfo']) if hash['shippingInfo'] order_type = hash.key?('orderType') ? hash['orderType'] : nil original_customer_order_id = hash.key?('originalCustomerOrderID') ? hash['originalCustomerOrderID'] : nil buyer_id = hash.key?('buyerId') ? hash['buyerId'] : nil mart = hash.key?('mart') ? hash['mart'] : nil is_guest = hash.key?('isGuest') ? hash['isGuest'] : nil payment_types = hash.key?('paymentTypes') ? hash['paymentTypes'] : nil order_summary = OrderSummary.from_hash(hash['orderSummary']) if hash['orderSummary'] # Parameter is an array, so we need to iterate through it pickup_persons = nil unless hash['pickupPersons'].nil? pickup_persons = [] hash['pickupPersons'].each do |structure| pickup_persons << (PickupPerson.from_hash(structure) if structure) end end pickup_persons = nil unless hash.key?('pickupPersons') ship_node = ShippingTemplate.from_hash(hash['shipNode']) if hash['shipNode'] # Create object from extracted values. Order.new(customer_email_id, customer_order_id, order_date, order_lines, purchase_order_id, shipping_info, order_type, original_customer_order_id, buyer_id, mart, is_guest, payment_types, order_summary, pickup_persons, ship_node) end |
.names ⇒ Object
A mapping from model property names to API property names.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 74 def self.names @_hash = {} if @_hash.nil? @_hash['customer_email_id'] = 'customerEmailId' @_hash['customer_order_id'] = 'customerOrderId' @_hash['order_date'] = 'orderDate' @_hash['order_lines'] = 'orderLines' @_hash['purchase_order_id'] = 'purchaseOrderId' @_hash['shipping_info'] = 'shippingInfo' @_hash['order_type'] = 'orderType' @_hash['original_customer_order_id'] = 'originalCustomerOrderID' @_hash['buyer_id'] = 'buyerId' @_hash['mart'] = 'mart' @_hash['is_guest'] = 'isGuest' @_hash['payment_types'] = 'paymentTypes' @_hash['order_summary'] = 'orderSummary' @_hash['pickup_persons'] = 'pickupPersons' @_hash['ship_node'] = 'shipNode' @_hash end |
.nullables ⇒ Object
An array for nullable fields
100 101 102 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 100 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
95 96 97 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 95 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 192 def inspect class_name = self.class.name.split('::').last "<#{class_name} customer_email_id: #{@customer_email_id.inspect}, customer_order_id:"\ " #{@customer_order_id.inspect}, order_date: #{@order_date.inspect}, order_lines:"\ " #{@order_lines.inspect}, purchase_order_id: #{@purchase_order_id.inspect}, shipping_info:"\ " #{@shipping_info.inspect}, order_type: #{@order_type.inspect}, original_customer_order_id:"\ " #{@original_customer_order_id.inspect}, buyer_id: #{@buyer_id.inspect}, mart:"\ " #{@mart.inspect}, is_guest: #{@is_guest.inspect}, payment_types:"\ " #{@payment_types.inspect}, order_summary: #{@order_summary.inspect}, pickup_persons:"\ " #{@pickup_persons.inspect}, ship_node: #{@ship_node.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
180 181 182 183 184 185 186 187 188 189 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/order.rb', line 180 def to_s class_name = self.class.name.split('::').last "<#{class_name} customer_email_id: #{@customer_email_id}, customer_order_id:"\ " #{@customer_order_id}, order_date: #{@order_date}, order_lines: #{@order_lines},"\ " purchase_order_id: #{@purchase_order_id}, shipping_info: #{@shipping_info}, order_type:"\ " #{@order_type}, original_customer_order_id: #{@original_customer_order_id}, buyer_id:"\ " #{@buyer_id}, mart: #{@mart}, is_guest: #{@is_guest}, payment_types: #{@payment_types},"\ " order_summary: #{@order_summary}, pickup_persons: #{@pickup_persons}, ship_node:"\ " #{@ship_node}>" end |