Class: ThePlaidApi::CreditPayrollIncomePrecheckRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::CreditPayrollIncomePrecheckRequest
- Defined in:
- lib/the_plaid_api/models/credit_payroll_income_precheck_request.rb
Overview
Defines the request schema for ‘/credit/payroll_income/precheck`.
Instance Attribute Summary collapse
-
#access_tokens ⇒ Array[String]
An array of access tokens corresponding to Items belonging to the user whose eligibility is being checked.
-
#client_id ⇒ String
Your Plaid API ‘client_id`.
-
#employer ⇒ IncomeVerificationPrecheckEmployer
Information about the end user’s employer.
-
#payroll_institution ⇒ IncomeVerificationPrecheckPayrollInstitution
Information about the end user’s payroll institution.
-
#secret ⇒ String
Your Plaid API ‘secret`.
-
#us_military_info ⇒ IncomeVerificationPrecheckMilitaryInfo
Data about military info in the income verification precheck.
-
#user_id ⇒ String
The user token associated with the User data is being requested for.
-
#user_token ⇒ String
The user token associated with the User data is being requested for.
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(client_id: SKIP, secret: SKIP, user_token: SKIP, user_id: SKIP, access_tokens: SKIP, employer: SKIP, us_military_info: SKIP, payroll_institution: SKIP, additional_properties: nil) ⇒ CreditPayrollIncomePrecheckRequest
constructor
A new instance of CreditPayrollIncomePrecheckRequest.
-
#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(client_id: SKIP, secret: SKIP, user_token: SKIP, user_id: SKIP, access_tokens: SKIP, employer: SKIP, us_military_info: SKIP, payroll_institution: SKIP, additional_properties: nil) ⇒ CreditPayrollIncomePrecheckRequest
Returns a new instance of CreditPayrollIncomePrecheckRequest.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/the_plaid_api/models/credit_payroll_income_precheck_request.rb', line 96 def initialize(client_id: SKIP, secret: SKIP, user_token: SKIP, user_id: SKIP, access_tokens: SKIP, employer: SKIP, us_military_info: SKIP, payroll_institution: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @client_id = client_id unless client_id == SKIP @secret = secret unless secret == SKIP @user_token = user_token unless user_token == SKIP @user_id = user_id unless user_id == SKIP @access_tokens = access_tokens unless access_tokens == SKIP @employer = employer unless employer == SKIP @us_military_info = us_military_info unless us_military_info == SKIP @payroll_institution = payroll_institution unless payroll_institution == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#access_tokens ⇒ Array[String]
An array of access tokens corresponding to Items belonging to the user whose eligibility is being checked. Note that if the Items specified here are not already initialized with ‘transactions`, providing them in this field will cause these Items to be initialized with (and billed for) the Transactions product.
45 46 47 |
# File 'lib/the_plaid_api/models/credit_payroll_income_precheck_request.rb', line 45 def access_tokens @access_tokens end |
#client_id ⇒ String
Your Plaid API ‘client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.
16 17 18 |
# File 'lib/the_plaid_api/models/credit_payroll_income_precheck_request.rb', line 16 def client_id @client_id end |
#employer ⇒ IncomeVerificationPrecheckEmployer
Information about the end user’s employer
49 50 51 |
# File 'lib/the_plaid_api/models/credit_payroll_income_precheck_request.rb', line 49 def employer @employer end |
#payroll_institution ⇒ IncomeVerificationPrecheckPayrollInstitution
Information about the end user’s payroll institution
57 58 59 |
# File 'lib/the_plaid_api/models/credit_payroll_income_precheck_request.rb', line 57 def payroll_institution @payroll_institution end |
#secret ⇒ String
Your Plaid API ‘secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.
21 22 23 |
# File 'lib/the_plaid_api/models/credit_payroll_income_precheck_request.rb', line 21 def secret @secret end |
#us_military_info ⇒ IncomeVerificationPrecheckMilitaryInfo
Data about military info in the income verification precheck.
53 54 55 |
# File 'lib/the_plaid_api/models/credit_payroll_income_precheck_request.rb', line 53 def us_military_info @us_military_info end |
#user_id ⇒ String
The user token associated with the User data is being requested for. This field is used only by customers with pre-existing integrations that already use the ‘user_token` field. All other customers should use the `user_id` instead. For more details, see [New User APIs](plaid.com/docs/api/users/user-apis).
37 38 39 |
# File 'lib/the_plaid_api/models/credit_payroll_income_precheck_request.rb', line 37 def user_id @user_id end |
#user_token ⇒ String
The user token associated with the User data is being requested for. This field is used only by customers with pre-existing integrations that already use the ‘user_token` field. All other customers should use the `user_id` instead. For more details, see [New User APIs](plaid.com/docs/api/users/user-apis).
29 30 31 |
# File 'lib/the_plaid_api/models/credit_payroll_income_precheck_request.rb', line 29 def user_token @user_token end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/the_plaid_api/models/credit_payroll_income_precheck_request.rb', line 115 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. client_id = hash.key?('client_id') ? hash['client_id'] : SKIP secret = hash.key?('secret') ? hash['secret'] : SKIP user_token = hash.key?('user_token') ? hash['user_token'] : SKIP user_id = hash.key?('user_id') ? hash['user_id'] : SKIP access_tokens = hash.key?('access_tokens') ? hash['access_tokens'] : SKIP employer = IncomeVerificationPrecheckEmployer.from_hash(hash['employer']) if hash['employer'] if hash['us_military_info'] us_military_info = IncomeVerificationPrecheckMilitaryInfo.from_hash(hash['us_military_info']) end if hash['payroll_institution'] payroll_institution = IncomeVerificationPrecheckPayrollInstitution.from_hash(hash['payroll_institution']) 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. CreditPayrollIncomePrecheckRequest.new(client_id: client_id, secret: secret, user_token: user_token, user_id: user_id, access_tokens: access_tokens, employer: employer, us_military_info: us_military_info, payroll_institution: payroll_institution, 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 |
# File 'lib/the_plaid_api/models/credit_payroll_income_precheck_request.rb', line 60 def self.names @_hash = {} if @_hash.nil? @_hash['client_id'] = 'client_id' @_hash['secret'] = 'secret' @_hash['user_token'] = 'user_token' @_hash['user_id'] = 'user_id' @_hash['access_tokens'] = 'access_tokens' @_hash['employer'] = 'employer' @_hash['us_military_info'] = 'us_military_info' @_hash['payroll_institution'] = 'payroll_institution' @_hash end |
.nullables ⇒ Object
An array for nullable fields
88 89 90 91 92 93 94 |
# File 'lib/the_plaid_api/models/credit_payroll_income_precheck_request.rb', line 88 def self.nullables %w[ employer us_military_info payroll_institution ] end |
.optionals ⇒ Object
An array for optional fields
74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/the_plaid_api/models/credit_payroll_income_precheck_request.rb', line 74 def self.optionals %w[ client_id secret user_token user_id access_tokens employer us_military_info payroll_institution ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
162 163 164 165 166 167 168 169 |
# File 'lib/the_plaid_api/models/credit_payroll_income_precheck_request.rb', line 162 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id.inspect}, secret: #{@secret.inspect}, user_token:"\ " #{@user_token.inspect}, user_id: #{@user_id.inspect}, access_tokens:"\ " #{@access_tokens.inspect}, employer: #{@employer.inspect}, us_military_info:"\ " #{@us_military_info.inspect}, payroll_institution: #{@payroll_institution.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
153 154 155 156 157 158 159 |
# File 'lib/the_plaid_api/models/credit_payroll_income_precheck_request.rb', line 153 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id}, secret: #{@secret}, user_token: #{@user_token},"\ " user_id: #{@user_id}, access_tokens: #{@access_tokens}, employer: #{@employer},"\ " us_military_info: #{@us_military_info}, payroll_institution: #{@payroll_institution},"\ " additional_properties: #{@additional_properties}>" end |