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