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.
67216 67217 67218 67219 67220 67221 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67216 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.
67214 67215 67216 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67214 def flow @flow end |
#shopify ⇒ Object (readonly)
Returns the value of attribute shopify.
67214 67215 67216 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67214 def shopify @shopify end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
67227 67228 67229 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67227 def copy(incoming={}) ShopifyCartConversion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
67231 67232 67233 67234 67235 67236 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67231 def to_hash { :flow => flow.to_hash, :shopify => shopify.to_hash } end |
#to_json ⇒ Object
67223 67224 67225 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 67223 def to_json JSON.dump(to_hash) end |