moneykit 0.0.2 → 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 +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'
|
@@ -33,11 +31,11 @@ module MoneyKit
|
|
33
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
34
32
|
def self.attribute_map
|
35
33
|
{
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
34
|
+
'client_id': :client_id,
|
35
|
+
'client_name': :client_name,
|
36
|
+
'scope': :scope,
|
37
|
+
'app': :app,
|
38
|
+
'disabled_at': :disabled_at
|
41
39
|
}
|
42
40
|
end
|
43
41
|
|
@@ -49,76 +47,62 @@ module MoneyKit
|
|
49
47
|
# Attribute type mapping.
|
50
48
|
def self.openapi_types
|
51
49
|
{
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
50
|
+
'client_id': :String,
|
51
|
+
'client_name': :String,
|
52
|
+
'scope': :String,
|
53
|
+
'app': :CustomerApp,
|
54
|
+
'disabled_at': :Time
|
57
55
|
}
|
58
56
|
end
|
59
57
|
|
60
58
|
# List of attributes with nullable: true
|
61
59
|
def self.openapi_nullable
|
62
|
-
Set.new([
|
63
|
-
:'disabled_at'
|
64
|
-
])
|
60
|
+
Set.new([])
|
65
61
|
end
|
66
62
|
|
67
63
|
# Initializes the object
|
68
64
|
# @param [Hash] attributes Model attributes in the form of hash
|
69
65
|
def initialize(attributes = {})
|
70
|
-
|
71
|
-
|
66
|
+
unless attributes.is_a?(Hash)
|
67
|
+
raise ArgumentError,
|
68
|
+
'The input argument (attributes) must be a hash in `MoneyKit::IntrospectClientResponse` initialize method'
|
72
69
|
end
|
73
70
|
|
74
71
|
# check to see if the attribute exists and convert string to symbol for hash key
|
75
|
-
attributes = attributes.each_with_object({})
|
76
|
-
|
77
|
-
|
72
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
73
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
74
|
+
raise ArgumentError,
|
75
|
+
"`#{k}` is not a valid attribute in `MoneyKit::IntrospectClientResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
78
76
|
end
|
79
|
-
h[k.to_sym] = v
|
80
|
-
}
|
81
77
|
|
82
|
-
|
83
|
-
self.client_id = attributes[:'client_id']
|
78
|
+
h[k.to_sym] = v
|
84
79
|
end
|
85
80
|
|
86
|
-
if attributes.key?(:
|
87
|
-
self.client_name = attributes[:'client_name']
|
88
|
-
end
|
81
|
+
self.client_id = (attributes[:client_id] if attributes.key?(:client_id))
|
89
82
|
|
90
|
-
if attributes.key?(:
|
91
|
-
self.scope = attributes[:'scope']
|
92
|
-
end
|
83
|
+
self.client_name = (attributes[:client_name] if attributes.key?(:client_name))
|
93
84
|
|
94
|
-
if attributes.key?(:
|
95
|
-
self.app = attributes[:'app']
|
96
|
-
end
|
85
|
+
self.scope = (attributes[:scope] if attributes.key?(:scope))
|
97
86
|
|
98
|
-
if attributes.key?(:
|
99
|
-
|
100
|
-
|
87
|
+
self.app = (attributes[:app] if attributes.key?(:app))
|
88
|
+
|
89
|
+
return unless attributes.key?(:disabled_at)
|
90
|
+
|
91
|
+
self.disabled_at = attributes[:disabled_at]
|
101
92
|
end
|
102
93
|
|
103
94
|
# Show invalid properties with the reasons. Usually used together with valid?
|
104
95
|
# @return Array for valid properties with the reasons
|
105
96
|
def list_invalid_properties
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
end
|
97
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
98
|
+
invalid_properties = []
|
99
|
+
invalid_properties.push('invalid value for "client_id", client_id cannot be nil.') if @client_id.nil?
|
110
100
|
|
111
|
-
if @client_name.nil?
|
112
|
-
invalid_properties.push('invalid value for "client_name", client_name cannot be nil.')
|
113
|
-
end
|
101
|
+
invalid_properties.push('invalid value for "client_name", client_name cannot be nil.') if @client_name.nil?
|
114
102
|
|
115
|
-
if @scope.nil?
|
116
|
-
invalid_properties.push('invalid value for "scope", scope cannot be nil.')
|
117
|
-
end
|
103
|
+
invalid_properties.push('invalid value for "scope", scope cannot be nil.') if @scope.nil?
|
118
104
|
|
119
|
-
if @app.nil?
|
120
|
-
invalid_properties.push('invalid value for "app", app cannot be nil.')
|
121
|
-
end
|
105
|
+
invalid_properties.push('invalid value for "app", app cannot be nil.') if @app.nil?
|
122
106
|
|
123
107
|
invalid_properties
|
124
108
|
end
|
@@ -126,29 +110,32 @@ module MoneyKit
|
|
126
110
|
# Check to see if the all the properties in the model are valid
|
127
111
|
# @return true if the model is valid
|
128
112
|
def valid?
|
113
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
129
114
|
return false if @client_id.nil?
|
130
115
|
return false if @client_name.nil?
|
131
116
|
return false if @scope.nil?
|
132
117
|
return false if @app.nil?
|
118
|
+
|
133
119
|
true
|
134
120
|
end
|
135
121
|
|
136
122
|
# Checks equality by comparing each attribute.
|
137
123
|
# @param [Object] Object to be compared
|
138
|
-
def ==(
|
139
|
-
return true if
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
124
|
+
def ==(other)
|
125
|
+
return true if equal?(other)
|
126
|
+
|
127
|
+
self.class == other.class &&
|
128
|
+
client_id == other.client_id &&
|
129
|
+
client_name == other.client_name &&
|
130
|
+
scope == other.scope &&
|
131
|
+
app == other.app &&
|
132
|
+
disabled_at == other.disabled_at
|
146
133
|
end
|
147
134
|
|
148
135
|
# @see the `==` method
|
149
136
|
# @param [Object] Object to be compared
|
150
|
-
def eql?(
|
151
|
-
self ==
|
137
|
+
def eql?(other)
|
138
|
+
self == other
|
152
139
|
end
|
153
140
|
|
154
141
|
# Calculates hash code according to all attributes.
|
@@ -161,37 +148,33 @@ module MoneyKit
|
|
161
148
|
# @param [Hash] attributes Model attributes in the form of hash
|
162
149
|
# @return [Object] Returns the model itself
|
163
150
|
def self.build_from_hash(attributes)
|
164
|
-
new.build_from_hash(attributes)
|
165
|
-
end
|
166
|
-
|
167
|
-
# Builds the object from hash
|
168
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
169
|
-
# @return [Object] Returns the model itself
|
170
|
-
def build_from_hash(attributes)
|
171
151
|
return nil unless attributes.is_a?(Hash)
|
152
|
+
|
172
153
|
attributes = attributes.transform_keys(&:to_sym)
|
173
|
-
|
174
|
-
|
175
|
-
|
154
|
+
transformed_hash = {}
|
155
|
+
openapi_types.each_pair do |key, type|
|
156
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
157
|
+
transformed_hash["#{key}"] = nil
|
176
158
|
elsif type =~ /\AArray<(.*)>/i
|
177
159
|
# check to ensure the input is an array given that the attribute
|
178
160
|
# is documented as an array but the input is not
|
179
|
-
if attributes[
|
180
|
-
|
161
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
162
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map do |v|
|
163
|
+
_deserialize(::Regexp.last_match(1), v)
|
164
|
+
end
|
181
165
|
end
|
182
|
-
elsif !attributes[
|
183
|
-
|
166
|
+
elsif !attributes[attribute_map[key]].nil?
|
167
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
184
168
|
end
|
185
169
|
end
|
186
|
-
|
187
|
-
self
|
170
|
+
new(transformed_hash)
|
188
171
|
end
|
189
172
|
|
190
173
|
# Deserializes the data based on type
|
191
174
|
# @param string type Data type
|
192
175
|
# @param string value Value to be deserialized
|
193
176
|
# @return [Object] Deserialized data
|
194
|
-
def _deserialize(type, value)
|
177
|
+
def self._deserialize(type, value)
|
195
178
|
case type.to_sym
|
196
179
|
when :Time
|
197
180
|
Time.parse(value)
|
@@ -226,7 +209,7 @@ module MoneyKit
|
|
226
209
|
else # model
|
227
210
|
# models (e.g. Pet) or oneOf
|
228
211
|
klass = MoneyKit.const_get(type)
|
229
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
212
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
230
213
|
end
|
231
214
|
end
|
232
215
|
|
@@ -247,7 +230,7 @@ module MoneyKit
|
|
247
230
|
def to_hash
|
248
231
|
hash = {}
|
249
232
|
self.class.attribute_map.each_pair do |attr, param|
|
250
|
-
value =
|
233
|
+
value = send(attr)
|
251
234
|
if value.nil?
|
252
235
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
253
236
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -275,7 +258,5 @@ module MoneyKit
|
|
275
258
|
value
|
276
259
|
end
|
277
260
|
end
|
278
|
-
|
279
261
|
end
|
280
|
-
|
281
262
|
end
|
@@ -1,27 +1,24 @@
|
|
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'
|
15
13
|
|
16
14
|
module MoneyKit
|
17
15
|
class JWKSet
|
18
|
-
# JWKs used for validating MoneyKit-issued tokens.
|
19
16
|
attr_accessor :keys
|
20
17
|
|
21
18
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
19
|
def self.attribute_map
|
23
20
|
{
|
24
|
-
|
21
|
+
'keys': :keys
|
25
22
|
}
|
26
23
|
end
|
27
24
|
|
@@ -33,45 +30,47 @@ module MoneyKit
|
|
33
30
|
# Attribute type mapping.
|
34
31
|
def self.openapi_types
|
35
32
|
{
|
36
|
-
|
33
|
+
'keys': :'Array<Object>'
|
37
34
|
}
|
38
35
|
end
|
39
36
|
|
40
37
|
# List of attributes with nullable: true
|
41
38
|
def self.openapi_nullable
|
42
|
-
Set.new([
|
43
|
-
])
|
39
|
+
Set.new([])
|
44
40
|
end
|
45
41
|
|
46
42
|
# Initializes the object
|
47
43
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
44
|
def initialize(attributes = {})
|
49
|
-
|
50
|
-
|
45
|
+
unless attributes.is_a?(Hash)
|
46
|
+
raise ArgumentError, 'The input argument (attributes) must be a hash in `MoneyKit::JWKSet` initialize method'
|
51
47
|
end
|
52
48
|
|
53
49
|
# check to see if the attribute exists and convert string to symbol for hash key
|
54
|
-
attributes = attributes.each_with_object({})
|
55
|
-
|
56
|
-
|
50
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
51
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
52
|
+
raise ArgumentError,
|
53
|
+
"`#{k}` is not a valid attribute in `MoneyKit::JWKSet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
54
|
end
|
55
|
+
|
58
56
|
h[k.to_sym] = v
|
59
|
-
|
57
|
+
end
|
60
58
|
|
61
|
-
if attributes.key?(:
|
62
|
-
if (value = attributes[:
|
59
|
+
if attributes.key?(:keys)
|
60
|
+
if (value = attributes[:keys]).is_a?(Array)
|
63
61
|
self.keys = value
|
64
62
|
end
|
63
|
+
else
|
64
|
+
self.keys = nil
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
68
|
# Show invalid properties with the reasons. Usually used together with valid?
|
69
69
|
# @return Array for valid properties with the reasons
|
70
70
|
def list_invalid_properties
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
end
|
71
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
72
|
+
invalid_properties = []
|
73
|
+
invalid_properties.push('invalid value for "keys", keys cannot be nil.') if @keys.nil?
|
75
74
|
|
76
75
|
invalid_properties
|
77
76
|
end
|
@@ -79,22 +78,25 @@ module MoneyKit
|
|
79
78
|
# Check to see if the all the properties in the model are valid
|
80
79
|
# @return true if the model is valid
|
81
80
|
def valid?
|
81
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
82
82
|
return false if @keys.nil?
|
83
|
+
|
83
84
|
true
|
84
85
|
end
|
85
86
|
|
86
87
|
# Checks equality by comparing each attribute.
|
87
88
|
# @param [Object] Object to be compared
|
88
|
-
def ==(
|
89
|
-
return true if
|
90
|
-
|
91
|
-
|
89
|
+
def ==(other)
|
90
|
+
return true if equal?(other)
|
91
|
+
|
92
|
+
self.class == other.class &&
|
93
|
+
keys == other.keys
|
92
94
|
end
|
93
95
|
|
94
96
|
# @see the `==` method
|
95
97
|
# @param [Object] Object to be compared
|
96
|
-
def eql?(
|
97
|
-
self ==
|
98
|
+
def eql?(other)
|
99
|
+
self == other
|
98
100
|
end
|
99
101
|
|
100
102
|
# Calculates hash code according to all attributes.
|
@@ -107,37 +109,33 @@ module MoneyKit
|
|
107
109
|
# @param [Hash] attributes Model attributes in the form of hash
|
108
110
|
# @return [Object] Returns the model itself
|
109
111
|
def self.build_from_hash(attributes)
|
110
|
-
new.build_from_hash(attributes)
|
111
|
-
end
|
112
|
-
|
113
|
-
# Builds the object from hash
|
114
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
115
|
-
# @return [Object] Returns the model itself
|
116
|
-
def build_from_hash(attributes)
|
117
112
|
return nil unless attributes.is_a?(Hash)
|
113
|
+
|
118
114
|
attributes = attributes.transform_keys(&:to_sym)
|
119
|
-
|
120
|
-
|
121
|
-
|
115
|
+
transformed_hash = {}
|
116
|
+
openapi_types.each_pair do |key, type|
|
117
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
118
|
+
transformed_hash["#{key}"] = nil
|
122
119
|
elsif type =~ /\AArray<(.*)>/i
|
123
120
|
# check to ensure the input is an array given that the attribute
|
124
121
|
# is documented as an array but the input is not
|
125
|
-
if attributes[
|
126
|
-
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map do |v|
|
124
|
+
_deserialize(::Regexp.last_match(1), v)
|
125
|
+
end
|
127
126
|
end
|
128
|
-
elsif !attributes[
|
129
|
-
|
127
|
+
elsif !attributes[attribute_map[key]].nil?
|
128
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
130
129
|
end
|
131
130
|
end
|
132
|
-
|
133
|
-
self
|
131
|
+
new(transformed_hash)
|
134
132
|
end
|
135
133
|
|
136
134
|
# Deserializes the data based on type
|
137
135
|
# @param string type Data type
|
138
136
|
# @param string value Value to be deserialized
|
139
137
|
# @return [Object] Deserialized data
|
140
|
-
def _deserialize(type, value)
|
138
|
+
def self._deserialize(type, value)
|
141
139
|
case type.to_sym
|
142
140
|
when :Time
|
143
141
|
Time.parse(value)
|
@@ -172,7 +170,7 @@ module MoneyKit
|
|
172
170
|
else # model
|
173
171
|
# models (e.g. Pet) or oneOf
|
174
172
|
klass = MoneyKit.const_get(type)
|
175
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
173
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
176
174
|
end
|
177
175
|
end
|
178
176
|
|
@@ -193,7 +191,7 @@ module MoneyKit
|
|
193
191
|
def to_hash
|
194
192
|
hash = {}
|
195
193
|
self.class.attribute_map.each_pair do |attr, param|
|
196
|
-
value =
|
194
|
+
value = send(attr)
|
197
195
|
if value.nil?
|
198
196
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
199
197
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -221,7 +219,5 @@ module MoneyKit
|
|
221
219
|
value
|
222
220
|
end
|
223
221
|
end
|
224
|
-
|
225
222
|
end
|
226
|
-
|
227
223
|
end
|