Class: Io::Flow::V0::Models::DirectDebit
- Inherits:
-
ConfirmationDetails
- Object
- ConfirmationDetails
- Io::Flow::V0::Models::DirectDebit
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Represents an online direct debit payment.
Instance Attribute Summary collapse
-
#last4 ⇒ Object
readonly
Returns the value of attribute last4.
-
#routing_number ⇒ Object
readonly
Returns the value of attribute routing_number.
Attributes inherited from ConfirmationDetails
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ DirectDebit
constructor
A new instance of DirectDebit.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from ConfirmationDetails
Constructor Details
#initialize(incoming = {}) ⇒ DirectDebit
Returns a new instance of DirectDebit.
22571 22572 22573 22574 22575 22576 22577 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22571 def initialize(incoming={}) super(:discriminator => ConfirmationDetails::Types::DIRECT_DEBIT) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:routing_number, :last4], 'DirectDebit') @routing_number = HttpClient::Preconditions.assert_class('routing_number', opts.delete(:routing_number), String) @last4 = HttpClient::Preconditions.assert_class('last4', opts.delete(:last4), String) end |
Instance Attribute Details
#last4 ⇒ Object (readonly)
Returns the value of attribute last4.
22569 22570 22571 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22569 def last4 @last4 end |
#routing_number ⇒ Object (readonly)
Returns the value of attribute routing_number.
22569 22570 22571 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22569 def routing_number @routing_number end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
22583 22584 22585 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22583 def copy(incoming={}) DirectDebit.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
22587 22588 22589 22590 22591 22592 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22587 def subtype_to_hash { :routing_number => routing_number, :last4 => last4 } end |
#to_json ⇒ Object
22579 22580 22581 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22579 def to_json JSON.dump(to_hash) end |