Class: FdxV660Api::FundingSource
- Defined in:
- lib/fdx_v660_api/models/funding_source.rb
Overview
Accounts for customer's alternate funding sources from which FI can transfer funds to cover transactions if customer has overdraft protection from a consented account. In the order of which accounts will be attempted to transfer the coverage amount needed. Contains masked or truncated account number or nickname, account type and/or institution name for full clarity on an internal or external funding source
Instance Attribute Summary collapse
-
#account_id ⇒ String
Long-term persistent identity of the funding source account, not an account number.
-
#account_number_display ⇒ String
Funding source account's masked or truncated account number or its nickname for display to the customer.
-
#account_type ⇒ AccountType1
Type of the funding source account.
-
#institution_name ⇒ String
The name of the institution holding the account.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(account_id: SKIP, account_number_display: SKIP, account_type: SKIP, institution_name: SKIP, additional_properties: nil) ⇒ FundingSource
constructor
A new instance of FundingSource.
-
#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_id: SKIP, account_number_display: SKIP, account_type: SKIP, institution_name: SKIP, additional_properties: nil) ⇒ FundingSource
Returns a new instance of FundingSource.
60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/fdx_v660_api/models/funding_source.rb', line 60 def initialize(account_id: SKIP, account_number_display: SKIP, account_type: SKIP, institution_name: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_id = account_id unless account_id == SKIP @account_number_display = account_number_display unless account_number_display == SKIP @account_type = account_type unless account_type == SKIP @institution_name = institution_name unless institution_name == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_id ⇒ String
Long-term persistent identity of the funding source account, not an account number. This identity must be unique to the owning institution
20 21 22 |
# File 'lib/fdx_v660_api/models/funding_source.rb', line 20 def account_id @account_id end |
#account_number_display ⇒ String
Funding source account's masked or truncated account number or its nickname for display to the customer
25 26 27 |
# File 'lib/fdx_v660_api/models/funding_source.rb', line 25 def account_number_display @account_number_display end |
#account_type ⇒ AccountType1
Type of the funding source account
29 30 31 |
# File 'lib/fdx_v660_api/models/funding_source.rb', line 29 def account_type @account_type end |
#institution_name ⇒ String
The name of the institution holding the account
33 34 35 |
# File 'lib/fdx_v660_api/models/funding_source.rb', line 33 def institution_name @institution_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/fdx_v660_api/models/funding_source.rb', line 74 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_id = hash.key?('accountId') ? hash['accountId'] : SKIP account_number_display = hash.key?('accountNumberDisplay') ? hash['accountNumberDisplay'] : SKIP account_type = hash.key?('accountType') ? hash['accountType'] : SKIP institution_name = hash.key?('institutionName') ? hash['institutionName'] : 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. FundingSource.new(account_id: account_id, account_number_display: account_number_display, account_type: account_type, institution_name: institution_name, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
36 37 38 39 40 41 42 43 |
# File 'lib/fdx_v660_api/models/funding_source.rb', line 36 def self.names @_hash = {} if @_hash.nil? @_hash['account_id'] = 'accountId' @_hash['account_number_display'] = 'accountNumberDisplay' @_hash['account_type'] = 'accountType' @_hash['institution_name'] = 'institutionName' @_hash end |
.nullables ⇒ Object
An array for nullable fields
56 57 58 |
# File 'lib/fdx_v660_api/models/funding_source.rb', line 56 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
46 47 48 49 50 51 52 53 |
# File 'lib/fdx_v660_api/models/funding_source.rb', line 46 def self.optionals %w[ account_id account_number_display account_type institution_name ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
102 103 104 105 106 107 108 |
# File 'lib/fdx_v660_api/models/funding_source.rb', line 102 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
119 120 121 122 123 124 125 |
# File 'lib/fdx_v660_api/models/funding_source.rb', line 119 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_id: #{@account_id.inspect}, account_number_display:"\ " #{@account_number_display.inspect}, account_type: #{@account_type.inspect},"\ " institution_name: #{@institution_name.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
111 112 113 114 115 116 |
# File 'lib/fdx_v660_api/models/funding_source.rb', line 111 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_id: #{@account_id}, account_number_display:"\ " #{@account_number_display}, account_type: #{@account_type}, institution_name:"\ " #{@institution_name}, additional_properties: #{@additional_properties}>" end |