Class: Io::Flow::V0::Models::PaymentAuthorizationStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PaymentAuthorizationStatus
- 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 = {}) ⇒ PaymentAuthorizationStatus
constructor
A new instance of PaymentAuthorizationStatus.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PaymentAuthorizationStatus
Returns a new instance of PaymentAuthorizationStatus.
56432 56433 56434 56435 56436 56437 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56432 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:status], 'PaymentAuthorizationStatus') @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::AuthorizationStatus) ? x : ::Io::Flow::V0::Models::AuthorizationStatus.apply(x)) @reason = (x = opts.delete(:reason); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::AuthorizationDeclineCode) ? x : ::Io::Flow::V0::Models::AuthorizationDeclineCode.apply(x))) end |
Instance Attribute Details
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
56430 56431 56432 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56430 def reason @reason end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
56430 56431 56432 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56430 def status @status end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
56443 56444 56445 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56443 def copy(incoming={}) PaymentAuthorizationStatus.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
56447 56448 56449 56450 56451 56452 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56447 def to_hash { :status => status.value, :reason => reason.nil? ? nil : reason.value } end |
#to_json ⇒ Object
56439 56440 56441 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56439 def to_json JSON.dump(to_hash) end |