Class: TophatterMerchant::Variation
- Inherits:
-
Resource
- Object
- Resource
- TophatterMerchant::Variation
show all
- Defined in:
- lib/tophatter_merchant/variation.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Methods inherited from Resource
#initialize, #to_hash
Instance Attribute Details
#color ⇒ Object
4
5
6
|
# File 'lib/tophatter_merchant/variation.rb', line 4
def color
@color
end
|
#created_at ⇒ Object
4
5
6
|
# File 'lib/tophatter_merchant/variation.rb', line 4
def created_at
@created_at
end
|
#deleted_at ⇒ Object
4
5
6
|
# File 'lib/tophatter_merchant/variation.rb', line 4
def deleted_at
@deleted_at
end
|
#disabled_at ⇒ Object
4
5
6
|
# File 'lib/tophatter_merchant/variation.rb', line 4
def disabled_at
@disabled_at
end
|
#identifier ⇒ Object
4
5
6
|
# File 'lib/tophatter_merchant/variation.rb', line 4
def identifier
@identifier
end
|
#internal_id ⇒ Object
4
5
6
|
# File 'lib/tophatter_merchant/variation.rb', line 4
def internal_id
@internal_id
end
|
#product_identifier ⇒ Object
4
5
6
|
# File 'lib/tophatter_merchant/variation.rb', line 4
def product_identifier
@product_identifier
end
|
#quantity ⇒ Object
4
5
6
|
# File 'lib/tophatter_merchant/variation.rb', line 4
def quantity
@quantity
end
|
#size ⇒ Object
4
5
6
|
# File 'lib/tophatter_merchant/variation.rb', line 4
def size
@size
end
|
Class Method Details
.create(params) ⇒ Object
22
23
24
|
# File 'lib/tophatter_merchant/variation.rb', line 22
def create(params)
Variation.new post(url: "#{path}.json", params: params)
end
|
.retrieve(identifier) ⇒ Object
17
18
19
|
# File 'lib/tophatter_merchant/variation.rb', line 17
def retrieve(identifier)
Variation.new get(url: "#{path}/retrieve.json", params: { identifier: identifier })
end
|
.update(identifier, data) ⇒ Object
28
29
30
|
# File 'lib/tophatter_merchant/variation.rb', line 28
def update(identifier, data)
Variation.new post(url: "#{path}/update.json", params: data.merge(identifier: identifier))
end
|