class Io::Flow::V0::Models::RefundCaptureSummary
Refund
captures provide the detailed information on the amount refunded against a specific capture
Attributes
amount[R]
capture[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 63006 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:capture, :amount], 'RefundCaptureSummary') @capture = (x = opts.delete(:capture); x.is_a?(::Io::Flow::V0::Models::Capture) ? x : ::Io::Flow::V0::Models::Capture.new(x)) @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 63017 def copy(incoming={}) RefundCaptureSummary.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 63021 def to_hash { :capture => capture.to_hash, :amount => amount.to_f.to_s } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 63013 def to_json JSON.dump(to_hash) end