Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::Item4

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb

Overview

Item4 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(item_id = nil, product_name = nil, product_url = nil, product_image_url = nil, sku_id = nil, current_price = nil, target_price = nil, shipping_price = nil, incentive_type = nil, base_referral_fee = nil, reduced_referral_fee = nil, enrollment_type = nil, enrollment_date = nil, incentive_status = nil, inventory_count = nil, start_date = nil, expiration_date = nil, incentive_id = nil) ⇒ Item4

Returns a new instance of Item4.



119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 119

def initialize(item_id = nil, product_name = nil, product_url = nil,
               product_image_url = nil, sku_id = nil, current_price = nil,
               target_price = nil, shipping_price = nil,
               incentive_type = nil, base_referral_fee = nil,
               reduced_referral_fee = nil, enrollment_type = nil,
               enrollment_date = nil, incentive_status = nil,
               inventory_count = nil, start_date = nil,
               expiration_date = nil, incentive_id = nil)
  @item_id = item_id
  @product_name = product_name
  @product_url = product_url
  @product_image_url = product_image_url
  @sku_id = sku_id
  @current_price = current_price
  @target_price = target_price
  @shipping_price = shipping_price
  @incentive_type = incentive_type
  @base_referral_fee = base_referral_fee
  @reduced_referral_fee = reduced_referral_fee
  @enrollment_type = enrollment_type
  @enrollment_date = enrollment_date
  @incentive_status = incentive_status
  @inventory_count = inventory_count
  @start_date = start_date
  @expiration_date = expiration_date
  @incentive_id = incentive_id
end

Instance Attribute Details

#base_referral_feeInteger

TODO: Write general description for this method

Returns:

  • (Integer)


51
52
53
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 51

def base_referral_fee
  @base_referral_fee
end

#current_priceFloat

TODO: Write general description for this method

Returns:

  • (Float)


35
36
37
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 35

def current_price
  @current_price
end

#enrollment_dateString

TODO: Write general description for this method

Returns:

  • (String)


63
64
65
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 63

def enrollment_date
  @enrollment_date
end

#enrollment_typeString

TODO: Write general description for this method

Returns:

  • (String)


59
60
61
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 59

def enrollment_type
  @enrollment_type
end

#expiration_dateString

TODO: Write general description for this method

Returns:

  • (String)


79
80
81
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 79

def expiration_date
  @expiration_date
end

#incentive_idString

TODO: Write general description for this method

Returns:

  • (String)


83
84
85
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 83

def incentive_id
  @incentive_id
end

#incentive_statusString

TODO: Write general description for this method

Returns:

  • (String)


67
68
69
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 67

def incentive_status
  @incentive_status
end

#incentive_typeString

TODO: Write general description for this method

Returns:

  • (String)


47
48
49
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 47

def incentive_type
  @incentive_type
end

#inventory_countFloat

TODO: Write general description for this method

Returns:

  • (Float)


71
72
73
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 71

def inventory_count
  @inventory_count
end

#item_idString

TODO: Write general description for this method

Returns:

  • (String)


15
16
17
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 15

def item_id
  @item_id
end

#product_image_urlString

TODO: Write general description for this method

Returns:

  • (String)


27
28
29
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 27

def product_image_url
  @product_image_url
end

#product_nameString

TODO: Write general description for this method

Returns:

  • (String)


19
20
21
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 19

def product_name
  @product_name
end

#product_urlString

TODO: Write general description for this method

Returns:

  • (String)


23
24
25
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 23

def product_url
  @product_url
end

#reduced_referral_feeInteger

TODO: Write general description for this method

Returns:

  • (Integer)


55
56
57
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 55

def reduced_referral_fee
  @reduced_referral_fee
end

#shipping_priceInteger

TODO: Write general description for this method

Returns:

  • (Integer)


43
44
45
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 43

def shipping_price
  @shipping_price
end

#sku_idString

TODO: Write general description for this method

Returns:

  • (String)


31
32
33
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 31

def sku_id
  @sku_id
end

#start_dateString

TODO: Write general description for this method

Returns:

  • (String)


75
76
77
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 75

def start_date
  @start_date
end

#target_priceInteger

TODO: Write general description for this method

Returns:

  • (Integer)


39
40
41
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 39

