Class: ThePlaidApi::LinkSessionSuccessMetadata
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::LinkSessionSuccessMetadata
- Defined in:
- lib/the_plaid_api/models/link_session_success_metadata.rb
Overview
Displayed once a user has successfully linked their Item.
Instance Attribute Summary collapse
-
#accounts ⇒ Array[LinkSessionSuccessMetadataAccount]
A list of accounts attached to the connected Item.
-
#institution ⇒ LinkSessionSuccessMetadataInstitution
An institution object.
-
#link_session_id ⇒ String
A unique identifier associated with a user’s actions and events through the Link flow.
-
#transfer_status ⇒ LinkSessionSuccessMetadataTransferStatus
The status of a transfer.
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(institution: SKIP, accounts: SKIP, link_session_id: SKIP, transfer_status: SKIP, additional_properties: nil) ⇒ LinkSessionSuccessMetadata
constructor
A new instance of LinkSessionSuccessMetadata.
-
#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(institution: SKIP, accounts: SKIP, link_session_id: SKIP, transfer_status: SKIP, additional_properties: nil) ⇒ LinkSessionSuccessMetadata
Returns a new instance of LinkSessionSuccessMetadata.
67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/the_plaid_api/models/link_session_success_metadata.rb', line 67 def initialize(institution: SKIP, accounts: SKIP, link_session_id: SKIP, transfer_status: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @institution = institution unless institution == SKIP @accounts = accounts unless accounts == SKIP @link_session_id = link_session_id unless link_session_id == SKIP @transfer_status = transfer_status unless transfer_status == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#accounts ⇒ Array[LinkSessionSuccessMetadataAccount]
A list of accounts attached to the connected Item. If Account Select is enabled via the developer dashboard, ‘accounts` will only include selected accounts.
21 22 23 |
# File 'lib/the_plaid_api/models/link_session_success_metadata.rb', line 21 def accounts @accounts end |
#institution ⇒ LinkSessionSuccessMetadataInstitution
An institution object. If the Item was created via Same-Day or Instant micro-deposit verification, will be ‘null`.
15 16 17 |
# File 'lib/the_plaid_api/models/link_session_success_metadata.rb', line 15 def institution @institution end |
#link_session_id ⇒ String
A unique identifier associated with a user’s actions and events through the Link flow. Include this identifier when opening a support ticket for faster turnaround.
27 28 29 |
# File 'lib/the_plaid_api/models/link_session_success_metadata.rb', line 27 def link_session_id @link_session_id end |
#transfer_status ⇒ LinkSessionSuccessMetadataTransferStatus
The status of a transfer. Returned only when [Transfer UI](plaid.com/docs/transfer/using-transfer-ui) is implemented.
-
‘COMPLETE` – The transfer was completed.
-
‘INCOMPLETE` – The transfer could not be completed. For help, see
[Troubleshooting transfers](plaid.com/docs/transfer/using-transfer-ui/#troubleshoot ing-transfer-ui).
37 38 39 |
# File 'lib/the_plaid_api/models/link_session_success_metadata.rb', line 37 def transfer_status @transfer_status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/the_plaid_api/models/link_session_success_metadata.rb', line 80 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. institution = LinkSessionSuccessMetadataInstitution.from_hash(hash['institution']) if hash['institution'] # Parameter is an array, so we need to iterate through it accounts = nil unless hash['accounts'].nil? accounts = [] hash['accounts'].each do |structure| accounts << (LinkSessionSuccessMetadataAccount.from_hash(structure) if structure) end end accounts = SKIP unless hash.key?('accounts') link_session_id = hash.key?('link_session_id') ? hash['link_session_id'] : SKIP transfer_status = hash.key?('transfer_status') ? hash['transfer_status'] : 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. LinkSessionSuccessMetadata.new(institution: institution, accounts: accounts, link_session_id: link_session_id, transfer_status: transfer_status, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
40 41 42 43 44 45 46 47 |
# File 'lib/the_plaid_api/models/link_session_success_metadata.rb', line 40 def self.names @_hash = {} if @_hash.nil? @_hash['institution'] = 'institution' @_hash['accounts'] = 'accounts' @_hash['link_session_id'] = 'link_session_id' @_hash['transfer_status'] = 'transfer_status' @_hash end |
.nullables ⇒ Object
An array for nullable fields
60 61 62 63 64 65 |
# File 'lib/the_plaid_api/models/link_session_success_metadata.rb', line 60 def self.nullables %w[ institution transfer_status ] end |
.optionals ⇒ Object
An array for optional fields
50 51 52 53 54 55 56 57 |
# File 'lib/the_plaid_api/models/link_session_success_metadata.rb', line 50 def self.optionals %w[ institution accounts link_session_id transfer_status ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
125 126 127 128 129 130 |
# File 'lib/the_plaid_api/models/link_session_success_metadata.rb', line 125 def inspect class_name = self.class.name.split('::').last "<#{class_name} institution: #{@institution.inspect}, accounts: #{@accounts.inspect},"\ " link_session_id: #{@link_session_id.inspect}, transfer_status:"\ " #{@transfer_status.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
117 118 119 120 121 122 |
# File 'lib/the_plaid_api/models/link_session_success_metadata.rb', line 117 def to_s class_name = self.class.name.split('::').last "<#{class_name} institution: #{@institution}, accounts: #{@accounts}, link_session_id:"\ " #{@link_session_id}, transfer_status: #{@transfer_status}, additional_properties:"\ " #{@additional_properties}>" end |