class Io::Flow::V0::Models::OrderRefundSummaryPartialForm
Attributes
includes[R]
items[R]
Public Class Methods
new(incoming={})
click to toggle source
Calls superclass method
Io::Flow::V0::Models::OrderRefundSummaryForm::new
# 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
Public Instance Methods
copy(incoming={})
click to toggle source
# 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()
click to toggle source
# 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()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 53799 def to_json JSON.dump(to_hash) end