moneykit 0.1.10 → 0.1.11
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 +1 -1
- data/README.md +1 -1
- data/docs/AccessTokenApi.md +26 -21
- data/docs/AccountBalances.md +2 -2
- data/docs/AccountGroup.md +1 -1
- data/docs/AccountIdentity.md +2 -0
- data/docs/AccountImportData.md +26 -0
- data/docs/AccountResponse.md +28 -0
- data/docs/AccountWithAccountNumbersLegacy20230218.md +2 -0
- data/docs/Address.md +1 -1
- data/docs/AppClientResponse.md +2 -2
- data/docs/AppLinkStateChangedWebhook.md +36 -0
- data/docs/AppResponse.md +2 -2
- data/docs/Body.md +3 -3
- data/docs/CreateAccessTokenResponse.md +22 -0
- data/docs/CreateLinkSessionRequest.md +1 -1
- data/docs/CustomerUser.md +22 -0
- data/docs/CustomerUserEmail.md +20 -0
- data/docs/CustomerUserPhone.md +22 -0
- data/docs/Date.md +15 -0
- data/docs/Email.md +1 -1
- data/docs/GetAccountResponse.md +1 -1
- data/docs/GetAccountsResponse.md +1 -1
- data/docs/GetHoldingsResponse.md +1 -1
- data/docs/GetInvestmentTransactionsResponse.md +1 -1
- data/docs/GetTransactionsResponse.md +2 -2
- data/docs/GetUserTransactionsResponse.md +1 -1
- data/docs/ImportLinkRequest.md +26 -0
- data/docs/Institution.md +1 -1
- data/docs/LinkCommon.md +3 -3
- data/docs/LinkProductError.md +15 -0
- data/docs/LinkProductRefreshWebhook.md +2 -2
- data/docs/LinkProductResponse.md +28 -0
- data/docs/LinkProducts.md +7 -5
- data/docs/LinkResponse.md +3 -3
- data/docs/LinkSessionApi.md +1 -1
- data/docs/LinksApi.md +79 -9
- data/docs/PhoneNumber.md +1 -1
- data/docs/PublicLinkState.md +15 -0
- data/docs/Response401DeleteLinkLinksIdDelete.md +22 -0
- data/docs/Response401GetTransactionsSyncLinksIdTransactionsSyncGet.md +22 -0
- data/docs/Response401ImportLinkLinksImportPost.md +22 -0
- data/docs/ResponseHandleLinkWebhookEventRequestBodyWebhookPost.md +3 -3
- data/docs/TransactionCategoryResponse.md +20 -0
- data/docs/TransactionEnrichmentResponse.md +26 -0
- data/docs/TransactionImportData.md +28 -0
- data/docs/TransactionMerchantResponse.md +24 -0
- data/docs/TransactionProcessorResponse.md +24 -0
- data/docs/TransactionRecurrenceResponse.md +20 -0
- data/docs/TransactionResponse.md +42 -0
- data/docs/TransactionSubcategoryResponse.md +20 -0
- data/docs/TransactionSync.md +22 -0
- data/docs/TransactionSyncResponse.md +1 -1
- data/docs/TransactionUpdatesAvailableWebhook.md +4 -2
- data/docs/TransactionsApi.md +15 -15
- data/docs/TransactionsLinkProduct.md +1 -1
- data/lib/moneykit/api/access_token_api.rb +19 -16
- data/lib/moneykit/api/links_api.rb +75 -7
- data/lib/moneykit/api/transactions_api.rb +17 -17
- data/lib/moneykit/models/account_balances.rb +2 -30
- data/lib/moneykit/models/account_group.rb +1 -1
- data/lib/moneykit/models/account_identity.rb +11 -1
- data/lib/moneykit/models/account_import_data.rb +280 -0
- data/lib/moneykit/models/account_response.rb +290 -0
- data/lib/moneykit/models/account_with_account_numbers_legacy20230218.rb +11 -1
- data/lib/moneykit/models/address.rb +0 -2
- data/lib/moneykit/models/app_client_response.rb +1 -1
- data/lib/moneykit/models/app_link_state_changed_webhook.rb +394 -0
- data/lib/moneykit/models/body.rb +1 -1
- data/lib/moneykit/models/create_access_token_response.rb +255 -0
- data/lib/moneykit/models/create_link_session_request.rb +1 -1
- data/lib/moneykit/models/customer_user.rb +266 -0
- data/lib/moneykit/models/customer_user_email.rb +258 -0
- data/lib/moneykit/models/customer_user_phone.rb +289 -0
- data/lib/moneykit/models/date.rb +104 -0
- data/lib/moneykit/models/email.rb +0 -2
- data/lib/moneykit/models/get_account_response.rb +1 -1
- data/lib/moneykit/models/get_accounts_response.rb +1 -1
- data/lib/moneykit/models/get_holdings_response.rb +1 -1
- data/lib/moneykit/models/get_investment_transactions_response.rb +1 -1
- data/lib/moneykit/models/get_transactions_response.rb +2 -2
- data/lib/moneykit/models/get_user_transactions_response.rb +1 -1
- data/lib/moneykit/models/import_link_request.rb +303 -0
- data/lib/moneykit/models/institution.rb +0 -7
- data/lib/moneykit/models/link_common.rb +3 -3
- data/lib/moneykit/models/link_product_error.rb +46 -0
- data/lib/moneykit/models/link_product_refresh_webhook.rb +24 -24
- data/lib/moneykit/models/link_product_response.rb +283 -0
- data/lib/moneykit/models/link_product_state.rb +3 -1
- data/lib/moneykit/models/link_products.rb +16 -7
- data/lib/moneykit/models/link_response.rb +3 -3
- data/lib/moneykit/models/phone_number.rb +0 -2
- data/lib/moneykit/models/product.rb +2 -1
- data/lib/moneykit/models/provider.rb +1 -2
- data/lib/moneykit/models/public_link_error.rb +1 -1
- data/lib/moneykit/models/public_link_state.rb +43 -0
- data/lib/moneykit/models/response401_delete_link_links_id_delete.rb +104 -0
- data/lib/moneykit/models/response401_get_transactions_sync_links_id_transactions_sync_get.rb +104 -0
- data/lib/moneykit/models/response401_import_link_links_import_post.rb +103 -0
- data/lib/moneykit/models/response_handle_link_webhook_event_request_body_webhook_post.rb +1 -1
- data/lib/moneykit/models/transaction_category_response.rb +230 -0
- data/lib/moneykit/models/transaction_enrichment_response.rb +255 -0
- data/lib/moneykit/models/transaction_import_data.rb +283 -0
- data/lib/moneykit/models/transaction_merchant_response.rb +243 -0
- data/lib/moneykit/models/transaction_processor_response.rb +243 -0
- data/lib/moneykit/models/transaction_recurrence_response.rb +223 -0
- data/lib/moneykit/models/transaction_response.rb +402 -0
- data/lib/moneykit/models/transaction_subcategory_response.rb +230 -0
- data/lib/moneykit/models/transaction_sync.rb +257 -0
- data/lib/moneykit/models/transaction_sync_response.rb +1 -1
- data/lib/moneykit/models/transaction_updates_available_webhook.rb +42 -24
- data/lib/moneykit/models/transactions_link_product.rb +1 -1
- data/lib/moneykit/version.rb +1 -1
- data/lib/moneykit.rb +25 -16
- data/spec/models/account_import_data_spec.rb +60 -0
- data/spec/models/account_response_spec.rb +66 -0
- data/spec/models/app_link_state_changed_webhook_spec.rb +102 -0
- data/spec/models/create_access_token_response_spec.rb +48 -0
- data/spec/models/customer_user_email_spec.rb +42 -0
- data/spec/models/customer_user_phone_spec.rb +48 -0
- data/spec/models/customer_user_spec.rb +48 -0
- data/spec/models/date_spec.rb +21 -0
- data/spec/models/import_link_request_spec.rb +60 -0
- data/spec/models/link_product_error_spec.rb +30 -0
- data/spec/models/link_product_response_spec.rb +66 -0
- data/spec/models/public_link_error_spec.rb +30 -0
- data/spec/models/public_link_state_spec.rb +30 -0
- data/spec/models/response401_delete_link_links_id_delete_spec.rb +21 -0
- data/spec/models/response401_get_transactions_sync_links_id_transactions_sync_get_spec.rb +21 -0
- data/spec/models/response401_import_link_links_import_post_spec.rb +21 -0
- data/spec/models/transaction_category_response_spec.rb +42 -0
- data/spec/models/transaction_enrichment_response_spec.rb +60 -0
- data/spec/models/transaction_import_data_spec.rb +66 -0
- data/spec/models/transaction_merchant_response_spec.rb +54 -0
- data/spec/models/transaction_processor_response_spec.rb +54 -0
- data/spec/models/transaction_recurrence_response_spec.rb +42 -0
- data/spec/models/transaction_response_spec.rb +108 -0
- data/spec/models/transaction_subcategory_response_spec.rb +42 -0
- data/spec/models/transaction_sync_spec.rb +48 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.1.1.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.1.1.1/mkmf.log +2 -2
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.7.3/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.1.0/gem_make.out +5 -5
- metadata +219 -121
@@ -0,0 +1,257 @@
|
|
1
|
+
=begin
|
2
|
+
#MoneyKit API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.1.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module MoneyKit
|
17
|
+
class TransactionSync
|
18
|
+
attr_accessor :created
|
19
|
+
|
20
|
+
attr_accessor :updated
|
21
|
+
|
22
|
+
attr_accessor :removed
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'created' => :'created',
|
28
|
+
:'updated' => :'updated',
|
29
|
+
:'removed' => :'removed'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
attribute_map.values
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'created' => :'Array<TransactionResponse>',
|
42
|
+
:'updated' => :'Array<TransactionResponse>',
|
43
|
+
:'removed' => :'Array<String>'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# List of attributes with nullable: true
|
48
|
+
def self.openapi_nullable
|
49
|
+
Set.new([
|
50
|
+
])
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
55
|
+
def initialize(attributes = {})
|
56
|
+
if (!attributes.is_a?(Hash))
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::TransactionSync` initialize method"
|
58
|
+
end
|
59
|
+
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::TransactionSync`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
64
|
+
end
|
65
|
+
h[k.to_sym] = v
|
66
|
+
}
|
67
|
+
|
68
|
+
if attributes.key?(:'created')
|
69
|
+
if (value = attributes[:'created']).is_a?(Array)
|
70
|
+
self.created = value
|
71
|
+
end
|
72
|
+
else
|
73
|
+
self.created = nil
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'updated')
|
77
|
+
if (value = attributes[:'updated']).is_a?(Array)
|
78
|
+
self.updated = value
|
79
|
+
end
|
80
|
+
else
|
81
|
+
self.updated = nil
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'removed')
|
85
|
+
if (value = attributes[:'removed']).is_a?(Array)
|
86
|
+
self.removed = value
|
87
|
+
end
|
88
|
+
else
|
89
|
+
self.removed = nil
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
94
|
+
# @return Array for valid properties with the reasons
|
95
|
+
def list_invalid_properties
|
96
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
97
|
+
invalid_properties = Array.new
|
98
|
+
if @created.nil?
|
99
|
+
invalid_properties.push('invalid value for "created", created cannot be nil.')
|
100
|
+
end
|
101
|
+
|
102
|
+
if @updated.nil?
|
103
|
+
invalid_properties.push('invalid value for "updated", updated cannot be nil.')
|
104
|
+
end
|
105
|
+
|
106
|
+
if @removed.nil?
|
107
|
+
invalid_properties.push('invalid value for "removed", removed cannot be nil.')
|
108
|
+
end
|
109
|
+
|
110
|
+
invalid_properties
|
111
|
+
end
|
112
|
+
|
113
|
+
# Check to see if the all the properties in the model are valid
|
114
|
+
# @return true if the model is valid
|
115
|
+
def valid?
|
116
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
117
|
+
return false if @created.nil?
|
118
|
+
return false if @updated.nil?
|
119
|
+
return false if @removed.nil?
|
120
|
+
true
|
121
|
+
end
|
122
|
+
|
123
|
+
# Checks equality by comparing each attribute.
|
124
|
+
# @param [Object] Object to be compared
|
125
|
+
def ==(o)
|
126
|
+
return true if self.equal?(o)
|
127
|
+
self.class == o.class &&
|
128
|
+
created == o.created &&
|
129
|
+
updated == o.updated &&
|
130
|
+
removed == o.removed
|
131
|
+
end
|
132
|
+
|
133
|
+
# @see the `==` method
|
134
|
+
# @param [Object] Object to be compared
|
135
|
+
def eql?(o)
|
136
|
+
self == o
|
137
|
+
end
|
138
|
+
|
139
|
+
# Calculates hash code according to all attributes.
|
140
|
+
# @return [Integer] Hash code
|
141
|
+
def hash
|
142
|
+
[created, updated, removed].hash
|
143
|
+
end
|
144
|
+
|
145
|
+
# Builds the object from hash
|
146
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
147
|
+
# @return [Object] Returns the model itself
|
148
|
+
def self.build_from_hash(attributes)
|
149
|
+
return nil unless attributes.is_a?(Hash)
|
150
|
+
attributes = attributes.transform_keys(&:to_sym)
|
151
|
+
transformed_hash = {}
|
152
|
+
openapi_types.each_pair do |key, type|
|
153
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
154
|
+
transformed_hash["#{key}"] = nil
|
155
|
+
elsif type =~ /\AArray<(.*)>/i
|
156
|
+
# check to ensure the input is an array given that the attribute
|
157
|
+
# is documented as an array but the input is not
|
158
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
159
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
160
|
+
end
|
161
|
+
elsif !attributes[attribute_map[key]].nil?
|
162
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
163
|
+
end
|
164
|
+
end
|
165
|
+
new(transformed_hash)
|
166
|
+
end
|
167
|
+
|
168
|
+
# Deserializes the data based on type
|
169
|
+
# @param string type Data type
|
170
|
+
# @param string value Value to be deserialized
|
171
|
+
# @return [Object] Deserialized data
|
172
|
+
def self._deserialize(type, value)
|
173
|
+
case type.to_sym
|
174
|
+
when :Time
|
175
|
+
Time.parse(value)
|
176
|
+
when :Date
|
177
|
+
Date.parse(value)
|
178
|
+
when :String
|
179
|
+
value.to_s
|
180
|
+
when :Integer
|
181
|
+
value.to_i
|
182
|
+
when :Float
|
183
|
+
value.to_f
|
184
|
+
when :Boolean
|
185
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
186
|
+
true
|
187
|
+
else
|
188
|
+
false
|
189
|
+
end
|
190
|
+
when :Object
|
191
|
+
# generic object (usually a Hash), return directly
|
192
|
+
value
|
193
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
194
|
+
inner_type = Regexp.last_match[:inner_type]
|
195
|
+
value.map { |v| _deserialize(inner_type, v) }
|
196
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
197
|
+
k_type = Regexp.last_match[:k_type]
|
198
|
+
v_type = Regexp.last_match[:v_type]
|
199
|
+
{}.tap do |hash|
|
200
|
+
value.each do |k, v|
|
201
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
else # model
|
205
|
+
# models (e.g. Pet) or oneOf
|
206
|
+
klass = MoneyKit.const_get(type)
|
207
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
# Returns the string representation of the object
|
212
|
+
# @return [String] String presentation of the object
|
213
|
+
def to_s
|
214
|
+
to_hash.to_s
|
215
|
+
end
|
216
|
+
|
217
|
+
# to_body is an alias to to_hash (backward compatibility)
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
219
|
+
def to_body
|
220
|
+
to_hash
|
221
|
+
end
|
222
|
+
|
223
|
+
# Returns the object in the form of hash
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
225
|
+
def to_hash
|
226
|
+
hash = {}
|
227
|
+
self.class.attribute_map.each_pair do |attr, param|
|
228
|
+
value = self.send(attr)
|
229
|
+
if value.nil?
|
230
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
231
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
232
|
+
end
|
233
|
+
|
234
|
+
hash[param] = _to_hash(value)
|
235
|
+
end
|
236
|
+
hash
|
237
|
+
end
|
238
|
+
|
239
|
+
# Outputs non-array value in the form of hash
|
240
|
+
# For object, use to_hash. Otherwise, just return the value
|
241
|
+
# @param [Object] value Any valid value
|
242
|
+
# @return [Hash] Returns the value in the form of hash
|
243
|
+
def _to_hash(value)
|
244
|
+
if value.is_a?(Array)
|
245
|
+
value.compact.map { |v| _to_hash(v) }
|
246
|
+
elsif value.is_a?(Hash)
|
247
|
+
{}.tap do |hash|
|
248
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
249
|
+
end
|
250
|
+
elsif value.respond_to? :to_hash
|
251
|
+
value.to_hash
|
252
|
+
else
|
253
|
+
value
|
254
|
+
end
|
255
|
+
end
|
256
|
+
end
|
257
|
+
end
|
@@ -15,8 +15,6 @@ require 'time'
|
|
15
15
|
|
16
16
|
module MoneyKit
|
17
17
|
class TransactionUpdatesAvailableWebhook
|
18
|
-
attr_accessor :webhook_event
|
19
|
-
|
20
18
|
attr_accessor :webhook_major_version
|
21
19
|
|
22
20
|
attr_accessor :webhook_minor_version
|
@@ -27,6 +25,10 @@ module MoneyKit
|
|
27
25
|
|
28
26
|
attr_accessor :link_id
|
29
27
|
|
28
|
+
attr_accessor :link_tags
|
29
|
+
|
30
|
+
attr_accessor :webhook_event
|
31
|
+
|
30
32
|
attr_accessor :has_history
|
31
33
|
|
32
34
|
class EnumAttributeValidator
|
@@ -54,12 +56,13 @@ module MoneyKit
|
|
54
56
|
# Attribute mapping from ruby-style variable name to JSON key.
|
55
57
|
def self.attribute_map
|
56
58
|
{
|
57
|
-
:'webhook_event' => :'webhook_event',
|
58
59
|
:'webhook_major_version' => :'webhook_major_version',
|
59
60
|
:'webhook_minor_version' => :'webhook_minor_version',
|
60
61
|
:'webhook_idempotency_key' => :'webhook_idempotency_key',
|
61
62
|
:'webhook_timestamp' => :'webhook_timestamp',
|
62
63
|
:'link_id' => :'link_id',
|
64
|
+
:'link_tags' => :'link_tags',
|
65
|
+
:'webhook_event' => :'webhook_event',
|
63
66
|
:'has_history' => :'has_history'
|
64
67
|
}
|
65
68
|
end
|
@@ -72,12 +75,13 @@ module MoneyKit
|
|
72
75
|
# Attribute type mapping.
|
73
76
|
def self.openapi_types
|
74
77
|
{
|
75
|
-
:'webhook_event' => :'String',
|
76
78
|
:'webhook_major_version' => :'Integer',
|
77
79
|
:'webhook_minor_version' => :'Integer',
|
78
80
|
:'webhook_idempotency_key' => :'String',
|
79
81
|
:'webhook_timestamp' => :'Time',
|
80
82
|
:'link_id' => :'String',
|
83
|
+
:'link_tags' => :'Array<String>',
|
84
|
+
:'webhook_event' => :'String',
|
81
85
|
:'has_history' => :'Boolean'
|
82
86
|
}
|
83
87
|
end
|
@@ -103,12 +107,6 @@ module MoneyKit
|
|
103
107
|
h[k.to_sym] = v
|
104
108
|
}
|
105
109
|
|
106
|
-
if attributes.key?(:'webhook_event')
|
107
|
-
self.webhook_event = attributes[:'webhook_event']
|
108
|
-
else
|
109
|
-
self.webhook_event = 'transactions.updates_available'
|
110
|
-
end
|
111
|
-
|
112
110
|
if attributes.key?(:'webhook_major_version')
|
113
111
|
self.webhook_major_version = attributes[:'webhook_major_version']
|
114
112
|
else
|
@@ -139,6 +137,20 @@ module MoneyKit
|
|
139
137
|
self.link_id = nil
|
140
138
|
end
|
141
139
|
|
140
|
+
if attributes.key?(:'link_tags')
|
141
|
+
if (value = attributes[:'link_tags']).is_a?(Array)
|
142
|
+
self.link_tags = value
|
143
|
+
end
|
144
|
+
else
|
145
|
+
self.link_tags = nil
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'webhook_event')
|
149
|
+
self.webhook_event = attributes[:'webhook_event']
|
150
|
+
else
|
151
|
+
self.webhook_event = 'transactions.updates_available'
|
152
|
+
end
|
153
|
+
|
142
154
|
if attributes.key?(:'has_history')
|
143
155
|
self.has_history = attributes[:'has_history']
|
144
156
|
else
|
@@ -163,6 +175,10 @@ module MoneyKit
|
|
163
175
|
invalid_properties.push('invalid value for "link_id", link_id cannot be nil.')
|
164
176
|
end
|
165
177
|
|
178
|
+
if @link_tags.nil?
|
179
|
+
invalid_properties.push('invalid value for "link_tags", link_tags cannot be nil.')
|
180
|
+
end
|
181
|
+
|
166
182
|
if @has_history.nil?
|
167
183
|
invalid_properties.push('invalid value for "has_history", has_history cannot be nil.')
|
168
184
|
end
|
@@ -174,8 +190,6 @@ module MoneyKit
|
|
174
190
|
# @return true if the model is valid
|
175
191
|
def valid?
|
176
192
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
177
|
-
webhook_event_validator = EnumAttributeValidator.new('String', ["transactions.updates_available"])
|
178
|
-
return false unless webhook_event_validator.valid?(@webhook_event)
|
179
193
|
webhook_major_version_validator = EnumAttributeValidator.new('Integer', [1])
|
180
194
|
return false unless webhook_major_version_validator.valid?(@webhook_major_version)
|
181
195
|
webhook_minor_version_validator = EnumAttributeValidator.new('Integer', [0])
|
@@ -183,20 +197,13 @@ module MoneyKit
|
|
183
197
|
return false if @webhook_idempotency_key.nil?
|
184
198
|
return false if @webhook_timestamp.nil?
|
185
199
|
return false if @link_id.nil?
|
200
|
+
return false if @link_tags.nil?
|
201
|
+
webhook_event_validator = EnumAttributeValidator.new('String', ["transactions.updates_available"])
|
202
|
+
return false unless webhook_event_validator.valid?(@webhook_event)
|
186
203
|
return false if @has_history.nil?
|
187
204
|
true
|
188
205
|
end
|
189
206
|
|
190
|
-
# Custom attribute writer method checking allowed values (enum).
|
191
|
-
# @param [Object] webhook_event Object to be assigned
|
192
|
-
def webhook_event=(webhook_event)
|
193
|
-
validator = EnumAttributeValidator.new('String', ["transactions.updates_available"])
|
194
|
-
unless validator.valid?(webhook_event)
|
195
|
-
fail ArgumentError, "invalid value for \"webhook_event\", must be one of #{validator.allowable_values}."
|
196
|
-
end
|
197
|
-
@webhook_event = webhook_event
|
198
|
-
end
|
199
|
-
|
200
207
|
# Custom attribute writer method checking allowed values (enum).
|
201
208
|
# @param [Object] webhook_major_version Object to be assigned
|
202
209
|
def webhook_major_version=(webhook_major_version)
|
@@ -217,17 +224,28 @@ module MoneyKit
|
|
217
224
|
@webhook_minor_version = webhook_minor_version
|
218
225
|
end
|
219
226
|
|
227
|
+
# Custom attribute writer method checking allowed values (enum).
|
228
|
+
# @param [Object] webhook_event Object to be assigned
|
229
|
+
def webhook_event=(webhook_event)
|
230
|
+
validator = EnumAttributeValidator.new('String', ["transactions.updates_available"])
|
231
|
+
unless validator.valid?(webhook_event)
|
232
|
+
fail ArgumentError, "invalid value for \"webhook_event\", must be one of #{validator.allowable_values}."
|
233
|
+
end
|
234
|
+
@webhook_event = webhook_event
|
235
|
+
end
|
236
|
+
|
220
237
|
# Checks equality by comparing each attribute.
|
221
238
|
# @param [Object] Object to be compared
|
222
239
|
def ==(o)
|
223
240
|
return true if self.equal?(o)
|
224
241
|
self.class == o.class &&
|
225
|
-
webhook_event == o.webhook_event &&
|
226
242
|
webhook_major_version == o.webhook_major_version &&
|
227
243
|
webhook_minor_version == o.webhook_minor_version &&
|
228
244
|
webhook_idempotency_key == o.webhook_idempotency_key &&
|
229
245
|
webhook_timestamp == o.webhook_timestamp &&
|
230
246
|
link_id == o.link_id &&
|
247
|
+
link_tags == o.link_tags &&
|
248
|
+
webhook_event == o.webhook_event &&
|
231
249
|
has_history == o.has_history
|
232
250
|
end
|
233
251
|
|
@@ -240,7 +258,7 @@ module MoneyKit
|
|
240
258
|
# Calculates hash code according to all attributes.
|
241
259
|
# @return [Integer] Hash code
|
242
260
|
def hash
|
243
|
-
[
|
261
|
+
[webhook_major_version, webhook_minor_version, webhook_idempotency_key, webhook_timestamp, link_id, link_tags, webhook_event, has_history].hash
|
244
262
|
end
|
245
263
|
|
246
264
|
# Builds the object from hash
|
@@ -79,7 +79,7 @@ module MoneyKit
|
|
79
79
|
{
|
80
80
|
:'refreshed_at' => :'Time',
|
81
81
|
:'last_attempted_at' => :'Time',
|
82
|
-
:'error_code' => :'
|
82
|
+
:'error_code' => :'LinkProductError',
|
83
83
|
:'error_message' => :'String',
|
84
84
|
:'unavailable' => :'String',
|
85
85
|
:'settings' => :'TransactionsProductSettings',
|
data/lib/moneykit/version.rb
CHANGED
data/lib/moneykit.rb
CHANGED
@@ -20,29 +20,34 @@ require 'moneykit/configuration'
|
|
20
20
|
require 'moneykit/models/api_error_auth_expired_access_token_response'
|
21
21
|
require 'moneykit/models/api_error_auth_unauthorized_response'
|
22
22
|
require 'moneykit/models/api_error_rate_limit_exceeded_response'
|
23
|
-
require 'moneykit/models/account'
|
24
23
|
require 'moneykit/models/account_balances'
|
25
24
|
require 'moneykit/models/account_group'
|
26
25
|
require 'moneykit/models/account_identity'
|
26
|
+
require 'moneykit/models/account_import_data'
|
27
27
|
require 'moneykit/models/account_numbers_legacy20230218'
|
28
|
+
require 'moneykit/models/account_response'
|
28
29
|
require 'moneykit/models/account_with_account_numbers_legacy20230218'
|
29
30
|
require 'moneykit/models/ach_number'
|
30
31
|
require 'moneykit/models/address'
|
31
32
|
require 'moneykit/models/app_client_response'
|
33
|
+
require 'moneykit/models/app_link_state_changed_webhook'
|
32
34
|
require 'moneykit/models/app_response'
|
33
35
|
require 'moneykit/models/bacs_number'
|
34
36
|
require 'moneykit/models/basic_account_details'
|
35
37
|
require 'moneykit/models/body'
|
36
38
|
require 'moneykit/models/country'
|
39
|
+
require 'moneykit/models/create_access_token_response'
|
37
40
|
require 'moneykit/models/create_link_session_request'
|
38
41
|
require 'moneykit/models/create_link_session_response'
|
39
|
-
require 'moneykit/models/currency'
|
40
42
|
require 'moneykit/models/cursor_pagination'
|
43
|
+
require 'moneykit/models/customer_user'
|
44
|
+
require 'moneykit/models/customer_user_email'
|
45
|
+
require 'moneykit/models/customer_user_phone'
|
46
|
+
require 'moneykit/models/date'
|
41
47
|
require 'moneykit/models/eft_number'
|
42
48
|
require 'moneykit/models/email'
|
43
49
|
require 'moneykit/models/exchange_token_request'
|
44
50
|
require 'moneykit/models/exchange_token_response'
|
45
|
-
require 'moneykit/models/generate_access_token_response'
|
46
51
|
require 'moneykit/models/get_account_numbers_response_legacy20230218'
|
47
52
|
require 'moneykit/models/get_account_response'
|
48
53
|
require 'moneykit/models/get_accounts_response'
|
@@ -56,13 +61,13 @@ require 'moneykit/models/get_user_transactions_response'
|
|
56
61
|
require 'moneykit/models/http_validation_error'
|
57
62
|
require 'moneykit/models/holding_response'
|
58
63
|
require 'moneykit/models/identity_response'
|
64
|
+
require 'moneykit/models/import_link_request'
|
59
65
|
require 'moneykit/models/institution'
|
60
66
|
require 'moneykit/models/institution_error_not_found_response'
|
61
67
|
require 'moneykit/models/international_number'
|
62
68
|
require 'moneykit/models/investment_transaction_response'
|
63
69
|
require 'moneykit/models/jwk_set'
|
64
70
|
require 'moneykit/models/link_common'
|
65
|
-
require 'moneykit/models/link_error'
|
66
71
|
require 'moneykit/models/link_error_bad_config_response'
|
67
72
|
require 'moneykit/models/link_error_bad_state_response'
|
68
73
|
require 'moneykit/models/link_error_deleted_response'
|
@@ -70,20 +75,15 @@ require 'moneykit/models/link_error_forbidden_action_response'
|
|
70
75
|
require 'moneykit/models/link_error_not_found_response'
|
71
76
|
require 'moneykit/models/link_error_unauthorized_access_response'
|
72
77
|
require 'moneykit/models/link_permissions'
|
73
|
-
require 'moneykit/models/
|
74
|
-
require 'moneykit/models/link_product_failure_reasons'
|
78
|
+
require 'moneykit/models/link_product_error'
|
75
79
|
require 'moneykit/models/link_product_refresh_webhook'
|
80
|
+
require 'moneykit/models/link_product_response'
|
76
81
|
require 'moneykit/models/link_product_state'
|
77
82
|
require 'moneykit/models/link_products'
|
78
83
|
require 'moneykit/models/link_response'
|
79
|
-
require 'moneykit/models/link_session_customer_user'
|
80
|
-
require 'moneykit/models/link_session_customer_user_email'
|
81
|
-
require 'moneykit/models/link_session_customer_user_phone'
|
82
84
|
require 'moneykit/models/link_session_error_forbidden_config_response'
|
83
85
|
require 'moneykit/models/link_session_error_invalid_token_exchange'
|
84
86
|
require 'moneykit/models/link_session_setting_overrides'
|
85
|
-
require 'moneykit/models/link_state'
|
86
|
-
require 'moneykit/models/link_state_changed_webhook'
|
87
87
|
require 'moneykit/models/money_kit_connect_features'
|
88
88
|
require 'moneykit/models/owner'
|
89
89
|
require 'moneykit/models/phone_number'
|
@@ -92,9 +92,11 @@ require 'moneykit/models/product'
|
|
92
92
|
require 'moneykit/models/product_settings'
|
93
93
|
require 'moneykit/models/products_settings'
|
94
94
|
require 'moneykit/models/provider'
|
95
|
+
require 'moneykit/models/public_link_error'
|
96
|
+
require 'moneykit/models/public_link_state'
|
95
97
|
require 'moneykit/models/refresh_products_request'
|
96
98
|
require 'moneykit/models/requested_link_permission'
|
97
|
-
require 'moneykit/models/
|
99
|
+
require 'moneykit/models/response401_delete_link_links_id_delete'
|
98
100
|
require 'moneykit/models/response401_exchange_token_link_session_exchange_token_post'
|
99
101
|
require 'moneykit/models/response401_get_account_links_id_accounts_account_id_get'
|
100
102
|
require 'moneykit/models/response401_get_account_numbers'
|
@@ -106,11 +108,11 @@ require 'moneykit/models/response401_get_institutions_institutions_get'
|
|
106
108
|
require 'moneykit/models/response401_get_investment_transactions_links_id_investments_transactions_get'
|
107
109
|
require 'moneykit/models/response401_get_link_links_id_get'
|
108
110
|
require 'moneykit/models/response401_get_transactions'
|
109
|
-
require 'moneykit/models/
|
111
|
+
require 'moneykit/models/response401_get_transactions_sync_links_id_transactions_sync_get'
|
110
112
|
require 'moneykit/models/response401_get_user_accounts_users_id_accounts_get'
|
111
113
|
require 'moneykit/models/response401_get_user_links_users_id_links_get'
|
112
114
|
require 'moneykit/models/response401_get_user_transactions'
|
113
|
-
require 'moneykit/models/
|
115
|
+
require 'moneykit/models/response401_import_link_links_import_post'
|
114
116
|
require 'moneykit/models/response401_instrospect_client_auth_introspect_get'
|
115
117
|
require 'moneykit/models/response401_refresh_products_links_id_products_post'
|
116
118
|
require 'moneykit/models/response401_reset_login_links_id_reset_post'
|
@@ -118,8 +120,15 @@ require 'moneykit/models/response401_trigger_test_link_webhook_event_webhooks_te
|
|
118
120
|
require 'moneykit/models/response401_update_link_links_id_patch'
|
119
121
|
require 'moneykit/models/response_handle_link_webhook_event_request_body_webhook_post'
|
120
122
|
require 'moneykit/models/security_response'
|
121
|
-
require 'moneykit/models/
|
122
|
-
require 'moneykit/models/
|
123
|
+
require 'moneykit/models/transaction_category_response'
|
124
|
+
require 'moneykit/models/transaction_enrichment_response'
|
125
|
+
require 'moneykit/models/transaction_import_data'
|
126
|
+
require 'moneykit/models/transaction_merchant_response'
|
127
|
+
require 'moneykit/models/transaction_processor_response'
|
128
|
+
require 'moneykit/models/transaction_recurrence_response'
|
129
|
+
require 'moneykit/models/transaction_response'
|
130
|
+
require 'moneykit/models/transaction_subcategory_response'
|
131
|
+
require 'moneykit/models/transaction_sync'
|
123
132
|
require 'moneykit/models/transaction_sync_response'
|
124
133
|
require 'moneykit/models/transaction_type'
|
125
134
|
require 'moneykit/models/transaction_type_filter'
|
@@ -0,0 +1,60 @@
|
|
1
|
+
=begin
|
2
|
+
#MoneyKit API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2023-02-18
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.1.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for MoneyKit::AccountImportData
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe MoneyKit::AccountImportData do
|
21
|
+
let(:instance) { MoneyKit::AccountImportData.new }
|
22
|
+
|
23
|
+
describe 'test an instance of AccountImportData' do
|
24
|
+
it 'should create an instance of AccountImportData' do
|
25
|
+
# uncomment below to test the instance creation
|
26
|
+
# expect(instance).to be_instance_of(MoneyKit::AccountImportData)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test attribute "account_id"' do
|
31
|
+
it 'should work' do
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe 'test attribute "name"' do
|
37
|
+
it 'should work' do
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
describe 'test attribute "type"' do
|
43
|
+
it 'should work' do
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
describe 'test attribute "mask"' do
|
49
|
+
it 'should work' do
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe 'test attribute "balances"' do
|
55
|
+
it 'should work' do
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|