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.



47763
47764
47765
47766
47767
47768
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47763

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.



47761
47762
47763
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47761

def includes
  @includes
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



47774
47775
47776
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47774

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

#subtype_to_hashObject



47778
47779
47780
47781
47782
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47778

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

#to_jsonObject



47770
47771
47772
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47770

def to_json
  JSON.dump(to_hash)
end