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.
48001 48002 48003 48004 48005 48006 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48001 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.
47999 48000 48001 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47999 def flow @flow end |
#shopify ⇒ Object (readonly)
Returns the value of attribute shopify.
47999 48000 48001 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47999 def shopify @shopify end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
48012 48013 48014 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48012 def copy(incoming={}) ShopifyCartConversion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
48016 48017 48018 48019 48020 48021 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48016 def to_hash { :flow => flow.to_hash, :shopify => shopify.to_hash } end |
#to_json ⇒ Object
48008 48009 48010 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48008 def to_json JSON.dump(to_hash) end |