Class: ShellCardManagementApIs::BankAccount
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::BankAccount
- Defined in:
- lib/shell_card_management_ap_is/models/bank_account.rb
Overview
BankAccount Model.
Instance Attribute Summary collapse
-
#account_name ⇒ String
Account Name.
-
#account_number ⇒ String
Account Number.
-
#bank_name ⇒ String
Bank Name.
-
#bank_type ⇒ String
Bank Type Id and Description.
-
#country ⇒ String
Bank Account Country Name 1-Austria 2-Belgium 3-Bulgaria 4-Croatia 5-Czech Republic.
-
#country_iso_code ⇒ String
Bank Account Country ISO Code.
-
#currency_code ⇒ String
Bank Account currency ISO code.
-
#currency_symbol ⇒ String
Bank Account currency Symbol.
-
#date_effective ⇒ String
Bank Account effective date for the payer.
-
#date_terminated ⇒ String
Bank Account terminated date.
-
#iban ⇒ String
Bank Account IBAN for Payer.
-
#sort_code ⇒ String
Payer bank Sort Code.
-
#swift_code ⇒ String
Payer Bank Swift Code.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(account_number = SKIP, bank_name = SKIP, account_name = SKIP, date_effective = SKIP, date_terminated = SKIP, iban = SKIP, currency_code = SKIP, currency_symbol = SKIP, country_iso_code = SKIP, country = SKIP, sort_code = SKIP, swift_code = SKIP, bank_type = SKIP) ⇒ BankAccount
constructor
A new instance of BankAccount.
Methods inherited from BaseModel
Constructor Details
#initialize(account_number = SKIP, bank_name = SKIP, account_name = SKIP, date_effective = SKIP, date_terminated = SKIP, iban = SKIP, currency_code = SKIP, currency_symbol = SKIP, country_iso_code = SKIP, country = SKIP, sort_code = SKIP, swift_code = SKIP, bank_type = SKIP) ⇒ BankAccount
Returns a new instance of BankAccount.
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/shell_card_management_ap_is/models/bank_account.rb', line 126 def initialize(account_number = SKIP, bank_name = SKIP, account_name = SKIP, date_effective = SKIP, date_terminated = SKIP, iban = SKIP, currency_code = SKIP, currency_symbol = SKIP, country_iso_code = SKIP, country = SKIP, sort_code = SKIP, swift_code = SKIP, bank_type = SKIP) @account_number = account_number unless account_number == SKIP @bank_name = bank_name unless bank_name == SKIP @account_name = account_name unless account_name == SKIP @date_effective = date_effective unless date_effective == SKIP @date_terminated = date_terminated unless date_terminated == SKIP @iban = iban unless iban == SKIP @currency_code = currency_code unless currency_code == SKIP @currency_symbol = currency_symbol unless currency_symbol == SKIP @country_iso_code = country_iso_code unless country_iso_code == SKIP @country = country unless country == SKIP @sort_code = sort_code unless sort_code == SKIP @swift_code = swift_code unless swift_code == SKIP @bank_type = bank_type unless bank_type == SKIP end |
Instance Attribute Details
#account_name ⇒ String
Account Name
22 23 24 |
# File 'lib/shell_card_management_ap_is/models/bank_account.rb', line 22 def account_name @account_name end |
#account_number ⇒ String
Account Number
14 15 16 |
# File 'lib/shell_card_management_ap_is/models/bank_account.rb', line 14 def account_number @account_number end |
#bank_name ⇒ String
Bank Name
18 19 20 |
# File 'lib/shell_card_management_ap_is/models/bank_account.rb', line 18 def bank_name @bank_name end |
#bank_type ⇒ String
Bank Type Id and Description
67 68 69 |
# File 'lib/shell_card_management_ap_is/models/bank_account.rb', line 67 def bank_type @bank_type end |
#country ⇒ String
Bank Account Country Name 1-Austria 2-Belgium 3-Bulgaria 4-Croatia 5-Czech Republic
55 56 57 |
# File 'lib/shell_card_management_ap_is/models/bank_account.rb', line 55 def country @country end |
#country_iso_code ⇒ String
Bank Account Country ISO Code
46 47 48 |
# File 'lib/shell_card_management_ap_is/models/bank_account.rb', line 46 def country_iso_code @country_iso_code end |
#currency_code ⇒ String
Bank Account currency ISO code.
38 39 40 |
# File 'lib/shell_card_management_ap_is/models/bank_account.rb', line 38 def currency_code @currency_code end |
#currency_symbol ⇒ String
Bank Account currency Symbol.
42 43 44 |
# File 'lib/shell_card_management_ap_is/models/bank_account.rb', line 42 def currency_symbol @currency_symbol end |
#date_effective ⇒ String
Bank Account effective date for the payer
26 27 28 |
# File 'lib/shell_card_management_ap_is/models/bank_account.rb', line 26 def date_effective @date_effective end |
#date_terminated ⇒ String
Bank Account terminated date. Default is null
30 31 32 |
# File 'lib/shell_card_management_ap_is/models/bank_account.rb', line 30 def date_terminated @date_terminated end |
#iban ⇒ String
Bank Account IBAN for Payer
34 35 36 |
# File 'lib/shell_card_management_ap_is/models/bank_account.rb', line 34 def iban @iban end |
#sort_code ⇒ String
Payer bank Sort Code
59 60 61 |
# File 'lib/shell_card_management_ap_is/models/bank_account.rb', line 59 def sort_code @sort_code end |
#swift_code ⇒ String
Payer Bank Swift Code
63 64 65 |
# File 'lib/shell_card_management_ap_is/models/bank_account.rb', line 63 def swift_code @swift_code end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/shell_card_management_ap_is/models/bank_account.rb', line 147 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP bank_name = hash.key?('BankName') ? hash['BankName'] : SKIP account_name = hash.key?('AccountName') ? hash['AccountName'] : SKIP date_effective = hash.key?('DateEffective') ? hash['DateEffective'] : SKIP date_terminated = hash.key?('DateTerminated') ? hash['DateTerminated'] : SKIP iban = hash.key?('IBAN') ? hash['IBAN'] : SKIP currency_code = hash.key?('CurrencyCode') ? hash['CurrencyCode'] : SKIP currency_symbol = hash.key?('CurrencySymbol') ? hash['CurrencySymbol'] : SKIP country_iso_code = hash.key?('CountryISOCode') ? hash['CountryISOCode'] : SKIP country = hash.key?('Country') ? hash['Country'] : SKIP sort_code = hash.key?('SortCode') ? hash['SortCode'] : SKIP swift_code = hash.key?('SwiftCode') ? hash['SwiftCode'] : SKIP bank_type = hash.key?('BankType') ? hash['BankType'] : SKIP # Create object from extracted values. BankAccount.new(account_number, bank_name, account_name, date_effective, date_terminated, iban, currency_code, currency_symbol, country_iso_code, country, sort_code, swift_code, bank_type) end |
.names ⇒ Object
A mapping from model property names to API property names.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/shell_card_management_ap_is/models/bank_account.rb', line 70 def self.names @_hash = {} if @_hash.nil? @_hash['account_number'] = 'AccountNumber' @_hash['bank_name'] = 'BankName' @_hash['account_name'] = 'AccountName' @_hash['date_effective'] = 'DateEffective' @_hash['date_terminated'] = 'DateTerminated' @_hash['iban'] = 'IBAN' @_hash['currency_code'] = 'CurrencyCode' @_hash['currency_symbol'] = 'CurrencySymbol' @_hash['country_iso_code'] = 'CountryISOCode' @_hash['country'] = 'Country' @_hash['sort_code'] = 'SortCode' @_hash['swift_code'] = 'SwiftCode' @_hash['bank_type'] = 'BankType' @_hash end |
.nullables ⇒ Object
An array for nullable fields
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/shell_card_management_ap_is/models/bank_account.rb', line 108 def self.nullables %w[ account_number bank_name account_name date_effective date_terminated iban currency_code currency_symbol country_iso_code country sort_code swift_code bank_type ] end |
.optionals ⇒ Object
An array for optional fields
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/shell_card_management_ap_is/models/bank_account.rb', line 89 def self.optionals %w[ account_number bank_name account_name date_effective date_terminated iban currency_code currency_symbol country_iso_code country sort_code swift_code bank_type ] end |