Class: Io::Flow::V0::Models::OrderRefundSummaryPartialIncludes

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ OrderRefundSummaryPartialIncludes

Returns a new instance of OrderRefundSummaryPartialIncludes.



49947
49948
49949
49950
49951
49952
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49947

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:key, :charged], 'OrderRefundSummaryPartialIncludes')
  @key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::OrderRefundSummaryIncludes) ? x : ::Io::Flow::V0::Models::OrderRefundSummaryIncludes.apply(x))
  @charged = (x = opts.delete(:charged); x.is_a?(::Io::Flow::V0::Models::OrderRefundSummaryPartialCharged) ? x : ::Io::Flow::V0::Models::OrderRefundSummaryPartialCharged.apply(x))
end

Instance Attribute Details

#chargedObject (readonly)

Returns the value of attribute charged.



49945
49946
49947
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49945

def charged
  @charged
end

#keyObject (readonly)

Returns the value of attribute key.



49945
49946
49947
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49945

def key
  @key
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



49958
49959
49960
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49958

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

#to_hashObject



49962
49963
49964
49965
49966
49967
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49962

def to_hash
  {
    :key => key.value,
    :charged => charged.value
  }
end

#to_jsonObject



49954
49955
49956
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49954

def to_json
  JSON.dump(to_hash)
end