Class: ThePlaidApi::InvestmentsAuthDataSources
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::InvestmentsAuthDataSources
- Defined in:
- lib/the_plaid_api/models/investments_auth_data_sources.rb
Overview
Object with metadata pertaining to the source of data for the account numbers, owners, and holdings that are returned.
Instance Attribute Summary collapse
-
#holdings ⇒ DataSources
A description of the source of data for a given product/data type.
-
#numbers ⇒ DataSources
A description of the source of data for a given product/data type.
-
#owners ⇒ DataSources
A description of the source of data for a given product/data 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(numbers: SKIP, owners: SKIP, holdings: SKIP, additional_properties: nil) ⇒ InvestmentsAuthDataSources
constructor
A new instance of InvestmentsAuthDataSources.
-
#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(numbers: SKIP, owners: SKIP, holdings: SKIP, additional_properties: nil) ⇒ InvestmentsAuthDataSources
Returns a new instance of InvestmentsAuthDataSources.
69 70 71 72 73 74 75 76 77 78 |
# File 'lib/the_plaid_api/models/investments_auth_data_sources.rb', line 69 def initialize(numbers: SKIP, owners: SKIP, holdings: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @numbers = numbers unless numbers == SKIP @owners = owners unless owners == SKIP @holdings = holdings unless holdings == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#holdings ⇒ DataSources
A description of the source of data for a given product/data type. ‘INSTITUTION`: The institution supports this product, and the data was provided by the institution. `INSTITUTION_MASK`: The user manually provided the full account number, which was matched to the account mask provided by the institution. Only applicable to the `numbers` data type. `USER`: The institution does not support this product, and the data was manually provided by the user.
44 45 46 |
# File 'lib/the_plaid_api/models/investments_auth_data_sources.rb', line 44 def holdings @holdings end |
#numbers ⇒ DataSources
A description of the source of data for a given product/data type. ‘INSTITUTION`: The institution supports this product, and the data was provided by the institution. `INSTITUTION_MASK`: The user manually provided the full account number, which was matched to the account mask provided by the institution. Only applicable to the `numbers` data type. `USER`: The institution does not support this product, and the data was manually provided by the user.
22 23 24 |
# File 'lib/the_plaid_api/models/investments_auth_data_sources.rb', line 22 def numbers @numbers end |
#owners ⇒ DataSources
A description of the source of data for a given product/data type. ‘INSTITUTION`: The institution supports this product, and the data was provided by the institution. `INSTITUTION_MASK`: The user manually provided the full account number, which was matched to the account mask provided by the institution. Only applicable to the `numbers` data type. `USER`: The institution does not support this product, and the data was manually provided by the user.
33 34 35 |
# File 'lib/the_plaid_api/models/investments_auth_data_sources.rb', line 33 def owners @owners end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/the_plaid_api/models/investments_auth_data_sources.rb', line 81 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. numbers = hash.key?('numbers') ? hash['numbers'] : SKIP owners = hash.key?('owners') ? hash['owners'] : SKIP holdings = hash.key?('holdings') ? hash['holdings'] : 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. InvestmentsAuthDataSources.new(numbers: numbers, owners: owners, holdings: holdings, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
47 48 49 50 51 52 53 |
# File 'lib/the_plaid_api/models/investments_auth_data_sources.rb', line 47 def self.names @_hash = {} if @_hash.nil? @_hash['numbers'] = 'numbers' @_hash['owners'] = 'owners' @_hash['holdings'] = 'holdings' @_hash end |
.nullables ⇒ Object
An array for nullable fields
65 66 67 |
# File 'lib/the_plaid_api/models/investments_auth_data_sources.rb', line 65 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
56 57 58 59 60 61 62 |
# File 'lib/the_plaid_api/models/investments_auth_data_sources.rb', line 56 def self.optionals %w[ numbers owners holdings ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
111 112 113 114 115 |
# File 'lib/the_plaid_api/models/investments_auth_data_sources.rb', line 111 def inspect class_name = self.class.name.split('::').last "<#{class_name} numbers: #{@numbers.inspect}, owners: #{@owners.inspect}, holdings:"\ " #{@holdings.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
104 105 106 107 108 |
# File 'lib/the_plaid_api/models/investments_auth_data_sources.rb', line 104 def to_s class_name = self.class.name.split('::').last "<#{class_name} numbers: #{@numbers}, owners: #{@owners}, holdings: #{@holdings},"\ " additional_properties: #{@additional_properties}>" end |