Class: ThePlaidApi::LinkDeliveryGetResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::LinkDeliveryGetResponse
- Defined in:
- lib/the_plaid_api/models/link_delivery_get_response.rb
Overview
LinkDeliveryGetRequest defines the response schema for ‘/link_delivery/get`
Instance Attribute Summary collapse
-
#access_tokens ⇒ Array[String]
An array of access tokens associated with the Hosted Link session.
-
#completed_at ⇒ DateTime
Timestamp in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (‘YYYY-MM-DDTHH:mm:ssZ`) indicating the time the given Hosted Link session was completed at.
-
#created_at ⇒ DateTime
Timestamp in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (‘YYYY-MM-DDTHH:mm:ssZ`) indicating the time the given Hosted Link session was created at.
-
#item_ids ⇒ Array[String]
An array of ‘item_id`s associated with the Hosted Link session.
-
#request_id ⇒ String
A unique identifier for the request, which can be used for troubleshooting.
-
#status ⇒ LinkDeliverySessionStatus
The status of the given Hosted Link session.
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(status:, created_at:, request_id:, completed_at: SKIP, access_tokens: SKIP, item_ids: SKIP, additional_properties: nil) ⇒ LinkDeliveryGetResponse
constructor
A new instance of LinkDeliveryGetResponse.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_completed_at ⇒ Object
- #to_custom_created_at ⇒ Object
-
#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(status:, created_at:, request_id:, completed_at: SKIP, access_tokens: SKIP, item_ids: SKIP, additional_properties: nil) ⇒ LinkDeliveryGetResponse
Returns a new instance of LinkDeliveryGetResponse.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/the_plaid_api/models/link_delivery_get_response.rb', line 78 def initialize(status:, created_at:, request_id:, completed_at: SKIP, access_tokens: SKIP, item_ids: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @status = status @created_at = created_at @completed_at = completed_at unless completed_at == SKIP @request_id = request_id @access_tokens = access_tokens unless access_tokens == SKIP @item_ids = item_ids unless item_ids == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#access_tokens ⇒ Array[String]
An array of access tokens associated with the Hosted Link session.
42 43 44 |
# File 'lib/the_plaid_api/models/link_delivery_get_response.rb', line 42 def access_tokens @access_tokens end |
#completed_at ⇒ DateTime
Timestamp in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (‘YYYY-MM-DDTHH:mm:ssZ`) indicating the time the given Hosted Link session was completed at.
32 33 34 |
# File 'lib/the_plaid_api/models/link_delivery_get_response.rb', line 32 def completed_at @completed_at end |
#created_at ⇒ DateTime
Timestamp in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (‘YYYY-MM-DDTHH:mm:ssZ`) indicating the time the given Hosted Link session was created at.
26 27 28 |
# File 'lib/the_plaid_api/models/link_delivery_get_response.rb', line 26 def created_at @created_at end |
#item_ids ⇒ Array[String]
An array of ‘item_id`s associated with the Hosted Link session.
46 47 48 |
# File 'lib/the_plaid_api/models/link_delivery_get_response.rb', line 46 def item_ids @item_ids end |
#request_id ⇒ String
A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.
38 39 40 |
# File 'lib/the_plaid_api/models/link_delivery_get_response.rb', line 38 def request_id @request_id end |
#status ⇒ LinkDeliverySessionStatus
The status of the given Hosted Link session. ‘CREATED`: The session is created but not yet accessed by the user `OPENED`: The session is opened by the user but not yet completed `EXITED`: The session has been exited by the user `COMPLETED`: The session has been completed by the user `EXPIRED`: The session has expired
20 21 22 |
# File 'lib/the_plaid_api/models/link_delivery_get_response.rb', line 20 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
94 95 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 126 |
# File 'lib/the_plaid_api/models/link_delivery_get_response.rb', line 94 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. status = hash.key?('status') ? hash['status'] : nil created_at = if hash.key?('created_at') (DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at']) end request_id = hash.key?('request_id') ? hash['request_id'] : nil completed_at = if hash.key?('completed_at') (DateTimeHelper.from_rfc3339(hash['completed_at']) if hash['completed_at']) else SKIP end access_tokens = hash.key?('access_tokens') ? hash['access_tokens'] : SKIP item_ids = hash.key?('item_ids') ? hash['item_ids'] : 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. LinkDeliveryGetResponse.new(status: status, created_at: created_at, request_id: request_id, completed_at: completed_at, access_tokens: access_tokens, item_ids: item_ids, 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 |
# File 'lib/the_plaid_api/models/link_delivery_get_response.rb', line 49 def self.names @_hash = {} if @_hash.nil? @_hash['status'] = 'status' @_hash['created_at'] = 'created_at' @_hash['completed_at'] = 'completed_at' @_hash['request_id'] = 'request_id' @_hash['access_tokens'] = 'access_tokens' @_hash['item_ids'] = 'item_ids' @_hash end |
.nullables ⇒ Object
An array for nullable fields
70 71 72 73 74 75 76 |
# File 'lib/the_plaid_api/models/link_delivery_get_response.rb', line 70 def self.nullables %w[ completed_at access_tokens item_ids ] end |
.optionals ⇒ Object
An array for optional fields
61 62 63 64 65 66 67 |
# File 'lib/the_plaid_api/models/link_delivery_get_response.rb', line 61 def self.optionals %w[ completed_at access_tokens item_ids ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
145 146 147 148 149 150 151 |
# File 'lib/the_plaid_api/models/link_delivery_get_response.rb', line 145 def inspect class_name = self.class.name.split('::').last "<#{class_name} status: #{@status.inspect}, created_at: #{@created_at.inspect},"\ " completed_at: #{@completed_at.inspect}, request_id: #{@request_id.inspect}, access_tokens:"\ " #{@access_tokens.inspect}, item_ids: #{@item_ids.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_custom_completed_at ⇒ Object
132 133 134 |
# File 'lib/the_plaid_api/models/link_delivery_get_response.rb', line 132 def to_custom_completed_at DateTimeHelper.to_rfc3339(completed_at) end |
#to_custom_created_at ⇒ Object
128 129 130 |
# File 'lib/the_plaid_api/models/link_delivery_get_response.rb', line 128 def to_custom_created_at DateTimeHelper.to_rfc3339(created_at) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
137 138 139 140 141 142 |
# File 'lib/the_plaid_api/models/link_delivery_get_response.rb', line 137 def to_s class_name = self.class.name.split('::').last "<#{class_name} status: #{@status}, created_at: #{@created_at}, completed_at:"\ " #{@completed_at}, request_id: #{@request_id}, access_tokens: #{@access_tokens}, item_ids:"\ " #{@item_ids}, additional_properties: #{@additional_properties}>" end |