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.
62310 62311 62312 62313 62314 62315 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62310 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.
62308 62309 62310 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62308 def flow @flow end |
#shopify ⇒ Object (readonly)
Returns the value of attribute shopify.
62308 62309 62310 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62308 def shopify @shopify end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
62321 62322 62323 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62321 def copy(incoming={}) ShopifyCartConversion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
62325 62326 62327 62328 62329 62330 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62325 def to_hash { :flow => flow.to_hash, :shopify => shopify.to_hash } end |
#to_json ⇒ Object
62317 62318 62319 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 62317 def to_json JSON.dump(to_hash) end |