class SixSaferpay::BankAccount

Attributes

bank_name[RW]
bic[RW]
country_code[RW]
holder_name[RW]
iban[RW]

Public Class Methods

new(iban:, holder_name: nil, bic: nil, bank_name: nil, country_code: nil ) click to toggle source
# 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

Public Instance Methods

to_h()
Alias for: to_hash
to_hash() click to toggle source
# 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
Also aliased as: to_h