Class: Io::Flow::V0::Models::ShopifyCartConversion
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ShopifyCartConversion
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#flow ⇒ Object
readonly
Returns the value of attribute flow.
-
#shopify ⇒ Object
readonly
Returns the value of attribute shopify.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ShopifyCartConversion
constructor
A new instance of ShopifyCartConversion.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ShopifyCartConversion
Returns a new instance of ShopifyCartConversion.
49811 49812 49813 49814 49815 49816 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49811 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:flow, :shopify], 'ShopifyCartConversion') @flow = (x = opts.delete(:flow); x.is_a?(::Io::Flow::V0::Models::ShopifyCartConversionFlowOrder) ? x : ::Io::Flow::V0::Models::ShopifyCartConversionFlowOrder.new(x)) @shopify = (x = opts.delete(:shopify); x.is_a?(::Io::Flow::V0::Models::ShopifyCartConversionShopifyCart) ? x : ::Io::Flow::V0::Models::ShopifyCartConversionShopifyCart.new(x)) end |
Instance Attribute Details
#flow ⇒ Object (readonly)
Returns the value of attribute flow.
49809 49810 49811 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49809 def flow @flow end |
#shopify ⇒ Object (readonly)
Returns the value of attribute shopify.
49809 49810 49811 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49809 def shopify @shopify end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
49822 49823 49824 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49822 def copy(incoming={}) ShopifyCartConversion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
49826 49827 49828 49829 49830 49831 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49826 def to_hash { :flow => flow.to_hash, :shopify => shopify.to_hash } end |
#to_json ⇒ Object
49818 49819 49820 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49818 def to_json JSON.dump(to_hash) end |