fuse_client 1.0.33 → 1.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +6 -1
- data/docs/AddAccountEventsRequest.md +18 -0
- data/docs/AddAccountEventsRequestEventsInner.md +51 -0
- data/docs/{AddSpendPowerTransactionResponse.md → AddAccountEventsResponse.md} +2 -2
- data/docs/AssetReportTransaction.md +1 -1
- data/docs/CreateSessionRequest.md +1 -1
- data/docs/CreateSpendPowerCustomizationRequest.md +22 -0
- data/docs/CreateSpendPowerRequest.md +5 -5
- data/docs/CreateSpendPowerResponse.md +1 -1
- data/docs/DeleteSpendPowerResponse.md +2 -2
- data/docs/EnrichTransactionsRequest.md +18 -0
- data/docs/EnrichTransactionsResponse.md +18 -0
- data/docs/EnrichedTransaction.md +46 -0
- data/docs/EnrichedTransactionLogo.md +18 -0
- data/docs/EvalSpendPowerRequest.md +22 -0
- data/docs/EvalSpendPowerRequestEventsInner.md +20 -0
- data/docs/EvalSpendPowerResponse.md +20 -0
- data/docs/ExternalTransactionEvent.md +36 -0
- data/docs/ExternalTransactionEventStatus.md +15 -0
- data/docs/FinancialConnectionsAccountBalance.md +2 -2
- data/docs/FinancialConnectionsAccountCachedBalance.md +2 -2
- data/docs/FinancialConnectionsHolding.md +3 -3
- data/docs/FinancialConnectionsInvestmentSecurity.md +1 -1
- data/docs/FinancialConnectionsInvestmentTransaction.md +5 -3
- data/docs/FinancialConnectionsInvestmentTransactionSubtype.md +15 -0
- data/docs/FuseApi.md +193 -35
- data/docs/GetFinanceScoreResponse.md +20 -0
- data/docs/GetInvestmentTransactionsRequest.md +4 -4
- data/docs/GetSpendPowerCustomizationResponse.md +20 -0
- data/docs/InAppTransactionEvent.md +34 -0
- data/docs/InAppTransactionEventStatus.md +15 -0
- data/docs/SpendPower.md +6 -6
- data/docs/SpendPowerApi.md +87 -44
- data/docs/SpendPowerCustomization.md +5 -3
- data/docs/SpendPowerTimeFrame.md +15 -0
- data/docs/Transaction.md +1 -1
- data/docs/TransactionCategory.md +20 -0
- data/docs/TransactionCategoryDetailed.md +15 -0
- data/docs/TransactionCategoryPrimary.md +15 -0
- data/docs/TransactionEventType.md +15 -0
- data/docs/TransactionToEnrich.md +26 -0
- data/docs/UpdateSpendPowerCustomizationRequest.md +22 -0
- data/docs/UpdatedBalanceEvent.md +26 -0
- data/lib/fuse_client/api/fuse_api.rb +176 -31
- data/lib/fuse_client/api/spend_power_api.rb +78 -52
- data/lib/fuse_client/models/add_account_events_request.rb +254 -0
- data/lib/fuse_client/models/add_account_events_request_events_inner.rb +106 -0
- data/lib/fuse_client/models/{add_spend_power_transaction_response.rb → add_account_events_response.rb} +3 -3
- data/lib/fuse_client/models/asset_report_transaction.rb +1 -1
- data/lib/fuse_client/models/country_code.rb +2 -1
- data/lib/fuse_client/models/create_session_request.rb +1 -1
- data/lib/fuse_client/models/create_spend_power_customization_request.rb +314 -0
- data/lib/fuse_client/models/create_spend_power_request.rb +22 -22
- data/lib/fuse_client/models/create_spend_power_response.rb +1 -1
- data/lib/fuse_client/models/delete_spend_power_response.rb +11 -10
- data/lib/fuse_client/models/enrich_transactions_request.rb +226 -0
- data/lib/fuse_client/models/enrich_transactions_response.rb +222 -0
- data/lib/fuse_client/models/enriched_transaction.rb +397 -0
- data/lib/fuse_client/models/enriched_transaction_logo.rb +220 -0
- data/lib/fuse_client/models/eval_spend_power_request.rb +296 -0
- data/lib/fuse_client/models/eval_spend_power_request_events_inner.rb +239 -0
- data/lib/fuse_client/models/eval_spend_power_response.rb +230 -0
- data/lib/fuse_client/models/external_transaction_event.rb +384 -0
- data/lib/fuse_client/models/external_transaction_event_status.rb +40 -0
- data/lib/fuse_client/models/financial_connections_account_balance.rb +2 -2
- data/lib/fuse_client/models/financial_connections_account_cached_balance.rb +2 -2
- data/lib/fuse_client/models/financial_connections_holding.rb +3 -3
- data/lib/fuse_client/models/financial_connections_investment_security.rb +1 -1
- data/lib/fuse_client/models/financial_connections_investment_transaction.rb +13 -4
- data/lib/fuse_client/models/financial_connections_investment_transaction_subtype.rb +87 -0
- data/lib/fuse_client/models/fuse_api_error_code.rb +3 -1
- data/lib/fuse_client/models/get_finance_score_response.rb +240 -0
- data/lib/fuse_client/models/get_investment_transactions_request.rb +37 -9
- data/lib/fuse_client/models/get_spend_power_customization_response.rb +239 -0
- data/lib/fuse_client/models/in_app_transaction_event.rb +364 -0
- data/lib/fuse_client/models/in_app_transaction_event_status.rb +41 -0
- data/lib/fuse_client/models/spend_power.rb +18 -18
- data/lib/fuse_client/models/spend_power_customization.rb +54 -14
- data/lib/fuse_client/models/spend_power_time_frame.rb +41 -0
- data/lib/fuse_client/models/transaction.rb +1 -1
- data/lib/fuse_client/models/transaction_category.rb +260 -0
- data/lib/fuse_client/models/transaction_category_detailed.rb +135 -0
- data/lib/fuse_client/models/transaction_category_primary.rb +59 -0
- data/lib/fuse_client/models/transaction_event_type.rb +65 -0
- data/lib/fuse_client/models/{add_spend_power_transaction_request.rb → transaction_to_enrich.rb} +47 -27
- data/lib/fuse_client/models/update_spend_power_customization_request.rb +291 -0
- data/lib/fuse_client/models/updated_balance_event.rb +308 -0
- data/lib/fuse_client/version.rb +1 -1
- data/lib/fuse_client.rb +26 -2
- data/spec/api/fuse_api_spec.rb +33 -7
- data/spec/api/spend_power_api_spec.rb +14 -17
- data/spec/models/add_account_events_request_events_inner_spec.rb +31 -0
- data/spec/models/add_account_events_request_spec.rb +34 -0
- data/spec/models/{add_spend_power_transaction_response_spec.rb → add_account_events_response_spec.rb} +6 -6
- data/spec/models/create_spend_power_customization_request_spec.rb +46 -0
- data/spec/models/create_spend_power_request_spec.rb +2 -2
- data/spec/models/delete_spend_power_response_spec.rb +1 -1
- data/spec/models/enrich_transactions_request_spec.rb +34 -0
- data/spec/models/enrich_transactions_response_spec.rb +34 -0
- data/spec/models/enriched_transaction_logo_spec.rb +34 -0
- data/spec/models/enriched_transaction_spec.rb +122 -0
- data/spec/models/eval_spend_power_request_events_inner_spec.rb +40 -0
- data/spec/models/eval_spend_power_request_spec.rb +46 -0
- data/spec/models/eval_spend_power_response_spec.rb +40 -0
- data/spec/models/external_transaction_event_spec.rb +92 -0
- data/spec/models/external_transaction_event_status_spec.rb +28 -0
- data/spec/models/financial_connections_investment_transaction_spec.rb +6 -0
- data/spec/models/financial_connections_investment_transaction_subtype_spec.rb +28 -0
- data/spec/models/get_finance_score_response_spec.rb +40 -0
- data/spec/models/get_spend_power_customization_response_spec.rb +40 -0
- data/spec/models/in_app_transaction_event_spec.rb +86 -0
- data/spec/models/in_app_transaction_event_status_spec.rb +28 -0
- data/spec/models/spend_power_customization_spec.rb +6 -4
- data/spec/models/spend_power_spec.rb +1 -1
- data/spec/models/spend_power_time_frame_spec.rb +28 -0
- data/spec/models/transaction_category_detailed_spec.rb +28 -0
- data/spec/models/transaction_category_primary_spec.rb +28 -0
- data/spec/models/transaction_category_spec.rb +40 -0
- data/spec/models/transaction_event_type_spec.rb +28 -0
- data/spec/models/{add_spend_power_transaction_request_spec.rb → transaction_to_enrich_spec.rb} +23 -11
- data/spec/models/update_spend_power_customization_request_spec.rb +46 -0
- data/spec/models/updated_balance_event_spec.rb +62 -0
- metadata +106 -10
- data/docs/AddSpendPowerTransactionRequest.md +0 -22
@@ -0,0 +1,230 @@
|
|
1
|
+
=begin
|
2
|
+
#Fuse
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.5.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module FuseClient
|
17
|
+
class EvalSpendPowerResponse
|
18
|
+
# The mean absolute overestimation error for the data
|
19
|
+
attr_accessor :mean_absolute_overestimation_error
|
20
|
+
|
21
|
+
# The mean absolute underestimation error for the data
|
22
|
+
attr_accessor :mean_absolute_underestimation_error
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'mean_absolute_overestimation_error' => :'mean_absolute_overestimation_error',
|
28
|
+
:'mean_absolute_underestimation_error' => :'mean_absolute_underestimation_error'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'mean_absolute_overestimation_error' => :'Float',
|
41
|
+
:'mean_absolute_underestimation_error' => :'Float'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# List of attributes with nullable: true
|
46
|
+
def self.openapi_nullable
|
47
|
+
Set.new([
|
48
|
+
])
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
if (!attributes.is_a?(Hash))
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FuseClient::EvalSpendPowerResponse` initialize method"
|
56
|
+
end
|
57
|
+
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FuseClient::EvalSpendPowerResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
62
|
+
end
|
63
|
+
h[k.to_sym] = v
|
64
|
+
}
|
65
|
+
|
66
|
+
if attributes.key?(:'mean_absolute_overestimation_error')
|
67
|
+
self.mean_absolute_overestimation_error = attributes[:'mean_absolute_overestimation_error']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'mean_absolute_underestimation_error')
|
71
|
+
self.mean_absolute_underestimation_error = attributes[:'mean_absolute_underestimation_error']
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
76
|
+
# @return Array for valid properties with the reasons
|
77
|
+
def list_invalid_properties
|
78
|
+
invalid_properties = Array.new
|
79
|
+
invalid_properties
|
80
|
+
end
|
81
|
+
|
82
|
+
# Check to see if the all the properties in the model are valid
|
83
|
+
# @return true if the model is valid
|
84
|
+
def valid?
|
85
|
+
true
|
86
|
+
end
|
87
|
+
|
88
|
+
# Checks equality by comparing each attribute.
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def ==(o)
|
91
|
+
return true if self.equal?(o)
|
92
|
+
self.class == o.class &&
|
93
|
+
mean_absolute_overestimation_error == o.mean_absolute_overestimation_error &&
|
94
|
+
mean_absolute_underestimation_error == o.mean_absolute_underestimation_error
|
95
|
+
end
|
96
|
+
|
97
|
+
# @see the `==` method
|
98
|
+
# @param [Object] Object to be compared
|
99
|
+
def eql?(o)
|
100
|
+
self == o
|
101
|
+
end
|
102
|
+
|
103
|
+
# Calculates hash code according to all attributes.
|
104
|
+
# @return [Integer] Hash code
|
105
|
+
def hash
|
106
|
+
[mean_absolute_overestimation_error, mean_absolute_underestimation_error].hash
|
107
|
+
end
|
108
|
+
|
109
|
+
# Builds the object from hash
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
111
|
+
# @return [Object] Returns the model itself
|
112
|
+
def self.build_from_hash(attributes)
|
113
|
+
new.build_from_hash(attributes)
|
114
|
+
end
|
115
|
+
|
116
|
+
# Builds the object from hash
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
+
# @return [Object] Returns the model itself
|
119
|
+
def build_from_hash(attributes)
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
122
|
+
self.class.openapi_types.each_pair do |key, type|
|
123
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
124
|
+
self.send("#{key}=", nil)
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
126
|
+
# check to ensure the input is an array given that the attribute
|
127
|
+
# is documented as an array but the input is not
|
128
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
129
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
130
|
+
end
|
131
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
132
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
self
|
137
|
+
end
|
138
|
+
|
139
|
+
# Deserializes the data based on type
|
140
|
+
# @param string type Data type
|
141
|
+
# @param string value Value to be deserialized
|
142
|
+
# @return [Object] Deserialized data
|
143
|
+
def _deserialize(type, value)
|
144
|
+
case type.to_sym
|
145
|
+
when :Time
|
146
|
+
Time.parse(value)
|
147
|
+
when :Date
|
148
|
+
Date.parse(value)
|
149
|
+
when :String
|
150
|
+
value.to_s
|
151
|
+
when :Integer
|
152
|
+
value.to_i
|
153
|
+
when :Float
|
154
|
+
value.to_f
|
155
|
+
when :Boolean
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
157
|
+
true
|
158
|
+
else
|
159
|
+
false
|
160
|
+
end
|
161
|
+
when :Object
|
162
|
+
# generic object (usually a Hash), return directly
|
163
|
+
value
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
170
|
+
{}.tap do |hash|
|
171
|
+
value.each do |k, v|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
else # model
|
176
|
+
# models (e.g. Pet) or oneOf
|
177
|
+
klass = FuseClient.const_get(type)
|
178
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the string representation of the object
|
183
|
+
# @return [String] String presentation of the object
|
184
|
+
def to_s
|
185
|
+
to_hash.to_s
|
186
|
+
end
|
187
|
+
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
190
|
+
def to_body
|
191
|
+
to_hash
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns the object in the form of hash
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
196
|
+
def to_hash
|
197
|
+
hash = {}
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
199
|
+
value = self.send(attr)
|
200
|
+
if value.nil?
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
203
|
+
end
|
204
|
+
|
205
|
+
hash[param] = _to_hash(value)
|
206
|
+
end
|
207
|
+
hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Outputs non-array value in the form of hash
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
212
|
+
# @param [Object] value Any valid value
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
214
|
+
def _to_hash(value)
|
215
|
+
if value.is_a?(Array)
|
216
|
+
value.compact.map { |v| _to_hash(v) }
|
217
|
+
elsif value.is_a?(Hash)
|
218
|
+
{}.tap do |hash|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
220
|
+
end
|
221
|
+
elsif value.respond_to? :to_hash
|
222
|
+
value.to_hash
|
223
|
+
else
|
224
|
+
value
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
end
|
229
|
+
|
230
|
+
end
|
@@ -0,0 +1,384 @@
|
|
1
|
+
=begin
|
2
|
+
#Fuse
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.5.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module FuseClient
|
17
|
+
class ExternalTransactionEvent
|
18
|
+
# ID of the transaction
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
attr_accessor :event_type
|
22
|
+
|
23
|
+
attr_accessor :status
|
24
|
+
|
25
|
+
# The running balance of the account after the transaction has occurred, in cents
|
26
|
+
attr_accessor :balance
|
27
|
+
|
28
|
+
# Use positive values to represent money going out and negative to represent money going in.
|
29
|
+
attr_accessor :amount
|
30
|
+
|
31
|
+
attr_accessor :merchant_name
|
32
|
+
|
33
|
+
attr_accessor :transaction_type
|
34
|
+
|
35
|
+
attr_accessor :category
|
36
|
+
|
37
|
+
# The ISO-4217 currency code.
|
38
|
+
attr_accessor :iso_currency_code
|
39
|
+
|
40
|
+
# Datetime of the transaction In ISO-8601 format
|
41
|
+
attr_accessor :timestamp
|
42
|
+
|
43
|
+
class EnumAttributeValidator
|
44
|
+
attr_reader :datatype
|
45
|
+
attr_reader :allowable_values
|
46
|
+
|
47
|
+
def initialize(datatype, allowable_values)
|
48
|
+
@allowable_values = allowable_values.map do |value|
|
49
|
+
case datatype.to_s
|
50
|
+
when /Integer/i
|
51
|
+
value.to_i
|
52
|
+
when /Float/i
|
53
|
+
value.to_f
|
54
|
+
else
|
55
|
+
value
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def valid?(value)
|
61
|
+
!value || allowable_values.include?(value)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
66
|
+
def self.attribute_map
|
67
|
+
{
|
68
|
+
:'id' => :'id',
|
69
|
+
:'event_type' => :'event_type',
|
70
|
+
:'status' => :'status',
|
71
|
+
:'balance' => :'balance',
|
72
|
+
:'amount' => :'amount',
|
73
|
+
:'merchant_name' => :'merchant_name',
|
74
|
+
:'transaction_type' => :'transaction_type',
|
75
|
+
:'category' => :'category',
|
76
|
+
:'iso_currency_code' => :'iso_currency_code',
|
77
|
+
:'timestamp' => :'timestamp'
|
78
|
+
}
|
79
|
+
end
|
80
|
+
|
81
|
+
# Returns all the JSON keys this model knows about
|
82
|
+
def self.acceptable_attributes
|
83
|
+
attribute_map.values
|
84
|
+
end
|
85
|
+
|
86
|
+
# Attribute type mapping.
|
87
|
+
def self.openapi_types
|
88
|
+
{
|
89
|
+
:'id' => :'String',
|
90
|
+
:'event_type' => :'String',
|
91
|
+
:'status' => :'ExternalTransactionEventStatus',
|
92
|
+
:'balance' => :'Float',
|
93
|
+
:'amount' => :'Float',
|
94
|
+
:'merchant_name' => :'String',
|
95
|
+
:'transaction_type' => :'TransactionEventType',
|
96
|
+
:'category' => :'TransactionCategory',
|
97
|
+
:'iso_currency_code' => :'String',
|
98
|
+
:'timestamp' => :'String'
|
99
|
+
}
|
100
|
+
end
|
101
|
+
|
102
|
+
# List of attributes with nullable: true
|
103
|
+
def self.openapi_nullable
|
104
|
+
Set.new([
|
105
|
+
])
|
106
|
+
end
|
107
|
+
|
108
|
+
# Initializes the object
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
110
|
+
def initialize(attributes = {})
|
111
|
+
if (!attributes.is_a?(Hash))
|
112
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FuseClient::ExternalTransactionEvent` initialize method"
|
113
|
+
end
|
114
|
+
|
115
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
116
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
117
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
118
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FuseClient::ExternalTransactionEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
119
|
+
end
|
120
|
+
h[k.to_sym] = v
|
121
|
+
}
|
122
|
+
|
123
|
+
if attributes.key?(:'id')
|
124
|
+
self.id = attributes[:'id']
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.key?(:'event_type')
|
128
|
+
self.event_type = attributes[:'event_type']
|
129
|
+
end
|
130
|
+
|
131
|
+
if attributes.key?(:'status')
|
132
|
+
self.status = attributes[:'status']
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.key?(:'balance')
|
136
|
+
self.balance = attributes[:'balance']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.key?(:'amount')
|
140
|
+
self.amount = attributes[:'amount']
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.key?(:'merchant_name')
|
144
|
+
self.merchant_name = attributes[:'merchant_name']
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.key?(:'transaction_type')
|
148
|
+
self.transaction_type = attributes[:'transaction_type']
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.key?(:'category')
|
152
|
+
self.category = attributes[:'category']
|
153
|
+
end
|
154
|
+
|
155
|
+
if attributes.key?(:'iso_currency_code')
|
156
|
+
self.iso_currency_code = attributes[:'iso_currency_code']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.key?(:'timestamp')
|
160
|
+
self.timestamp = attributes[:'timestamp']
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
165
|
+
# @return Array for valid properties with the reasons
|
166
|
+
def list_invalid_properties
|
167
|
+
invalid_properties = Array.new
|
168
|
+
if @id.nil?
|
169
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
170
|
+
end
|
171
|
+
|
172
|
+
if @event_type.nil?
|
173
|
+
invalid_properties.push('invalid value for "event_type", event_type cannot be nil.')
|
174
|
+
end
|
175
|
+
|
176
|
+
if @status.nil?
|
177
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
178
|
+
end
|
179
|
+
|
180
|
+
if @amount.nil?
|
181
|
+
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
182
|
+
end
|
183
|
+
|
184
|
+
if @merchant_name.nil?
|
185
|
+
invalid_properties.push('invalid value for "merchant_name", merchant_name cannot be nil.')
|
186
|
+
end
|
187
|
+
|
188
|
+
if @transaction_type.nil?
|
189
|
+
invalid_properties.push('invalid value for "transaction_type", transaction_type cannot be nil.')
|
190
|
+
end
|
191
|
+
|
192
|
+
if @category.nil?
|
193
|
+
invalid_properties.push('invalid value for "category", category cannot be nil.')
|
194
|
+
end
|
195
|
+
|
196
|
+
if @iso_currency_code.nil?
|
197
|
+
invalid_properties.push('invalid value for "iso_currency_code", iso_currency_code cannot be nil.')
|
198
|
+
end
|
199
|
+
|
200
|
+
if @timestamp.nil?
|
201
|
+
invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
|
202
|
+
end
|
203
|
+
|
204
|
+
invalid_properties
|
205
|
+
end
|
206
|
+
|
207
|
+
# Check to see if the all the properties in the model are valid
|
208
|
+
# @return true if the model is valid
|
209
|
+
def valid?
|
210
|
+
return false if @id.nil?
|
211
|
+
return false if @event_type.nil?
|
212
|
+
event_type_validator = EnumAttributeValidator.new('String', ["external_transaction"])
|
213
|
+
return false unless event_type_validator.valid?(@event_type)
|
214
|
+
return false if @status.nil?
|
215
|
+
return false if @amount.nil?
|
216
|
+
return false if @merchant_name.nil?
|
217
|
+
return false if @transaction_type.nil?
|
218
|
+
return false if @category.nil?
|
219
|
+
return false if @iso_currency_code.nil?
|
220
|
+
return false if @timestamp.nil?
|
221
|
+
true
|
222
|
+
end
|
223
|
+
|
224
|
+
# Custom attribute writer method checking allowed values (enum).
|
225
|
+
# @param [Object] event_type Object to be assigned
|
226
|
+
def event_type=(event_type)
|
227
|
+
validator = EnumAttributeValidator.new('String', ["external_transaction"])
|
228
|
+
unless validator.valid?(event_type)
|
229
|
+
fail ArgumentError, "invalid value for \"event_type\", must be one of #{validator.allowable_values}."
|
230
|
+
end
|
231
|
+
@event_type = event_type
|
232
|
+
end
|
233
|
+
|
234
|
+
# Checks equality by comparing each attribute.
|
235
|
+
# @param [Object] Object to be compared
|
236
|
+
def ==(o)
|
237
|
+
return true if self.equal?(o)
|
238
|
+
self.class == o.class &&
|
239
|
+
id == o.id &&
|
240
|
+
event_type == o.event_type &&
|
241
|
+
status == o.status &&
|
242
|
+
balance == o.balance &&
|
243
|
+
amount == o.amount &&
|
244
|
+
merchant_name == o.merchant_name &&
|
245
|
+
transaction_type == o.transaction_type &&
|
246
|
+
category == o.category &&
|
247
|
+
iso_currency_code == o.iso_currency_code &&
|
248
|
+
timestamp == o.timestamp
|
249
|
+
end
|
250
|
+
|
251
|
+
# @see the `==` method
|
252
|
+
# @param [Object] Object to be compared
|
253
|
+
def eql?(o)
|
254
|
+
self == o
|
255
|
+
end
|
256
|
+
|
257
|
+
# Calculates hash code according to all attributes.
|
258
|
+
# @return [Integer] Hash code
|
259
|
+
def hash
|
260
|
+
[id, event_type, status, balance, amount, merchant_name, transaction_type, category, iso_currency_code, timestamp].hash
|
261
|
+
end
|
262
|
+
|
263
|
+
# Builds the object from hash
|
264
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
265
|
+
# @return [Object] Returns the model itself
|
266
|
+
def self.build_from_hash(attributes)
|
267
|
+
new.build_from_hash(attributes)
|
268
|
+
end
|
269
|
+
|
270
|
+
# Builds the object from hash
|
271
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
272
|
+
# @return [Object] Returns the model itself
|
273
|
+
def build_from_hash(attributes)
|
274
|
+
return nil unless attributes.is_a?(Hash)
|
275
|
+
attributes = attributes.transform_keys(&:to_sym)
|
276
|
+
self.class.openapi_types.each_pair do |key, type|
|
277
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
278
|
+
self.send("#{key}=", nil)
|
279
|
+
elsif type =~ /\AArray<(.*)>/i
|
280
|
+
# check to ensure the input is an array given that the attribute
|
281
|
+
# is documented as an array but the input is not
|
282
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
283
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
284
|
+
end
|
285
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
286
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
287
|
+
end
|
288
|
+
end
|
289
|
+
|
290
|
+
self
|
291
|
+
end
|
292
|
+
|
293
|
+
# Deserializes the data based on type
|
294
|
+
# @param string type Data type
|
295
|
+
# @param string value Value to be deserialized
|
296
|
+
# @return [Object] Deserialized data
|
297
|
+
def _deserialize(type, value)
|
298
|
+
case type.to_sym
|
299
|
+
when :Time
|
300
|
+
Time.parse(value)
|
301
|
+
when :Date
|
302
|
+
Date.parse(value)
|
303
|
+
when :String
|
304
|
+
value.to_s
|
305
|
+
when :Integer
|
306
|
+
value.to_i
|
307
|
+
when :Float
|
308
|
+
value.to_f
|
309
|
+
when :Boolean
|
310
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
311
|
+
true
|
312
|
+
else
|
313
|
+
false
|
314
|
+
end
|
315
|
+
when :Object
|
316
|
+
# generic object (usually a Hash), return directly
|
317
|
+
value
|
318
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
319
|
+
inner_type = Regexp.last_match[:inner_type]
|
320
|
+
value.map { |v| _deserialize(inner_type, v) }
|
321
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
322
|
+
k_type = Regexp.last_match[:k_type]
|
323
|
+
v_type = Regexp.last_match[:v_type]
|
324
|
+
{}.tap do |hash|
|
325
|
+
value.each do |k, v|
|
326
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
327
|
+
end
|
328
|
+
end
|
329
|
+
else # model
|
330
|
+
# models (e.g. Pet) or oneOf
|
331
|
+
klass = FuseClient.const_get(type)
|
332
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
333
|
+
end
|
334
|
+
end
|
335
|
+
|
336
|
+
# Returns the string representation of the object
|
337
|
+
# @return [String] String presentation of the object
|
338
|
+
def to_s
|
339
|
+
to_hash.to_s
|
340
|
+
end
|
341
|
+
|
342
|
+
# to_body is an alias to to_hash (backward compatibility)
|
343
|
+
# @return [Hash] Returns the object in the form of hash
|
344
|
+
def to_body
|
345
|
+
to_hash
|
346
|
+
end
|
347
|
+
|
348
|
+
# Returns the object in the form of hash
|
349
|
+
# @return [Hash] Returns the object in the form of hash
|
350
|
+
def to_hash
|
351
|
+
hash = {}
|
352
|
+
self.class.attribute_map.each_pair do |attr, param|
|
353
|
+
value = self.send(attr)
|
354
|
+
if value.nil?
|
355
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
356
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
357
|
+
end
|
358
|
+
|
359
|
+
hash[param] = _to_hash(value)
|
360
|
+
end
|
361
|
+
hash
|
362
|
+
end
|
363
|
+
|
364
|
+
# Outputs non-array value in the form of hash
|
365
|
+
# For object, use to_hash. Otherwise, just return the value
|
366
|
+
# @param [Object] value Any valid value
|
367
|
+
# @return [Hash] Returns the value in the form of hash
|
368
|
+
def _to_hash(value)
|
369
|
+
if value.is_a?(Array)
|
370
|
+
value.compact.map { |v| _to_hash(v) }
|
371
|
+
elsif value.is_a?(Hash)
|
372
|
+
{}.tap do |hash|
|
373
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
374
|
+
end
|
375
|
+
elsif value.respond_to? :to_hash
|
376
|
+
value.to_hash
|
377
|
+
else
|
378
|
+
value
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
382
|
+
end
|
383
|
+
|
384
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
=begin
|
2
|
+
#Fuse
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.5.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module FuseClient
|
17
|
+
class ExternalTransactionEventStatus
|
18
|
+
PENDING = "pending".freeze
|
19
|
+
POSTED = "posted".freeze
|
20
|
+
|
21
|
+
def self.all_vars
|
22
|
+
@all_vars ||= [PENDING, POSTED].freeze
|
23
|
+
end
|
24
|
+
|
25
|
+
# Builds the enum from string
|
26
|
+
# @param [String] The enum value in the form of the string
|
27
|
+
# @return [String] The enum value
|
28
|
+
def self.build_from_hash(value)
|
29
|
+
new.build_from_hash(value)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Builds the enum from string
|
33
|
+
# @param [String] The enum value in the form of the string
|
34
|
+
# @return [String] The enum value
|
35
|
+
def build_from_hash(value)
|
36
|
+
return value if ExternalTransactionEventStatus.all_vars.include?(value)
|
37
|
+
raise "Invalid ENUM value #{value} for class #ExternalTransactionEventStatus"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -18,10 +18,10 @@ module FuseClient
|
|
18
18
|
# Remote Account Id of the transaction, ie Plaid Account Id
|
19
19
|
attr_accessor :remote_account_id
|
20
20
|
|
21
|
-
# Amount in cents after factoring in pending balances. For accounts with credit features, the available funds generally equal the credit limit. Some institutions may not provide an available balance calculation. If this is the case, Fuse will return a null value for the available balance. To ensure you have the most accurate information, we recommend obtaining the current balance by using 'balance.available || balance.current'.
|
21
|
+
# Amount in cents after factoring in pending balances. The format of this value is a double. For accounts with credit features, the available funds generally equal the credit limit. Some institutions may not provide an available balance calculation. If this is the case, Fuse will return a null value for the available balance. To ensure you have the most accurate information, we recommend obtaining the current balance by using 'balance.available || balance.current'.
|
22
22
|
attr_accessor :available
|
23
23
|
|
24
|
-
# Amount in cents without factoring in pending balances
|
24
|
+
# Amount in cents without factoring in pending balances. The format of this value is a double.
|
25
25
|
attr_accessor :current
|
26
26
|
|
27
27
|
# The ISO-4217 currency code of the balance.
|
@@ -15,10 +15,10 @@ require 'time'
|
|
15
15
|
|
16
16
|
module FuseClient
|
17
17
|
class FinancialConnectionsAccountCachedBalance
|
18
|
-
# The amount of funds available to be withdrawn from the account, as determined by the financial institution Available balance may be cached and is not guaranteed to be up-to-date in realtime unless the value was returned by /financial_connections/balances. For accounts with credit features, the available funds generally equal the credit limit. Some institutions may not provide an available balance calculation. If this is the case, Fuse will return a null value for the available balance. To ensure you have the most accurate information, we recommend obtaining the current balance by using 'balance.available || balance.current'.
|
18
|
+
# The amount of funds available, in cents, to be withdrawn from the account, as determined by the financial institution. The format of this value is a double. Available balance may be cached and is not guaranteed to be up-to-date in realtime unless the value was returned by /financial_connections/balances. For accounts with credit features, the available funds generally equal the credit limit. Some institutions may not provide an available balance calculation. If this is the case, Fuse will return a null value for the available balance. To ensure you have the most accurate information, we recommend obtaining the current balance by using 'balance.available || balance.current'.
|
19
19
|
attr_accessor :available
|
20
20
|
|
21
|
-
# Amount without factoring in pending balances
|
21
|
+
# Amount without factoring in pending balances, in cents. The format of this value is a double.
|
22
22
|
attr_accessor :current
|
23
23
|
|
24
24
|
# The ISO-4217 currency code of the balance.
|
@@ -18,16 +18,16 @@ module FuseClient
|
|
18
18
|
# The remote account ID associated with this holding.
|
19
19
|
attr_accessor :remote_account_id
|
20
20
|
|
21
|
-
# The original total value of the holding when it was purchased.
|
21
|
+
# The original total value of the holding, in cents, when it was purchased. The format of this value is a double.
|
22
22
|
attr_accessor :cost_basis
|
23
23
|
|
24
|
-
# The current market value of the holding.
|
24
|
+
# The current market value of the holding, in cents. The format of this value is a double.
|
25
25
|
attr_accessor :value
|
26
26
|
|
27
27
|
# The number of units of the security held in this holding.
|
28
28
|
attr_accessor :quantity
|
29
29
|
|
30
|
-
# The price of the security as provided by the financial institution managing the holding.
|
30
|
+
# The price of the security, in cents, as provided by the financial institution managing the holding. The format of this value is a double.
|
31
31
|
attr_accessor :institution_price
|
32
32
|
|
33
33
|
attr_accessor :security
|