Class: ThePlaidApi::ProductAccess
- Defined in:
- lib/the_plaid_api/models/product_access.rb
Overview
The product access being requested. Used to or disallow product access across all accounts. If unset, defaults to all products allowed.
Instance Attribute Summary collapse
-
#accounts_details_transactions ⇒ TrueClass | FalseClass
Allow access to ‘accounts_details_transactions`.
-
#accounts_routing_number ⇒ TrueClass | FalseClass
Allow access to ‘accounts_routing_number`.
-
#accounts_statements ⇒ TrueClass | FalseClass
Allow access to ‘accounts_statements`.
-
#accounts_tax_statements ⇒ TrueClass | FalseClass
Allow access to ‘accounts_tax_statements`.
-
#auth ⇒ TrueClass | FalseClass
Allow access to account number details.
-
#customers_profiles ⇒ TrueClass | FalseClass
Allow access to ‘customers_profiles`.
-
#identity ⇒ TrueClass | FalseClass
Allow access to the Identity product (name, email, phone, address).
-
#statements ⇒ TrueClass | FalseClass
Allow access to statements.
-
#transactions ⇒ TrueClass | FalseClass
Allow access to transaction details.
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(statements: true, identity: true, auth: true, transactions: true, accounts_details_transactions: true, accounts_routing_number: true, accounts_statements: true, accounts_tax_statements: true, customers_profiles: true, additional_properties: nil) ⇒ ProductAccess
constructor
A new instance of ProductAccess.
-
#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(statements: true, identity: true, auth: true, transactions: true, accounts_details_transactions: true, accounts_routing_number: true, accounts_statements: true, accounts_tax_statements: true, customers_profiles: true, additional_properties: nil) ⇒ ProductAccess
Returns a new instance of ProductAccess.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/the_plaid_api/models/product_access.rb', line 105 def initialize(statements: true, identity: true, auth: true, transactions: true, accounts_details_transactions: true, accounts_routing_number: true, accounts_statements: true, accounts_tax_statements: true, customers_profiles: true, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @statements = statements unless statements == SKIP @identity = identity unless identity == SKIP @auth = auth unless auth == SKIP @transactions = transactions unless transactions == SKIP unless accounts_details_transactions == SKIP @accounts_details_transactions = accounts_details_transactions end @accounts_routing_number = accounts_routing_number unless accounts_routing_number == SKIP @accounts_statements = accounts_statements unless accounts_statements == SKIP @accounts_tax_statements = accounts_tax_statements unless accounts_tax_statements == SKIP @customers_profiles = customers_profiles unless customers_profiles == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#accounts_details_transactions ⇒ TrueClass | FalseClass
Allow access to ‘accounts_details_transactions`. Only used by certain partners. If relevant to the partner and unset, defaults to `true`.
37 38 39 |
# File 'lib/the_plaid_api/models/product_access.rb', line 37 def accounts_details_transactions @accounts_details_transactions end |
#accounts_routing_number ⇒ TrueClass | FalseClass
Allow access to ‘accounts_routing_number`. Only used by certain partners. If relevant to the partner and unset, defaults to `true`.
42 43 44 |
# File 'lib/the_plaid_api/models/product_access.rb', line 42 def accounts_routing_number @accounts_routing_number end |
#accounts_statements ⇒ TrueClass | FalseClass
Allow access to ‘accounts_statements`. Only used by certain partners. If relevant to the partner and unset, defaults to `true`.
47 48 49 |
# File 'lib/the_plaid_api/models/product_access.rb', line 47 def accounts_statements @accounts_statements end |
#accounts_tax_statements ⇒ TrueClass | FalseClass
Allow access to ‘accounts_tax_statements`. Only used by certain partners. If relevant to the partner and unset, defaults to `true`.
52 53 54 |
# File 'lib/the_plaid_api/models/product_access.rb', line 52 def accounts_tax_statements @accounts_tax_statements end |
#auth ⇒ TrueClass | FalseClass
Allow access to account number details. Only used by certain partners. If relevant to the partner and unset, defaults to ‘true`.
27 28 29 |
# File 'lib/the_plaid_api/models/product_access.rb', line 27 def auth @auth end |
#customers_profiles ⇒ TrueClass | FalseClass
Allow access to ‘customers_profiles`. Only used by certain partners. If relevant to the partner and unset, defaults to `true`.
57 58 59 |
# File 'lib/the_plaid_api/models/product_access.rb', line 57 def customers_profiles @customers_profiles end |
#identity ⇒ TrueClass | FalseClass
Allow access to the Identity product (name, email, phone, address). Only used by certain partners. If relevant to the partner and unset, defaults to ‘true`.
22 23 24 |
# File 'lib/the_plaid_api/models/product_access.rb', line 22 def identity @identity end |
#statements ⇒ TrueClass | FalseClass
Allow access to statements. Only used by certain partners. If relevant to the partner and unset, defaults to ‘true`.
16 17 18 |
# File 'lib/the_plaid_api/models/product_access.rb', line 16 def statements @statements end |
#transactions ⇒ TrueClass | FalseClass
Allow access to transaction details. Only used by certain partners. If relevant to the partner and unset, defaults to ‘true`.
32 33 34 |
# File 'lib/the_plaid_api/models/product_access.rb', line 32 def transactions @transactions end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/the_plaid_api/models/product_access.rb', line 129 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. statements = hash['statements'] ||= true identity = hash['identity'] ||= true auth = hash['auth'] ||= true transactions = hash['transactions'] ||= true accounts_details_transactions = hash['accounts_details_transactions'] ||= true accounts_routing_number = hash['accounts_routing_number'] ||= true accounts_statements = hash['accounts_statements'] ||= true accounts_tax_statements = hash['accounts_tax_statements'] ||= true customers_profiles = hash['customers_profiles'] ||= 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. ProductAccess.new(statements: statements, identity: identity, auth: auth, transactions: transactions, accounts_details_transactions: accounts_details_transactions, accounts_routing_number: accounts_routing_number, accounts_statements: accounts_statements, accounts_tax_statements: accounts_tax_statements, customers_profiles: customers_profiles, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/the_plaid_api/models/product_access.rb', line 60 def self.names @_hash = {} if @_hash.nil? @_hash['statements'] = 'statements' @_hash['identity'] = 'identity' @_hash['auth'] = 'auth' @_hash['transactions'] = 'transactions' @_hash['accounts_details_transactions'] = 'accounts_details_transactions' @_hash['accounts_routing_number'] = 'accounts_routing_number' @_hash['accounts_statements'] = 'accounts_statements' @_hash['accounts_tax_statements'] = 'accounts_tax_statements' @_hash['customers_profiles'] = 'customers_profiles' @_hash end |
.nullables ⇒ Object
An array for nullable fields
91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/the_plaid_api/models/product_access.rb', line 91 def self.nullables %w[ statements identity auth transactions accounts_details_transactions accounts_routing_number accounts_statements accounts_tax_statements customers_profiles ] end |
.optionals ⇒ Object
An array for optional fields
76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/the_plaid_api/models/product_access.rb', line 76 def self.optionals %w[ statements identity auth transactions accounts_details_transactions accounts_routing_number accounts_statements accounts_tax_statements customers_profiles ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
176 177 178 179 180 181 182 183 184 |
# File 'lib/the_plaid_api/models/product_access.rb', line 176 def inspect class_name = self.class.name.split('::').last "<#{class_name} statements: #{@statements.inspect}, identity: #{@identity.inspect}, auth:"\ " #{@auth.inspect}, transactions: #{@transactions.inspect}, accounts_details_transactions:"\ " #{@accounts_details_transactions.inspect}, accounts_routing_number:"\ " #{@accounts_routing_number.inspect}, accounts_statements: #{@accounts_statements.inspect},"\ " accounts_tax_statements: #{@accounts_tax_statements.inspect}, customers_profiles:"\ " #{@customers_profiles.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
165 166 167 168 169 170 171 172 173 |
# File 'lib/the_plaid_api/models/product_access.rb', line 165 def to_s class_name = self.class.name.split('::').last "<#{class_name} statements: #{@statements}, identity: #{@identity}, auth: #{@auth},"\ " transactions: #{@transactions}, accounts_details_transactions:"\ " #{@accounts_details_transactions}, accounts_routing_number: #{@accounts_routing_number},"\ " accounts_statements: #{@accounts_statements}, accounts_tax_statements:"\ " #{@accounts_tax_statements}, customers_profiles: #{@customers_profiles},"\ " additional_properties: #{@additional_properties}>" end |