Class: ThePlaidApi::AccountProductAccessNullable
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::AccountProductAccessNullable
- Defined in:
- lib/the_plaid_api/models/account_product_access_nullable.rb
Overview
Allow the application to access specific products on this account
Instance Attribute Summary collapse
-
#account_data ⇒ TrueClass | FalseClass
Allow the application to access account data.
-
#statements ⇒ TrueClass | FalseClass
Allow the application to access bank statements.
-
#tax_documents ⇒ TrueClass | FalseClass
Allow the application to access tax documents.
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(account_data: true, statements: true, tax_documents: true, additional_properties: nil) ⇒ AccountProductAccessNullable
constructor
A new instance of AccountProductAccessNullable.
-
#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_data: true, statements: true, tax_documents: true, additional_properties: nil) ⇒ AccountProductAccessNullable
Returns a new instance of AccountProductAccessNullable.
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/the_plaid_api/models/account_product_access_nullable.rb', line 54 def initialize(account_data: true, statements: true, tax_documents: true, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_data = account_data unless account_data == SKIP @statements = statements unless statements == SKIP @tax_documents = tax_documents unless tax_documents == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_data ⇒ TrueClass | FalseClass
Allow the application to access account data. Only used by certain partners. If relevant to the partner and unset, defaults to ‘true`.
15 16 17 |
# File 'lib/the_plaid_api/models/account_product_access_nullable.rb', line 15 def account_data @account_data end |
#statements ⇒ TrueClass | FalseClass
Allow the application to access bank statements. Only used by certain partners. If relevant to the partner and unset, defaults to ‘true`.
20 21 22 |
# File 'lib/the_plaid_api/models/account_product_access_nullable.rb', line 20 def statements @statements end |
#tax_documents ⇒ TrueClass | FalseClass
Allow the application to access tax documents. Only used by certain partners. If relevant to the partner and unset, defaults to ‘true`.
25 26 27 |
# File 'lib/the_plaid_api/models/account_product_access_nullable.rb', line 25 def tax_documents @tax_documents end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/the_plaid_api/models/account_product_access_nullable.rb', line 66 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_data = hash['account_data'] ||= true statements = hash['statements'] ||= true tax_documents = hash['tax_documents'] ||= true # 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. AccountProductAccessNullable.new(account_data: account_data, statements: statements, tax_documents: tax_documents, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
28 29 30 31 32 33 34 |
# File 'lib/the_plaid_api/models/account_product_access_nullable.rb', line 28 def self.names @_hash = {} if @_hash.nil? @_hash['account_data'] = 'account_data' @_hash['statements'] = 'statements' @_hash['tax_documents'] = 'tax_documents' @_hash end |
.nullables ⇒ Object
An array for nullable fields
46 47 48 49 50 51 52 |
# File 'lib/the_plaid_api/models/account_product_access_nullable.rb', line 46 def self.nullables %w[ account_data statements tax_documents ] end |
.optionals ⇒ Object
An array for optional fields
37 38 39 40 41 42 43 |
# File 'lib/the_plaid_api/models/account_product_access_nullable.rb', line 37 def self.optionals %w[ account_data statements tax_documents ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
96 97 98 99 100 101 |
# File 'lib/the_plaid_api/models/account_product_access_nullable.rb', line 96 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_data: #{@account_data.inspect}, statements: #{@statements.inspect},"\ " tax_documents: #{@tax_documents.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
89 90 91 92 93 |
# File 'lib/the_plaid_api/models/account_product_access_nullable.rb', line 89 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_data: #{@account_data}, statements: #{@statements}, tax_documents:"\ " #{@tax_documents}, additional_properties: #{@additional_properties}>" end |