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.
59771 59772 59773 59774 59775 59776 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59771 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.
59769 59770 59771 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59769 def flow @flow end |
#shopify ⇒ Object (readonly)
Returns the value of attribute shopify.
59769 59770 59771 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59769 def shopify @shopify end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
59782 59783 59784 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59782 def copy(incoming={}) ShopifyCartConversion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
59786 59787 59788 59789 59790 59791 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59786 def to_hash { :flow => flow.to_hash, :shopify => shopify.to_hash } end |
#to_json ⇒ Object
59778 59779 59780 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59778 def to_json JSON.dump(to_hash) end |