class Io::Flow::V0::Models::OrderRefundSummary

For merchant of record authorizations, we provide a summary of refund information primarily to support customer service workflow.

Attributes

amounts[R]
currency[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 53669
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:currency, :amounts], 'OrderRefundSummary')
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
  @amounts = (x = opts.delete(:amounts); x.is_a?(::Io::Flow::V0::Models::OrderRefundSummaryAmounts) ? x : ::Io::Flow::V0::Models::OrderRefundSummaryAmounts.new(x))
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 53680
def copy(incoming={})
  OrderRefundSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 53684
def to_hash
  {
    :currency => currency,
    :amounts => amounts.to_hash
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 53676
def to_json
  JSON.dump(to_hash)
end