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
-
#account_holder_name ⇒ Object
readonly
Returns the value of attribute account_holder_name.
-
#bank_name ⇒ Object
readonly
Returns the value of attribute bank_name.
-
#bic ⇒ Object
readonly
Returns the value of attribute bic.
-
#iban ⇒ Object
readonly
Returns the value of attribute iban.
-
#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.
39961 39962 39963 39964 39965 39966 39967 39968 39969 39970 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39961 def initialize(incoming={}) super(:discriminator => ConfirmationDetails::Types::DIRECT_DEBIT) opts = HttpClient::Helper.symbolize_keys(incoming) @bank_name = (x = opts.delete(:bank_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('bank_name', x, String)) @bic = (x = opts.delete(:bic); x.nil? ? nil : HttpClient::Preconditions.assert_class('bic', x, String)) @iban = (x = opts.delete(:iban); x.nil? ? nil : HttpClient::Preconditions.assert_class('iban', x, String)) @routing_number = (x = opts.delete(:routing_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('routing_number', x, String)) @last4 = (x = opts.delete(:last4); x.nil? ? nil : HttpClient::Preconditions.assert_class('last4', x, String)) @account_holder_name = (x = opts.delete(:account_holder_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('account_holder_name', x, String)) end |
Instance Attribute Details
#account_holder_name ⇒ Object (readonly)
Returns the value of attribute account_holder_name.
39959 39960 39961 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39959 def account_holder_name @account_holder_name end |
#bank_name ⇒ Object (readonly)
Returns the value of attribute bank_name.
39959 39960 39961 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39959 def bank_name @bank_name end |
#bic ⇒ Object (readonly)
Returns the value of attribute bic.
39959 39960 39961 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39959 def bic @bic end |
#iban ⇒ Object (readonly)
Returns the value of attribute iban.
39959 39960 39961 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39959 def iban @iban end |
#last4 ⇒ Object (readonly)
Returns the value of attribute last4.
39959 39960 39961 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39959 def last4 @last4 end |
#routing_number ⇒ Object (readonly)
Returns the value of attribute routing_number.
39959 39960 39961 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39959 def routing_number @routing_number end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
39976 39977 39978 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39976 def copy(incoming={}) DirectDebit.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
39980 39981 39982 39983 39984 39985 39986 39987 39988 39989 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39980 def subtype_to_hash { :bank_name => bank_name, :bic => bic, :iban => iban, :routing_number => routing_number, :last4 => last4, :account_holder_name => account_holder_name } end |
#to_json ⇒ Object
39972 39973 39974 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39972 def to_json JSON.dump(to_hash) end |