Class: ThePlaidApi::ProcessorAuthGetResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::ProcessorAuthGetResponse
- Defined in:
- lib/the_plaid_api/models/processor_auth_get_response.rb
Overview
ProcessorAuthGetResponse defines the response schema for ‘/processor/auth/get`
Instance Attribute Summary collapse
-
#account ⇒ Account
A single account at a financial institution.
-
#numbers ⇒ ProcessorNumber
An object containing identifying numbers used for making electronic transfers to and from the ‘account`.
-
#request_id ⇒ String
A unique identifier for the request, which can be used for troubleshooting.
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(request_id:, numbers:, account:, additional_properties: nil) ⇒ ProcessorAuthGetResponse
constructor
A new instance of ProcessorAuthGetResponse.
-
#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(request_id:, numbers:, account:, additional_properties: nil) ⇒ ProcessorAuthGetResponse
Returns a new instance of ProcessorAuthGetResponse.
51 52 53 54 55 56 57 58 59 |
# File 'lib/the_plaid_api/models/processor_auth_get_response.rb', line 51 def initialize(request_id:, numbers:, account:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @request_id = request_id @numbers = numbers @account = account @additional_properties = additional_properties end |
Instance Attribute Details
#account ⇒ Account
A single account at a financial institution.
30 31 32 |
# File 'lib/the_plaid_api/models/processor_auth_get_response.rb', line 30 def account @account end |
#numbers ⇒ ProcessorNumber
An object containing identifying numbers used for making electronic transfers to and from the ‘account`. The identifying number type (ACH, EFT, IBAN, or BACS) used will depend on the country of the account. An account may have more than one number type. If a particular identifying number type is not used by the `account` for which auth data has been requested, a null value will be returned.
26 27 28 |
# File 'lib/the_plaid_api/models/processor_auth_get_response.rb', line 26 def numbers @numbers end |
#request_id ⇒ String
A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.
17 18 19 |
# File 'lib/the_plaid_api/models/processor_auth_get_response.rb', line 17 def request_id @request_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/the_plaid_api/models/processor_auth_get_response.rb', line 62 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. request_id = hash.key?('request_id') ? hash['request_id'] : nil numbers = ProcessorNumber.from_hash(hash['numbers']) if hash['numbers'] account = Account.from_hash(hash['account']) if hash['account'] # 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. ProcessorAuthGetResponse.new(request_id: request_id, numbers: numbers, account: account, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 |
# File 'lib/the_plaid_api/models/processor_auth_get_response.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['request_id'] = 'request_id' @_hash['numbers'] = 'numbers' @_hash['account'] = 'account' @_hash end |
.nullables ⇒ Object
An array for nullable fields
47 48 49 |
# File 'lib/the_plaid_api/models/processor_auth_get_response.rb', line 47 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
42 43 44 |
# File 'lib/the_plaid_api/models/processor_auth_get_response.rb', line 42 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
92 93 94 95 96 |
# File 'lib/the_plaid_api/models/processor_auth_get_response.rb', line 92 def inspect class_name = self.class.name.split('::').last "<#{class_name} request_id: #{@request_id.inspect}, numbers: #{@numbers.inspect}, account:"\ " #{@account.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
85 86 87 88 89 |
# File 'lib/the_plaid_api/models/processor_auth_get_response.rb', line 85 def to_s class_name = self.class.name.split('::').last "<#{class_name} request_id: #{@request_id}, numbers: #{@numbers}, account: #{@account},"\ " additional_properties: #{@additional_properties}>" end |