Class: FdxV660Api::AccountDescriptorEntity
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::AccountDescriptorEntity
- Defined in:
- lib/fdx_v660_api/models/account_descriptor_entity.rb
Overview
This descriptor provides minimal information about the account for use in lightweight arrays
Direct Known Subclasses
Instance Attribute Summary collapse
-
#account_category ⇒ String
TODO: Write general description for this method.
-
#account_close_date ⇒ Date
Account closing date.
-
#account_id ⇒ String
Long-term persistent identity of the account, though not an account number.
-
#account_number ⇒ String
Full account number for the end user for this account at the owning institution.
-
#account_number_display ⇒ String
Account display number for the end user's handle at the owning institution.
-
#account_open_date ⇒ Date
Account opening date.
-
#account_type ⇒ AccountType3
Account type.
-
#currency ⇒ CurrencyEntity4
Account currency.
-
#data_clusters ⇒ Array[DataCluster]
An array of supported data cluster scopes for this account.
-
#description ⇒ String
Description of account.
-
#domicile ⇒ DomicileEntity3
The country and region of the account's legal jurisdiction.
-
#error ⇒ Error3
Present if an error was encountered while retrieving this account.
-
#fi_attributes ⇒ Array[FiAttributeEntity]
Array of Financial institution-specific attributes.
-
#links ⇒ Array[HateoasLink]
Links (unique to this Account and consent) for the additional data APIs supported by Data Provider for this account and customer consent.
-
#nickname ⇒ String
Name given by the user.
-
#parent_account_id ⇒ String
Long-term persistent identity of the parent account.
-
#product_id ⇒ String
Unique ID of the marketed product for this account.
-
#product_name ⇒ String
Marketed product name for this account.
-
#status ⇒ AccountStatus3
Account status.
-
#transfer_out_use_cases ⇒ Array[TransferOutUseCase]
Account-level outgoing-transfer use cases supported by this LIMITEDPURPOSECHECKING account, made available for lightweight account selection.
Class Method Summary collapse
-
.discriminators ⇒ Object
Discriminators mapping.
-
.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_category: 'Account Descriptor entity', account_id: SKIP, parent_account_id: SKIP, error: SKIP, account_type: SKIP, domicile: SKIP, account_number: SKIP, account_number_display: SKIP, product_id: SKIP, product_name: SKIP, nickname: SKIP, status: SKIP, description: SKIP, account_open_date: SKIP, account_close_date: SKIP, currency: SKIP, data_clusters: SKIP, transfer_out_use_cases: SKIP, fi_attributes: SKIP, links: SKIP, additional_properties: nil) ⇒ AccountDescriptorEntity
constructor
A new instance of AccountDescriptorEntity.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(account_category: 'Account Descriptor entity', account_id: SKIP, parent_account_id: SKIP, error: SKIP, account_type: SKIP, domicile: SKIP, account_number: SKIP, account_number_display: SKIP, product_id: SKIP, product_name: SKIP, nickname: SKIP, status: SKIP, description: SKIP, account_open_date: SKIP, account_close_date: SKIP, currency: SKIP, data_clusters: SKIP, transfer_out_use_cases: SKIP, fi_attributes: SKIP, links: SKIP, additional_properties: nil) ⇒ AccountDescriptorEntity
Returns a new instance of AccountDescriptorEntity.
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 200 def initialize(account_category: 'Account Descriptor entity', account_id: SKIP, parent_account_id: SKIP, error: SKIP, account_type: SKIP, domicile: SKIP, account_number: SKIP, account_number_display: SKIP, product_id: SKIP, product_name: SKIP, nickname: SKIP, status: SKIP, description: SKIP, account_open_date: SKIP, account_close_date: SKIP, currency: SKIP, data_clusters: SKIP, transfer_out_use_cases: SKIP, fi_attributes: SKIP, links: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_category = account_category unless account_category == SKIP @account_id = account_id unless account_id == SKIP @parent_account_id = parent_account_id unless parent_account_id == SKIP @error = error unless error == SKIP @account_type = account_type unless account_type == SKIP @domicile = domicile unless domicile == SKIP @account_number = account_number unless account_number == SKIP @account_number_display = account_number_display unless account_number_display == SKIP @product_id = product_id unless product_id == SKIP @product_name = product_name unless product_name == SKIP @nickname = nickname unless nickname == SKIP @status = status unless status == SKIP @description = description unless description == SKIP @account_open_date = account_open_date unless account_open_date == SKIP @account_close_date = account_close_date unless account_close_date == SKIP @currency = currency unless currency == SKIP @data_clusters = data_clusters unless data_clusters == SKIP @transfer_out_use_cases = transfer_out_use_cases unless transfer_out_use_cases == SKIP @fi_attributes = fi_attributes unless fi_attributes == SKIP @links = links unless links == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_category ⇒ String
TODO: Write general description for this method
15 16 17 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 15 def account_category @account_category end |
#account_close_date ⇒ Date
Account closing date
81 82 83 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 81 def account_close_date @account_close_date end |
#account_id ⇒ String
Long-term persistent identity of the account, though not an account number. This identity must be unique to the owning institution
20 21 22 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 20 def account_id @account_id end |
#account_number ⇒ String
Full account number for the end user for this account at the owning
institution. If not masked this is sensitive data which should only be
exchanged if encrypted. Deprecated with FDX v6.4, instead return through
the getAccountPaymentNetworks operation as either identifier of
TOKENIZED_ACCOUNT_NUMBER or as encrypted payload with identifier of
ACCOUNT_NUMBER
46 47 48 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 46 def account_number @account_number end |
#account_number_display ⇒ String
Account display number for the end user's handle at the owning institution. This is to be displayed by the Interface Provider
51 52 53 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 51 def account_number_display @account_number_display end |
#account_open_date ⇒ Date
Account opening date
77 78 79 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 77 def account_open_date @account_open_date end |
#account_type ⇒ AccountType3
Account type
33 34 35 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 33 def account_type @account_type end |
#currency ⇒ CurrencyEntity4
Account currency
85 86 87 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 85 def currency @currency end |
#data_clusters ⇒ Array[DataCluster]
An array of supported data cluster scopes for this account. I.e. ACCOUNT_DETAILED, TRANSACTIONS, STATEMENTS, REWARDS, etc.
90 91 92 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 90 def data_clusters @data_clusters end |
#description ⇒ String
Description of account
73 74 75 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 73 def description @description end |
#domicile ⇒ DomicileEntity3
The country and region of the account's legal jurisdiction
37 38 39 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 37 def domicile @domicile end |
#error ⇒ Error3
Present if an error was encountered while retrieving this account
29 30 31 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 29 def error @error end |
#fi_attributes ⇒ Array[FiAttributeEntity]
Array of Financial institution-specific attributes
102 103 104 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 102 def fi_attributes @fi_attributes end |
#links ⇒ Array[HateoasLink]
Links (unique to this Account and consent) for the additional data APIs
supported by Data Provider for this account and customer consent. A link's
rel value can contain a data cluster or space-delimited list of data
clusters which link to the referenced data type(s), for example:
* `ACCOUNT_DETAILED` - Link to the account's details via
/accounts/{accountId}
PAYMENT_SUPPORT- Link to the account's ID and bank ID for payments or transfers via/accounts/{accountId}/payment-networksCUSTOMER_CONTACT- Link to the account's customer contact details via/accounts/{accountId}/contactTRANSACTIONS- Link to the account's transactions list via/accounts/{accountId}/transactionsREWARDS- Link to the account's reward program via/reward-programs/{rewardProgramId}TRANSACTIONS REWARDS- Specific link to the account's transaction rewards via/accounts/{accountId}/reward-transactionsSTATEMENTS- Link to the account's statements list via/accounts/{accountId}/statements
123 124 125 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 123 def links @links end |
#nickname ⇒ String
Name given by the user. Used in UIs to assist in account selection
64 65 66 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 64 def nickname @nickname end |
#parent_account_id ⇒ String
Long-term persistent identity of the parent account. This is used to group accounts
25 26 27 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 25 def parent_account_id @parent_account_id end |
#product_id ⇒ String
Unique ID of the marketed product for this account
55 56 57 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 55 def product_id @product_id end |
#product_name ⇒ String
Marketed product name for this account. Used in UIs to assist in account selection
60 61 62 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 60 def product_name @product_name end |
#status ⇒ AccountStatus3
Account status. Suggested values are: OPEN, CLOSED, PENDINGOPEN, PENDINGCLOSE, PAID, DELINQUENT, NEGATIVECURRENTBALANCE, RESTRICTED
69 70 71 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 69 def status @status end |
#transfer_out_use_cases ⇒ Array[TransferOutUseCase]
Account-level outgoing-transfer use cases supported by this LIMITEDPURPOSECHECKING account, made available for lightweight account selection. This field does not describe payment rails, payment network identifiers, routing details, account numbers, tokenized account numbers, or transfer amount limits
98 99 100 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 98 def transfer_out_use_cases @transfer_out_use_cases end |
Class Method Details
.discriminators ⇒ Object
Discriminators mapping.
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 126 def self.discriminators if @_discriminators.nil? @_discriminators = {} @_discriminators['Account entity'] = AccountEntity @_discriminators['Annuity Account entity'] = AnnuityAccountEntity @_discriminators['Buy Now Pay Later Account entity'] = BuyNowPayLaterAccountEntity @_discriminators['Commercial Account entity'] = CommercialAccountEntity @_discriminators['Deposit Account entity'] = DepositAccountEntity @_discriminators['Digital Wallet account entity'] = DigitalWalletAccountEntity @_discriminators['Insurance Account entity'] = InsuranceAccountEntity @_discriminators['Investment Account entity'] = InvestmentAccountEntity @_discriminators['Line of Credit Account entity'] = LineOfCreditAccountEntity @_discriminators['Loan Account entity'] = LoanAccountEntity end @_discriminators end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 236 def self.from_hash(hash) return nil unless hash # Delegate unboxing to another function if a discriminator # value for a child class is present. unboxer = discriminators[hash['accountCategory']] return unboxer.send(:from_hash, hash) if unboxer # Extract variables from the hash. account_category = hash['accountCategory'] ||= 'Account Descriptor entity' account_id = hash.key?('accountId') ? hash['accountId'] : SKIP parent_account_id = hash.key?('parentAccountId') ? hash['parentAccountId'] : SKIP error = Error3.from_hash(hash['error']) if hash['error'] account_type = hash.key?('accountType') ? hash['accountType'] : SKIP domicile = DomicileEntity3.from_hash(hash['domicile']) if hash['domicile'] account_number = hash.key?('accountNumber') ? hash['accountNumber'] : SKIP account_number_display = hash.key?('accountNumberDisplay') ? hash['accountNumberDisplay'] : SKIP product_id = hash.key?('productId') ? hash['productId'] : SKIP product_name = hash.key?('productName') ? hash['productName'] : SKIP nickname = hash.key?('nickname') ? hash['nickname'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP description = hash.key?('description') ? hash['description'] : SKIP account_open_date = hash.key?('accountOpenDate') ? hash['accountOpenDate'] : SKIP account_close_date = hash.key?('accountCloseDate') ? hash['accountCloseDate'] : SKIP currency = CurrencyEntity4.from_hash(hash['currency']) if hash['currency'] data_clusters = hash.key?('dataClusters') ? hash['dataClusters'] : SKIP transfer_out_use_cases = hash.key?('transferOutUseCases') ? hash['transferOutUseCases'] : SKIP # Parameter is an array, so we need to iterate through it fi_attributes = nil unless hash['fiAttributes'].nil? fi_attributes = [] hash['fiAttributes'].each do |structure| fi_attributes << (FiAttributeEntity.from_hash(structure) if structure) end end fi_attributes = SKIP unless hash.key?('fiAttributes') # Parameter is an array, so we need to iterate through it links = nil unless hash['links'].nil? links = [] hash['links'].each do |structure| links << (HateoasLink.from_hash(structure) if structure) end end links = SKIP unless hash.key?('links') # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. AccountDescriptorEntity.new(account_category: account_category, account_id: account_id, parent_account_id: parent_account_id, error: error, account_type: account_type, domicile: domicile, account_number: account_number, account_number_display: account_number_display, product_id: product_id, product_name: product_name, nickname: nickname, status: status, description: description, account_open_date: account_open_date, account_close_date: account_close_date, currency: currency, data_clusters: data_clusters, transfer_out_use_cases: transfer_out_use_cases, fi_attributes: fi_attributes, links: links, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 144 def self.names @_hash = {} if @_hash.nil? @_hash['account_category'] = 'accountCategory' @_hash['account_id'] = 'accountId' @_hash['parent_account_id'] = 'parentAccountId' @_hash['error'] = 'error' @_hash['account_type'] = 'accountType' @_hash['domicile'] = 'domicile' @_hash['account_number'] = 'accountNumber' @_hash['account_number_display'] = 'accountNumberDisplay' @_hash['product_id'] = 'productId' @_hash['product_name'] = 'productName' @_hash['nickname'] = 'nickname' @_hash['status'] = 'status' @_hash['description'] = 'description' @_hash['account_open_date'] = 'accountOpenDate' @_hash['account_close_date'] = 'accountCloseDate' @_hash['currency'] = 'currency' @_hash['data_clusters'] = 'dataClusters' @_hash['transfer_out_use_cases'] = 'transferOutUseCases' @_hash['fi_attributes'] = 'fiAttributes' @_hash['links'] = 'links' @_hash end |
.nullables ⇒ Object
An array for nullable fields
196 197 198 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 196 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 170 def self.optionals %w[ account_category account_id parent_account_id error account_type domicile account_number account_number_display product_id product_name nickname status description account_open_date account_close_date currency data_clusters transfer_out_use_cases fi_attributes links ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 335 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_category: #{@account_category.inspect}, account_id:"\ " #{@account_id.inspect}, parent_account_id: #{@parent_account_id.inspect}, error:"\ " #{@error.inspect}, account_type: #{@account_type.inspect}, domicile: #{@domicile.inspect},"\ " account_number: #{@account_number.inspect}, account_number_display:"\ " #{@account_number_display.inspect}, product_id: #{@product_id.inspect}, product_name:"\ " #{@product_name.inspect}, nickname: #{@nickname.inspect}, status: #{@status.inspect},"\ " description: #{@description.inspect}, account_open_date: #{@account_open_date.inspect},"\ " account_close_date: #{@account_close_date.inspect}, currency: #{@currency.inspect},"\ " data_clusters: #{@data_clusters.inspect}, transfer_out_use_cases:"\ " #{@transfer_out_use_cases.inspect}, fi_attributes: #{@fi_attributes.inspect}, links:"\ " #{@links.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
321 322 323 324 325 326 327 328 329 330 331 332 |
# File 'lib/fdx_v660_api/models/account_descriptor_entity.rb', line 321 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_category: #{@account_category}, account_id: #{@account_id},"\ " parent_account_id: #{@parent_account_id}, error: #{@error}, account_type:"\ " #{@account_type}, domicile: #{@domicile}, account_number: #{@account_number},"\ " account_number_display: #{@account_number_display}, product_id: #{@product_id},"\ " product_name: #{@product_name}, nickname: #{@nickname}, status: #{@status}, description:"\ " #{@description}, account_open_date: #{@account_open_date}, account_close_date:"\ " #{@account_close_date}, currency: #{@currency}, data_clusters: #{@data_clusters},"\ " transfer_out_use_cases: #{@transfer_out_use_cases}, fi_attributes: #{@fi_attributes},"\ " links: #{@links}, additional_properties: #{@additional_properties}>" end |