Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::DestinationItem
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::DestinationItem
- Defined in:
- lib/inventory_management_and_item_management_and_order_management_and_price_management/models/destination_item.rb
Overview
DestinationItem Model.
Instance Attribute Summary collapse
-
#additional_attributes ⇒ Array[String]
TODO: Write general description for this method.
-
#gtin ⇒ String
TODO: Write general description for this method.
-
#item_id ⇒ String
TODO: Write general description for this method.
-
#mart ⇒ String
TODO: Write general description for this method.
-
#product_name ⇒ String
TODO: Write general description for this method.
-
#product_type ⇒ String
TODO: Write general description for this method.
-
#upc ⇒ String
TODO: Write general description for this method.
-
#wpid ⇒ String
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(mart = nil, wpid = nil, gtin = nil, upc = nil, item_id = nil, product_name = nil, product_type = nil, additional_attributes = nil) ⇒ DestinationItem
constructor
A new instance of DestinationItem.
-
#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(mart = nil, wpid = nil, gtin = nil, upc = nil, item_id = nil, product_name = nil, product_type = nil, additional_attributes = nil) ⇒ DestinationItem
Returns a new instance of DestinationItem.
69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/destination_item.rb', line 69 def initialize(mart = nil, wpid = nil, gtin = nil, upc = nil, item_id = nil, product_name = nil, product_type = nil, additional_attributes = nil) @mart = mart @wpid = wpid @gtin = gtin @upc = upc @item_id = item_id @product_name = product_name @product_type = product_type @additional_attributes = additional_attributes end |
Instance Attribute Details
#additional_attributes ⇒ Array[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/destination_item.rb', line 43 def additional_attributes @additional_attributes end |
#gtin ⇒ 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/destination_item.rb', line 23 def gtin @gtin end |
#item_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/destination_item.rb', line 31 def item_id @item_id end |
#mart ⇒ 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/destination_item.rb', line 15 def mart @mart end |
#product_name ⇒ String
TODO: Write general description for this method
35 36 37 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/destination_item.rb', line 35 def product_name @product_name end |
#product_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/destination_item.rb', line 39 def product_type @product_type end |
#upc ⇒ 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/destination_item.rb', line 27 def upc @upc end |
#wpid ⇒ 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/destination_item.rb', line 19 def wpid @wpid end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/destination_item.rb', line 83 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. mart = hash.key?('mart') ? hash['mart'] : nil wpid = hash.key?('wpid') ? hash['wpid'] : nil gtin = hash.key?('gtin') ? hash['gtin'] : nil upc = hash.key?('upc') ? hash['upc'] : nil item_id = hash.key?('itemId') ? hash['itemId'] : nil product_name = hash.key?('productName') ? hash['productName'] : nil product_type = hash.key?('productType') ? hash['productType'] : nil additional_attributes = hash.key?('additionalAttributes') ? hash['additionalAttributes'] : nil # Create object from extracted values. DestinationItem.new(mart, wpid, gtin, upc, item_id, product_name, product_type, additional_attributes) end |
.names ⇒ Object
A mapping from model property names to API property names.
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/destination_item.rb', line 46 def self.names @_hash = {} if @_hash.nil? @_hash['mart'] = 'mart' @_hash['wpid'] = 'wpid' @_hash['gtin'] = 'gtin' @_hash['upc'] = 'upc' @_hash['item_id'] = 'itemId' @_hash['product_name'] = 'productName' @_hash['product_type'] = 'productType' @_hash['additional_attributes'] = 'additionalAttributes' @_hash end |
.nullables ⇒ Object
An array for nullable fields
65 66 67 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/destination_item.rb', line 65 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
60 61 62 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/destination_item.rb', line 60 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
117 118 119 120 121 122 123 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/destination_item.rb', line 117 def inspect class_name = self.class.name.split('::').last "<#{class_name} mart: #{@mart.inspect}, wpid: #{@wpid.inspect}, gtin: #{@gtin.inspect},"\ " upc: #{@upc.inspect}, item_id: #{@item_id.inspect}, product_name:"\ " #{@product_name.inspect}, product_type: #{@product_type.inspect}, additional_attributes:"\ " #{@additional_attributes.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
109 110 111 112 113 114 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/destination_item.rb', line 109 def to_s class_name = self.class.name.split('::').last "<#{class_name} mart: #{@mart}, wpid: #{@wpid}, gtin: #{@gtin}, upc: #{@upc}, item_id:"\ " #{@item_id}, product_name: #{@product_name}, product_type: #{@product_type},"\ " additional_attributes: #{@additional_attributes}>" end |