Class: ThePlaidApi::SandboxPublicTokenCreateRequestOptions
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::SandboxPublicTokenCreateRequestOptions
- Defined in:
- lib/the_plaid_api/models/sandbox_public_token_create_request_options.rb
Overview
An optional set of options to be used when configuring the Item. If specified, must not be ‘null`.
Instance Attribute Summary collapse
-
#income_verification ⇒ SandboxPublicTokenCreateRequestOptionsIncomeVerification
A set of parameters for income verification options.
-
#override_password ⇒ String
Test password to use for the creation of the Sandbox Item.
-
#override_username ⇒ String
Test username to use for the creation of the Sandbox Item.
-
#statements ⇒ SandboxPublicTokenCreateRequestOptionsStatements
An optional set of parameters corresponding to statements options.
-
#transactions ⇒ SandboxPublicTokenCreateRequestOptionsTransactions
An optional set of parameters corresponding to transactions options.
-
#webhook ⇒ String
Specify a webhook to associate with the new Item.
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(webhook: SKIP, override_username: 'user_good', override_password: 'pass_good', transactions: SKIP, statements: SKIP, income_verification: SKIP, additional_properties: nil) ⇒ SandboxPublicTokenCreateRequestOptions
constructor
A new instance of SandboxPublicTokenCreateRequestOptions.
-
#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(webhook: SKIP, override_username: 'user_good', override_password: 'pass_good', transactions: SKIP, statements: SKIP, income_verification: SKIP, additional_properties: nil) ⇒ SandboxPublicTokenCreateRequestOptions
Returns a new instance of SandboxPublicTokenCreateRequestOptions.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/the_plaid_api/models/sandbox_public_token_create_request_options.rb', line 75 def initialize(webhook: SKIP, override_username: 'user_good', override_password: 'pass_good', transactions: SKIP, statements: SKIP, income_verification: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @webhook = webhook unless webhook == SKIP @override_username = override_username unless override_username == SKIP @override_password = override_password unless override_password == SKIP @transactions = transactions unless transactions == SKIP @statements = statements unless statements == SKIP @income_verification = income_verification unless income_verification == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#income_verification ⇒ SandboxPublicTokenCreateRequestOptionsIncomeVerification
A set of parameters for income verification options. This field is required if ‘income_verification` is included in the `initial_products` array.
39 40 41 |
# File 'lib/the_plaid_api/models/sandbox_public_token_create_request_options.rb', line 39 def income_verification @income_verification end |
#override_password ⇒ String
Test password to use for the creation of the Sandbox Item. Default value is ‘pass_good`.
25 26 27 |
# File 'lib/the_plaid_api/models/sandbox_public_token_create_request_options.rb', line 25 def override_password @override_password end |
#override_username ⇒ String
Test username to use for the creation of the Sandbox Item. Default value is ‘user_good`.
20 21 22 |
# File 'lib/the_plaid_api/models/sandbox_public_token_create_request_options.rb', line 20 def override_username @override_username end |
#statements ⇒ SandboxPublicTokenCreateRequestOptionsStatements
An optional set of parameters corresponding to statements options.
33 34 35 |
# File 'lib/the_plaid_api/models/sandbox_public_token_create_request_options.rb', line 33 def statements @statements end |
#transactions ⇒ SandboxPublicTokenCreateRequestOptionsTransactions
An optional set of parameters corresponding to transactions options.
29 30 31 |
# File 'lib/the_plaid_api/models/sandbox_public_token_create_request_options.rb', line 29 def transactions @transactions end |
#webhook ⇒ String
Specify a webhook to associate with the new Item.
15 16 17 |
# File 'lib/the_plaid_api/models/sandbox_public_token_create_request_options.rb', line 15 def webhook @webhook end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/the_plaid_api/models/sandbox_public_token_create_request_options.rb', line 92 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. webhook = hash.key?('webhook') ? hash['webhook'] : SKIP override_username = hash['override_username'] ||= 'user_good' override_password = hash['override_password'] ||= 'pass_good' if hash['transactions'] transactions = SandboxPublicTokenCreateRequestOptionsTransactions.from_hash(hash['transactions']) end statements = SandboxPublicTokenCreateRequestOptionsStatements.from_hash(hash['statements']) if hash['statements'] if hash['income_verification'] income_verification = SandboxPublicTokenCreateRequestOptionsIncomeVerification.from_hash(hash['income_verification']) end # 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. SandboxPublicTokenCreateRequestOptions.new(webhook: webhook, override_username: override_username, override_password: override_password, transactions: transactions, statements: statements, income_verification: income_verification, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/the_plaid_api/models/sandbox_public_token_create_request_options.rb', line 42 def self.names @_hash = {} if @_hash.nil? @_hash['webhook'] = 'webhook' @_hash['override_username'] = 'override_username' @_hash['override_password'] = 'override_password' @_hash['transactions'] = 'transactions' @_hash['statements'] = 'statements' @_hash['income_verification'] = 'income_verification' @_hash end |
.nullables ⇒ Object
An array for nullable fields
66 67 68 69 70 71 72 73 |
# File 'lib/the_plaid_api/models/sandbox_public_token_create_request_options.rb', line 66 def self.nullables %w[ override_username override_password transactions statements ] end |
.optionals ⇒ Object
An array for optional fields
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/the_plaid_api/models/sandbox_public_token_create_request_options.rb', line 54 def self.optionals %w[ webhook override_username override_password transactions statements income_verification ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
135 136 137 138 139 140 141 142 |
# File 'lib/the_plaid_api/models/sandbox_public_token_create_request_options.rb', line 135 def inspect class_name = self.class.name.split('::').last "<#{class_name} webhook: #{@webhook.inspect}, override_username:"\ " #{@override_username.inspect}, override_password: #{@override_password.inspect},"\ " transactions: #{@transactions.inspect}, statements: #{@statements.inspect},"\ " income_verification: #{@income_verification.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
126 127 128 129 130 131 132 |
# File 'lib/the_plaid_api/models/sandbox_public_token_create_request_options.rb', line 126 def to_s class_name = self.class.name.split('::').last "<#{class_name} webhook: #{@webhook}, override_username: #{@override_username},"\ " override_password: #{@override_password}, transactions: #{@transactions}, statements:"\ " #{@statements}, income_verification: #{@income_verification}, additional_properties:"\ " #{@additional_properties}>" end |