Class: ThePlaidApi::ProcessorTransactionsRecurringGetResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/the_plaid_api/models/processor_transactions_recurring_get_response.rb

Overview

ProcessorTransactionsRecurringGetResponse defines the response schema for ‘/processor/transactions/recurring/get`

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(inflow_streams:, outflow_streams:, updated_datetime:, request_id:, personal_finance_category_version: SKIP, additional_properties: nil) ⇒ ProcessorTransactionsRecurringGetResponse

Returns a new instance of ProcessorTransactionsRecurringGetResponse.



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/the_plaid_api/models/processor_transactions_recurring_get_response.rb', line 69

def initialize(inflow_streams:, outflow_streams:, updated_datetime:,
               request_id:, personal_finance_category_version: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @inflow_streams = inflow_streams
  @outflow_streams = outflow_streams
  @updated_datetime = updated_datetime
  unless personal_finance_category_version == SKIP
    @personal_finance_category_version =
      personal_finance_category_version
  end
  @request_id = request_id
  @additional_properties = additional_properties
end

Instance Attribute Details

#inflow_streamsArray[TransactionStream]

An array of depository transaction streams.

Returns:



16
17
18
# File 'lib/the_plaid_api/models/processor_transactions_recurring_get_response.rb', line 16

def inflow_streams
  @inflow_streams
end

#outflow_streamsArray[TransactionStream]

An array of expense transaction streams.

Returns:



20
21
22
# File 'lib/the_plaid_api/models/processor_transactions_recurring_get_response.rb', line 20

def outflow_streams
  @outflow_streams
end

#personal_finance_category_versionPersonalFinanceCategoryVersion

Indicates which version of the personal finance category taxonomy is being used. [View PFCv2 and PFCv1 taxonomies](plaid.com/documents/pfc-taxonomy-all.csv). If you enabled Transactions or Enrich before December 2025 you will receive the ‘v1` taxonomy by default and may request `v2` by explicitly setting this field to `v2` in the request. If you enabled Transactions or Enrich on or after December 2025, you may only receive the `v2` taxonomy.



37
38
39
# File 'lib/the_plaid_api/models/processor_transactions_recurring_get_response.rb', line 37

def personal_finance_category_version
  @personal_finance_category_version
end

#request_idString

A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.

Returns:

  • (String)


43
44
45
# File 'lib/the_plaid_api/models/processor_transactions_recurring_get_response.rb', line 43

def request_id
  @request_id
end

#updated_datetimeDateTime

Timestamp in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (‘YYYY-MM-DDTHH:mm:ssZ`) indicating the last time transaction streams for the given account were updated on

Returns:

  • (DateTime)


26
27
28
# File 'lib/the_plaid_api/models/processor_transactions_recurring_get_response.rb', line 26

def updated_datetime
  @updated_datetime
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/the_plaid_api/models/processor_transactions_recurring_get_response.rb', line 87

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  # Parameter is an array, so we need to iterate through it
  inflow_streams = nil
  unless hash['inflow_streams'].nil?
    inflow_streams = []
    hash['inflow_streams'].each do |structure|
      inflow_streams << (TransactionStream.from_hash(structure) if structure)
    end
  end

  inflow_streams = nil unless hash.key?('inflow_streams')
  # Parameter is an array, so we need to iterate through it
  outflow_streams = nil
  unless hash['outflow_streams'].nil?
    outflow_streams = []
    hash['outflow_streams'].each do |structure|
      outflow_streams << (TransactionStream.from_hash(structure) if structure)
    end
  end

  outflow_streams = nil unless hash.key?('outflow_streams')
  updated_datetime = if hash.key?('updated_datetime')
                       (DateTimeHelper.from_rfc3339(hash['updated_datetime']) if hash['updated_datetime'])
                     end
  request_id = hash.key?('request_id') ? hash['request_id'] : nil
  personal_finance_category_version =
    hash.key?('personal_finance_category_version') ? hash['personal_finance_category_version'] : 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.
  ProcessorTransactionsRecurringGetResponse.new(inflow_streams: inflow_streams,
                                                outflow_streams: outflow_streams,
                                                updated_datetime: updated_datetime,
                                                request_id: request_id,
                                                personal_finance_category_version: personal_finance_category_version,
                                                additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



46
47
48
49
50
51
52
53
54
55
# File 'lib/the_plaid_api/models/processor_transactions_recurring_get_response.rb', line 46

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['inflow_streams'] = 'inflow_streams'
  @_hash['outflow_streams'] = 'outflow_streams'
  @_hash['updated_datetime'] = 'updated_datetime'
  @_hash['personal_finance_category_version'] =
    'personal_finance_category_version'
  @_hash['request_id'] = 'request_id'
  @_hash
end

.nullablesObject

An array for nullable fields



65
66
67
# File 'lib/the_plaid_api/models/processor_transactions_recurring_get_response.rb', line 65

def self.nullables
  []
end

.optionalsObject

An array for optional fields



58
59
60
61
62
# File 'lib/the_plaid_api/models/processor_transactions_recurring_get_response.rb', line 58

def self.optionals
  %w[
    personal_finance_category_version
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



148
149
150
151
152
153
154
# File 'lib/the_plaid_api/models/processor_transactions_recurring_get_response.rb', line 148

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} inflow_streams: #{@inflow_streams.inspect}, outflow_streams:"\
  " #{@outflow_streams.inspect}, updated_datetime: #{@updated_datetime.inspect},"\
  " personal_finance_category_version: #{@personal_finance_category_version.inspect},"\
  " request_id: #{@request_id.inspect}, additional_properties: #{@additional_properties}>"
end

#to_custom_updated_datetimeObject



134
135
136
# File 'lib/the_plaid_api/models/processor_transactions_recurring_get_response.rb', line 134

def to_custom_updated_datetime
  DateTimeHelper.to_rfc3339(updated_datetime)
end

#to_sObject

Provides a human-readable string representation of the object.



139
140
141
142
143
144
145
# File 'lib/the_plaid_api/models/processor_transactions_recurring_get_response.rb', line 139

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} inflow_streams: #{@inflow_streams}, outflow_streams: #{@outflow_streams},"\
  " updated_datetime: #{@updated_datetime}, personal_finance_category_version:"\
  " #{@personal_finance_category_version}, request_id: #{@request_id}, additional_properties:"\
  " #{@additional_properties}>"
end