Class: Io::Flow::V0::Models::ShopifyCartAddMultipleForm
- Inherits:
-
ShopifyCartAddForm
- Object
- ShopifyCartAddForm
- Io::Flow::V0::Models::ShopifyCartAddMultipleForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
Attributes inherited from ShopifyCartAddForm
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ShopifyCartAddMultipleForm
constructor
A new instance of ShopifyCartAddMultipleForm.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from ShopifyCartAddForm
Constructor Details
#initialize(incoming = {}) ⇒ ShopifyCartAddMultipleForm
Returns a new instance of ShopifyCartAddMultipleForm.
39701 39702 39703 39704 39705 39706 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39701 def initialize(incoming={}) super(:discriminator => ShopifyCartAddForm::Types::SHOPIFY_CART_ADD_MULTIPLE_FORM) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:items], 'ShopifyCartAddMultipleForm') @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ShopifyCartAddSingleForm) ? x : ::Io::Flow::V0::Models::ShopifyCartAddSingleForm.new(x)) } end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
39699 39700 39701 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39699 def items @items end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
39712 39713 39714 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39712 def copy(incoming={}) ShopifyCartAddMultipleForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
39716 39717 39718 39719 39720 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39716 def subtype_to_hash { :items => items.map { |o| o.to_hash } } end |
#to_json ⇒ Object
39708 39709 39710 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39708 def to_json JSON.dump(to_hash) end |