Class: VisaAcceptanceMergedSpec::Account1
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::Account1
- Defined in:
- lib/visa_acceptance_merged_spec/models/account1.rb
Overview
Account1 Model.
Instance Attribute Summary collapse
-
#funds_source ⇒ String
Source of funds.
-
#number ⇒ String
The account number of the entity funding the transaction.
-
#type ⇒ String
Identifies the sender’s account type.
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(number: SKIP, type: SKIP, funds_source: SKIP, additional_properties: nil) ⇒ Account1
constructor
A new instance of Account1.
-
#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(number: SKIP, type: SKIP, funds_source: SKIP, additional_properties: nil) ⇒ Account1
Returns a new instance of Account1.
72 73 74 75 76 77 78 79 80 81 |
# File 'lib/visa_acceptance_merged_spec/models/account1.rb', line 72 def initialize(number: SKIP, type: SKIP, funds_source: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @number = number unless number == SKIP @type = type unless type == SKIP @funds_source = funds_source unless funds_source == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#funds_source ⇒ String
Source of funds. Possible Values:
01: Credit.02: Debit.03: Prepaid.04: Deposit Account.05: Mobile Money Account.06: Cash.07: Other.V5: Debits / deposit access other than those linked to the cardholders’ scheme.V6: Credit accounts other than those linked to the cardholder’s scheme.
47 48 49 |
# File 'lib/visa_acceptance_merged_spec/models/account1.rb', line 47 def funds_source @funds_source end |
#number ⇒ String
The account number of the entity funding the transaction. The value for this field can be a payment card account number or bank account number.
15 16 17 |
# File 'lib/visa_acceptance_merged_spec/models/account1.rb', line 15 def number @number end |
#type ⇒ String
Identifies the sender’s account type. This field is applicable for AFT transactions. Valid values are:
- `00` for Other
- `01` for Routing Transit Number (RTN) + Bank Account Number (BAN)
- `02` for International Bank Account Number (IBAN)
- `03` for Card Account
- `04` for Email
- `05` for Phone Number
- `06` for Bank Account Number (BAN) + Bank Identification Code (BIC),
also known as a SWIFT code
07for Wallet ID08for Social Network ID
31 32 33 |
# File 'lib/visa_acceptance_merged_spec/models/account1.rb', line 31 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/visa_acceptance_merged_spec/models/account1.rb', line 84 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. number = hash.key?('number') ? hash['number'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP funds_source = hash.key?('fundsSource') ? hash['fundsSource'] : SKIP # 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. Account1.new(number: number, type: type, funds_source: funds_source, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
50 51 52 53 54 55 56 |
# File 'lib/visa_acceptance_merged_spec/models/account1.rb', line 50 def self.names @_hash = {} if @_hash.nil? @_hash['number'] = 'number' @_hash['type'] = 'type' @_hash['funds_source'] = 'fundsSource' @_hash end |
.nullables ⇒ Object
An array for nullable fields
68 69 70 |
# File 'lib/visa_acceptance_merged_spec/models/account1.rb', line 68 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
59 60 61 62 63 64 65 |
# File 'lib/visa_acceptance_merged_spec/models/account1.rb', line 59 def self.optionals %w[ number type funds_source ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
114 115 116 117 118 |
# File 'lib/visa_acceptance_merged_spec/models/account1.rb', line 114 def inspect class_name = self.class.name.split('::').last "<#{class_name} number: #{@number.inspect}, type: #{@type.inspect}, funds_source:"\ " #{@funds_source.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
107 108 109 110 111 |
# File 'lib/visa_acceptance_merged_spec/models/account1.rb', line 107 def to_s class_name = self.class.name.split('::').last "<#{class_name} number: #{@number}, type: #{@type}, funds_source: #{@funds_source},"\ " additional_properties: #{@additional_properties}>" end |