class Io::Flow::V0::Models::RefundOrderSummary
For merchant of record authorizations, we provide a summary of refund information primarily to support customer service workflow.
Attributes
amounts[R]
captured[R]
currency[R]
order_number[R]
refunded[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 63277 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:order_number, :currency, :captured, :refunded, :amounts], 'RefundOrderSummary') @order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String) @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String) @captured = HttpClient::Preconditions.assert_class('captured', HttpClient::Helper.to_big_decimal(opts.delete(:captured)), BigDecimal) @refunded = HttpClient::Preconditions.assert_class('refunded', HttpClient::Helper.to_big_decimal(opts.delete(:refunded)), BigDecimal) @amounts = (x = opts.delete(:amounts); x.is_a?(::Io::Flow::V0::Models::RefundOrderSummaryAmounts) ? x : ::Io::Flow::V0::Models::RefundOrderSummaryAmounts.new(x)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 63291 def copy(incoming={}) RefundOrderSummary.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 63295 def to_hash { :order_number => order_number, :currency => currency, :captured => captured.to_f.to_s, :refunded => refunded.to_f.to_s, :amounts => amounts.to_hash } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 63287 def to_json JSON.dump(to_hash) end