moneykit 0.0.2 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/moneykit/api/access_token_api.rb +53 -55
- data/lib/moneykit/api/account_numbers_api.rb +26 -26
- data/lib/moneykit/api/accounts_api.rb +88 -82
- data/lib/moneykit/api/identity_api.rb +31 -30
- data/lib/moneykit/api/institutions_api.rb +50 -48
- data/lib/moneykit/api/link_session_api.rb +47 -50
- data/lib/moneykit/api/links_api.rb +137 -81
- data/lib/moneykit/api/products_api.rb +33 -35
- data/lib/moneykit/api/transactions_api.rb +126 -101
- data/lib/moneykit/api/users_api.rb +100 -83
- data/lib/moneykit/api/webhooks_api.rb +97 -0
- data/lib/moneykit/api_client.rb +100 -103
- data/lib/moneykit/api_error.rb +14 -16
- data/lib/moneykit/configuration.rb +52 -65
- data/lib/moneykit/models/account.rb +69 -112
- data/lib/moneykit/models/account_balances.rb +64 -78
- data/lib/moneykit/models/account_group.rb +58 -61
- data/lib/moneykit/models/account_identity.rb +79 -124
- data/lib/moneykit/models/account_numbers.rb +96 -71
- data/lib/moneykit/models/account_numbers_link_product.rb +57 -69
- data/lib/moneykit/models/account_numbers_product_settings.rb +59 -63
- data/lib/moneykit/models/account_type.rb +23 -23
- data/lib/moneykit/models/account_with_account_numbers.rb +76 -124
- data/lib/moneykit/models/accounts_link_product.rb +53 -61
- data/lib/moneykit/models/ach_number.rb +57 -65
- data/lib/moneykit/models/address.rb +70 -90
- data/lib/moneykit/models/api_error_auth_expired_access_token_response.rb +72 -78
- data/lib/moneykit/models/api_error_auth_unauthorized_response.rb +69 -78
- data/lib/moneykit/models/api_error_rate_limit_exceeded_response.rb +72 -78
- data/lib/moneykit/models/app.rb +46 -50
- data/lib/moneykit/models/bacs_number.rb +53 -61
- data/lib/moneykit/models/balances.rb +58 -64
- data/lib/moneykit/models/basic_account_details.rb +62 -77
- data/lib/moneykit/models/country.rb +13 -14
- data/lib/moneykit/models/create_link_session_request.rb +109 -119
- data/lib/moneykit/models/create_link_session_response.rb +48 -52
- data/lib/moneykit/models/currency.rb +193 -193
- data/lib/moneykit/models/cursor.rb +40 -39
- data/lib/moneykit/models/cursor_pagination.rb +49 -54
- data/lib/moneykit/models/cursors.rb +40 -39
- data/lib/moneykit/models/customer_app.rb +54 -64
- data/lib/moneykit/models/customer_user.rb +59 -69
- data/lib/moneykit/models/eft_number.rb +56 -67
- data/lib/moneykit/models/email.rb +56 -63
- data/lib/moneykit/models/email1.rb +50 -53
- data/lib/moneykit/models/exchange_token_request.rb +48 -52
- data/lib/moneykit/models/exchange_token_response.rb +54 -64
- data/lib/moneykit/models/generate_access_token_response.rb +59 -73
- data/lib/moneykit/models/get_account_numbers_response.rb +58 -66
- data/lib/moneykit/models/get_account_response.rb +55 -67
- data/lib/moneykit/models/get_accounts_response.rb +58 -67
- data/lib/moneykit/models/get_institutions_response.rb +58 -67
- data/lib/moneykit/models/get_transactions_response.rb +81 -105
- data/lib/moneykit/models/get_user_accounts_response.rb +50 -58
- data/lib/moneykit/models/get_user_links_response.rb +50 -58
- data/lib/moneykit/models/get_user_transactions_response.rb +75 -95
- data/lib/moneykit/models/http_validation_error.rb +77 -84
- data/lib/moneykit/models/identity.rb +49 -49
- data/lib/moneykit/models/identity_link_product.rb +57 -69
- data/lib/moneykit/models/identity_product_settings.rb +59 -63
- data/lib/moneykit/models/identity_response.rb +58 -67
- data/lib/moneykit/models/institution.rb +85 -113
- data/lib/moneykit/models/institution_error_not_found_response.rb +72 -80
- data/lib/moneykit/models/institution_styling_response.rb +77 -93
- data/lib/moneykit/models/international_number.rb +54 -64
- data/lib/moneykit/models/introspect_client_response.rb +70 -89
- data/lib/moneykit/models/jwk_set.rb +51 -55
- data/lib/moneykit/models/link.rb +78 -100
- data/lib/moneykit/models/link1.rb +78 -100
- data/lib/moneykit/models/link2.rb +78 -100
- data/lib/moneykit/models/link3.rb +78 -100
- data/lib/moneykit/models/link4.rb +78 -100
- data/lib/moneykit/models/link_common.rb +82 -117
- data/lib/moneykit/models/link_error.rb +19 -19
- data/lib/moneykit/models/link_error_bad_config_response.rb +269 -0
- data/lib/moneykit/models/link_error_bad_state_response.rb +71 -88
- data/lib/moneykit/models/link_error_deleted_response.rb +72 -80
- data/lib/moneykit/models/link_error_forbidden_action_response.rb +69 -78
- data/lib/moneykit/models/link_error_not_found_response.rb +72 -80
- data/lib/moneykit/models/link_error_unauthorized_access_response.rb +72 -80
- data/lib/moneykit/models/link_permission_scope.rb +14 -15
- data/lib/moneykit/models/link_permissions.rb +52 -62
- data/lib/moneykit/models/link_products.rb +62 -78
- data/lib/moneykit/models/link_response.rb +95 -136
- data/lib/moneykit/models/link_session_customer_user.rb +65 -83
- data/lib/moneykit/models/link_session_customer_user_email.rb +59 -68
- data/lib/moneykit/models/link_session_customer_user_phone.rb +67 -82
- data/lib/moneykit/models/link_session_error_forbidden_config_response.rb +69 -78
- data/lib/moneykit/models/link_session_error_invalid_token_exchange.rb +69 -78
- data/lib/moneykit/models/link_session_setting_overrides.rb +64 -99
- data/lib/moneykit/models/link_state.rb +15 -16
- data/lib/moneykit/models/link_state_changed_webhook.rb +121 -148
- data/lib/moneykit/models/location_inner.rb +41 -46
- data/lib/moneykit/models/money_kit_env.rb +12 -13
- data/lib/moneykit/models/money_link_features.rb +62 -66
- data/lib/moneykit/models/moneylink_features.rb +50 -49
- data/lib/moneykit/models/numbers.rb +60 -73
- data/lib/moneykit/models/owner.rb +76 -89
- data/lib/moneykit/models/phone.rb +60 -68
- data/lib/moneykit/models/phone_number.rb +63 -74
- data/lib/moneykit/models/phone_number_type.rb +14 -15
- data/lib/moneykit/models/product.rb +14 -15
- data/lib/moneykit/models/products.rb +52 -64
- data/lib/moneykit/models/products1.rb +48 -56
- data/lib/moneykit/models/products_settings.rb +58 -70
- data/lib/moneykit/models/provider.rb +18 -17
- data/lib/moneykit/models/public_link_error.rb +43 -0
- data/lib/moneykit/models/refresh_products_request.rb +52 -65
- data/lib/moneykit/models/requested_link_permission.rb +60 -75
- data/lib/moneykit/models/response401_disconnect_links_id_delete.rb +83 -283
- data/lib/moneykit/models/response401_exchange_token_link_session_exchange_token_post.rb +82 -281
- data/lib/moneykit/models/response401_get_account_links_id_accounts_account_id_get.rb +83 -283
- data/lib/moneykit/models/response401_get_account_numbers_links_id_accounts_numbers_get.rb +83 -283
- data/lib/moneykit/models/response401_get_accounts_links_id_accounts_get.rb +83 -283
- data/lib/moneykit/models/response401_get_identities_links_id_identity_get.rb +83 -283
- data/lib/moneykit/models/response401_get_institution_institutions_institution_id_get.rb +82 -281
- data/lib/moneykit/models/response401_get_institution_styling_institutions_institution_id_styling_get.rb +66 -72
- data/lib/moneykit/models/response401_get_institutions_institutions_get.rb +82 -281
- data/lib/moneykit/models/response401_get_link_links_id_get.rb +83 -283
- data/lib/moneykit/models/response401_get_transactions_diff_links_id_transactions_sync_get.rb +83 -283
- data/lib/moneykit/models/response401_get_transactions_links_id_transactions_get.rb +83 -283
- data/lib/moneykit/models/response401_get_user_accounts_users_id_accounts_get.rb +82 -281
- data/lib/moneykit/models/response401_get_user_links_users_id_links_get.rb +82 -281
- data/lib/moneykit/models/response401_get_user_transactions_users_id_transactions_get.rb +82 -281
- data/lib/moneykit/models/response401_get_well_known_jwks_well_known_jwks_json_get.rb +82 -281
- data/lib/moneykit/models/response401_instrospect_client_auth_introspect_get.rb +82 -281
- data/lib/moneykit/models/response401_refresh_products_links_id_products_post.rb +83 -283
- 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 +83 -283
- data/lib/moneykit/models/settings.rb +61 -73
- data/lib/moneykit/models/supported_version.rb +11 -12
- data/lib/moneykit/models/transaction.rb +104 -131
- data/lib/moneykit/models/transaction_diff.rb +69 -78
- data/lib/moneykit/models/transaction_sync_response.rb +65 -87
- data/lib/moneykit/models/transaction_type.rb +12 -13
- data/lib/moneykit/models/transaction_type_filter.rb +12 -13
- data/lib/moneykit/models/transactions.rb +58 -57
- data/lib/moneykit/models/transactions1.rb +55 -63
- data/lib/moneykit/models/transactions_link_product.rb +57 -69
- data/lib/moneykit/models/transactions_product_settings.rb +67 -71
- data/lib/moneykit/models/update_link_request.rb +63 -69
- data/lib/moneykit/models/user_accounts_out.rb +40 -40
- data/lib/moneykit/models/user_links_out.rb +40 -40
- data/lib/moneykit/models/user_transactions_paged_response.rb +40 -40
- data/lib/moneykit/models/validation_error.rb +63 -77
- 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 +10 -12
- data/lib/moneykit.rb +18 -39
- data/lib/plaid_compatible/money_kit_plaid_compatible/api/plaid_api.rb +738 -737
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_client.rb +339 -340
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_error.rb +47 -47
- data/lib/plaid_compatible/money_kit_plaid_compatible/configuration.rb +258 -260
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_balance.rb +210 -212
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_base.rb +221 -237
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_identity.rb +231 -252
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_subtype.rb +100 -101
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_type.rb +35 -36
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request.rb +209 -211
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request_options.rb +188 -185
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_response.rb +205 -210
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address.rb +195 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address_data.rb +222 -226
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_numbers.rb +218 -226
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request.rb +209 -211
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request_options.rb +188 -185
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_response.rb +211 -222
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/country_code.rb +32 -33
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/email.rb +197 -198
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/http_validation_error.rb +183 -181
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request.rb +209 -211
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request_options.rb +188 -185
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_response.rb +205 -210
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institution.rb +228 -232
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_request.rb +216 -217
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_response.rb +195 -196
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item.rb +251 -261
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_error_webhook.rb +217 -229
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_request.rb +205 -205
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_response.rb +201 -205
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_request.rb +205 -205
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_response.rb +206 -211
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_request.rb +205 -205
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_response.rb +188 -185
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_investments.rb +195 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_last_webhook.rb +195 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_nullable.rb +194 -198
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_transactions.rb +195 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request.rb +272 -291
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request_user.rb +225 -225
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_response.rb +206 -211
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_ach.rb +215 -221
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_bacs.rb +206 -211
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_eft.rb +215 -224
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_international.rb +206 -211
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/owner.rb +218 -226
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/personal_finance_category.rb +197 -198
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/phone_number.rb +206 -211
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error.rb +253 -266
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error_type.rb +43 -44
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/products.rb +33 -34
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/removed_transaction.rb +187 -183
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transaction.rb +288 -315
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request.rb +225 -235
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request_options.rb +222 -224
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_response.rb +225 -236
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_request.rb +205 -205
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_response.rb +188 -185
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request.rb +223 -229
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request_options.rb +197 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_response.rb +235 -252
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/validation_error.rb +198 -207
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/webhook_environment_values.rb +32 -33
- data/lib/plaid_compatible/money_kit_plaid_compatible/version.rb +14 -14
- data/lib/plaid_compatible/money_kit_plaid_compatible.rb +24 -24
- data/moneykit.gemspec +22 -25
- metadata +14 -5
@@ -1,14 +1,12 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=end
|
1
|
+
# #MoneyKit API
|
2
|
+
#
|
3
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
#
|
5
|
+
# The version of the OpenAPI document: 0.1.0
|
6
|
+
#
|
7
|
+
# Generated by: https://openapi-generator.tech
|
8
|
+
# OpenAPI Generator version: 7.1.0
|
9
|
+
#
|
12
10
|
|
13
11
|
require 'date'
|
14
12
|
require 'time'
|
@@ -24,26 +22,16 @@ module MoneyKit
|
|
24
22
|
# The institution name this link is connected to.
|
25
23
|
attr_accessor :institution_name
|
26
24
|
|
27
|
-
attr_accessor :state
|
28
|
-
|
29
|
-
attr_accessor :error_code
|
25
|
+
attr_accessor :state, :error_code, :tags, :products, :provider
|
30
26
|
|
31
27
|
# An ISO-8601 timestamp indicating the last time that the account was updated.
|
32
28
|
attr_accessor :last_synced_at
|
33
29
|
|
34
|
-
# Arbitrary strings used to describe this link.
|
35
|
-
attr_accessor :tags
|
36
|
-
|
37
|
-
attr_accessor :products
|
38
|
-
|
39
|
-
attr_accessor :provider
|
40
|
-
|
41
30
|
# The webhook url assigned to this link.
|
42
31
|
attr_accessor :webhook
|
43
32
|
|
44
33
|
class EnumAttributeValidator
|
45
|
-
attr_reader :datatype
|
46
|
-
attr_reader :allowable_values
|
34
|
+
attr_reader :datatype, :allowable_values
|
47
35
|
|
48
36
|
def initialize(datatype, allowable_values)
|
49
37
|
@allowable_values = allowable_values.map do |value|
|
@@ -66,16 +54,16 @@ module MoneyKit
|
|
66
54
|
# Attribute mapping from ruby-style variable name to JSON key.
|
67
55
|
def self.attribute_map
|
68
56
|
{
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
57
|
+
'link_id': :link_id,
|
58
|
+
'institution_id': :institution_id,
|
59
|
+
'institution_name': :institution_name,
|
60
|
+
'state': :state,
|
61
|
+
'error_code': :error_code,
|
62
|
+
'last_synced_at': :last_synced_at,
|
63
|
+
'tags': :tags,
|
64
|
+
'products': :products,
|
65
|
+
'provider': :provider,
|
66
|
+
'webhook': :webhook
|
79
67
|
}
|
80
68
|
end
|
81
69
|
|
@@ -87,94 +75,73 @@ module MoneyKit
|
|
87
75
|
# Attribute type mapping.
|
88
76
|
def self.openapi_types
|
89
77
|
{
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
78
|
+
'link_id': :String,
|
79
|
+
'institution_id': :String,
|
80
|
+
'institution_name': :String,
|
81
|
+
'state': :LinkState,
|
82
|
+
'error_code': :PublicLinkError,
|
83
|
+
'last_synced_at': :Time,
|
84
|
+
'tags': :'Array<String>',
|
85
|
+
'products': :LinkProducts,
|
86
|
+
'provider': :Provider,
|
87
|
+
'webhook': :String
|
100
88
|
}
|
101
89
|
end
|
102
90
|
|
103
91
|
# List of attributes with nullable: true
|
104
92
|
def self.openapi_nullable
|
105
|
-
Set.new([
|
106
|
-
:'error_code',
|
107
|
-
:'last_synced_at',
|
108
|
-
:'tags',
|
109
|
-
:'webhook'
|
110
|
-
])
|
93
|
+
Set.new([])
|
111
94
|
end
|
112
95
|
|
113
96
|
# Initializes the object
|
114
97
|
# @param [Hash] attributes Model attributes in the form of hash
|
115
98
|
def initialize(attributes = {})
|
116
|
-
|
117
|
-
|
99
|
+
unless attributes.is_a?(Hash)
|
100
|
+
raise ArgumentError,
|
101
|
+
'The input argument (attributes) must be a hash in `MoneyKit::LinkResponse` initialize method'
|
118
102
|
end
|
119
103
|
|
120
104
|
# check to see if the attribute exists and convert string to symbol for hash key
|
121
|
-
attributes = attributes.each_with_object({})
|
122
|
-
|
123
|
-
|
105
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
106
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
107
|
+
raise ArgumentError,
|
108
|
+
"`#{k}` is not a valid attribute in `MoneyKit::LinkResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
124
109
|
end
|
125
|
-
h[k.to_sym] = v
|
126
|
-
}
|
127
110
|
|
128
|
-
|
129
|
-
self.link_id = attributes[:'link_id']
|
111
|
+
h[k.to_sym] = v
|
130
112
|
end
|
131
113
|
|
132
|
-
if attributes.key?(:
|
133
|
-
self.institution_id = attributes[:'institution_id']
|
134
|
-
end
|
114
|
+
self.link_id = (attributes[:link_id] if attributes.key?(:link_id))
|
135
115
|
|
136
|
-
if attributes.key?(:
|
137
|
-
self.institution_name = attributes[:'institution_name']
|
138
|
-
end
|
116
|
+
self.institution_id = (attributes[:institution_id] if attributes.key?(:institution_id))
|
139
117
|
|
140
|
-
if attributes.key?(:
|
141
|
-
self.state = attributes[:'state']
|
142
|
-
end
|
118
|
+
self.institution_name = (attributes[:institution_name] if attributes.key?(:institution_name))
|
143
119
|
|
144
|
-
if attributes.key?(:
|
145
|
-
self.error_code = attributes[:'error_code']
|
146
|
-
end
|
120
|
+
self.state = (attributes[:state] if attributes.key?(:state))
|
147
121
|
|
148
|
-
if attributes.key?(:
|
149
|
-
self.last_synced_at = attributes[:'last_synced_at']
|
150
|
-
end
|
122
|
+
self.error_code = attributes[:error_code] if attributes.key?(:error_code)
|
151
123
|
|
152
|
-
if attributes.key?(:
|
153
|
-
if (value = attributes[:'tags']).is_a?(Array)
|
154
|
-
self.tags = value
|
155
|
-
end
|
156
|
-
end
|
124
|
+
self.last_synced_at = attributes[:last_synced_at] if attributes.key?(:last_synced_at)
|
157
125
|
|
158
|
-
if attributes.key?(:
|
159
|
-
self.
|
126
|
+
if attributes.key?(:tags) && (value = attributes[:tags]).is_a?(Array)
|
127
|
+
self.tags = value
|
160
128
|
end
|
161
129
|
|
162
|
-
if attributes.key?(:
|
163
|
-
self.provider = attributes[:'provider']
|
164
|
-
end
|
130
|
+
self.products = (attributes[:products] if attributes.key?(:products))
|
165
131
|
|
166
|
-
if attributes.key?(:
|
167
|
-
|
168
|
-
|
132
|
+
self.provider = (attributes[:provider] if attributes.key?(:provider))
|
133
|
+
|
134
|
+
return unless attributes.key?(:webhook)
|
135
|
+
|
136
|
+
self.webhook = attributes[:webhook]
|
169
137
|
end
|
170
138
|
|
171
139
|
# Show invalid properties with the reasons. Usually used together with valid?
|
172
140
|
# @return Array for valid properties with the reasons
|
173
141
|
def list_invalid_properties
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
end
|
142
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
143
|
+
invalid_properties = []
|
144
|
+
invalid_properties.push('invalid value for "link_id", link_id cannot be nil.') if @link_id.nil?
|
178
145
|
|
179
146
|
if @institution_id.nil?
|
180
147
|
invalid_properties.push('invalid value for "institution_id", institution_id cannot be nil.')
|
@@ -184,17 +151,11 @@ module MoneyKit
|
|
184
151
|
invalid_properties.push('invalid value for "institution_name", institution_name cannot be nil.')
|
185
152
|
end
|
186
153
|
|
187
|
-
if @state.nil?
|
188
|
-
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
189
|
-
end
|
154
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.') if @state.nil?
|
190
155
|
|
191
|
-
if @products.nil?
|
192
|
-
invalid_properties.push('invalid value for "products", products cannot be nil.')
|
193
|
-
end
|
156
|
+
invalid_properties.push('invalid value for "products", products cannot be nil.') if @products.nil?
|
194
157
|
|
195
|
-
if @provider.nil?
|
196
|
-
invalid_properties.push('invalid value for "provider", provider cannot be nil.')
|
197
|
-
end
|
158
|
+
invalid_properties.push('invalid value for "provider", provider cannot be nil.') if @provider.nil?
|
198
159
|
|
199
160
|
invalid_properties
|
200
161
|
end
|
@@ -202,79 +163,79 @@ module MoneyKit
|
|
202
163
|
# Check to see if the all the properties in the model are valid
|
203
164
|
# @return true if the model is valid
|
204
165
|
def valid?
|
166
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
205
167
|
return false if @link_id.nil?
|
206
168
|
return false if @institution_id.nil?
|
207
169
|
return false if @institution_name.nil?
|
208
170
|
return false if @state.nil?
|
209
171
|
return false if @products.nil?
|
210
172
|
return false if @provider.nil?
|
173
|
+
|
211
174
|
true
|
212
175
|
end
|
213
176
|
|
214
177
|
# Checks equality by comparing each attribute.
|
215
178
|
# @param [Object] Object to be compared
|
216
|
-
def ==(
|
217
|
-
return true if
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
179
|
+
def ==(other)
|
180
|
+
return true if equal?(other)
|
181
|
+
|
182
|
+
self.class == other.class &&
|
183
|
+
link_id == other.link_id &&
|
184
|
+
institution_id == other.institution_id &&
|
185
|
+
institution_name == other.institution_name &&
|
186
|
+
state == other.state &&
|
187
|
+
error_code == other.error_code &&
|
188
|
+
last_synced_at == other.last_synced_at &&
|
189
|
+
tags == other.tags &&
|
190
|
+
products == other.products &&
|
191
|
+
provider == other.provider &&
|
192
|
+
webhook == other.webhook
|
229
193
|
end
|
230
194
|
|
231
195
|
# @see the `==` method
|
232
196
|
# @param [Object] Object to be compared
|
233
|
-
def eql?(
|
234
|
-
self ==
|
197
|
+
def eql?(other)
|
198
|
+
self == other
|
235
199
|
end
|
236
200
|
|
237
201
|
# Calculates hash code according to all attributes.
|
238
202
|
# @return [Integer] Hash code
|
239
203
|
def hash
|
240
|
-
[link_id, institution_id, institution_name, state, error_code, last_synced_at, tags, products, provider,
|
204
|
+
[link_id, institution_id, institution_name, state, error_code, last_synced_at, tags, products, provider,
|
205
|
+
webhook].hash
|
241
206
|
end
|
242
207
|
|
243
208
|
# Builds the object from hash
|
244
209
|
# @param [Hash] attributes Model attributes in the form of hash
|
245
210
|
# @return [Object] Returns the model itself
|
246
211
|
def self.build_from_hash(attributes)
|
247
|
-
new.build_from_hash(attributes)
|
248
|
-
end
|
249
|
-
|
250
|
-
# Builds the object from hash
|
251
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
252
|
-
# @return [Object] Returns the model itself
|
253
|
-
def build_from_hash(attributes)
|
254
212
|
return nil unless attributes.is_a?(Hash)
|
213
|
+
|
255
214
|
attributes = attributes.transform_keys(&:to_sym)
|
256
|
-
|
257
|
-
|
258
|
-
|
215
|
+
transformed_hash = {}
|
216
|
+
openapi_types.each_pair do |key, type|
|
217
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
218
|
+
transformed_hash["#{key}"] = nil
|
259
219
|
elsif type =~ /\AArray<(.*)>/i
|
260
220
|
# check to ensure the input is an array given that the attribute
|
261
221
|
# is documented as an array but the input is not
|
262
|
-
if attributes[
|
263
|
-
|
222
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
223
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map do |v|
|
224
|
+
_deserialize(::Regexp.last_match(1), v)
|
225
|
+
end
|
264
226
|
end
|
265
|
-
elsif !attributes[
|
266
|
-
|
227
|
+
elsif !attributes[attribute_map[key]].nil?
|
228
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
267
229
|
end
|
268
230
|
end
|
269
|
-
|
270
|
-
self
|
231
|
+
new(transformed_hash)
|
271
232
|
end
|
272
233
|
|
273
234
|
# Deserializes the data based on type
|
274
235
|
# @param string type Data type
|
275
236
|
# @param string value Value to be deserialized
|
276
237
|
# @return [Object] Deserialized data
|
277
|
-
def _deserialize(type, value)
|
238
|
+
def self._deserialize(type, value)
|
278
239
|
case type.to_sym
|
279
240
|
when :Time
|
280
241
|
Time.parse(value)
|
@@ -309,7 +270,7 @@ module MoneyKit
|
|
309
270
|
else # model
|
310
271
|
# models (e.g. Pet) or oneOf
|
311
272
|
klass = MoneyKit.const_get(type)
|
312
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
273
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
313
274
|
end
|
314
275
|
end
|
315
276
|
|
@@ -330,7 +291,7 @@ module MoneyKit
|
|
330
291
|
def to_hash
|
331
292
|
hash = {}
|
332
293
|
self.class.attribute_map.each_pair do |attr, param|
|
333
|
-
value =
|
294
|
+
value = send(attr)
|
334
295
|
if value.nil?
|
335
296
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
336
297
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -358,7 +319,5 @@ module MoneyKit
|
|
358
319
|
value
|
359
320
|
end
|
360
321
|
end
|
361
|
-
|
362
322
|
end
|
363
|
-
|
364
323
|
end
|
@@ -1,14 +1,12 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=end
|
1
|
+
# #MoneyKit API
|
2
|
+
#
|
3
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
#
|
5
|
+
# The version of the OpenAPI document: 0.1.0
|
6
|
+
#
|
7
|
+
# Generated by: https://openapi-generator.tech
|
8
|
+
# OpenAPI Generator version: 7.1.0
|
9
|
+
#
|
12
10
|
|
13
11
|
require 'date'
|
14
12
|
require 'time'
|
@@ -18,16 +16,14 @@ module MoneyKit
|
|
18
16
|
# Your own unique ID for this user. Typically this will be a UUID or primary key from your application.
|
19
17
|
attr_accessor :id
|
20
18
|
|
21
|
-
attr_accessor :email
|
22
|
-
|
23
|
-
attr_accessor :phone
|
19
|
+
attr_accessor :email, :phone
|
24
20
|
|
25
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
26
22
|
def self.attribute_map
|
27
23
|
{
|
28
|
-
|
29
|
-
|
30
|
-
|
24
|
+
'id': :id,
|
25
|
+
'email': :email,
|
26
|
+
'phone': :phone
|
31
27
|
}
|
32
28
|
end
|
33
29
|
|
@@ -39,55 +35,50 @@ module MoneyKit
|
|
39
35
|
# Attribute type mapping.
|
40
36
|
def self.openapi_types
|
41
37
|
{
|
42
|
-
|
43
|
-
|
44
|
-
|
38
|
+
'id': :String,
|
39
|
+
'email': :LinkSessionCustomerUserEmail,
|
40
|
+
'phone': :LinkSessionCustomerUserPhone
|
45
41
|
}
|
46
42
|
end
|
47
43
|
|
48
44
|
# List of attributes with nullable: true
|
49
45
|
def self.openapi_nullable
|
50
|
-
Set.new([
|
51
|
-
:'email',
|
52
|
-
:'phone'
|
53
|
-
])
|
46
|
+
Set.new([])
|
54
47
|
end
|
55
48
|
|
56
49
|
# Initializes the object
|
57
50
|
# @param [Hash] attributes Model attributes in the form of hash
|
58
51
|
def initialize(attributes = {})
|
59
|
-
|
60
|
-
|
52
|
+
unless attributes.is_a?(Hash)
|
53
|
+
raise ArgumentError,
|
54
|
+
'The input argument (attributes) must be a hash in `MoneyKit::LinkSessionCustomerUser` initialize method'
|
61
55
|
end
|
62
56
|
|
63
57
|
# check to see if the attribute exists and convert string to symbol for hash key
|
64
|
-
attributes = attributes.each_with_object({})
|
65
|
-
|
66
|
-
|
58
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
59
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
60
|
+
raise ArgumentError,
|
61
|
+
"`#{k}` is not a valid attribute in `MoneyKit::LinkSessionCustomerUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
62
|
end
|
68
|
-
h[k.to_sym] = v
|
69
|
-
}
|
70
63
|
|
71
|
-
|
72
|
-
self.id = attributes[:'id']
|
64
|
+
h[k.to_sym] = v
|
73
65
|
end
|
74
66
|
|
75
|
-
if attributes.key?(:
|
76
|
-
self.email = attributes[:'email']
|
77
|
-
end
|
67
|
+
self.id = (attributes[:id] if attributes.key?(:id))
|
78
68
|
|
79
|
-
if attributes.key?(:
|
80
|
-
|
81
|
-
|
69
|
+
self.email = attributes[:email] if attributes.key?(:email)
|
70
|
+
|
71
|
+
return unless attributes.key?(:phone)
|
72
|
+
|
73
|
+
self.phone = attributes[:phone]
|
82
74
|
end
|
83
75
|
|
84
76
|
# Show invalid properties with the reasons. Usually used together with valid?
|
85
77
|
# @return Array for valid properties with the reasons
|
86
78
|
def list_invalid_properties
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
end
|
79
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
80
|
+
invalid_properties = []
|
81
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.') if @id.nil?
|
91
82
|
|
92
83
|
if @id.to_s.length > 150
|
93
84
|
invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 150.')
|
@@ -98,9 +89,7 @@ module MoneyKit
|
|
98
89
|
end
|
99
90
|
|
100
91
|
pattern = Regexp.new(/^[a-zA-Z0-9-_]+$/)
|
101
|
-
if @id !~ pattern
|
102
|
-
invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
|
103
|
-
end
|
92
|
+
invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.") if @id !~ pattern
|
104
93
|
|
105
94
|
invalid_properties
|
106
95
|
end
|
@@ -108,50 +97,49 @@ module MoneyKit
|
|
108
97
|
# Check to see if the all the properties in the model are valid
|
109
98
|
# @return true if the model is valid
|
110
99
|
def valid?
|
100
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
111
101
|
return false if @id.nil?
|
112
102
|
return false if @id.to_s.length > 150
|
113
103
|
return false if @id.to_s.length < 4
|
114
104
|
return false if @id !~ Regexp.new(/^[a-zA-Z0-9-_]+$/)
|
105
|
+
|
115
106
|
true
|
116
107
|
end
|
117
108
|
|
118
109
|
# Custom attribute writer method with validation
|
119
110
|
# @param [Object] id Value to be assigned
|
120
111
|
def id=(id)
|
121
|
-
if id.nil?
|
122
|
-
fail ArgumentError, 'id cannot be nil'
|
123
|
-
end
|
112
|
+
raise ArgumentError, 'id cannot be nil' if id.nil?
|
124
113
|
|
125
114
|
if id.to_s.length > 150
|
126
|
-
|
115
|
+
raise ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 150.'
|
127
116
|
end
|
128
117
|
|
129
118
|
if id.to_s.length < 4
|
130
|
-
|
119
|
+
raise ArgumentError, 'invalid value for "id", the character length must be great than or equal to 4.'
|
131
120
|
end
|
132
121
|
|
133
122
|
pattern = Regexp.new(/^[a-zA-Z0-9-_]+$/)
|
134
|
-
if id !~ pattern
|
135
|
-
fail ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}."
|
136
|
-
end
|
123
|
+
raise ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}." if id !~ pattern
|
137
124
|
|
138
125
|
@id = id
|
139
126
|
end
|
140
127
|
|
141
128
|
# Checks equality by comparing each attribute.
|
142
129
|
# @param [Object] Object to be compared
|
143
|
-
def ==(
|
144
|
-
return true if
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
130
|
+
def ==(other)
|
131
|
+
return true if equal?(other)
|
132
|
+
|
133
|
+
self.class == other.class &&
|
134
|
+
id == other.id &&
|
135
|
+
email == other.email &&
|
136
|
+
phone == other.phone
|
149
137
|
end
|
150
138
|
|
151
139
|
# @see the `==` method
|
152
140
|
# @param [Object] Object to be compared
|
153
|
-
def eql?(
|
154
|
-
self ==
|
141
|
+
def eql?(other)
|
142
|
+
self == other
|
155
143
|
end
|
156
144
|
|
157
145
|
# Calculates hash code according to all attributes.
|
@@ -164,37 +152,33 @@ module MoneyKit
|
|
164
152
|
# @param [Hash] attributes Model attributes in the form of hash
|
165
153
|
# @return [Object] Returns the model itself
|
166
154
|
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
155
|
return nil unless attributes.is_a?(Hash)
|
156
|
+
|
175
157
|
attributes = attributes.transform_keys(&:to_sym)
|
176
|
-
|
177
|
-
|
178
|
-
|
158
|
+
transformed_hash = {}
|
159
|
+
openapi_types.each_pair do |key, type|
|
160
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
161
|
+
transformed_hash["#{key}"] = nil
|
179
162
|
elsif type =~ /\AArray<(.*)>/i
|
180
163
|
# check to ensure the input is an array given that the attribute
|
181
164
|
# is documented as an array but the input is not
|
182
|
-
if attributes[
|
183
|
-
|
165
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
166
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map do |v|
|
167
|
+
_deserialize(::Regexp.last_match(1), v)
|
168
|
+
end
|
184
169
|
end
|
185
|
-
elsif !attributes[
|
186
|
-
|
170
|
+
elsif !attributes[attribute_map[key]].nil?
|
171
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
187
172
|
end
|
188
173
|
end
|
189
|
-
|
190
|
-
self
|
174
|
+
new(transformed_hash)
|
191
175
|
end
|
192
176
|
|
193
177
|
# Deserializes the data based on type
|
194
178
|
# @param string type Data type
|
195
179
|
# @param string value Value to be deserialized
|
196
180
|
# @return [Object] Deserialized data
|
197
|
-
def _deserialize(type, value)
|
181
|
+
def self._deserialize(type, value)
|
198
182
|
case type.to_sym
|
199
183
|
when :Time
|
200
184
|
Time.parse(value)
|
@@ -229,7 +213,7 @@ module MoneyKit
|
|
229
213
|
else # model
|
230
214
|
# models (e.g. Pet) or oneOf
|
231
215
|
klass = MoneyKit.const_get(type)
|
232
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
216
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
233
217
|
end
|
234
218
|
end
|
235
219
|
|
@@ -250,7 +234,7 @@ module MoneyKit
|
|
250
234
|
def to_hash
|
251
235
|
hash = {}
|
252
236
|
self.class.attribute_map.each_pair do |attr, param|
|
253
|
-
value =
|
237
|
+
value = send(attr)
|
254
238
|
if value.nil?
|
255
239
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
256
240
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -278,7 +262,5 @@ module MoneyKit
|
|
278
262
|
value
|
279
263
|
end
|
280
264
|
end
|
281
|
-
|
282
265
|
end
|
283
|
-
|
284
266
|
end
|