Class: CyberSource::UnifiedriskPaymentBankAccount
- Inherits:
-
Object
- Object
- CyberSource::UnifiedriskPaymentBankAccount
- Defined in:
- lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb
Instance Attribute Summary collapse
-
#account_holder_name ⇒ Object
Full name of the person or business that owns the bank account.
-
#account_open_date ⇒ Object
Date when the bank account was originally opened, in ISO 8601 format (YYYY-MM-DD).
-
#added_at_checkout ⇒ Object
Whether the bank account was newly entered during checkout.
-
#balance_before ⇒ Object
Returns the value of attribute balance_before.
-
#bank_code ⇒ Object
Bank code.
-
#branch_address ⇒ Object
Returns the value of attribute branch_address.
-
#branch_id ⇒ Object
Bank branch identifier.
-
#check_image_reference ⇒ Object
Check image reference number.
-
#check_number ⇒ Object
Check number for check payments.
-
#credit_limit ⇒ Object
Returns the value of attribute credit_limit.
-
#encoder_id ⇒ Object
Bank encoder identifier for encoded account numbers.
-
#financial_institution ⇒ Object
Returns the value of attribute financial_institution.
-
#flags ⇒ Object
Account flags: VIP, COMPROMISED, etc.
-
#iban ⇒ Object
International Bank Account Number.
-
#number ⇒ Object
Masked or tokenized account number.
-
#number_format ⇒ Object
Account number format: IBAN, BBAN, etc.
-
#routing_number ⇒ Object
Bank routing/transit number.
-
#sub_type ⇒ Object
Sub-category of the bank account type providing more specific classification (e.g., PERSONAL_CHECKING, BUSINESS_SAVINGS, CORPORATE_CURRENT).
-
#swift_code ⇒ Object
Bank SWIFT/BIC code.
-
#type ⇒ Object
Account type: CHECKING, SAVINGS, CORPORATE, etc.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UnifiedriskPaymentBankAccount
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ UnifiedriskPaymentBankAccount
Initializes the object
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 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 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 234 235 236 237 238 239 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 152 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'type') self.type = attributes[:'type'] end if attributes.has_key?(:'number') self.number = attributes[:'number'] end if attributes.has_key?(:'numberFormat') self.number_format = attributes[:'numberFormat'] end if attributes.has_key?(:'routingNumber') self.routing_number = attributes[:'routingNumber'] end if attributes.has_key?(:'iban') self.iban = attributes[:'iban'] end if attributes.has_key?(:'swiftCode') self.swift_code = attributes[:'swiftCode'] end if attributes.has_key?(:'bankCode') self.bank_code = attributes[:'bankCode'] end if attributes.has_key?(:'checkNumber') self.check_number = attributes[:'checkNumber'] end if attributes.has_key?(:'checkImageReference') self.check_image_reference = attributes[:'checkImageReference'] end if attributes.has_key?(:'encoderId') self.encoder_id = attributes[:'encoderId'] end if attributes.has_key?(:'branchId') self.branch_id = attributes[:'branchId'] end if attributes.has_key?(:'flags') if (value = attributes[:'flags']).is_a?(Array) self.flags = value end end if attributes.has_key?(:'accountHolderName') self.account_holder_name = attributes[:'accountHolderName'] end if attributes.has_key?(:'addedAtCheckout') self.added_at_checkout = attributes[:'addedAtCheckout'] end if attributes.has_key?(:'financialInstitution') self.financial_institution = attributes[:'financialInstitution'] end if attributes.has_key?(:'balanceBefore') self.balance_before = attributes[:'balanceBefore'] end if attributes.has_key?(:'creditLimit') self.credit_limit = attributes[:'creditLimit'] end if attributes.has_key?(:'branchAddress') self.branch_address = attributes[:'branchAddress'] end if attributes.has_key?(:'subType') self.sub_type = attributes[:'subType'] end if attributes.has_key?(:'accountOpenDate') self.account_open_date = attributes[:'accountOpenDate'] end end |
Instance Attribute Details
#account_holder_name ⇒ Object
Full name of the person or business that owns the bank account
53 54 55 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 53 def account_holder_name @account_holder_name end |
#account_open_date ⇒ Object
Date when the bank account was originally opened, in ISO 8601 format (YYYY-MM-DD). Account tenure is a key risk factor - newer accounts carry higher fraud risk
70 71 72 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 70 def account_open_date @account_open_date end |
#added_at_checkout ⇒ Object
Whether the bank account was newly entered during checkout
56 57 58 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 56 def added_at_checkout @added_at_checkout end |
#balance_before ⇒ Object
Returns the value of attribute balance_before.
60 61 62 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 60 def balance_before @balance_before end |
#bank_code ⇒ Object
Bank code
35 36 37 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 35 def bank_code @bank_code end |
#branch_address ⇒ Object
Returns the value of attribute branch_address.
64 65 66 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 64 def branch_address @branch_address end |
#branch_id ⇒ Object
Bank branch identifier
47 48 49 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 47 def branch_id @branch_id end |
#check_image_reference ⇒ Object
Check image reference number
41 42 43 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 41 def check_image_reference @check_image_reference end |
#check_number ⇒ Object
Check number for check payments
38 39 40 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 38 def check_number @check_number end |
#credit_limit ⇒ Object
Returns the value of attribute credit_limit.
62 63 64 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 62 def credit_limit @credit_limit end |
#encoder_id ⇒ Object
Bank encoder identifier for encoded account numbers
44 45 46 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 44 def encoder_id @encoder_id end |
#financial_institution ⇒ Object
Returns the value of attribute financial_institution.
58 59 60 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 58 def financial_institution @financial_institution end |
#flags ⇒ Object
Account flags: VIP, COMPROMISED, etc
50 51 52 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 50 def flags @flags end |
#iban ⇒ Object
International Bank Account Number
29 30 31 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 29 def iban @iban end |
#number ⇒ Object
Masked or tokenized account number
20 21 22 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 20 def number @number end |
#number_format ⇒ Object
Account number format: IBAN, BBAN, etc
23 24 25 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 23 def number_format @number_format end |
#routing_number ⇒ Object
Bank routing/transit number
26 27 28 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 26 def routing_number @routing_number end |
#sub_type ⇒ Object
Sub-category of the bank account type providing more specific classification (e.g., PERSONAL_CHECKING, BUSINESS_SAVINGS, CORPORATE_CURRENT). Used for risk segmentation within account types
67 68 69 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 67 def sub_type @sub_type end |
#swift_code ⇒ Object
Bank SWIFT/BIC code
32 33 34 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 32 def swift_code @swift_code end |
#type ⇒ Object
Account type: CHECKING, SAVINGS, CORPORATE, etc
17 18 19 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 17 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 73 def self.attribute_map { :'type' => :'type', :'number' => :'number', :'number_format' => :'numberFormat', :'routing_number' => :'routingNumber', :'iban' => :'iban', :'swift_code' => :'swiftCode', :'bank_code' => :'bankCode', :'check_number' => :'checkNumber', :'check_image_reference' => :'checkImageReference', :'encoder_id' => :'encoderId', :'branch_id' => :'branchId', :'flags' => :'flags', :'account_holder_name' => :'accountHolderName', :'added_at_checkout' => :'addedAtCheckout', :'financial_institution' => :'financialInstitution', :'balance_before' => :'balanceBefore', :'credit_limit' => :'creditLimit', :'branch_address' => :'branchAddress', :'sub_type' => :'subType', :'account_open_date' => :'accountOpenDate' } end |
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 99 def self.json_map { :'type' => :'type', :'number' => :'number', :'number_format' => :'number_format', :'routing_number' => :'routing_number', :'iban' => :'iban', :'swift_code' => :'swift_code', :'bank_code' => :'bank_code', :'check_number' => :'check_number', :'check_image_reference' => :'check_image_reference', :'encoder_id' => :'encoder_id', :'branch_id' => :'branch_id', :'flags' => :'flags', :'account_holder_name' => :'account_holder_name', :'added_at_checkout' => :'added_at_checkout', :'financial_institution' => :'financial_institution', :'balance_before' => :'balance_before', :'credit_limit' => :'credit_limit', :'branch_address' => :'branch_address', :'sub_type' => :'sub_type', :'account_open_date' => :'account_open_date' } end |
.swagger_types ⇒ Object
Attribute type mapping.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 125 def self.swagger_types { :'type' => :'String', :'number' => :'String', :'number_format' => :'String', :'routing_number' => :'String', :'iban' => :'String', :'swift_code' => :'String', :'bank_code' => :'String', :'check_number' => :'String', :'check_image_reference' => :'String', :'encoder_id' => :'String', :'branch_id' => :'String', :'flags' => :'Array<String>', :'account_holder_name' => :'String', :'added_at_checkout' => :'BOOLEAN', :'financial_institution' => :'UnifiedriskPaymentBankAccountFinancialInstitution', :'balance_before' => :'UnifiedriskPaymentBankAccountBalanceBefore', :'credit_limit' => :'UnifiedriskPaymentBankAccountCreditLimit', :'branch_address' => :'UnifiedriskPaymentBankAccountBranchAddress', :'sub_type' => :'String', :'account_open_date' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 310 def ==(o) return true if self.equal?(o) self.class == o.class && type == o.type && number == o.number && number_format == o.number_format && routing_number == o.routing_number && iban == o.iban && swift_code == o.swift_code && bank_code == o.bank_code && check_number == o.check_number && check_image_reference == o.check_image_reference && encoder_id == o.encoder_id && branch_id == o.branch_id && flags == o.flags && account_holder_name == o.account_holder_name && added_at_checkout == o.added_at_checkout && financial_institution == o.financial_institution && balance_before == o.balance_before && credit_limit == o.credit_limit && branch_address == o.branch_address && sub_type == o.sub_type && account_open_date == o.account_open_date end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 371 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = CyberSource.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
437 438 439 440 441 442 443 444 445 446 447 448 449 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 437 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 350 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
337 338 339 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 337 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
343 344 345 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 343 def hash [type, number, number_format, routing_number, iban, swift_code, bank_code, check_number, check_image_reference, encoder_id, branch_id, flags, account_holder_name, added_at_checkout, financial_institution, balance_before, credit_limit, branch_address, sub_type, account_open_date].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
243 244 245 246 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 243 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
417 418 419 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 417 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
423 424 425 426 427 428 429 430 431 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 423 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
411 412 413 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 411 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
250 251 252 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_bank_account.rb', line 250 def valid? true end |