Class: Io::Flow::V0::Models::RefundOrderSummary
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::RefundOrderSummary
- 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.
-
#captured ⇒ Object
readonly
Returns the value of attribute captured.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#order_number ⇒ Object
readonly
Returns the value of attribute order_number.
-
#refunded ⇒ Object
readonly
Returns the value of attribute refunded.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ RefundOrderSummary
constructor
A new instance of RefundOrderSummary.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ RefundOrderSummary
Returns a new instance of RefundOrderSummary.
35388 35389 35390 35391 35392 35393 35394 35395 35396 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35388 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 |
Instance Attribute Details
#amounts ⇒ Object (readonly)
Returns the value of attribute amounts.
35386 35387 35388 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35386 def amounts @amounts end |
#captured ⇒ Object (readonly)
Returns the value of attribute captured.
35386 35387 35388 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35386 def captured @captured end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
35386 35387 35388 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35386 def currency @currency end |
#order_number ⇒ Object (readonly)
Returns the value of attribute order_number.
35386 35387 35388 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35386 def order_number @order_number end |
#refunded ⇒ Object (readonly)
Returns the value of attribute refunded.
35386 35387 35388 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35386 def refunded @refunded end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
35402 35403 35404 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35402 def copy(incoming={}) RefundOrderSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
35406 35407 35408 35409 35410 35411 35412 35413 35414 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35406 def to_hash { :order_number => order_number, :currency => currency, :captured => captured, :refunded => refunded, :amounts => amounts.to_hash } end |
#to_json ⇒ Object
35398 35399 35400 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35398 def to_json JSON.dump(to_hash) end |