Class: ThePlaidApi::PaymentProfileGetResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::PaymentProfileGetResponse
- Defined in:
- lib/the_plaid_api/models/payment_profile_get_response.rb
Overview
PaymentProfileGetResponse defines the response schema for ‘/payment_profile/get`
Instance Attribute Summary collapse
-
#created_at ⇒ DateTime
Timestamp in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (‘YYYY-MM-DDTHH:mm:ssZ`) indicating the time the given Payment Profile was created at.
-
#deleted_at ⇒ DateTime
Timestamp in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (‘YYYY-MM-DDTHH:mm:ssZ`) indicating the time the given Payment Profile was deleted at.
-
#request_id ⇒ String
A unique identifier for the request, which can be used for troubleshooting.
-
#status ⇒ PaymentProfileStatus
The status of the given Payment Profile.
-
#updated_at ⇒ DateTime
Timestamp in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (‘YYYY-MM-DDTHH:mm:ssZ`) indicating the last time the given Payment Profile was updated at.
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(updated_at:, created_at:, deleted_at:, status:, request_id:, additional_properties: nil) ⇒ PaymentProfileGetResponse
constructor
A new instance of PaymentProfileGetResponse.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_created_at ⇒ Object
- #to_custom_deleted_at ⇒ Object
- #to_custom_updated_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(updated_at:, created_at:, deleted_at:, status:, request_id:, additional_properties: nil) ⇒ PaymentProfileGetResponse
Returns a new instance of PaymentProfileGetResponse.
72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/the_plaid_api/models/payment_profile_get_response.rb', line 72 def initialize(updated_at:, created_at:, deleted_at:, status:, request_id:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @updated_at = updated_at @created_at = created_at @deleted_at = deleted_at @status = status @request_id = request_id @additional_properties = additional_properties end |
Instance Attribute Details
#created_at ⇒ DateTime
Timestamp in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (‘YYYY-MM-DDTHH:mm:ssZ`) indicating the time the given Payment Profile was created at
24 25 26 |
# File 'lib/the_plaid_api/models/payment_profile_get_response.rb', line 24 def created_at @created_at end |
#deleted_at ⇒ DateTime
Timestamp in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (‘YYYY-MM-DDTHH:mm:ssZ`) indicating the time the given Payment Profile was deleted at. Always `null` if the Payment Profile has not been deleted
30 31 32 |
# File 'lib/the_plaid_api/models/payment_profile_get_response.rb', line 30 def deleted_at @deleted_at 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.
47 48 49 |
# File 'lib/the_plaid_api/models/payment_profile_get_response.rb', line 47 def request_id @request_id end |
#status ⇒ PaymentProfileStatus
The status of the given Payment Profile. ‘READY`: This Payment Profile is ready to be used to create transfers using `/transfer/authorization/create` and `/transfer/create`. `PENDING`: This Payment Profile is not ready to be used. You’ll need to call `/link/token/create` and provide the `payment_profile_token` in the `transfer.payment_profile_token` field to initiate the account linking experience. `REMOVED`: This Payment Profile has been removed.
41 42 43 |
# File 'lib/the_plaid_api/models/payment_profile_get_response.rb', line 41 def status @status end |
#updated_at ⇒ DateTime
Timestamp in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (‘YYYY-MM-DDTHH:mm:ssZ`) indicating the last time the given Payment Profile was updated at
18 19 20 |
# File 'lib/the_plaid_api/models/payment_profile_get_response.rb', line 18 def updated_at @updated_at end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 115 116 |
# File 'lib/the_plaid_api/models/payment_profile_get_response.rb', line 86 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. updated_at = if hash.key?('updated_at') (DateTimeHelper.from_rfc3339(hash['updated_at']) if hash['updated_at']) end created_at = if hash.key?('created_at') (DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at']) end deleted_at = if hash.key?('deleted_at') (DateTimeHelper.from_rfc3339(hash['deleted_at']) if hash['deleted_at']) end status = hash.key?('status') ? hash['status'] : nil request_id = hash.key?('request_id') ? hash['request_id'] : nil # 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. PaymentProfileGetResponse.new(updated_at: updated_at, created_at: created_at, deleted_at: deleted_at, status: status, request_id: request_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
50 51 52 53 54 55 56 57 58 |
# File 'lib/the_plaid_api/models/payment_profile_get_response.rb', line 50 def self.names @_hash = {} if @_hash.nil? @_hash['updated_at'] = 'updated_at' @_hash['created_at'] = 'created_at' @_hash['deleted_at'] = 'deleted_at' @_hash['status'] = 'status' @_hash['request_id'] = 'request_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
66 67 68 69 70 |
# File 'lib/the_plaid_api/models/payment_profile_get_response.rb', line 66 def self.nullables %w[ deleted_at ] end |
.optionals ⇒ Object
An array for optional fields
61 62 63 |
# File 'lib/the_plaid_api/models/payment_profile_get_response.rb', line 61 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
139 140 141 142 143 144 |
# File 'lib/the_plaid_api/models/payment_profile_get_response.rb', line 139 def inspect class_name = self.class.name.split('::').last "<#{class_name} updated_at: #{@updated_at.inspect}, created_at: #{@created_at.inspect},"\ " deleted_at: #{@deleted_at.inspect}, status: #{@status.inspect}, request_id:"\ " #{@request_id.inspect}, additional_properties: #{@additional_properties}>" end |
#to_custom_created_at ⇒ Object
122 123 124 |
# File 'lib/the_plaid_api/models/payment_profile_get_response.rb', line 122 def to_custom_created_at DateTimeHelper.to_rfc3339(created_at) end |
#to_custom_deleted_at ⇒ Object
126 127 128 |
# File 'lib/the_plaid_api/models/payment_profile_get_response.rb', line 126 def to_custom_deleted_at DateTimeHelper.to_rfc3339(deleted_at) end |
#to_custom_updated_at ⇒ Object
118 119 120 |
# File 'lib/the_plaid_api/models/payment_profile_get_response.rb', line 118 def to_custom_updated_at DateTimeHelper.to_rfc3339(updated_at) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
131 132 133 134 135 136 |
# File 'lib/the_plaid_api/models/payment_profile_get_response.rb', line 131 def to_s class_name = self.class.name.split('::').last "<#{class_name} updated_at: #{@updated_at}, created_at: #{@created_at}, deleted_at:"\ " #{@deleted_at}, status: #{@status}, request_id: #{@request_id}, additional_properties:"\ " #{@additional_properties}>" end |