Class: Io::Flow::V0::Models::PaymentSourceConfirmationAction
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PaymentSourceConfirmationAction
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Represents confirmation details & any additional confirmation actions required to execute the payment.
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PaymentSourceConfirmationAction
constructor
A new instance of PaymentSourceConfirmationAction.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PaymentSourceConfirmationAction
Returns a new instance of PaymentSourceConfirmationAction.
54589 54590 54591 54592 54593 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54589 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:type], 'PaymentSourceConfirmationAction') @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::PaymentSourceConfirmationActionType) ? x : ::Io::Flow::V0::Models::PaymentSourceConfirmationActionType.apply(x)) end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
54587 54588 54589 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54587 def type @type end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
54599 54600 54601 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54599 def copy(incoming={}) PaymentSourceConfirmationAction.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
54603 54604 54605 54606 54607 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54603 def to_hash { :type => type.value } end |
#to_json ⇒ Object
54595 54596 54597 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54595 def to_json JSON.dump(to_hash) end |