Class: ThePlaidApi::BeaconAccountRiskEvaluateAccount
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::BeaconAccountRiskEvaluateAccount
- Defined in:
- lib/the_plaid_api/models/beacon_account_risk_evaluate_account.rb
Overview
An account in the ‘/beacon/account_risk/v1/evaluate` response.
Instance Attribute Summary collapse
-
#account_id ⇒ String
The account ID.
-
#attributes ⇒ BeaconAccountRiskEvaluateAccountAttributes
The attributes object contains data that can be used to assess account risk.
-
#subtype ⇒ AccountSubtype
See the [Account type schema](plaid.com/docs/api/accounts/#account-type-schema) for a full listing of account types and corresponding subtypes.
-
#type ⇒ AccountType
‘investment:` Investment account.
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_id: SKIP, type: SKIP, subtype: SKIP, attributes: SKIP, additional_properties: nil) ⇒ BeaconAccountRiskEvaluateAccount
constructor
A new instance of BeaconAccountRiskEvaluateAccount.
-
#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_id: SKIP, type: SKIP, subtype: SKIP, attributes: SKIP, additional_properties: nil) ⇒ BeaconAccountRiskEvaluateAccount
Returns a new instance of BeaconAccountRiskEvaluateAccount.
77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/the_plaid_api/models/beacon_account_risk_evaluate_account.rb', line 77 def initialize(account_id: SKIP, type: SKIP, subtype: SKIP, attributes: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_id = account_id unless account_id == SKIP @type = type unless type == SKIP @subtype = subtype unless subtype == SKIP @attributes = attributes unless attributes == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_id ⇒ String
The account ID.
14 15 16 |
# File 'lib/the_plaid_api/models/beacon_account_risk_evaluate_account.rb', line 14 def account_id @account_id end |
#attributes ⇒ BeaconAccountRiskEvaluateAccountAttributes
The attributes object contains data that can be used to assess account risk. Examples of data include: ‘days_since_first_plaid_connection`: The number of days since the first time the Item was connected to an application via Plaid `plaid_connections_count_7d`: The number of times the Item has been connected to applications via Plaid over the past 7 days `plaid_connections_count_30d`: The number of times the Item has been connected to applications via Plaid over the past 30 days `total_plaid_connections_count`: The number of times the Item has been connected to applications via Plaid For the full list and detailed documentation of core attributes available, or to request that core attributes not be returned, contact Sales or your Plaid account manager
48 49 50 |
# File 'lib/the_plaid_api/models/beacon_account_risk_evaluate_account.rb', line 48 def attributes @attributes end |
#subtype ⇒ AccountSubtype
See the [Account type schema](plaid.com/docs/api/accounts/#account-type-schema) for a full listing of account types and corresponding subtypes.
32 33 34 |
# File 'lib/the_plaid_api/models/beacon_account_risk_evaluate_account.rb', line 32 def subtype @subtype end |
#type ⇒ AccountType
‘investment:` Investment account. In API versions 2018-05-22 and earlier, this type is called `brokerage` instead. `credit:` Credit card `depository:` Depository account `loan:` Loan account `other:` Non-specified account type See the [Account type schema](plaid.com/docs/api/accounts#account-type-schema) for a full listing of account types and corresponding subtypes.
26 27 28 |
# File 'lib/the_plaid_api/models/beacon_account_risk_evaluate_account.rb', line 26 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/the_plaid_api/models/beacon_account_risk_evaluate_account.rb', line 90 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_id = hash.key?('account_id') ? hash['account_id'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP subtype = hash.key?('subtype') ? hash['subtype'] : SKIP attributes = BeaconAccountRiskEvaluateAccountAttributes.from_hash(hash['attributes']) if hash['attributes'] # 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. BeaconAccountRiskEvaluateAccount.new(account_id: account_id, type: type, subtype: subtype, attributes: attributes, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
51 52 53 54 55 56 57 58 |
# File 'lib/the_plaid_api/models/beacon_account_risk_evaluate_account.rb', line 51 def self.names @_hash = {} if @_hash.nil? @_hash['account_id'] = 'account_id' @_hash['type'] = 'type' @_hash['subtype'] = 'subtype' @_hash['attributes'] = 'attributes' @_hash end |
.nullables ⇒ Object
An array for nullable fields
71 72 73 74 75 |
# File 'lib/the_plaid_api/models/beacon_account_risk_evaluate_account.rb', line 71 def self.nullables %w[ subtype ] end |
.optionals ⇒ Object
An array for optional fields
61 62 63 64 65 66 67 68 |
# File 'lib/the_plaid_api/models/beacon_account_risk_evaluate_account.rb', line 61 def self.optionals %w[ account_id type subtype attributes ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
123 124 125 126 127 128 |
# File 'lib/the_plaid_api/models/beacon_account_risk_evaluate_account.rb', line 123 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_id: #{@account_id.inspect}, type: #{@type.inspect}, subtype:"\ " #{@subtype.inspect}, attributes: #{@attributes.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
116 117 118 119 120 |
# File 'lib/the_plaid_api/models/beacon_account_risk_evaluate_account.rb', line 116 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_id: #{@account_id}, type: #{@type}, subtype: #{@subtype},"\ " attributes: #{@attributes}, additional_properties: #{@additional_properties}>" end |