Class: SixSaferpay::BankAccount
- Inherits:
-
Object
- Object
- SixSaferpay::BankAccount
- Defined in:
- lib/six_saferpay/models/bank_account.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#bank_name ⇒ Object
Returns the value of attribute bank_name.
-
#bic ⇒ Object
Returns the value of attribute bic.
-
#country_code ⇒ Object
Returns the value of attribute country_code.
-
#holder_name ⇒ Object
Returns the value of attribute holder_name.
-
#iban ⇒ Object
Returns the value of attribute iban.
Instance Method Summary collapse
-
#initialize(iban:, holder_name: nil, bic: nil, bank_name: nil, country_code: nil) ⇒ BankAccount
constructor
A new instance of BankAccount.
- #to_hash ⇒ Object (also: #to_h)
Constructor Details
#initialize(iban:, holder_name: nil, bic: nil, bank_name: nil, country_code: nil) ⇒ BankAccount
Returns a new instance of BankAccount.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/six_saferpay/models/bank_account.rb', line 11 def initialize(iban:, holder_name: nil, bic: nil, bank_name: nil, country_code: nil ) @iban = iban @holder_name = holder_name @bic = bic @bank_name = bank_name @country_code = country_code end |
Instance Attribute Details
#bank_name ⇒ Object
Returns the value of attribute bank_name.
4 5 6 |
# File 'lib/six_saferpay/models/bank_account.rb', line 4 def bank_name @bank_name end |
#bic ⇒ Object
Returns the value of attribute bic.
4 5 6 |
# File 'lib/six_saferpay/models/bank_account.rb', line 4 def bic @bic end |
#country_code ⇒ Object
Returns the value of attribute country_code.
4 5 6 |
# File 'lib/six_saferpay/models/bank_account.rb', line 4 def country_code @country_code end |
#holder_name ⇒ Object
Returns the value of attribute holder_name.
4 5 6 |
# File 'lib/six_saferpay/models/bank_account.rb', line 4 def holder_name @holder_name end |
#iban ⇒ Object
Returns the value of attribute iban.
4 5 6 |
# File 'lib/six_saferpay/models/bank_account.rb', line 4 def iban @iban end |
Instance Method Details
#to_hash ⇒ Object Also known as: to_h
24 25 26 27 28 29 30 31 32 |
# File 'lib/six_saferpay/models/bank_account.rb', line 24 def to_hash hash = Hash.new hash.merge!(iban: @iban) if @iban hash.merge!(holder_name: @holder_name) if @holder_name hash.merge!(bic: @bic) if @bic hash.merge!(bank_name: @bank_name) hash.merge!(country_code: @country_code) hash end |