def target_price
  @target_price
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 148

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  item_id = hash.key?('itemId') ? hash['itemId'] : nil
  product_name = hash.key?('productName') ? hash['productName'] : nil
  product_url = hash.key?('productUrl') ? hash['productUrl'] : nil
  product_image_url =
    hash.key?('productImageUrl') ? hash['productImageUrl'] : nil
  sku_id = hash.key?('skuId') ? hash['skuId'] : nil
  current_price = hash.key?('currentPrice') ? hash['currentPrice'] : nil
  target_price = hash.key?('targetPrice') ? hash['targetPrice'] : nil
  shipping_price = hash.key?('shippingPrice') ? hash['shippingPrice'] : nil
  incentive_type = hash.key?('incentiveType') ? hash['incentiveType'] : nil
  base_referral_fee =
    hash.key?('baseReferralFee') ? hash['baseReferralFee'] : nil
  reduced_referral_fee =
    hash.key?('reducedReferralFee') ? hash['reducedReferralFee'] : nil
  enrollment_type =
    hash.key?('enrollmentType') ? hash['enrollmentType'] : nil
  enrollment_date =
    hash.key?('enrollmentDate') ? hash['enrollmentDate'] : nil
  incentive_status =
    hash.key?('incentiveStatus') ? hash['incentiveStatus'] : nil
  inventory_count =
    hash.key?('inventoryCount') ? hash['inventoryCount'] : nil
  start_date = hash.key?('startDate') ? hash['startDate'] : nil
  expiration_date =
    hash.key?('expirationDate') ? hash['expirationDate'] : nil
  incentive_id = hash.key?('incentiveId') ? hash['incentiveId'] : nil

  # Create object from extracted values.
  Item4.new(item_id,
            product_name,
            product_url,
            product_image_url,
            sku_id,
            current_price,
            target_price,
            shipping_price,
            incentive_type,
            base_referral_fee,
            reduced_referral_fee,
            enrollment_type,
            enrollment_date,
            incentive_status,
            inventory_count,
            start_date,
            expiration_date,
            incentive_id)
end

.namesObject

A mapping from model property names to API property names.



86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 86

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['item_id'] = 'itemId'
  @_hash['product_name'] = 'productName'
  @_hash['product_url'] = 'productUrl'
  @_hash['product_image_url'] = 'productImageUrl'
  @_hash['sku_id'] = 'skuId'
  @_hash['current_price'] = 'currentPrice'
  @_hash['target_price'] = 'targetPrice'
  @_hash['shipping_price'] = 'shippingPrice'
  @_hash['incentive_type'] = 'incentiveType'
  @_hash['base_referral_fee'] = 'baseReferralFee'
  @_hash['reduced_referral_fee'] = 'reducedReferralFee'
  @_hash['enrollment_type'] = 'enrollmentType'
  @_hash['enrollment_date'] = 'enrollmentDate'
  @_hash['incentive_status'] = 'incentiveStatus'
  @_hash['inventory_count'] = 'inventoryCount'
  @_hash['start_date'] = 'startDate'
  @_hash['expiration_date'] = 'expirationDate'
  @_hash['incentive_id'] = 'incentiveId'
  @_hash
end

.nullablesObject

An array for nullable fields



115
116
117
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 115

def self.nullables
  []
end

.optionalsObject

An array for optional fields



110
111
112
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 110

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 214

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} item_id: #{@item_id.inspect}, product_name: #{@product_name.inspect},"\
  " product_url: #{@product_url.inspect}, product_image_url: #{@product_image_url.inspect},"\
  " sku_id: #{@sku_id.inspect}, current_price: #{@current_price.inspect}, target_price:"\
  " #{@target_price.inspect}, shipping_price: #{@shipping_price.inspect}, incentive_type:"\
  " #{@incentive_type.inspect}, base_referral_fee: #{@base_referral_fee.inspect},"\
  " reduced_referral_fee: #{@reduced_referral_fee.inspect}, enrollment_type:"\
  " #{@enrollment_type.inspect}, enrollment_date: #{@enrollment_date.inspect},"\
  " incentive_status: #{@incentive_status.inspect}, inventory_count:"\
  " #{@inventory_count.inspect}, start_date: #{@start_date.inspect}, expiration_date:"\
  " #{@expiration_date.inspect}, incentive_id: #{@incentive_id.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



201
202
203
204
205
206
207
208
209
210
211
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/item4.rb', line 201

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} item_id: #{@item_id}, product_name: #{@product_name}, product_url:"\
  " #{@product_url}, product_image_url: #{@product_image_url}, sku_id: #{@sku_id},"\
  " current_price: #{@current_price}, target_price: #{@target_price}, shipping_price:"\
  " #{@shipping_price}, incentive_type: #{@incentive_type}, base_referral_fee:"\
  " #{@base_referral_fee}, reduced_referral_fee: #{@reduced_referral_fee}, enrollment_type:"\
  " #{@enrollment_type}, enrollment_date: #{@enrollment_date}, incentive_status:"\
  " #{@incentive_status}, inventory_count: #{@inventory_count}, start_date: #{@start_date},"\
  " expiration_date: #{@expiration_date}, incentive_id: #{@incentive_id}>"
end