Class: Io::Flow::V0::Models::PaymentReversalStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PaymentReversalStatus
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PaymentReversalStatus
constructor
A new instance of PaymentReversalStatus.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PaymentReversalStatus
Returns a new instance of PaymentReversalStatus.
59039 59040 59041 59042 59043 59044 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59039 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:status], 'PaymentReversalStatus') @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::ReversalStatus) ? x : ::Io::Flow::V0::Models::ReversalStatus.apply(x)) @reason = (x = opts.delete(:reason); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ReversalErrorCode) ? x : ::Io::Flow::V0::Models::ReversalErrorCode.apply(x))) end |
Instance Attribute Details
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
59037 59038 59039 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59037 def reason @reason end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
59037 59038 59039 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59037 def status @status end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
59050 59051 59052 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59050 def copy(incoming={}) PaymentReversalStatus.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
59054 59055 59056 59057 59058 59059 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59054 def to_hash { :status => status.value, :reason => reason.nil? ? nil : reason.value } end |
#to_json ⇒ Object
59046 59047 59048 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59046 def to_json JSON.dump(to_hash) end |