Class: ThePlaidApi::LinkDeliveryAccount
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::LinkDeliveryAccount
- Defined in:
- lib/the_plaid_api/models/link_delivery_account.rb
Overview
Information related to account attached to the connected Item
Instance Attribute Summary collapse
-
#class_type ⇒ String
If micro-deposit verification is being used, indicates whether the account being verified is a ‘business` or `personal` account.
-
#id ⇒ String
The Plaid ‘account_id`.
-
#mask ⇒ String
The last 2-4 alphanumeric characters of an account’s official account number.
-
#name ⇒ String
The official account name.
-
#subtype ⇒ String
The account subtype.
-
#type ⇒ String
The account type.
-
#verification_status ⇒ LinkDeliveryVerificationStatus
Indicates an Item’s micro-deposit-based verification or database verification status.
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(id: SKIP, name: SKIP, mask: SKIP, type: SKIP, subtype: SKIP, verification_status: SKIP, class_type: SKIP, additional_properties: nil) ⇒ LinkDeliveryAccount
constructor
A new instance of LinkDeliveryAccount.
-
#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(id: SKIP, name: SKIP, mask: SKIP, type: SKIP, subtype: SKIP, verification_status: SKIP, class_type: SKIP, additional_properties: nil) ⇒ LinkDeliveryAccount
Returns a new instance of LinkDeliveryAccount.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/the_plaid_api/models/link_delivery_account.rb', line 79 def initialize(id: SKIP, name: SKIP, mask: SKIP, type: SKIP, subtype: SKIP, verification_status: SKIP, class_type: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @id = id unless id == SKIP @name = name unless name == SKIP @mask = mask unless mask == SKIP @type = type unless type == SKIP @subtype = subtype unless subtype == SKIP @verification_status = verification_status unless verification_status == SKIP @class_type = class_type unless class_type == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#class_type ⇒ String
If micro-deposit verification is being used, indicates whether the account being verified is a ‘business` or `personal` account.
46 47 48 |
# File 'lib/the_plaid_api/models/link_delivery_account.rb', line 46 def class_type @class_type end |
#id ⇒ String
The Plaid ‘account_id`
14 15 16 |
# File 'lib/the_plaid_api/models/link_delivery_account.rb', line 14 def id @id end |
#mask ⇒ String
The last 2-4 alphanumeric characters of an account’s official account number. Note that the mask may be non-unique between an Item’s accounts. It may also not match the mask that the bank displays to the user.
24 25 26 |
# File 'lib/the_plaid_api/models/link_delivery_account.rb', line 24 def mask @mask end |
#name ⇒ String
The official account name
18 19 20 |
# File 'lib/the_plaid_api/models/link_delivery_account.rb', line 18 def name @name end |
#subtype ⇒ String
The account subtype. See the [Account schema](plaid.com/docs/api/accounts/#account-type-schema) for a full list of possible values
36 37 38 |
# File 'lib/the_plaid_api/models/link_delivery_account.rb', line 36 def subtype @subtype end |
#type ⇒ String
The account type. See the [Account schema](plaid.com/docs/api/accounts/#account-type-schema) for a full list of possible values
30 31 32 |
# File 'lib/the_plaid_api/models/link_delivery_account.rb', line 30 def type @type end |
#verification_status ⇒ LinkDeliveryVerificationStatus
Indicates an Item’s micro-deposit-based verification or database verification status.
41 42 43 |
# File 'lib/the_plaid_api/models/link_delivery_account.rb', line 41 def verification_status @verification_status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 124 125 |
# File 'lib/the_plaid_api/models/link_delivery_account.rb', line 96 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP mask = hash.key?('mask') ? hash['mask'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP subtype = hash.key?('subtype') ? hash['subtype'] : SKIP verification_status = hash.key?('verification_status') ? hash['verification_status'] : SKIP class_type = hash.key?('class_type') ? hash['class_type'] : SKIP # 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. LinkDeliveryAccount.new(id: id, name: name, mask: mask, type: type, subtype: subtype, verification_status: verification_status, class_type: class_type, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/the_plaid_api/models/link_delivery_account.rb', line 49 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['name'] = 'name' @_hash['mask'] = 'mask' @_hash['type'] = 'type' @_hash['subtype'] = 'subtype' @_hash['verification_status'] = 'verification_status' @_hash['class_type'] = 'class_type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
75 76 77 |
# File 'lib/the_plaid_api/models/link_delivery_account.rb', line 75 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/the_plaid_api/models/link_delivery_account.rb', line 62 def self.optionals %w[ id name mask type subtype verification_status class_type ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
136 137 138 139 140 141 142 |
# File 'lib/the_plaid_api/models/link_delivery_account.rb', line 136 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, name: #{@name.inspect}, mask: #{@mask.inspect}, type:"\ " #{@type.inspect}, subtype: #{@subtype.inspect}, verification_status:"\ " #{@verification_status.inspect}, class_type: #{@class_type.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
128 129 130 131 132 133 |
# File 'lib/the_plaid_api/models/link_delivery_account.rb', line 128 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, name: #{@name}, mask: #{@mask}, type: #{@type}, subtype:"\ " #{@subtype}, verification_status: #{@verification_status}, class_type: #{@class_type},"\ " additional_properties: #{@additional_properties}>" end |