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'
|
@@ -24,8 +22,7 @@ module MoneyKit
|
|
24
22
|
attr_accessor :type
|
25
23
|
|
26
24
|
class EnumAttributeValidator
|
27
|
-
attr_reader :datatype
|
28
|
-
attr_reader :allowable_values
|
25
|
+
attr_reader :datatype, :allowable_values
|
29
26
|
|
30
27
|
def initialize(datatype, allowable_values)
|
31
28
|
@allowable_values = allowable_values.map do |value|
|
@@ -48,9 +45,9 @@ module MoneyKit
|
|
48
45
|
# Attribute mapping from ruby-style variable name to JSON key.
|
49
46
|
def self.attribute_map
|
50
47
|
{
|
51
|
-
|
52
|
-
|
53
|
-
|
48
|
+
'number': :number,
|
49
|
+
'primary': :primary,
|
50
|
+
'type': :type
|
54
51
|
}
|
55
52
|
end
|
56
53
|
|
@@ -62,59 +59,54 @@ module MoneyKit
|
|
62
59
|
# Attribute type mapping.
|
63
60
|
def self.openapi_types
|
64
61
|
{
|
65
|
-
|
66
|
-
|
67
|
-
|
62
|
+
'number': :String,
|
63
|
+
'primary': :Boolean,
|
64
|
+
'type': :PhoneNumberType
|
68
65
|
}
|
69
66
|
end
|
70
67
|
|
71
68
|
# List of attributes with nullable: true
|
72
69
|
def self.openapi_nullable
|
73
|
-
Set.new([
|
74
|
-
])
|
70
|
+
Set.new([])
|
75
71
|
end
|
76
72
|
|
77
73
|
# Initializes the object
|
78
74
|
# @param [Hash] attributes Model attributes in the form of hash
|
79
75
|
def initialize(attributes = {})
|
80
|
-
|
81
|
-
|
76
|
+
unless attributes.is_a?(Hash)
|
77
|
+
raise ArgumentError,
|
78
|
+
'The input argument (attributes) must be a hash in `MoneyKit::PhoneNumber` initialize method'
|
82
79
|
end
|
83
80
|
|
84
81
|
# check to see if the attribute exists and convert string to symbol for hash key
|
85
|
-
attributes = attributes.each_with_object({})
|
86
|
-
|
87
|
-
|
82
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
83
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
84
|
+
raise ArgumentError,
|
85
|
+
"`#{k}` is not a valid attribute in `MoneyKit::PhoneNumber`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
88
86
|
end
|
89
|
-
h[k.to_sym] = v
|
90
|
-
}
|
91
87
|
|
92
|
-
|
93
|
-
self.number = attributes[:'number']
|
88
|
+
h[k.to_sym] = v
|
94
89
|
end
|
95
90
|
|
96
|
-
if attributes.key?(:
|
97
|
-
self.primary = attributes[:'primary']
|
98
|
-
else
|
99
|
-
self.primary = false
|
100
|
-
end
|
91
|
+
self.number = (attributes[:number] if attributes.key?(:number))
|
101
92
|
|
102
|
-
if attributes.key?(:
|
103
|
-
|
104
|
-
|
93
|
+
self.primary = if attributes.key?(:primary)
|
94
|
+
attributes[:primary]
|
95
|
+
else
|
96
|
+
false
|
97
|
+
end
|
98
|
+
|
99
|
+
self.type = (attributes[:type] if attributes.key?(:type))
|
105
100
|
end
|
106
101
|
|
107
102
|
# Show invalid properties with the reasons. Usually used together with valid?
|
108
103
|
# @return Array for valid properties with the reasons
|
109
104
|
def list_invalid_properties
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
end
|
105
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
106
|
+
invalid_properties = []
|
107
|
+
invalid_properties.push('invalid value for "number", number cannot be nil.') if @number.nil?
|
114
108
|
|
115
|
-
if @type.nil?
|
116
|
-
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
117
|
-
end
|
109
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.') if @type.nil?
|
118
110
|
|
119
111
|
invalid_properties
|
120
112
|
end
|
@@ -122,25 +114,28 @@ module MoneyKit
|
|
122
114
|
# Check to see if the all the properties in the model are valid
|
123
115
|
# @return true if the model is valid
|
124
116
|
def valid?
|
117
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
125
118
|
return false if @number.nil?
|
126
119
|
return false if @type.nil?
|
120
|
+
|
127
121
|
true
|
128
122
|
end
|
129
123
|
|
130
124
|
# Checks equality by comparing each attribute.
|
131
125
|
# @param [Object] Object to be compared
|
132
|
-
def ==(
|
133
|
-
return true if
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
126
|
+
def ==(other)
|
127
|
+
return true if equal?(other)
|
128
|
+
|
129
|
+
self.class == other.class &&
|
130
|
+
number == other.number &&
|
131
|
+
primary == other.primary &&
|
132
|
+
type == other.type
|
138
133
|
end
|
139
134
|
|
140
135
|
# @see the `==` method
|
141
136
|
# @param [Object] Object to be compared
|
142
|
-
def eql?(
|
143
|
-
self ==
|
137
|
+
def eql?(other)
|
138
|
+
self == other
|
144
139
|
end
|
145
140
|
|
146
141
|
# Calculates hash code according to all attributes.
|
@@ -153,37 +148,33 @@ module MoneyKit
|
|
153
148
|
# @param [Hash] attributes Model attributes in the form of hash
|
154
149
|
# @return [Object] Returns the model itself
|
155
150
|
def self.build_from_hash(attributes)
|
156
|
-
new.build_from_hash(attributes)
|
157
|
-
end
|
158
|
-
|
159
|
-
# Builds the object from hash
|
160
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
161
|
-
# @return [Object] Returns the model itself
|
162
|
-
def build_from_hash(attributes)
|
163
151
|
return nil unless attributes.is_a?(Hash)
|
152
|
+
|
164
153
|
attributes = attributes.transform_keys(&:to_sym)
|
165
|
-
|
166
|
-
|
167
|
-
|
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
|
168
158
|
elsif type =~ /\AArray<(.*)>/i
|
169
159
|
# check to ensure the input is an array given that the attribute
|
170
160
|
# is documented as an array but the input is not
|
171
|
-
if attributes[
|
172
|
-
|
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
|
173
165
|
end
|
174
|
-
elsif !attributes[
|
175
|
-
|
166
|
+
elsif !attributes[attribute_map[key]].nil?
|
167
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
176
168
|
end
|
177
169
|
end
|
178
|
-
|
179
|
-
self
|
170
|
+
new(transformed_hash)
|
180
171
|
end
|
181
172
|
|
182
173
|
# Deserializes the data based on type
|
183
174
|
# @param string type Data type
|
184
175
|
# @param string value Value to be deserialized
|
185
176
|
# @return [Object] Deserialized data
|
186
|
-
def _deserialize(type, value)
|
177
|
+
def self._deserialize(type, value)
|
187
178
|
case type.to_sym
|
188
179
|
when :Time
|
189
180
|
Time.parse(value)
|
@@ -218,7 +209,7 @@ module MoneyKit
|
|
218
209
|
else # model
|
219
210
|
# models (e.g. Pet) or oneOf
|
220
211
|
klass = MoneyKit.const_get(type)
|
221
|
-
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)
|
222
213
|
end
|
223
214
|
end
|
224
215
|
|
@@ -239,7 +230,7 @@ module MoneyKit
|
|
239
230
|
def to_hash
|
240
231
|
hash = {}
|
241
232
|
self.class.attribute_map.each_pair do |attr, param|
|
242
|
-
value =
|
233
|
+
value = send(attr)
|
243
234
|
if value.nil?
|
244
235
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
245
236
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -267,7 +258,5 @@ module MoneyKit
|
|
267
258
|
value
|
268
259
|
end
|
269
260
|
end
|
270
|
-
|
271
261
|
end
|
272
|
-
|
273
262
|
end
|
@@ -1,24 +1,22 @@
|
|
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 PhoneNumberType
|
18
|
-
HOME =
|
19
|
-
WORK =
|
20
|
-
MOBILE =
|
21
|
-
OTHER =
|
16
|
+
HOME = 'home'.freeze
|
17
|
+
WORK = 'work'.freeze
|
18
|
+
MOBILE = 'mobile'.freeze
|
19
|
+
OTHER = 'other'.freeze
|
22
20
|
|
23
21
|
def self.all_vars
|
24
22
|
@all_vars ||= [HOME, WORK, MOBILE, OTHER].freeze
|
@@ -36,6 +34,7 @@ module MoneyKit
|
|
36
34
|
# @return [String] The enum value
|
37
35
|
def build_from_hash(value)
|
38
36
|
return value if PhoneNumberType.all_vars.include?(value)
|
37
|
+
|
39
38
|
raise "Invalid ENUM value #{value} for class #PhoneNumberType"
|
40
39
|
end
|
41
40
|
end
|
@@ -1,24 +1,22 @@
|
|
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 Product
|
18
|
-
ACCOUNTS =
|
19
|
-
ACCOUNT_NUMBERS =
|
20
|
-
IDENTITY =
|
21
|
-
TRANSACTIONS =
|
16
|
+
ACCOUNTS = 'accounts'.freeze
|
17
|
+
ACCOUNT_NUMBERS = 'account_numbers'.freeze
|
18
|
+
IDENTITY = 'identity'.freeze
|
19
|
+
TRANSACTIONS = 'transactions'.freeze
|
22
20
|
|
23
21
|
def self.all_vars
|
24
22
|
@all_vars ||= [ACCOUNTS, ACCOUNT_NUMBERS, IDENTITY, TRANSACTIONS].freeze
|
@@ -36,6 +34,7 @@ module MoneyKit
|
|
36
34
|
# @return [String] The enum value
|
37
35
|
def build_from_hash(value)
|
38
36
|
return value if Product.all_vars.include?(value)
|
37
|
+
|
39
38
|
raise "Invalid ENUM value #{value} for class #Product"
|
40
39
|
end
|
41
40
|
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: 6.5.0
|
9
|
+
#
|
12
10
|
|
13
11
|
require 'date'
|
14
12
|
require 'time'
|
@@ -16,21 +14,15 @@ require 'time'
|
|
16
14
|
module MoneyKit
|
17
15
|
# The granted products available for this link.
|
18
16
|
class Products
|
19
|
-
attr_accessor :accounts
|
20
|
-
|
21
|
-
attr_accessor :account_numbers
|
22
|
-
|
23
|
-
attr_accessor :identity
|
24
|
-
|
25
|
-
attr_accessor :transactions
|
17
|
+
attr_accessor :accounts, :account_numbers, :identity, :transactions
|
26
18
|
|
27
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
20
|
def self.attribute_map
|
29
21
|
{
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
22
|
+
'accounts': :accounts,
|
23
|
+
'account_numbers': :account_numbers,
|
24
|
+
'identity': :identity,
|
25
|
+
'transactions': :transactions
|
34
26
|
}
|
35
27
|
end
|
36
28
|
|
@@ -42,63 +34,57 @@ module MoneyKit
|
|
42
34
|
# Attribute type mapping.
|
43
35
|
def self.openapi_types
|
44
36
|
{
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
37
|
+
'accounts': :AccountsLinkProduct,
|
38
|
+
'account_numbers': :AccountNumbersLinkProduct,
|
39
|
+
'identity': :IdentityLinkProduct,
|
40
|
+
'transactions': :TransactionsLinkProduct
|
49
41
|
}
|
50
42
|
end
|
51
43
|
|
52
44
|
# List of attributes with nullable: true
|
53
45
|
def self.openapi_nullable
|
54
|
-
Set.new([
|
55
|
-
])
|
46
|
+
Set.new([])
|
56
47
|
end
|
57
48
|
|
58
49
|
# List of class defined in allOf (OpenAPI v3)
|
59
50
|
def self.openapi_all_of
|
60
51
|
[
|
61
|
-
|
52
|
+
:LinkProducts
|
62
53
|
]
|
63
54
|
end
|
64
55
|
|
65
56
|
# Initializes the object
|
66
57
|
# @param [Hash] attributes Model attributes in the form of hash
|
67
58
|
def initialize(attributes = {})
|
68
|
-
|
69
|
-
|
59
|
+
unless attributes.is_a?(Hash)
|
60
|
+
raise ArgumentError, 'The input argument (attributes) must be a hash in `MoneyKit::Products` initialize method'
|
70
61
|
end
|
71
62
|
|
72
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
73
|
-
attributes = attributes.each_with_object({})
|
74
|
-
|
75
|
-
|
64
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
65
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
66
|
+
raise ArgumentError,
|
67
|
+
"`#{k}` is not a valid attribute in `MoneyKit::Products`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
76
68
|
end
|
77
|
-
h[k.to_sym] = v
|
78
|
-
}
|
79
69
|
|
80
|
-
|
81
|
-
self.accounts = attributes[:'accounts']
|
70
|
+
h[k.to_sym] = v
|
82
71
|
end
|
83
72
|
|
84
|
-
if attributes.key?(:
|
85
|
-
self.account_numbers = attributes[:'account_numbers']
|
86
|
-
end
|
73
|
+
self.accounts = attributes[:accounts] if attributes.key?(:accounts)
|
87
74
|
|
88
|
-
if attributes.key?(:
|
89
|
-
self.identity = attributes[:'identity']
|
90
|
-
end
|
75
|
+
self.account_numbers = attributes[:account_numbers] if attributes.key?(:account_numbers)
|
91
76
|
|
92
|
-
if attributes.key?(:
|
93
|
-
|
94
|
-
|
77
|
+
self.identity = attributes[:identity] if attributes.key?(:identity)
|
78
|
+
|
79
|
+
return unless attributes.key?(:transactions)
|
80
|
+
|
81
|
+
self.transactions = attributes[:transactions]
|
95
82
|
end
|
96
83
|
|
97
84
|
# Show invalid properties with the reasons. Usually used together with valid?
|
98
85
|
# @return Array for valid properties with the reasons
|
99
86
|
def list_invalid_properties
|
100
|
-
|
101
|
-
invalid_properties
|
87
|
+
[]
|
102
88
|
end
|
103
89
|
|
104
90
|
# Check to see if the all the properties in the model are valid
|
@@ -109,19 +95,20 @@ module MoneyKit
|
|
109
95
|
|
110
96
|
# Checks equality by comparing each attribute.
|
111
97
|
# @param [Object] Object to be compared
|
112
|
-
def ==(
|
113
|
-
return true if
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
98
|
+
def ==(other)
|
99
|
+
return true if equal?(other)
|
100
|
+
|
101
|
+
self.class == other.class &&
|
102
|
+
accounts == other.accounts &&
|
103
|
+
account_numbers == other.account_numbers &&
|
104
|
+
identity == other.identity &&
|
105
|
+
transactions == other.transactions
|
119
106
|
end
|
120
107
|
|
121
108
|
# @see the `==` method
|
122
109
|
# @param [Object] Object to be compared
|
123
|
-
def eql?(
|
124
|
-
self ==
|
110
|
+
def eql?(other)
|
111
|
+
self == other
|
125
112
|
end
|
126
113
|
|
127
114
|
# Calculates hash code according to all attributes.
|
@@ -142,18 +129,21 @@ module MoneyKit
|
|
142
129
|
# @return [Object] Returns the model itself
|
143
130
|
def build_from_hash(attributes)
|
144
131
|
return nil unless attributes.is_a?(Hash)
|
132
|
+
|
145
133
|
attributes = attributes.transform_keys(&:to_sym)
|
146
134
|
self.class.openapi_types.each_pair do |key, type|
|
147
135
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
148
|
-
|
136
|
+
send("#{key}=", nil)
|
149
137
|
elsif type =~ /\AArray<(.*)>/i
|
150
138
|
# check to ensure the input is an array given that the attribute
|
151
139
|
# is documented as an array but the input is not
|
152
140
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
153
|
-
|
141
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
|
142
|
+
_deserialize(::Regexp.last_match(1), v)
|
143
|
+
end)
|
154
144
|
end
|
155
145
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
156
|
-
|
146
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
157
147
|
end
|
158
148
|
end
|
159
149
|
|
@@ -220,7 +210,7 @@ module MoneyKit
|
|
220
210
|
def to_hash
|
221
211
|
hash = {}
|
222
212
|
self.class.attribute_map.each_pair do |attr, param|
|
223
|
-
value =
|
213
|
+
value = send(attr)
|
224
214
|
if value.nil?
|
225
215
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
226
216
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -248,7 +238,5 @@ module MoneyKit
|
|
248
238
|
value
|
249
239
|
end
|
250
240
|
end
|
251
|
-
|
252
241
|
end
|
253
|
-
|
254
242
|
end
|