Class: Io::Flow::V0::Models::OrderRefundSummaryPartialForm
- Inherits:
-
OrderRefundSummaryForm
- Object
- OrderRefundSummaryForm
- Io::Flow::V0::Models::OrderRefundSummaryPartialForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#includes ⇒ Object
readonly
Returns the value of attribute includes.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
Attributes inherited from OrderRefundSummaryForm
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderRefundSummaryPartialForm
constructor
A new instance of OrderRefundSummaryPartialForm.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from OrderRefundSummaryForm
Constructor Details
#initialize(incoming = {}) ⇒ OrderRefundSummaryPartialForm
Returns a new instance of OrderRefundSummaryPartialForm.
53791 53792 53793 53794 53795 53796 53797 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53791 def initialize(incoming={}) super(:discriminator => OrderRefundSummaryForm::Types::ORDER_REFUND_SUMMARY_PARTIAL_FORM) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:includes, :items], 'OrderRefundSummaryPartialForm') @includes = HttpClient::Preconditions.assert_class('includes', opts.delete(:includes), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OrderRefundSummaryPartialIncludes) ? x : ::Io::Flow::V0::Models::OrderRefundSummaryPartialIncludes.new(x)) } @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OrderRefundSummaryItem) ? x : ::Io::Flow::V0::Models::OrderRefundSummaryItem.new(x)) } end |
Instance Attribute Details
#includes ⇒ Object (readonly)
Returns the value of attribute includes.
53789 53790 53791 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53789 def includes @includes end |
#items ⇒ Object (readonly)
Returns the value of attribute items.
53789 53790 53791 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53789 def items @items end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
53803 53804 53805 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53803 def copy(incoming={}) OrderRefundSummaryPartialForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
53807 53808 53809 53810 53811 53812 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53807 def subtype_to_hash { :includes => includes.map { |o| o.to_hash }, :items => items.map { |o| o.to_hash } } end |
#to_json ⇒ Object
53799 53800 53801 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53799 def to_json JSON.dump(to_hash) end |