moneykit 0.0.2 → 0.0.3
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/lib/moneykit/api/access_token_api.rb +53 -55
- data/lib/moneykit/api/account_numbers_api.rb +24 -24
- data/lib/moneykit/api/accounts_api.rb +86 -80
- data/lib/moneykit/api/identity_api.rb +29 -28
- 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 +74 -81
- data/lib/moneykit/api/products_api.rb +31 -33
- data/lib/moneykit/api/transactions_api.rb +112 -87
- data/lib/moneykit/api/users_api.rb +96 -79
- data/lib/moneykit/api_client.rb +64 -71
- data/lib/moneykit/api_error.rb +14 -16
- data/lib/moneykit/configuration.rb +42 -45
- data/lib/moneykit/models/account.rb +62 -78
- data/lib/moneykit/models/account_balances.rb +58 -63
- data/lib/moneykit/models/account_group.rb +47 -47
- data/lib/moneykit/models/account_identity.rb +69 -89
- data/lib/moneykit/models/account_numbers.rb +50 -49
- data/lib/moneykit/models/account_numbers_link_product.rb +52 -54
- data/lib/moneykit/models/account_numbers_product_settings.rb +49 -48
- data/lib/moneykit/models/account_type.rb +23 -23
- data/lib/moneykit/models/account_with_account_numbers.rb +68 -89
- data/lib/moneykit/models/accounts_link_product.rb +46 -46
- data/lib/moneykit/models/ach_number.rb +48 -49
- data/lib/moneykit/models/address.rb +66 -75
- data/lib/moneykit/models/api_error_auth_expired_access_token_response.rb +63 -62
- data/lib/moneykit/models/api_error_auth_unauthorized_response.rb +60 -62
- data/lib/moneykit/models/api_error_rate_limit_exceeded_response.rb +63 -62
- data/lib/moneykit/models/app.rb +46 -50
- data/lib/moneykit/models/bacs_number.rb +45 -46
- data/lib/moneykit/models/balances.rb +58 -64
- data/lib/moneykit/models/basic_account_details.rb +55 -61
- data/lib/moneykit/models/country.rb +13 -14
- data/lib/moneykit/models/create_link_session_request.rb +83 -96
- data/lib/moneykit/models/create_link_session_response.rb +40 -37
- data/lib/moneykit/models/currency.rb +193 -193
- data/lib/moneykit/models/cursor.rb +40 -39
- data/lib/moneykit/models/cursor_pagination.rb +40 -38
- data/lib/moneykit/models/cursors.rb +40 -39
- data/lib/moneykit/models/customer_app.rb +46 -49
- data/lib/moneykit/models/customer_user.rb +59 -69
- data/lib/moneykit/models/eft_number.rb +48 -52
- data/lib/moneykit/models/email.rb +46 -48
- data/lib/moneykit/models/email1.rb +50 -53
- data/lib/moneykit/models/exchange_token_request.rb +40 -37
- data/lib/moneykit/models/exchange_token_response.rb +46 -49
- data/lib/moneykit/models/generate_access_token_response.rb +51 -58
- data/lib/moneykit/models/get_account_numbers_response.rb +48 -53
- data/lib/moneykit/models/get_account_response.rb +47 -52
- data/lib/moneykit/models/get_accounts_response.rb +47 -50
- data/lib/moneykit/models/get_institutions_response.rb +47 -50
- data/lib/moneykit/models/get_transactions_response.rb +68 -87
- data/lib/moneykit/models/get_user_accounts_response.rb +42 -42
- data/lib/moneykit/models/get_user_links_response.rb +42 -42
- data/lib/moneykit/models/get_user_transactions_response.rb +64 -82
- data/lib/moneykit/models/http_validation_error.rb +68 -71
- data/lib/moneykit/models/identity.rb +49 -49
- data/lib/moneykit/models/identity_link_product.rb +52 -54
- data/lib/moneykit/models/identity_product_settings.rb +49 -48
- data/lib/moneykit/models/identity_response.rb +47 -50
- data/lib/moneykit/models/institution.rb +77 -96
- data/lib/moneykit/models/institution_error_not_found_response.rb +63 -64
- data/lib/moneykit/models/institution_styling_response.rb +77 -93
- data/lib/moneykit/models/international_number.rb +46 -49
- data/lib/moneykit/models/introspect_client_response.rb +61 -73
- data/lib/moneykit/models/jwk_set.rb +41 -42
- 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 +78 -99
- data/lib/moneykit/models/link_error.rb +19 -19
- data/lib/moneykit/models/link_error_bad_state_response.rb +64 -72
- data/lib/moneykit/models/link_error_deleted_response.rb +63 -64
- data/lib/moneykit/models/link_error_forbidden_action_response.rb +60 -62
- data/lib/moneykit/models/link_error_not_found_response.rb +63 -64
- data/lib/moneykit/models/link_error_unauthorized_access_response.rb +63 -64
- data/lib/moneykit/models/link_permission_scope.rb +14 -15
- data/lib/moneykit/models/link_permissions.rb +43 -43
- data/lib/moneykit/models/link_products.rb +52 -63
- data/lib/moneykit/models/link_response.rb +90 -118
- data/lib/moneykit/models/link_session_customer_user.rb +58 -68
- data/lib/moneykit/models/link_session_customer_user_email.rb +50 -52
- data/lib/moneykit/models/link_session_customer_user_phone.rb +60 -67
- data/lib/moneykit/models/link_session_error_forbidden_config_response.rb +60 -62
- data/lib/moneykit/models/link_session_error_invalid_token_exchange.rb +60 -62
- data/lib/moneykit/models/link_session_setting_overrides.rb +61 -72
- data/lib/moneykit/models/link_state.rb +15 -16
- data/lib/moneykit/models/link_state_changed_webhook.rb +110 -134
- 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 +49 -48
- data/lib/moneykit/models/moneylink_features.rb +50 -49
- data/lib/moneykit/models/numbers.rb +60 -73
- data/lib/moneykit/models/owner.rb +59 -72
- data/lib/moneykit/models/phone.rb +60 -68
- data/lib/moneykit/models/phone_number.rb +55 -59
- 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 +48 -55
- data/lib/moneykit/models/provider.rb +15 -16
- data/lib/moneykit/models/refresh_products_request.rb +43 -45
- data/lib/moneykit/models/requested_link_permission.rb +52 -60
- data/lib/moneykit/models/response401_disconnect_links_id_delete.rb +71 -77
- data/lib/moneykit/models/response401_exchange_token_link_session_exchange_token_post.rb +66 -72
- data/lib/moneykit/models/response401_get_account_links_id_accounts_account_id_get.rb +71 -77
- data/lib/moneykit/models/response401_get_account_numbers_links_id_accounts_numbers_get.rb +71 -77
- data/lib/moneykit/models/response401_get_accounts_links_id_accounts_get.rb +71 -77
- data/lib/moneykit/models/response401_get_identities_links_id_identity_get.rb +71 -77
- data/lib/moneykit/models/response401_get_institution_institutions_institution_id_get.rb +66 -72
- 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 +66 -72
- data/lib/moneykit/models/response401_get_link_links_id_get.rb +71 -77
- data/lib/moneykit/models/response401_get_transactions_diff_links_id_transactions_sync_get.rb +71 -77
- data/lib/moneykit/models/response401_get_transactions_links_id_transactions_get.rb +71 -77
- data/lib/moneykit/models/response401_get_user_accounts_users_id_accounts_get.rb +66 -72
- data/lib/moneykit/models/response401_get_user_links_users_id_links_get.rb +66 -72
- data/lib/moneykit/models/response401_get_user_transactions_users_id_transactions_get.rb +66 -72
- data/lib/moneykit/models/response401_get_well_known_jwks_well_known_jwks_json_get.rb +66 -72
- data/lib/moneykit/models/response401_instrospect_client_auth_introspect_get.rb +66 -72
- data/lib/moneykit/models/response401_refresh_products_links_id_products_post.rb +71 -77
- data/lib/moneykit/models/response401_update_link_links_id_patch.rb +71 -77
- data/lib/moneykit/models/settings.rb +61 -73
- data/lib/moneykit/models/supported_version.rb +11 -12
- data/lib/moneykit/models/transaction.rb +87 -114
- data/lib/moneykit/models/transaction_diff.rb +54 -62
- data/lib/moneykit/models/transaction_sync_response.rb +57 -72
- 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 +52 -54
- data/lib/moneykit/models/transactions_product_settings.rb +57 -56
- data/lib/moneykit/models/update_link_request.rb +53 -52
- 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 +53 -64
- data/lib/moneykit/version.rb +10 -12
- data/lib/moneykit.rb +9 -11
- data/lib/plaid_compatible/money_kit_plaid_compatible/api/plaid_api.rb +203 -207
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_client.rb +75 -76
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_error.rb +19 -19
- data/lib/plaid_compatible/money_kit_plaid_compatible/configuration.rb +38 -40
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_balance.rb +59 -61
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_base.rb +71 -87
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_identity.rb +77 -98
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_subtype.rb +85 -86
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_type.rb +18 -19
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request.rb +59 -61
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request_options.rb +44 -41
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_response.rb +55 -60
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address.rb +49 -47
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address_data.rb +65 -69
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_numbers.rb +63 -73
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request.rb +59 -61
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request_options.rb +44 -41
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_response.rb +61 -72
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/country_code.rb +15 -16
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/email.rb +49 -50
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/http_validation_error.rb +43 -41
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request.rb +59 -61
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request_options.rb +44 -41
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_response.rb +55 -60
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institution.rb +65 -71
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_request.rb +60 -61
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_response.rb +49 -50
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item.rb +85 -96
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_error_webhook.rb +65 -77
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_request.rb +55 -55
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_response.rb +55 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_request.rb +55 -55
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_response.rb +54 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_request.rb +55 -55
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_response.rb +44 -41
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_investments.rb +49 -47
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_last_webhook.rb +50 -48
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_nullable.rb +55 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_transactions.rb +49 -47
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request.rb +100 -121
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request_user.rb +66 -66
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_response.rb +54 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_ach.rb +59 -65
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_bacs.rb +54 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_eft.rb +59 -68
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_international.rb +54 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/owner.rb +63 -73
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/personal_finance_category.rb +49 -50
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/phone_number.rb +54 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error.rb +88 -103
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error_type.rb +26 -27
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/products.rb +16 -17
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/removed_transaction.rb +43 -39
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transaction.rb +107 -134
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request.rb +69 -79
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request_options.rb +66 -68
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_response.rb +65 -76
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_request.rb +55 -55
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_response.rb +44 -41
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request.rb +69 -75
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request_options.rb +50 -46
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_response.rb +72 -89
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/validation_error.rb +56 -65
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/webhook_environment_values.rb +15 -16
- data/lib/plaid_compatible/money_kit_plaid_compatible/version.rb +13 -13
- data/lib/plaid_compatible/money_kit_plaid_compatible.rb +12 -12
- data/moneykit.gemspec +21 -25
- metadata +1 -1
@@ -1,30 +1,25 @@
|
|
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'
|
15
13
|
|
16
14
|
module MoneyKit
|
17
15
|
class APIErrorAuthUnauthorizedResponse
|
18
|
-
attr_accessor :error_code
|
16
|
+
attr_accessor :error_code, :documentation_url
|
19
17
|
|
20
18
|
# Error message
|
21
19
|
attr_accessor :error_message
|
22
20
|
|
23
|
-
attr_accessor :documentation_url
|
24
|
-
|
25
21
|
class EnumAttributeValidator
|
26
|
-
attr_reader :datatype
|
27
|
-
attr_reader :allowable_values
|
22
|
+
attr_reader :datatype, :allowable_values
|
28
23
|
|
29
24
|
def initialize(datatype, allowable_values)
|
30
25
|
@allowable_values = allowable_values.map do |value|
|
@@ -47,9 +42,9 @@ module MoneyKit
|
|
47
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
48
43
|
def self.attribute_map
|
49
44
|
{
|
50
|
-
|
51
|
-
|
52
|
-
|
45
|
+
'error_code': :error_code,
|
46
|
+
'error_message': :error_message,
|
47
|
+
'documentation_url': :documentation_url
|
53
48
|
}
|
54
49
|
end
|
55
50
|
|
@@ -61,56 +56,55 @@ module MoneyKit
|
|
61
56
|
# Attribute type mapping.
|
62
57
|
def self.openapi_types
|
63
58
|
{
|
64
|
-
|
65
|
-
|
66
|
-
|
59
|
+
'error_code': :String,
|
60
|
+
'error_message': :String,
|
61
|
+
'documentation_url': :String
|
67
62
|
}
|
68
63
|
end
|
69
64
|
|
70
65
|
# List of attributes with nullable: true
|
71
66
|
def self.openapi_nullable
|
72
67
|
Set.new([
|
73
|
-
|
74
|
-
|
68
|
+
:documentation_url
|
69
|
+
])
|
75
70
|
end
|
76
71
|
|
77
72
|
# Initializes the object
|
78
73
|
# @param [Hash] attributes Model attributes in the form of hash
|
79
74
|
def initialize(attributes = {})
|
80
|
-
|
81
|
-
|
75
|
+
unless attributes.is_a?(Hash)
|
76
|
+
raise ArgumentError,
|
77
|
+
'The input argument (attributes) must be a hash in `MoneyKit::APIErrorAuthUnauthorizedResponse` initialize method'
|
82
78
|
end
|
83
79
|
|
84
80
|
# check to see if the attribute exists and convert string to symbol for hash key
|
85
|
-
attributes = attributes.each_with_object({})
|
86
|
-
|
87
|
-
|
81
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
82
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
83
|
+
raise ArgumentError,
|
84
|
+
"`#{k}` is not a valid attribute in `MoneyKit::APIErrorAuthUnauthorizedResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
88
85
|
end
|
89
|
-
h[k.to_sym] = v
|
90
|
-
}
|
91
86
|
|
92
|
-
|
93
|
-
self.error_code = attributes[:'error_code']
|
94
|
-
else
|
95
|
-
self.error_code = 'api_error.auth.unauthorized'
|
87
|
+
h[k.to_sym] = v
|
96
88
|
end
|
97
89
|
|
98
|
-
if attributes.key?(:
|
99
|
-
|
100
|
-
|
90
|
+
self.error_code = if attributes.key?(:error_code)
|
91
|
+
attributes[:error_code]
|
92
|
+
else
|
93
|
+
'api_error.auth.unauthorized'
|
94
|
+
end
|
101
95
|
|
102
|
-
if attributes.key?(:
|
103
|
-
|
104
|
-
|
96
|
+
self.error_message = attributes[:error_message] if attributes.key?(:error_message)
|
97
|
+
|
98
|
+
return unless attributes.key?(:documentation_url)
|
99
|
+
|
100
|
+
self.documentation_url = attributes[:documentation_url]
|
105
101
|
end
|
106
102
|
|
107
103
|
# Show invalid properties with the reasons. Usually used together with valid?
|
108
104
|
# @return Array for valid properties with the reasons
|
109
105
|
def list_invalid_properties
|
110
|
-
invalid_properties =
|
111
|
-
if @error_message.nil?
|
112
|
-
invalid_properties.push('invalid value for "error_message", error_message cannot be nil.')
|
113
|
-
end
|
106
|
+
invalid_properties = []
|
107
|
+
invalid_properties.push('invalid value for "error_message", error_message cannot be nil.') if @error_message.nil?
|
114
108
|
|
115
109
|
invalid_properties
|
116
110
|
end
|
@@ -118,36 +112,39 @@ module MoneyKit
|
|
118
112
|
# Check to see if the all the properties in the model are valid
|
119
113
|
# @return true if the model is valid
|
120
114
|
def valid?
|
121
|
-
error_code_validator = EnumAttributeValidator.new('String', [
|
115
|
+
error_code_validator = EnumAttributeValidator.new('String', ['api_error.auth.unauthorized'])
|
122
116
|
return false unless error_code_validator.valid?(@error_code)
|
123
117
|
return false if @error_message.nil?
|
118
|
+
|
124
119
|
true
|
125
120
|
end
|
126
121
|
|
127
122
|
# Custom attribute writer method checking allowed values (enum).
|
128
123
|
# @param [Object] error_code Object to be assigned
|
129
124
|
def error_code=(error_code)
|
130
|
-
validator = EnumAttributeValidator.new('String', [
|
125
|
+
validator = EnumAttributeValidator.new('String', ['api_error.auth.unauthorized'])
|
131
126
|
unless validator.valid?(error_code)
|
132
|
-
|
127
|
+
raise ArgumentError, "invalid value for \"error_code\", must be one of #{validator.allowable_values}."
|
133
128
|
end
|
129
|
+
|
134
130
|
@error_code = error_code
|
135
131
|
end
|
136
132
|
|
137
133
|
# Checks equality by comparing each attribute.
|
138
134
|
# @param [Object] Object to be compared
|
139
|
-
def ==(
|
140
|
-
return true if
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
135
|
+
def ==(other)
|
136
|
+
return true if equal?(other)
|
137
|
+
|
138
|
+
self.class == other.class &&
|
139
|
+
error_code == other.error_code &&
|
140
|
+
error_message == other.error_message &&
|
141
|
+
documentation_url == other.documentation_url
|
145
142
|
end
|
146
143
|
|
147
144
|
# @see the `==` method
|
148
145
|
# @param [Object] Object to be compared
|
149
|
-
def eql?(
|
150
|
-
self ==
|
146
|
+
def eql?(other)
|
147
|
+
self == other
|
151
148
|
end
|
152
149
|
|
153
150
|
# Calculates hash code according to all attributes.
|
@@ -168,18 +165,21 @@ module MoneyKit
|
|
168
165
|
# @return [Object] Returns the model itself
|
169
166
|
def build_from_hash(attributes)
|
170
167
|
return nil unless attributes.is_a?(Hash)
|
168
|
+
|
171
169
|
attributes = attributes.transform_keys(&:to_sym)
|
172
170
|
self.class.openapi_types.each_pair do |key, type|
|
173
171
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
174
|
-
|
172
|
+
send("#{key}=", nil)
|
175
173
|
elsif type =~ /\AArray<(.*)>/i
|
176
174
|
# check to ensure the input is an array given that the attribute
|
177
175
|
# is documented as an array but the input is not
|
178
176
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
179
|
-
|
177
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
|
178
|
+
_deserialize(::Regexp.last_match(1), v)
|
179
|
+
end)
|
180
180
|
end
|
181
181
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
182
|
-
|
182
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
183
183
|
end
|
184
184
|
end
|
185
185
|
|
@@ -246,7 +246,7 @@ module MoneyKit
|
|
246
246
|
def to_hash
|
247
247
|
hash = {}
|
248
248
|
self.class.attribute_map.each_pair do |attr, param|
|
249
|
-
value =
|
249
|
+
value = send(attr)
|
250
250
|
if value.nil?
|
251
251
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
252
252
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -274,7 +274,5 @@ module MoneyKit
|
|
274
274
|
value
|
275
275
|
end
|
276
276
|
end
|
277
|
-
|
278
277
|
end
|
279
|
-
|
280
278
|
end
|
@@ -1,30 +1,25 @@
|
|
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'
|
15
13
|
|
16
14
|
module MoneyKit
|
17
15
|
class APIErrorRateLimitExceededResponse
|
18
|
-
attr_accessor :error_code
|
16
|
+
attr_accessor :error_code, :documentation_url
|
19
17
|
|
20
18
|
# Error message
|
21
19
|
attr_accessor :error_message
|
22
20
|
|
23
|
-
attr_accessor :documentation_url
|
24
|
-
|
25
21
|
class EnumAttributeValidator
|
26
|
-
attr_reader :datatype
|
27
|
-
attr_reader :allowable_values
|
22
|
+
attr_reader :datatype, :allowable_values
|
28
23
|
|
29
24
|
def initialize(datatype, allowable_values)
|
30
25
|
@allowable_values = allowable_values.map do |value|
|
@@ -47,9 +42,9 @@ module MoneyKit
|
|
47
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
48
43
|
def self.attribute_map
|
49
44
|
{
|
50
|
-
|
51
|
-
|
52
|
-
|
45
|
+
'error_code': :error_code,
|
46
|
+
'error_message': :error_message,
|
47
|
+
'documentation_url': :documentation_url
|
53
48
|
}
|
54
49
|
end
|
55
50
|
|
@@ -61,90 +56,95 @@ module MoneyKit
|
|
61
56
|
# Attribute type mapping.
|
62
57
|
def self.openapi_types
|
63
58
|
{
|
64
|
-
|
65
|
-
|
66
|
-
|
59
|
+
'error_code': :String,
|
60
|
+
'error_message': :String,
|
61
|
+
'documentation_url': :String
|
67
62
|
}
|
68
63
|
end
|
69
64
|
|
70
65
|
# List of attributes with nullable: true
|
71
66
|
def self.openapi_nullable
|
72
67
|
Set.new([
|
73
|
-
|
74
|
-
|
68
|
+
:documentation_url
|
69
|
+
])
|
75
70
|
end
|
76
71
|
|
77
72
|
# Initializes the object
|
78
73
|
# @param [Hash] attributes Model attributes in the form of hash
|
79
74
|
def initialize(attributes = {})
|
80
|
-
|
81
|
-
|
75
|
+
unless attributes.is_a?(Hash)
|
76
|
+
raise ArgumentError,
|
77
|
+
'The input argument (attributes) must be a hash in `MoneyKit::APIErrorRateLimitExceededResponse` initialize method'
|
82
78
|
end
|
83
79
|
|
84
80
|
# check to see if the attribute exists and convert string to symbol for hash key
|
85
|
-
attributes = attributes.each_with_object({})
|
86
|
-
|
87
|
-
|
81
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
82
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
83
|
+
raise ArgumentError,
|
84
|
+
"`#{k}` is not a valid attribute in `MoneyKit::APIErrorRateLimitExceededResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
88
85
|
end
|
89
|
-
h[k.to_sym] = v
|
90
|
-
}
|
91
86
|
|
92
|
-
|
93
|
-
self.error_code = attributes[:'error_code']
|
94
|
-
else
|
95
|
-
self.error_code = 'api_error.rate_limit_exceeded'
|
87
|
+
h[k.to_sym] = v
|
96
88
|
end
|
97
89
|
|
98
|
-
if attributes.key?(:
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
90
|
+
self.error_code = if attributes.key?(:error_code)
|
91
|
+
attributes[:error_code]
|
92
|
+
else
|
93
|
+
'api_error.rate_limit_exceeded'
|
94
|
+
end
|
103
95
|
|
104
|
-
if attributes.key?(:
|
105
|
-
|
106
|
-
|
96
|
+
self.error_message = if attributes.key?(:error_message)
|
97
|
+
attributes[:error_message]
|
98
|
+
else
|
99
|
+
'Rate limit exceeded'
|
100
|
+
end
|
101
|
+
|
102
|
+
return unless attributes.key?(:documentation_url)
|
103
|
+
|
104
|
+
self.documentation_url = attributes[:documentation_url]
|
107
105
|
end
|
108
106
|
|
109
107
|
# Show invalid properties with the reasons. Usually used together with valid?
|
110
108
|
# @return Array for valid properties with the reasons
|
111
109
|
def list_invalid_properties
|
112
|
-
|
113
|
-
invalid_properties
|
110
|
+
[]
|
114
111
|
end
|
115
112
|
|
116
113
|
# Check to see if the all the properties in the model are valid
|
117
114
|
# @return true if the model is valid
|
118
115
|
def valid?
|
119
|
-
error_code_validator = EnumAttributeValidator.new('String', [
|
116
|
+
error_code_validator = EnumAttributeValidator.new('String', ['api_error.rate_limit_exceeded'])
|
120
117
|
return false unless error_code_validator.valid?(@error_code)
|
118
|
+
|
121
119
|
true
|
122
120
|
end
|
123
121
|
|
124
122
|
# Custom attribute writer method checking allowed values (enum).
|
125
123
|
# @param [Object] error_code Object to be assigned
|
126
124
|
def error_code=(error_code)
|
127
|
-
validator = EnumAttributeValidator.new('String', [
|
125
|
+
validator = EnumAttributeValidator.new('String', ['api_error.rate_limit_exceeded'])
|
128
126
|
unless validator.valid?(error_code)
|
129
|
-
|
127
|
+
raise ArgumentError, "invalid value for \"error_code\", must be one of #{validator.allowable_values}."
|
130
128
|
end
|
129
|
+
|
131
130
|
@error_code = error_code
|
132
131
|
end
|
133
132
|
|
134
133
|
# Checks equality by comparing each attribute.
|
135
134
|
# @param [Object] Object to be compared
|
136
|
-
def ==(
|
137
|
-
return true if
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
135
|
+
def ==(other)
|
136
|
+
return true if equal?(other)
|
137
|
+
|
138
|
+
self.class == other.class &&
|
139
|
+
error_code == other.error_code &&
|
140
|
+
error_message == other.error_message &&
|
141
|
+
documentation_url == other.documentation_url
|
142
142
|
end
|
143
143
|
|
144
144
|
# @see the `==` method
|
145
145
|
# @param [Object] Object to be compared
|
146
|
-
def eql?(
|
147
|
-
self ==
|
146
|
+
def eql?(other)
|
147
|
+
self == other
|
148
148
|
end
|
149
149
|
|
150
150
|
# Calculates hash code according to all attributes.
|
@@ -165,18 +165,21 @@ module MoneyKit
|
|
165
165
|
# @return [Object] Returns the model itself
|
166
166
|
def build_from_hash(attributes)
|
167
167
|
return nil unless attributes.is_a?(Hash)
|
168
|
+
|
168
169
|
attributes = attributes.transform_keys(&:to_sym)
|
169
170
|
self.class.openapi_types.each_pair do |key, type|
|
170
171
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
171
|
-
|
172
|
+
send("#{key}=", nil)
|
172
173
|
elsif type =~ /\AArray<(.*)>/i
|
173
174
|
# check to ensure the input is an array given that the attribute
|
174
175
|
# is documented as an array but the input is not
|
175
176
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
176
|
-
|
177
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
|
178
|
+
_deserialize(::Regexp.last_match(1), v)
|
179
|
+
end)
|
177
180
|
end
|
178
181
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
179
|
-
|
182
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
180
183
|
end
|
181
184
|
end
|
182
185
|
|
@@ -243,7 +246,7 @@ module MoneyKit
|
|
243
246
|
def to_hash
|
244
247
|
hash = {}
|
245
248
|
self.class.attribute_map.each_pair do |attr, param|
|
246
|
-
value =
|
249
|
+
value = send(attr)
|
247
250
|
if value.nil?
|
248
251
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
249
252
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -271,7 +274,5 @@ module MoneyKit
|
|
271
274
|
value
|
272
275
|
end
|
273
276
|
end
|
274
|
-
|
275
277
|
end
|
276
|
-
|
277
278
|
end
|
data/lib/moneykit/models/app.rb
CHANGED
@@ -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'
|
@@ -25,8 +23,8 @@ module MoneyKit
|
|
25
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
26
24
|
def self.attribute_map
|
27
25
|
{
|
28
|
-
|
29
|
-
|
26
|
+
'id': :id,
|
27
|
+
'app_name': :app_name
|
30
28
|
}
|
31
29
|
end
|
32
30
|
|
@@ -38,59 +36,54 @@ module MoneyKit
|
|
38
36
|
# Attribute type mapping.
|
39
37
|
def self.openapi_types
|
40
38
|
{
|
41
|
-
|
42
|
-
|
39
|
+
'id': :String,
|
40
|
+
'app_name': :String
|
43
41
|
}
|
44
42
|
end
|
45
43
|
|
46
44
|
# List of attributes with nullable: true
|
47
45
|
def self.openapi_nullable
|
48
|
-
Set.new([
|
49
|
-
])
|
46
|
+
Set.new([])
|
50
47
|
end
|
51
48
|
|
52
49
|
# List of class defined in allOf (OpenAPI v3)
|
53
50
|
def self.openapi_all_of
|
54
51
|
[
|
55
|
-
|
52
|
+
:CustomerApp
|
56
53
|
]
|
57
54
|
end
|
58
55
|
|
59
56
|
# Initializes the object
|
60
57
|
# @param [Hash] attributes Model attributes in the form of hash
|
61
58
|
def initialize(attributes = {})
|
62
|
-
|
63
|
-
|
59
|
+
unless attributes.is_a?(Hash)
|
60
|
+
raise ArgumentError, 'The input argument (attributes) must be a hash in `MoneyKit::App` initialize method'
|
64
61
|
end
|
65
62
|
|
66
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
67
|
-
attributes = attributes.each_with_object({})
|
68
|
-
|
69
|
-
|
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::App`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
70
68
|
end
|
71
|
-
h[k.to_sym] = v
|
72
|
-
}
|
73
69
|
|
74
|
-
|
75
|
-
self.id = attributes[:'id']
|
70
|
+
h[k.to_sym] = v
|
76
71
|
end
|
77
72
|
|
78
|
-
if attributes.key?(:
|
79
|
-
|
80
|
-
|
73
|
+
self.id = attributes[:id] if attributes.key?(:id)
|
74
|
+
|
75
|
+
return unless attributes.key?(:app_name)
|
76
|
+
|
77
|
+
self.app_name = attributes[:app_name]
|
81
78
|
end
|
82
79
|
|
83
80
|
# Show invalid properties with the reasons. Usually used together with valid?
|
84
81
|
# @return Array for valid properties with the reasons
|
85
82
|
def list_invalid_properties
|
86
|
-
invalid_properties =
|
87
|
-
if @id.nil?
|
88
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
89
|
-
end
|
83
|
+
invalid_properties = []
|
84
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.') if @id.nil?
|
90
85
|
|
91
|
-
if @app_name.nil?
|
92
|
-
invalid_properties.push('invalid value for "app_name", app_name cannot be nil.')
|
93
|
-
end
|
86
|
+
invalid_properties.push('invalid value for "app_name", app_name cannot be nil.') if @app_name.nil?
|
94
87
|
|
95
88
|
invalid_properties
|
96
89
|
end
|
@@ -100,22 +93,24 @@ module MoneyKit
|
|
100
93
|
def valid?
|
101
94
|
return false if @id.nil?
|
102
95
|
return false if @app_name.nil?
|
96
|
+
|
103
97
|
true
|
104
98
|
end
|
105
99
|
|
106
100
|
# Checks equality by comparing each attribute.
|
107
101
|
# @param [Object] Object to be compared
|
108
|
-
def ==(
|
109
|
-
return true if
|
110
|
-
|
111
|
-
|
112
|
-
|
102
|
+
def ==(other)
|
103
|
+
return true if equal?(other)
|
104
|
+
|
105
|
+
self.class == other.class &&
|
106
|
+
id == other.id &&
|
107
|
+
app_name == other.app_name
|
113
108
|
end
|
114
109
|
|
115
110
|
# @see the `==` method
|
116
111
|
# @param [Object] Object to be compared
|
117
|
-
def eql?(
|
118
|
-
self ==
|
112
|
+
def eql?(other)
|
113
|
+
self == other
|
119
114
|
end
|
120
115
|
|
121
116
|
# Calculates hash code according to all attributes.
|
@@ -136,18 +131,21 @@ module MoneyKit
|
|
136
131
|
# @return [Object] Returns the model itself
|
137
132
|
def build_from_hash(attributes)
|
138
133
|
return nil unless attributes.is_a?(Hash)
|
134
|
+
|
139
135
|
attributes = attributes.transform_keys(&:to_sym)
|
140
136
|
self.class.openapi_types.each_pair do |key, type|
|
141
137
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
142
|
-
|
138
|
+
send("#{key}=", nil)
|
143
139
|
elsif type =~ /\AArray<(.*)>/i
|
144
140
|
# check to ensure the input is an array given that the attribute
|
145
141
|
# is documented as an array but the input is not
|
146
142
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
147
|
-
|
143
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
|
144
|
+
_deserialize(::Regexp.last_match(1), v)
|
145
|
+
end)
|
148
146
|
end
|
149
147
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
150
|
-
|
148
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
151
149
|
end
|
152
150
|
end
|
153
151
|
|
@@ -214,7 +212,7 @@ module MoneyKit
|
|
214
212
|
def to_hash
|
215
213
|
hash = {}
|
216
214
|
self.class.attribute_map.each_pair do |attr, param|
|
217
|
-
value =
|
215
|
+
value = send(attr)
|
218
216
|
if value.nil?
|
219
217
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
220
218
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -242,7 +240,5 @@ module MoneyKit
|
|
242
240
|
value
|
243
241
|
end
|
244
242
|
end
|
245
|
-
|
246
243
|
end
|
247
|
-
|
248
244
|
end
|