Class: Io::Flow::V0::Models::ShopifyLocalizedVariantPrices
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ShopifyLocalizedVariantPrices
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#compare_at ⇒ Object
readonly
Returns the value of attribute compare_at.
-
#duty ⇒ Object
readonly
Returns the value of attribute duty.
-
#item ⇒ Object
readonly
Returns the value of attribute item.
-
#vat ⇒ Object
readonly
Returns the value of attribute vat.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ShopifyLocalizedVariantPrices
constructor
A new instance of ShopifyLocalizedVariantPrices.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ShopifyLocalizedVariantPrices
Returns a new instance of ShopifyLocalizedVariantPrices.
50998 50999 51000 51001 51002 51003 51004 51005 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50998 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:item], 'ShopifyLocalizedVariantPrices') @item = (x = opts.delete(:item); x.is_a?(::Io::Flow::V0::Models::ShopifyPrice) ? x : ::Io::Flow::V0::Models::ShopifyPrice.new(x)) @compare_at = (x = opts.delete(:compare_at); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShopifyPrice) ? x : ::Io::Flow::V0::Models::ShopifyPrice.new(x))) @vat = (x = opts.delete(:vat); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShopifyPrice) ? x : ::Io::Flow::V0::Models::ShopifyPrice.new(x))) @duty = (x = opts.delete(:duty); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShopifyPrice) ? x : ::Io::Flow::V0::Models::ShopifyPrice.new(x))) end |
Instance Attribute Details
#compare_at ⇒ Object (readonly)
Returns the value of attribute compare_at.
50996 50997 50998 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50996 def compare_at @compare_at end |
#duty ⇒ Object (readonly)
Returns the value of attribute duty.
50996 50997 50998 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50996 def duty @duty end |
#item ⇒ Object (readonly)
Returns the value of attribute item.
50996 50997 50998 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50996 def item @item end |
#vat ⇒ Object (readonly)
Returns the value of attribute vat.
50996 50997 50998 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50996 def vat @vat end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
51011 51012 51013 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51011 def copy(incoming={}) ShopifyLocalizedVariantPrices.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
51015 51016 51017 51018 51019 51020 51021 51022 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51015 def to_hash { :item => item.to_hash, :compare_at => compare_at.nil? ? nil : compare_at.to_hash, :vat => vat.nil? ? nil : vat.to_hash, :duty => duty.nil? ? nil : duty.to_hash } end |
#to_json ⇒ Object
51007 51008 51009 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51007 def to_json JSON.dump(to_hash) end |