Class: ThePlaidApi::CreditSessionItemAddResult
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::CreditSessionItemAddResult
- Defined in:
- lib/the_plaid_api/models/credit_session_item_add_result.rb
Overview
The details of an Item add in Link.
Instance Attribute Summary collapse
-
#institution_id ⇒ String
The Plaid Institution ID associated with the Item.
-
#item_id ⇒ String
The Plaid Item ID.
-
#public_token ⇒ String
Returned once a user has successfully linked their 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(public_token: SKIP, item_id: SKIP, institution_id: SKIP, additional_properties: nil) ⇒ CreditSessionItemAddResult
constructor
A new instance of CreditSessionItemAddResult.
-
#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(public_token: SKIP, item_id: SKIP, institution_id: SKIP, additional_properties: nil) ⇒ CreditSessionItemAddResult
Returns a new instance of CreditSessionItemAddResult.
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/the_plaid_api/models/credit_session_item_add_result.rb', line 50 def initialize(public_token: SKIP, item_id: SKIP, institution_id: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @public_token = public_token unless public_token == SKIP @item_id = item_id unless item_id == SKIP @institution_id = institution_id unless institution_id == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#institution_id ⇒ String
The Plaid Institution ID associated with the Item.
25 26 27 |
# File 'lib/the_plaid_api/models/credit_session_item_add_result.rb', line 25 def institution_id @institution_id end |
#item_id ⇒ String
The Plaid Item ID. The ‘item_id` is always unique; linking the same account at the same institution twice will result in two Items with different `item_id` values. Like all Plaid identifiers, the `item_id` is case-sensitive.
21 22 23 |
# File 'lib/the_plaid_api/models/credit_session_item_add_result.rb', line 21 def item_id @item_id end |
#public_token ⇒ String
Returned once a user has successfully linked their Item.
14 15 16 |
# File 'lib/the_plaid_api/models/credit_session_item_add_result.rb', line 14 def public_token @public_token end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/the_plaid_api/models/credit_session_item_add_result.rb', line 62 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. public_token = hash.key?('public_token') ? hash['public_token'] : SKIP item_id = hash.key?('item_id') ? hash['item_id'] : SKIP institution_id = hash.key?('institution_id') ? hash['institution_id'] : 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. CreditSessionItemAddResult.new(public_token: public_token, item_id: item_id, institution_id: institution_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
28 29 30 31 32 33 34 |
# File 'lib/the_plaid_api/models/credit_session_item_add_result.rb', line 28 def self.names @_hash = {} if @_hash.nil? @_hash['public_token'] = 'public_token' @_hash['item_id'] = 'item_id' @_hash['institution_id'] = 'institution_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
46 47 48 |
# File 'lib/the_plaid_api/models/credit_session_item_add_result.rb', line 46 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
37 38 39 40 41 42 43 |
# File 'lib/the_plaid_api/models/credit_session_item_add_result.rb', line 37 def self.optionals %w[ public_token item_id institution_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
93 94 95 96 97 98 |
# File 'lib/the_plaid_api/models/credit_session_item_add_result.rb', line 93 def inspect class_name = self.class.name.split('::').last "<#{class_name} public_token: #{@public_token.inspect}, item_id: #{@item_id.inspect},"\ " institution_id: #{@institution_id.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
86 87 88 89 90 |
# File 'lib/the_plaid_api/models/credit_session_item_add_result.rb', line 86 def to_s class_name = self.class.name.split('::').last "<#{class_name} public_token: #{@public_token}, item_id: #{@item_id}, institution_id:"\ " #{@institution_id}, additional_properties: #{@additional_properties}>" end |