class Io::Flow::V0::Models::PaymentRefundForm
Returns already captured funds back to the customer. You can refund as many times as you’d like up until the total captured amount has been refunded. Refunds are allowed up to one year after the capture (depending on the payment method) unless a dispute has been raised for a transaction.
Attributes
amount[R]
currency[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 58547 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @amount = (x = opts.delete(:amount); x.nil? ? nil : HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(x), BigDecimal)) @currency = (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 58557 def copy(incoming={}) PaymentRefundForm.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 58561 def to_hash { :amount => amount.to_f.to_s, :currency => currency } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 58553 def to_json JSON.dump(to_hash) end