Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::ShippingInfo
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::ShippingInfo
- Defined in:
- lib/inventory_management_and_item_management_and_order_management_and_price_management/models/shipping_info.rb
Overview
ShippingInfo Model.
Instance Attribute Summary collapse
-
#estimated_delivery_date ⇒ String
TODO: Write general description for this method.
-
#estimated_ship_date ⇒ String
TODO: Write general description for this method.
-
#method_code ⇒ String
TODO: Write general description for this method.
-
#phone ⇒ String
TODO: Write general description for this method.
-
#postal_address ⇒ PostalAddress
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(estimated_delivery_date = nil, estimated_ship_date = nil, method_code = nil, phone = nil, postal_address = nil) ⇒ ShippingInfo
constructor
A new instance of ShippingInfo.
-
#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(estimated_delivery_date = nil, estimated_ship_date = nil, method_code = nil, phone = nil, postal_address = nil) ⇒ ShippingInfo
Returns a new instance of ShippingInfo.
54 55 56 57 58 59 60 61 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/shipping_info.rb', line 54 def initialize(estimated_delivery_date = nil, estimated_ship_date = nil, method_code = nil, phone = nil, postal_address = nil) @estimated_delivery_date = estimated_delivery_date @estimated_ship_date = estimated_ship_date @method_code = method_code @phone = phone @postal_address = postal_address end |
Instance Attribute Details
#estimated_delivery_date ⇒ 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/shipping_info.rb', line 15 def estimated_delivery_date @estimated_delivery_date end |
#estimated_ship_date ⇒ 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/shipping_info.rb', line 19 def estimated_ship_date @estimated_ship_date end |
#method_code ⇒ 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/shipping_info.rb', line 23 def method_code @method_code end |
#phone ⇒ String
TODO: Write general description for this method
27 28 29 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/shipping_info.rb', line 27 def phone @phone end |
#postal_address ⇒ PostalAddress
TODO: Write general description for this method
31 32 33 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/shipping_info.rb', line 31 def postal_address @postal_address end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/shipping_info.rb', line 64 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. estimated_delivery_date = hash.key?('estimatedDeliveryDate') ? hash['estimatedDeliveryDate'] : nil estimated_ship_date = hash.key?('estimatedShipDate') ? hash['estimatedShipDate'] : nil method_code = hash.key?('methodCode') ? hash['methodCode'] : nil phone = hash.key?('phone') ? hash['phone'] : nil postal_address = PostalAddress.from_hash(hash['postalAddress']) if hash['postalAddress'] # Create object from extracted values. ShippingInfo.new(estimated_delivery_date, estimated_ship_date, method_code, phone, postal_address) end |
.names ⇒ Object
A mapping from model property names to API property names.
34 35 36 37 38 39 40 41 42 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/shipping_info.rb', line 34 def self.names @_hash = {} if @_hash.nil? @_hash['estimated_delivery_date'] = 'estimatedDeliveryDate' @_hash['estimated_ship_date'] = 'estimatedShipDate' @_hash['method_code'] = 'methodCode' @_hash['phone'] = 'phone' @_hash['postal_address'] = 'postalAddress' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/shipping_info.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
45 46 47 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/shipping_info.rb', line 45 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
93 94 95 96 97 98 99 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/shipping_info.rb', line 93 def inspect class_name = self.class.name.split('::').last "<#{class_name} estimated_delivery_date: #{@estimated_delivery_date.inspect},"\ " estimated_ship_date: #{@estimated_ship_date.inspect}, method_code:"\ " #{@method_code.inspect}, phone: #{@phone.inspect}, postal_address:"\ " #{@postal_address.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
85 86 87 88 89 90 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/shipping_info.rb', line 85 def to_s class_name = self.class.name.split('::').last "<#{class_name} estimated_delivery_date: #{@estimated_delivery_date}, estimated_ship_date:"\ " #{@estimated_ship_date}, method_code: #{@method_code}, phone: #{@phone}, postal_address:"\ " #{@postal_address}>" end |