Class: Io::Flow::V0::Models::OrderRefundSummaryFullForm

Inherits:
OrderRefundSummaryForm show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Attributes inherited from OrderRefundSummaryForm

#discriminator

Instance Method Summary collapse

Methods inherited from OrderRefundSummaryForm

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ OrderRefundSummaryFullForm

Returns a new instance of OrderRefundSummaryFullForm.



53736
53737
53738
53739
53740
53741
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53736

def initialize(incoming={})
  super(:discriminator => OrderRefundSummaryForm::Types::ORDER_REFUND_SUMMARY_FULL_FORM)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:includes], 'OrderRefundSummaryFullForm')
  @includes = HttpClient::Preconditions.assert_class('includes', opts.delete(:includes), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OrderRefundSummaryIncludes) ? x : ::Io::Flow::V0::Models::OrderRefundSummaryIncludes.apply(x)) }
end

Instance Attribute Details

#includesObject (readonly)

Returns the value of attribute includes.



53734
53735
53736
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53734

def includes
  @includes
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



53747
53748
53749
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53747

def copy(incoming={})
  OrderRefundSummaryFullForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#subtype_to_hashObject



53751
53752
53753
53754
53755
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53751

def subtype_to_hash
  {
    :includes => includes.map { |o| o.value }
  }
end

#to_jsonObject



53743
53744
53745
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53743

def to_json
  JSON.dump(to_hash)
end