moneykit 0.0.3 → 0.0.5
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/README.md +2 -2
- data/lib/moneykit/api/access_token_api.rb +9 -9
- data/lib/moneykit/api/account_numbers_api.rb +6 -6
- data/lib/moneykit/api/accounts_api.rb +15 -15
- data/lib/moneykit/api/identity_api.rb +6 -6
- data/lib/moneykit/api/institutions_api.rb +7 -7
- data/lib/moneykit/api/link_session_api.rb +7 -7
- data/lib/moneykit/api/links_api.rb +76 -13
- data/lib/moneykit/api/products_api.rb +6 -6
- data/lib/moneykit/api/transactions_api.rb +28 -28
- data/lib/moneykit/api/users_api.rb +14 -14
- data/lib/moneykit/api/webhooks_api.rb +97 -0
- data/lib/moneykit/api_client.rb +40 -36
- data/lib/moneykit/api_error.rb +1 -1
- data/lib/moneykit/configuration.rb +20 -30
- data/lib/moneykit/models/account.rb +27 -54
- data/lib/moneykit/models/account_balances.rb +18 -27
- data/lib/moneykit/models/account_group.rb +23 -26
- data/lib/moneykit/models/account_identity.rb +34 -59
- data/lib/moneykit/models/account_numbers.rb +75 -51
- data/lib/moneykit/models/account_numbers_link_product.rb +18 -28
- data/lib/moneykit/models/account_numbers_product_settings.rb +16 -21
- data/lib/moneykit/models/account_with_account_numbers.rb +29 -56
- data/lib/moneykit/models/accounts_link_product.rb +17 -25
- data/lib/moneykit/models/ach_number.rb +19 -26
- data/lib/moneykit/models/address.rb +17 -28
- data/lib/moneykit/models/api_error_auth_expired_access_token_response.rb +17 -24
- data/lib/moneykit/models/api_error_auth_unauthorized_response.rb +18 -25
- data/lib/moneykit/models/api_error_rate_limit_exceeded_response.rb +17 -24
- data/lib/moneykit/models/bacs_number.rb +18 -25
- data/lib/moneykit/models/basic_account_details.rb +20 -29
- data/lib/moneykit/models/country.rb +1 -1
- data/lib/moneykit/models/create_link_session_request.rb +48 -45
- data/lib/moneykit/models/create_link_session_response.rb +17 -24
- data/lib/moneykit/models/currency.rb +1 -1
- data/lib/moneykit/models/cursor_pagination.rb +17 -24
- data/lib/moneykit/models/customer_app.rb +18 -25
- data/lib/moneykit/models/eft_number.rb +19 -26
- data/lib/moneykit/models/email.rb +17 -22
- data/lib/moneykit/models/exchange_token_request.rb +17 -24
- data/lib/moneykit/models/exchange_token_response.rb +19 -26
- data/lib/moneykit/models/generate_access_token_response.rb +19 -26
- data/lib/moneykit/models/get_account_numbers_response.rb +23 -26
- data/lib/moneykit/models/get_account_response.rb +19 -26
- data/lib/moneykit/models/get_accounts_response.rb +25 -31
- data/lib/moneykit/models/get_institutions_response.rb +25 -31
- data/lib/moneykit/models/get_transactions_response.rb +34 -39
- data/lib/moneykit/models/get_user_accounts_response.rb +24 -32
- data/lib/moneykit/models/get_user_links_response.rb +24 -32
- data/lib/moneykit/models/get_user_transactions_response.rb +32 -34
- data/lib/moneykit/models/http_validation_error.rb +24 -28
- data/lib/moneykit/models/identity_link_product.rb +18 -28
- data/lib/moneykit/models/identity_product_settings.rb +16 -21
- data/lib/moneykit/models/identity_response.rb +24 -30
- data/lib/moneykit/models/institution.rb +29 -38
- data/lib/moneykit/models/institution_error_not_found_response.rb +17 -24
- data/lib/moneykit/models/international_number.rb +18 -25
- data/lib/moneykit/models/introspect_client_response.rb +22 -29
- data/lib/moneykit/models/jwk_set.rb +23 -26
- data/lib/moneykit/models/link_common.rb +25 -39
- data/lib/moneykit/models/link_error_bad_config_response.rb +269 -0
- data/lib/moneykit/models/link_error_bad_state_response.rb +19 -28
- data/lib/moneykit/models/link_error_deleted_response.rb +17 -24
- data/lib/moneykit/models/link_error_forbidden_action_response.rb +18 -25
- data/lib/moneykit/models/link_error_not_found_response.rb +17 -24
- data/lib/moneykit/models/link_error_unauthorized_access_response.rb +17 -24
- data/lib/moneykit/models/link_permission_scope.rb +1 -1
- data/lib/moneykit/models/link_permissions.rb +23 -33
- data/lib/moneykit/models/link_products.rb +16 -21
- data/lib/moneykit/models/link_response.rb +26 -39
- data/lib/moneykit/models/link_session_customer_user.rb +20 -28
- data/lib/moneykit/models/link_session_customer_user_email.rb +18 -25
- data/lib/moneykit/models/link_session_customer_user_phone.rb +18 -26
- data/lib/moneykit/models/link_session_error_forbidden_config_response.rb +18 -25
- data/lib/moneykit/models/link_session_error_invalid_token_exchange.rb +18 -25
- data/lib/moneykit/models/link_session_setting_overrides.rb +19 -43
- data/lib/moneykit/models/link_state.rb +1 -1
- data/lib/moneykit/models/link_state_changed_webhook.rb +28 -31
- data/lib/moneykit/models/money_link_features.rb +27 -32
- data/lib/moneykit/models/owner.rb +42 -42
- data/lib/moneykit/models/phone_number.rb +18 -25
- data/lib/moneykit/models/phone_number_type.rb +1 -1
- data/lib/moneykit/models/product.rb +1 -1
- data/lib/moneykit/models/products_settings.rb +19 -24
- data/lib/moneykit/models/provider.rb +4 -2
- data/lib/moneykit/models/public_link_error.rb +43 -0
- data/lib/moneykit/models/refresh_products_request.rb +23 -34
- data/lib/moneykit/models/requested_link_permission.rb +19 -26
- data/lib/moneykit/models/response401_disconnect_links_id_delete.rb +75 -269
- data/lib/moneykit/models/response401_exchange_token_link_session_exchange_token_post.rb +74 -267
- data/lib/moneykit/models/response401_get_account_links_id_accounts_account_id_get.rb +75 -269
- data/lib/moneykit/models/response401_get_account_numbers_links_id_accounts_numbers_get.rb +75 -269
- data/lib/moneykit/models/response401_get_accounts_links_id_accounts_get.rb +75 -269
- data/lib/moneykit/models/response401_get_identities_links_id_identity_get.rb +75 -269
- data/lib/moneykit/models/response401_get_institution_institutions_institution_id_get.rb +74 -267
- data/lib/moneykit/models/response401_get_institutions_institutions_get.rb +74 -267
- data/lib/moneykit/models/response401_get_link_links_id_get.rb +75 -269
- data/lib/moneykit/models/response401_get_transactions_diff_links_id_transactions_sync_get.rb +75 -269
- data/lib/moneykit/models/response401_get_transactions_links_id_transactions_get.rb +75 -269
- data/lib/moneykit/models/response401_get_user_accounts_users_id_accounts_get.rb +74 -267
- data/lib/moneykit/models/response401_get_user_links_users_id_links_get.rb +74 -267
- data/lib/moneykit/models/response401_get_user_transactions_users_id_transactions_get.rb +74 -267
- data/lib/moneykit/models/response401_get_well_known_jwks_well_known_jwks_json_get.rb +74 -267
- data/lib/moneykit/models/response401_instrospect_client_auth_introspect_get.rb +74 -267
- data/lib/moneykit/models/response401_refresh_products_links_id_products_post.rb +75 -269
- data/lib/moneykit/models/response401_reset_login_links_id_reset_post.rb +102 -0
- data/lib/moneykit/models/response401_trigger_test_link_webhook_event_webhooks_test_link_id_post.rb +102 -0
- data/lib/moneykit/models/response401_update_link_links_id_patch.rb +75 -269
- data/lib/moneykit/models/transaction.rb +35 -35
- data/lib/moneykit/models/transaction_diff.rb +36 -37
- data/lib/moneykit/models/transaction_sync_response.rb +23 -30
- data/lib/moneykit/models/transaction_type.rb +1 -1
- data/lib/moneykit/models/transaction_type_filter.rb +1 -1
- data/lib/moneykit/models/transactions_link_product.rb +18 -28
- data/lib/moneykit/models/transactions_product_settings.rb +16 -21
- data/lib/moneykit/models/update_link_request.rb +21 -28
- data/lib/moneykit/models/validation_error.rb +25 -28
- data/lib/moneykit/models/validation_error_location_inner.rb +101 -0
- data/lib/moneykit/models/webhook_link_test_event.rb +40 -0
- data/lib/moneykit/models/webhook_test_link_request.rb +252 -0
- data/lib/moneykit/models/webhook_test_link_response.rb +220 -0
- data/lib/moneykit/version.rb +2 -2
- data/lib/moneykit.rb +10 -29
- data/lib/plaid_compatible/money_kit_plaid_compatible/api/plaid_api.rb +684 -679
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_client.rb +330 -330
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_error.rb +33 -33
- data/lib/plaid_compatible/money_kit_plaid_compatible/configuration.rb +245 -245
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_balance.rb +198 -198
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_base.rb +213 -213
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_identity.rb +223 -223
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_subtype.rb +89 -89
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_type.rb +22 -22
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request.rb +198 -198
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request_options.rb +175 -175
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_response.rb +194 -194
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address.rb +183 -183
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address_data.rb +209 -209
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_numbers.rb +211 -209
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request.rb +198 -198
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request_options.rb +175 -175
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_response.rb +200 -200
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/country_code.rb +19 -19
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/email.rb +184 -184
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/http_validation_error.rb +171 -171
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request.rb +198 -198
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request_options.rb +175 -175
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_response.rb +194 -194
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institution.rb +216 -214
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_request.rb +202 -202
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_response.rb +183 -183
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item.rb +246 -245
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_error_webhook.rb +208 -208
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_request.rb +192 -192
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_response.rb +189 -189
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_request.rb +192 -192
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_response.rb +193 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_request.rb +192 -192
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_response.rb +175 -175
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_investments.rb +182 -182
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_last_webhook.rb +182 -182
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_nullable.rb +183 -183
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_transactions.rb +182 -182
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request.rb +268 -266
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request_user.rb +212 -212
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_response.rb +193 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_ach.rb +202 -202
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_bacs.rb +193 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_eft.rb +202 -202
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_international.rb +193 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/owner.rb +211 -209
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/personal_finance_category.rb +184 -184
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/phone_number.rb +193 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error.rb +247 -245
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error_type.rb +30 -30
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/products.rb +20 -20
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/removed_transaction.rb +174 -174
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transaction.rb +283 -283
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request.rb +217 -217
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request_options.rb +211 -211
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_response.rb +217 -217
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_request.rb +192 -192
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_response.rb +175 -175
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request.rb +215 -215
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request_options.rb +184 -184
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_response.rb +228 -228
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/validation_error.rb +187 -187
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/webhook_environment_values.rb +19 -19
- data/lib/plaid_compatible/money_kit_plaid_compatible/version.rb +1 -1
- data/lib/plaid_compatible/money_kit_plaid_compatible.rb +13 -13
- data/moneykit.gemspec +2 -1
- metadata +14 -5
@@ -5,7 +5,7 @@
|
|
5
5
|
# The version of the OpenAPI document: 0.1.0
|
6
6
|
#
|
7
7
|
# Generated by: https://openapi-generator.tech
|
8
|
-
# OpenAPI Generator version:
|
8
|
+
# OpenAPI Generator version: 7.1.0
|
9
9
|
#
|
10
10
|
|
11
11
|
require 'date'
|
@@ -16,34 +16,16 @@ module MoneyKit
|
|
16
16
|
# MoneyKit's unique ID for the account. <p>The `account_id` is distinct from the institution's account number. For accounts that may change account numbers from time to time, such as credit cards, MoneyKit attempts to keep the `account_id` constant. However, if MoneyKit can't reconcile the new account data with the old data, the `account_id` may change.
|
17
17
|
attr_accessor :account_id
|
18
18
|
|
19
|
-
|
19
|
+
# See <a href=/pages/account_types>Account Types</a> for an explanation of account types. Account types are dot-prefixed with one of `depository`, `investment`, `liability`, or `other`; or the value is `unknown`. <p>**Balances for `liability` accounts are reversed:** negative balances (the amount owed) are reported as positive values. For all other types of accounts, a negative balance indicates the amount owed.
|
20
|
+
attr_accessor :account_type
|
20
21
|
|
21
|
-
# The account name, according to the institution. Note that some institutions allow the end user to nickname the account; in such cases this field may be the name assigned by the user
|
22
|
+
# The account name, according to the institution. Note that some institutions allow the end user to nickname the account; in such cases this field may be the name assigned by the user.
|
22
23
|
attr_accessor :name
|
23
24
|
|
24
25
|
# The last four characters (usually digits) of the account number. Note that this mask may be non-unique between accounts.
|
25
26
|
attr_accessor :account_mask
|
26
27
|
|
27
|
-
|
28
|
-
attr_reader :datatype, :allowable_values
|
29
|
-
|
30
|
-
def initialize(datatype, allowable_values)
|
31
|
-
@allowable_values = allowable_values.map do |value|
|
32
|
-
case datatype.to_s
|
33
|
-
when /Integer/i
|
34
|
-
value.to_i
|
35
|
-
when /Float/i
|
36
|
-
value.to_f
|
37
|
-
else
|
38
|
-
value
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
def valid?(value)
|
44
|
-
!value || allowable_values.include?(value)
|
45
|
-
end
|
46
|
-
end
|
28
|
+
attr_accessor :balances
|
47
29
|
|
48
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
49
31
|
def self.attribute_map
|
@@ -65,18 +47,16 @@ module MoneyKit
|
|
65
47
|
def self.openapi_types
|
66
48
|
{
|
67
49
|
'account_id': :String,
|
68
|
-
'account_type': :
|
50
|
+
'account_type': :String,
|
69
51
|
'name': :String,
|
70
52
|
'account_mask': :String,
|
71
|
-
'balances': :
|
53
|
+
'balances': :AccountBalances
|
72
54
|
}
|
73
55
|
end
|
74
56
|
|
75
57
|
# List of attributes with nullable: true
|
76
58
|
def self.openapi_nullable
|
77
|
-
Set.new([
|
78
|
-
:account_mask
|
79
|
-
])
|
59
|
+
Set.new([])
|
80
60
|
end
|
81
61
|
|
82
62
|
# Initializes the object
|
@@ -96,22 +76,21 @@ module MoneyKit
|
|
96
76
|
h[k.to_sym] = v
|
97
77
|
end
|
98
78
|
|
99
|
-
self.account_id = attributes[:account_id] if attributes.key?(:account_id)
|
79
|
+
self.account_id = (attributes[:account_id] if attributes.key?(:account_id))
|
100
80
|
|
101
|
-
self.account_type = attributes[:account_type] if attributes.key?(:account_type)
|
81
|
+
self.account_type = (attributes[:account_type] if attributes.key?(:account_type))
|
102
82
|
|
103
|
-
self.name = attributes[:name] if attributes.key?(:name)
|
83
|
+
self.name = (attributes[:name] if attributes.key?(:name))
|
104
84
|
|
105
85
|
self.account_mask = attributes[:account_mask] if attributes.key?(:account_mask)
|
106
86
|
|
107
|
-
|
108
|
-
|
109
|
-
self.balances = attributes[:balances]
|
87
|
+
self.balances = (attributes[:balances] if attributes.key?(:balances))
|
110
88
|
end
|
111
89
|
|
112
90
|
# Show invalid properties with the reasons. Usually used together with valid?
|
113
91
|
# @return Array for valid properties with the reasons
|
114
92
|
def list_invalid_properties
|
93
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
115
94
|
invalid_properties = []
|
116
95
|
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') if @account_id.nil?
|
117
96
|
|
@@ -127,6 +106,7 @@ module MoneyKit
|
|
127
106
|
# Check to see if the all the properties in the model are valid
|
128
107
|
# @return true if the model is valid
|
129
108
|
def valid?
|
109
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
130
110
|
return false if @account_id.nil?
|
131
111
|
return false if @account_type.nil?
|
132
112
|
return false if @name.nil?
|
@@ -164,40 +144,33 @@ module MoneyKit
|
|
164
144
|
# @param [Hash] attributes Model attributes in the form of hash
|
165
145
|
# @return [Object] Returns the model itself
|
166
146
|
def self.build_from_hash(attributes)
|
167
|
-
new.build_from_hash(attributes)
|
168
|
-
end
|
169
|
-
|
170
|
-
# Builds the object from hash
|
171
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
172
|
-
# @return [Object] Returns the model itself
|
173
|
-
def build_from_hash(attributes)
|
174
147
|
return nil unless attributes.is_a?(Hash)
|
175
148
|
|
176
149
|
attributes = attributes.transform_keys(&:to_sym)
|
177
|
-
|
178
|
-
|
179
|
-
|
150
|
+
transformed_hash = {}
|
151
|
+
openapi_types.each_pair do |key, type|
|
152
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
153
|
+
transformed_hash["#{key}"] = nil
|
180
154
|
elsif type =~ /\AArray<(.*)>/i
|
181
155
|
# check to ensure the input is an array given that the attribute
|
182
156
|
# is documented as an array but the input is not
|
183
|
-
if attributes[
|
184
|
-
|
185
|
-
|
186
|
-
|
157
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
158
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map do |v|
|
159
|
+
_deserialize(::Regexp.last_match(1), v)
|
160
|
+
end
|
187
161
|
end
|
188
|
-
elsif !attributes[
|
189
|
-
|
162
|
+
elsif !attributes[attribute_map[key]].nil?
|
163
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
190
164
|
end
|
191
165
|
end
|
192
|
-
|
193
|
-
self
|
166
|
+
new(transformed_hash)
|
194
167
|
end
|
195
168
|
|
196
169
|
# Deserializes the data based on type
|
197
170
|
# @param string type Data type
|
198
171
|
# @param string value Value to be deserialized
|
199
172
|
# @return [Object] Deserialized data
|
200
|
-
def _deserialize(type, value)
|
173
|
+
def self._deserialize(type, value)
|
201
174
|
case type.to_sym
|
202
175
|
when :Time
|
203
176
|
Time.parse(value)
|
@@ -232,7 +205,7 @@ module MoneyKit
|
|
232
205
|
else # model
|
233
206
|
# models (e.g. Pet) or oneOf
|
234
207
|
klass = MoneyKit.const_get(type)
|
235
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
208
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
236
209
|
end
|
237
210
|
end
|
238
211
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# The version of the OpenAPI document: 0.1.0
|
6
6
|
#
|
7
7
|
# Generated by: https://openapi-generator.tech
|
8
|
-
# OpenAPI Generator version:
|
8
|
+
# OpenAPI Generator version: 7.1.0
|
9
9
|
#
|
10
10
|
|
11
11
|
require 'date'
|
@@ -72,11 +72,7 @@ module MoneyKit
|
|
72
72
|
|
73
73
|
# List of attributes with nullable: true
|
74
74
|
def self.openapi_nullable
|
75
|
-
Set.new(
|
76
|
-
available
|
77
|
-
current
|
78
|
-
limit
|
79
|
-
])
|
75
|
+
Set.new([])
|
80
76
|
end
|
81
77
|
|
82
78
|
# Initializes the object
|
@@ -97,7 +93,7 @@ module MoneyKit
|
|
97
93
|
h[k.to_sym] = v
|
98
94
|
end
|
99
95
|
|
100
|
-
self.currency = attributes[:currency] if attributes.key?(:currency)
|
96
|
+
self.currency = (attributes[:currency] if attributes.key?(:currency))
|
101
97
|
|
102
98
|
self.available = attributes[:available] if attributes.key?(:available)
|
103
99
|
|
@@ -111,6 +107,7 @@ module MoneyKit
|
|
111
107
|
# Show invalid properties with the reasons. Usually used together with valid?
|
112
108
|
# @return Array for valid properties with the reasons
|
113
109
|
def list_invalid_properties
|
110
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
114
111
|
invalid_properties = []
|
115
112
|
invalid_properties.push('invalid value for "currency", currency cannot be nil.') if @currency.nil?
|
116
113
|
|
@@ -120,6 +117,7 @@ module MoneyKit
|
|
120
117
|
# Check to see if the all the properties in the model are valid
|
121
118
|
# @return true if the model is valid
|
122
119
|
def valid?
|
120
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
123
121
|
return false if @currency.nil?
|
124
122
|
|
125
123
|
true
|
@@ -153,40 +151,33 @@ module MoneyKit
|
|
153
151
|
# @param [Hash] attributes Model attributes in the form of hash
|
154
152
|
# @return [Object] Returns the model itself
|
155
153
|
def self.build_from_hash(attributes)
|
156
|
-
new.build_from_hash(attributes)
|
157
|
-
end
|
158
|
-
|
159
|
-
# Builds the object from hash
|
160
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
161
|
-
# @return [Object] Returns the model itself
|
162
|
-
def build_from_hash(attributes)
|
163
154
|
return nil unless attributes.is_a?(Hash)
|
164
155
|
|
165
156
|
attributes = attributes.transform_keys(&:to_sym)
|
166
|
-
|
167
|
-
|
168
|
-
|
157
|
+
transformed_hash = {}
|
158
|
+
openapi_types.each_pair do |key, type|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
160
|
+
transformed_hash["#{key}"] = nil
|
169
161
|
elsif type =~ /\AArray<(.*)>/i
|
170
162
|
# check to ensure the input is an array given that the attribute
|
171
163
|
# is documented as an array but the input is not
|
172
|
-
if attributes[
|
173
|
-
|
174
|
-
|
175
|
-
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map do |v|
|
166
|
+
_deserialize(::Regexp.last_match(1), v)
|
167
|
+
end
|
176
168
|
end
|
177
|
-
elsif !attributes[
|
178
|
-
|
169
|
+
elsif !attributes[attribute_map[key]].nil?
|
170
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
179
171
|
end
|
180
172
|
end
|
181
|
-
|
182
|
-
self
|
173
|
+
new(transformed_hash)
|
183
174
|
end
|
184
175
|
|
185
176
|
# Deserializes the data based on type
|
186
177
|
# @param string type Data type
|
187
178
|
# @param string value Value to be deserialized
|
188
179
|
# @return [Object] Deserialized data
|
189
|
-
def _deserialize(type, value)
|
180
|
+
def self._deserialize(type, value)
|
190
181
|
case type.to_sym
|
191
182
|
when :Time
|
192
183
|
Time.parse(value)
|
@@ -221,7 +212,7 @@ module MoneyKit
|
|
221
212
|
else # model
|
222
213
|
# models (e.g. Pet) or oneOf
|
223
214
|
klass = MoneyKit.const_get(type)
|
224
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
215
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
225
216
|
end
|
226
217
|
end
|
227
218
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# The version of the OpenAPI document: 0.1.0
|
6
6
|
#
|
7
7
|
# Generated by: https://openapi-generator.tech
|
8
|
-
# OpenAPI Generator version:
|
8
|
+
# OpenAPI Generator version: 7.1.0
|
9
9
|
#
|
10
10
|
|
11
11
|
require 'date'
|
@@ -41,9 +41,7 @@ module MoneyKit
|
|
41
41
|
|
42
42
|
# List of attributes with nullable: true
|
43
43
|
def self.openapi_nullable
|
44
|
-
Set.new([
|
45
|
-
:last_synced_at
|
46
|
-
])
|
44
|
+
Set.new([])
|
47
45
|
end
|
48
46
|
|
49
47
|
# Initializes the object
|
@@ -64,8 +62,12 @@ module MoneyKit
|
|
64
62
|
h[k.to_sym] = v
|
65
63
|
end
|
66
64
|
|
67
|
-
if attributes.key?(:accounts)
|
68
|
-
|
65
|
+
if attributes.key?(:accounts)
|
66
|
+
if (value = attributes[:accounts]).is_a?(Array)
|
67
|
+
self.accounts = value
|
68
|
+
end
|
69
|
+
else
|
70
|
+
self.accounts = nil
|
69
71
|
end
|
70
72
|
|
71
73
|
return unless attributes.key?(:last_synced_at)
|
@@ -76,6 +78,7 @@ module MoneyKit
|
|
76
78
|
# Show invalid properties with the reasons. Usually used together with valid?
|
77
79
|
# @return Array for valid properties with the reasons
|
78
80
|
def list_invalid_properties
|
81
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
79
82
|
invalid_properties = []
|
80
83
|
invalid_properties.push('invalid value for "accounts", accounts cannot be nil.') if @accounts.nil?
|
81
84
|
|
@@ -85,6 +88,7 @@ module MoneyKit
|
|
85
88
|
# Check to see if the all the properties in the model are valid
|
86
89
|
# @return true if the model is valid
|
87
90
|
def valid?
|
91
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
88
92
|
return false if @accounts.nil?
|
89
93
|
|
90
94
|
true
|
@@ -116,40 +120,33 @@ module MoneyKit
|
|
116
120
|
# @param [Hash] attributes Model attributes in the form of hash
|
117
121
|
# @return [Object] Returns the model itself
|
118
122
|
def self.build_from_hash(attributes)
|
119
|
-
new.build_from_hash(attributes)
|
120
|
-
end
|
121
|
-
|
122
|
-
# Builds the object from hash
|
123
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
124
|
-
# @return [Object] Returns the model itself
|
125
|
-
def build_from_hash(attributes)
|
126
123
|
return nil unless attributes.is_a?(Hash)
|
127
124
|
|
128
125
|
attributes = attributes.transform_keys(&:to_sym)
|
129
|
-
|
130
|
-
|
131
|
-
|
126
|
+
transformed_hash = {}
|
127
|
+
openapi_types.each_pair do |key, type|
|
128
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
129
|
+
transformed_hash["#{key}"] = nil
|
132
130
|
elsif type =~ /\AArray<(.*)>/i
|
133
131
|
# check to ensure the input is an array given that the attribute
|
134
132
|
# is documented as an array but the input is not
|
135
|
-
if attributes[
|
136
|
-
|
137
|
-
|
138
|
-
|
133
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
134
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map do |v|
|
135
|
+
_deserialize(::Regexp.last_match(1), v)
|
136
|
+
end
|
139
137
|
end
|
140
|
-
elsif !attributes[
|
141
|
-
|
138
|
+
elsif !attributes[attribute_map[key]].nil?
|
139
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
142
140
|
end
|
143
141
|
end
|
144
|
-
|
145
|
-
self
|
142
|
+
new(transformed_hash)
|
146
143
|
end
|
147
144
|
|
148
145
|
# Deserializes the data based on type
|
149
146
|
# @param string type Data type
|
150
147
|
# @param string value Value to be deserialized
|
151
148
|
# @return [Object] Deserialized data
|
152
|
-
def _deserialize(type, value)
|
149
|
+
def self._deserialize(type, value)
|
153
150
|
case type.to_sym
|
154
151
|
when :Time
|
155
152
|
Time.parse(value)
|
@@ -184,7 +181,7 @@ module MoneyKit
|
|
184
181
|
else # model
|
185
182
|
# models (e.g. Pet) or oneOf
|
186
183
|
klass = MoneyKit.const_get(type)
|
187
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
184
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
188
185
|
end
|
189
186
|
end
|
190
187
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# The version of the OpenAPI document: 0.1.0
|
6
6
|
#
|
7
7
|
# Generated by: https://openapi-generator.tech
|
8
|
-
# OpenAPI Generator version:
|
8
|
+
# OpenAPI Generator version: 7.1.0
|
9
9
|
#
|
10
10
|
|
11
11
|
require 'date'
|
@@ -16,37 +16,16 @@ module MoneyKit
|
|
16
16
|
# MoneyKit's unique ID for the account. <p>The `account_id` is distinct from the institution's account number. For accounts that may change account numbers from time to time, such as credit cards, MoneyKit attempts to keep the `account_id` constant. However, if MoneyKit can't reconcile the new account data with the old data, the `account_id` may change.
|
17
17
|
attr_accessor :account_id
|
18
18
|
|
19
|
-
|
19
|
+
# See <a href=/pages/account_types>Account Types</a> for an explanation of account types. Account types are dot-prefixed with one of `depository`, `investment`, `liability`, or `other`; or the value is `unknown`. <p>**Balances for `liability` accounts are reversed:** negative balances (the amount owed) are reported as positive values. For all other types of accounts, a negative balance indicates the amount owed.
|
20
|
+
attr_accessor :account_type
|
20
21
|
|
21
|
-
# The account name, according to the institution. Note that some institutions allow the end user to nickname the account; in such cases this field may be the name assigned by the user
|
22
|
+
# The account name, according to the institution. Note that some institutions allow the end user to nickname the account; in such cases this field may be the name assigned by the user.
|
22
23
|
attr_accessor :name
|
23
24
|
|
24
25
|
# The last four characters (usually digits) of the account number. Note that this mask may be non-unique between accounts.
|
25
26
|
attr_accessor :account_mask
|
26
27
|
|
27
|
-
|
28
|
-
attr_accessor :owners
|
29
|
-
|
30
|
-
class EnumAttributeValidator
|
31
|
-
attr_reader :datatype, :allowable_values
|
32
|
-
|
33
|
-
def initialize(datatype, allowable_values)
|
34
|
-
@allowable_values = allowable_values.map do |value|
|
35
|
-
case datatype.to_s
|
36
|
-
when /Integer/i
|
37
|
-
value.to_i
|
38
|
-
when /Float/i
|
39
|
-
value.to_f
|
40
|
-
else
|
41
|
-
value
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def valid?(value)
|
47
|
-
!value || allowable_values.include?(value)
|
48
|
-
end
|
49
|
-
end
|
28
|
+
attr_accessor :balances, :owners
|
50
29
|
|
51
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
52
31
|
def self.attribute_map
|
@@ -69,19 +48,17 @@ module MoneyKit
|
|
69
48
|
def self.openapi_types
|
70
49
|
{
|
71
50
|
'account_id': :String,
|
72
|
-
'account_type': :
|
51
|
+
'account_type': :String,
|
73
52
|
'name': :String,
|
74
53
|
'account_mask': :String,
|
75
|
-
'balances': :
|
54
|
+
'balances': :AccountBalances,
|
76
55
|
'owners': :'Array<Owner>'
|
77
56
|
}
|
78
57
|
end
|
79
58
|
|
80
59
|
# List of attributes with nullable: true
|
81
60
|
def self.openapi_nullable
|
82
|
-
Set.new([
|
83
|
-
:account_mask
|
84
|
-
])
|
61
|
+
Set.new([])
|
85
62
|
end
|
86
63
|
|
87
64
|
# Initializes the object
|
@@ -102,25 +79,29 @@ module MoneyKit
|
|
102
79
|
h[k.to_sym] = v
|
103
80
|
end
|
104
81
|
|
105
|
-
self.account_id = attributes[:account_id] if attributes.key?(:account_id)
|
82
|
+
self.account_id = (attributes[:account_id] if attributes.key?(:account_id))
|
106
83
|
|
107
|
-
self.account_type = attributes[:account_type] if attributes.key?(:account_type)
|
84
|
+
self.account_type = (attributes[:account_type] if attributes.key?(:account_type))
|
108
85
|
|
109
|
-
self.name = attributes[:name] if attributes.key?(:name)
|
86
|
+
self.name = (attributes[:name] if attributes.key?(:name))
|
110
87
|
|
111
88
|
self.account_mask = attributes[:account_mask] if attributes.key?(:account_mask)
|
112
89
|
|
113
|
-
self.balances = attributes[:balances] if attributes.key?(:balances)
|
90
|
+
self.balances = (attributes[:balances] if attributes.key?(:balances))
|
114
91
|
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
92
|
+
if attributes.key?(:owners)
|
93
|
+
if (value = attributes[:owners]).is_a?(Array)
|
94
|
+
self.owners = value
|
95
|
+
end
|
96
|
+
else
|
97
|
+
self.owners = nil
|
98
|
+
end
|
119
99
|
end
|
120
100
|
|
121
101
|
# Show invalid properties with the reasons. Usually used together with valid?
|
122
102
|
# @return Array for valid properties with the reasons
|
123
103
|
def list_invalid_properties
|
104
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
124
105
|
invalid_properties = []
|
125
106
|
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') if @account_id.nil?
|
126
107
|
|
@@ -138,6 +119,7 @@ module MoneyKit
|
|
138
119
|
# Check to see if the all the properties in the model are valid
|
139
120
|
# @return true if the model is valid
|
140
121
|
def valid?
|
122
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
141
123
|
return false if @account_id.nil?
|
142
124
|
return false if @account_type.nil?
|
143
125
|
return false if @name.nil?
|
@@ -177,40 +159,33 @@ module MoneyKit
|
|
177
159
|
# @param [Hash] attributes Model attributes in the form of hash
|
178
160
|
# @return [Object] Returns the model itself
|
179
161
|
def self.build_from_hash(attributes)
|
180
|
-
new.build_from_hash(attributes)
|
181
|
-
end
|
182
|
-
|
183
|
-
# Builds the object from hash
|
184
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
185
|
-
# @return [Object] Returns the model itself
|
186
|
-
def build_from_hash(attributes)
|
187
162
|
return nil unless attributes.is_a?(Hash)
|
188
163
|
|
189
164
|
attributes = attributes.transform_keys(&:to_sym)
|
190
|
-
|
191
|
-
|
192
|
-
|
165
|
+
transformed_hash = {}
|
166
|
+
openapi_types.each_pair do |key, type|
|
167
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
168
|
+
transformed_hash["#{key}"] = nil
|
193
169
|
elsif type =~ /\AArray<(.*)>/i
|
194
170
|
# check to ensure the input is an array given that the attribute
|
195
171
|
# is documented as an array but the input is not
|
196
|
-
if attributes[
|
197
|
-
|
198
|
-
|
199
|
-
|
172
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
173
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map do |v|
|
174
|
+
_deserialize(::Regexp.last_match(1), v)
|
175
|
+
end
|
200
176
|
end
|
201
|
-
elsif !attributes[
|
202
|
-
|
177
|
+
elsif !attributes[attribute_map[key]].nil?
|
178
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
203
179
|
end
|
204
180
|
end
|
205
|
-
|
206
|
-
self
|
181
|
+
new(transformed_hash)
|
207
182
|
end
|
208
183
|
|
209
184
|
# Deserializes the data based on type
|
210
185
|
# @param string type Data type
|
211
186
|
# @param string value Value to be deserialized
|
212
187
|
# @return [Object] Deserialized data
|
213
|
-
def _deserialize(type, value)
|
188
|
+
def self._deserialize(type, value)
|
214
189
|
case type.to_sym
|
215
190
|
when :Time
|
216
191
|
Time.parse(value)
|
@@ -245,7 +220,7 @@ module MoneyKit
|
|
245
220
|
else # model
|
246
221
|
# models (e.g. Pet) or oneOf
|
247
222
|
klass = MoneyKit.const_get(type)
|
248
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
223
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
249
224
|
end
|
250
225
|
end
|
251
226
|
|