Class: ThePlaidApi::CraEmploymentRefreshReportTransaction
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::CraEmploymentRefreshReportTransaction
- Defined in:
- lib/the_plaid_api/models/cra_employment_refresh_report_transaction.rb
Overview
A transaction on the Employment Refresh Report. Note that this transaction differs from a Base Report transaction in that it will only be deposits, and the amounts will be omitted.
Instance Attribute Summary collapse
-
#account_id ⇒ String
The ID of the account in which this transaction occurred.
-
#date ⇒ Date
For pending transactions, the date that the transaction occurred; for posted transactions, the date that the transaction posted.
-
#original_description ⇒ String
The string returned by the financial institution to describe the transaction.
-
#pending ⇒ TrueClass | FalseClass
When ‘true`, identifies the transaction as pending or unsettled.
-
#transaction_id ⇒ String
The unique ID of the transaction.
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(account_id:, original_description:, date:, pending:, transaction_id:, additional_properties: nil) ⇒ CraEmploymentRefreshReportTransaction
constructor
A new instance of CraEmploymentRefreshReportTransaction.
-
#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(account_id:, original_description:, date:, pending:, transaction_id:, additional_properties: nil) ⇒ CraEmploymentRefreshReportTransaction
Returns a new instance of CraEmploymentRefreshReportTransaction.
61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/the_plaid_api/models/cra_employment_refresh_report_transaction.rb', line 61 def initialize(account_id:, original_description:, date:, pending:, transaction_id:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_id = account_id @original_description = original_description @date = date @pending = pending @transaction_id = transaction_id @additional_properties = additional_properties end |
Instance Attribute Details
#account_id ⇒ String
The ID of the account in which this transaction occurred.
16 17 18 |
# File 'lib/the_plaid_api/models/cra_employment_refresh_report_transaction.rb', line 16 def account_id @account_id end |
#date ⇒ Date
For pending transactions, the date that the transaction occurred; for posted transactions, the date that the transaction posted. Both dates are returned in an ISO 8601 format ( ‘YYYY-MM-DD` ).
27 28 29 |
# File 'lib/the_plaid_api/models/cra_employment_refresh_report_transaction.rb', line 27 def date @date end |
#original_description ⇒ String
The string returned by the financial institution to describe the transaction.
21 22 23 |
# File 'lib/the_plaid_api/models/cra_employment_refresh_report_transaction.rb', line 21 def original_description @original_description end |
#pending ⇒ TrueClass | FalseClass
When ‘true`, identifies the transaction as pending or unsettled. Pending transaction details (name, type, amount, category ID) may change before they are settled.
33 34 35 |
# File 'lib/the_plaid_api/models/cra_employment_refresh_report_transaction.rb', line 33 def pending @pending end |
#transaction_id ⇒ String
The unique ID of the transaction. Like all Plaid identifiers, the ‘transaction_id` is case sensitive.
38 39 40 |
# File 'lib/the_plaid_api/models/cra_employment_refresh_report_transaction.rb', line 38 def transaction_id @transaction_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/the_plaid_api/models/cra_employment_refresh_report_transaction.rb', line 75 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_id = hash.key?('account_id') ? hash['account_id'] : nil original_description = hash.key?('original_description') ? hash['original_description'] : nil date = hash.key?('date') ? hash['date'] : nil pending = hash.key?('pending') ? hash['pending'] : nil transaction_id = hash.key?('transaction_id') ? hash['transaction_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. CraEmploymentRefreshReportTransaction.new(account_id: account_id, original_description: original_description, date: date, pending: pending, transaction_id: transaction_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 49 |
# File 'lib/the_plaid_api/models/cra_employment_refresh_report_transaction.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['account_id'] = 'account_id' @_hash['original_description'] = 'original_description' @_hash['date'] = 'date' @_hash['pending'] = 'pending' @_hash['transaction_id'] = 'transaction_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
57 58 59 |
# File 'lib/the_plaid_api/models/cra_employment_refresh_report_transaction.rb', line 57 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
52 53 54 |
# File 'lib/the_plaid_api/models/cra_employment_refresh_report_transaction.rb', line 52 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
112 113 114 115 116 117 118 |
# File 'lib/the_plaid_api/models/cra_employment_refresh_report_transaction.rb', line 112 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_id: #{@account_id.inspect}, original_description:"\ " #{@original_description.inspect}, date: #{@date.inspect}, pending: #{@pending.inspect},"\ " transaction_id: #{@transaction_id.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
104 105 106 107 108 109 |
# File 'lib/the_plaid_api/models/cra_employment_refresh_report_transaction.rb', line 104 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_id: #{@account_id}, original_description: #{@original_description},"\ " date: #{@date}, pending: #{@pending}, transaction_id: #{@transaction_id},"\ " additional_properties: #{@additional_properties}>" end |