Class: Io::Flow::V0::Models::OrderRefundSummary
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderRefundSummary
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
For merchant of record authorizations, we provide a summary of refund information primarily to support customer service workflow.
Instance Attribute Summary collapse
-
#amounts ⇒ Object
readonly
Returns the value of attribute amounts.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderRefundSummary
constructor
A new instance of OrderRefundSummary.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderRefundSummary
Returns a new instance of OrderRefundSummary.
53669 53670 53671 53672 53673 53674 |
# 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 |
Instance Attribute Details
#amounts ⇒ Object (readonly)
Returns the value of attribute amounts.
53667 53668 53669 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53667 def amounts @amounts end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
53667 53668 53669 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53667 def currency @currency end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
53680 53681 53682 |
# 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 ⇒ Object
53684 53685 53686 53687 53688 53689 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53684 def to_hash { :currency => currency, :amounts => amounts.to_hash } end |
#to_json ⇒ Object
53676 53677 53678 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53676 def to_json JSON.dump(to_hash) end |