Class: Io::Flow::V0::Models::PaymentFailure
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PaymentFailure
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#authorization_id ⇒ Object
readonly
Returns the value of attribute authorization_id.
-
#failure_code ⇒ Object
readonly
Returns the value of attribute failure_code.
-
#failure_message ⇒ Object
readonly
Returns the value of attribute failure_message.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PaymentFailure
constructor
A new instance of PaymentFailure.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PaymentFailure
Returns a new instance of PaymentFailure.
52599 52600 52601 52602 52603 52604 52605 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52599 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:failure_code, :failure_message], 'PaymentFailure') @authorization_id = (x = opts.delete(:authorization_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('authorization_id', x, String)) @failure_code = (x = opts.delete(:failure_code); x.is_a?(::Io::Flow::V0::Models::PaymentFailureCode) ? x : ::Io::Flow::V0::Models::PaymentFailureCode.apply(x)) @failure_message = HttpClient::Preconditions.assert_class('failure_message', opts.delete(:failure_message), String) end |
Instance Attribute Details
#authorization_id ⇒ Object (readonly)
Returns the value of attribute authorization_id.
52597 52598 52599 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52597 def @authorization_id end |
#failure_code ⇒ Object (readonly)
Returns the value of attribute failure_code.
52597 52598 52599 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52597 def failure_code @failure_code end |
#failure_message ⇒ Object (readonly)
Returns the value of attribute failure_message.
52597 52598 52599 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52597 def @failure_message end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
52611 52612 52613 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52611 def copy(incoming={}) PaymentFailure.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
52615 52616 52617 52618 52619 52620 52621 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52615 def to_hash { :authorization_id => , :failure_code => failure_code.value, :failure_message => } end |
#to_json ⇒ Object
52607 52608 52609 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52607 def to_json JSON.dump(to_hash) end |