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