moneykit 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +291 -0
- data/lib/moneykit/api/access_token_api.rb +224 -0
- data/lib/moneykit/api/account_numbers_api.rb +88 -0
- data/lib/moneykit/api/accounts_api.rb +301 -0
- data/lib/moneykit/api/identity_api.rb +91 -0
- data/lib/moneykit/api/institutions_api.rb +234 -0
- data/lib/moneykit/api/link_session_api.rb +164 -0
- data/lib/moneykit/api/links_api.rb +297 -0
- data/lib/moneykit/api/products_api.rb +99 -0
- data/lib/moneykit/api/transactions_api.rb +297 -0
- data/lib/moneykit/api/users_api.rb +262 -0
- data/lib/moneykit/api_client.rb +428 -0
- data/lib/moneykit/api_error.rb +58 -0
- data/lib/moneykit/configuration.rb +404 -0
- data/lib/moneykit/models/account.rb +301 -0
- data/lib/moneykit/models/account_balances.rb +279 -0
- data/lib/moneykit/models/account_group.rb +237 -0
- data/lib/moneykit/models/account_identity.rb +318 -0
- data/lib/moneykit/models/account_numbers.rb +241 -0
- data/lib/moneykit/models/account_numbers_link_product.rb +246 -0
- data/lib/moneykit/models/account_numbers_product_settings.rb +234 -0
- data/lib/moneykit/models/account_type.rb +49 -0
- data/lib/moneykit/models/account_with_account_numbers.rb +315 -0
- data/lib/moneykit/models/accounts_link_product.rb +232 -0
- data/lib/moneykit/models/ach_number.rb +251 -0
- data/lib/moneykit/models/address.rb +277 -0
- data/lib/moneykit/models/api_error_auth_expired_access_token_response.rb +277 -0
- data/lib/moneykit/models/api_error_auth_unauthorized_response.rb +280 -0
- data/lib/moneykit/models/api_error_rate_limit_exceeded_response.rb +277 -0
- data/lib/moneykit/models/app.rb +248 -0
- data/lib/moneykit/models/bacs_number.rb +240 -0
- data/lib/moneykit/models/balances.rb +287 -0
- data/lib/moneykit/models/basic_account_details.rb +265 -0
- data/lib/moneykit/models/country.rb +41 -0
- data/lib/moneykit/models/create_link_session_request.rb +336 -0
- data/lib/moneykit/models/create_link_session_response.rb +225 -0
- data/lib/moneykit/models/currency.rb +219 -0
- data/lib/moneykit/models/cursor.rb +229 -0
- data/lib/moneykit/models/cursor_pagination.rb +221 -0
- data/lib/moneykit/models/cursors.rb +229 -0
- data/lib/moneykit/models/customer_app.rb +241 -0
- data/lib/moneykit/models/customer_user.rb +292 -0
- data/lib/moneykit/models/eft_number.rb +255 -0
- data/lib/moneykit/models/email.rb +237 -0
- data/lib/moneykit/models/email1.rb +283 -0
- data/lib/moneykit/models/exchange_token_request.rb +225 -0
- data/lib/moneykit/models/exchange_token_response.rb +239 -0
- data/lib/moneykit/models/generate_access_token_response.rb +256 -0
- data/lib/moneykit/models/get_account_numbers_response.rb +240 -0
- data/lib/moneykit/models/get_account_response.rb +238 -0
- data/lib/moneykit/models/get_accounts_response.rb +241 -0
- data/lib/moneykit/models/get_institutions_response.rb +241 -0
- data/lib/moneykit/models/get_transactions_response.rb +303 -0
- data/lib/moneykit/models/get_user_accounts_response.rb +227 -0
- data/lib/moneykit/models/get_user_links_response.rb +227 -0
- data/lib/moneykit/models/get_user_transactions_response.rb +287 -0
- data/lib/moneykit/models/http_validation_error.rb +293 -0
- data/lib/moneykit/models/identity.rb +241 -0
- data/lib/moneykit/models/identity_link_product.rb +246 -0
- data/lib/moneykit/models/identity_product_settings.rb +234 -0
- data/lib/moneykit/models/identity_response.rb +241 -0
- data/lib/moneykit/models/institution.rb +345 -0
- data/lib/moneykit/models/institution_error_not_found_response.rb +276 -0
- data/lib/moneykit/models/institution_styling_response.rb +310 -0
- data/lib/moneykit/models/international_number.rb +240 -0
- data/lib/moneykit/models/introspect_client_response.rb +281 -0
- data/lib/moneykit/models/jwk_set.rb +227 -0
- data/lib/moneykit/models/link.rb +347 -0
- data/lib/moneykit/models/link1.rb +347 -0
- data/lib/moneykit/models/link2.rb +347 -0
- data/lib/moneykit/models/link3.rb +347 -0
- data/lib/moneykit/models/link4.rb +347 -0
- data/lib/moneykit/models/link_common.rb +339 -0
- data/lib/moneykit/models/link_error.rb +45 -0
- data/lib/moneykit/models/link_error_bad_state_response.rb +294 -0
- data/lib/moneykit/models/link_error_deleted_response.rb +277 -0
- data/lib/moneykit/models/link_error_forbidden_action_response.rb +280 -0
- data/lib/moneykit/models/link_error_not_found_response.rb +276 -0
- data/lib/moneykit/models/link_error_unauthorized_access_response.rb +276 -0
- data/lib/moneykit/models/link_permission_scope.rb +42 -0
- data/lib/moneykit/models/link_permissions.rb +234 -0
- data/lib/moneykit/models/link_products.rb +246 -0
- data/lib/moneykit/models/link_response.rb +364 -0
- data/lib/moneykit/models/link_session_customer_user.rb +284 -0
- data/lib/moneykit/models/link_session_customer_user_email.rb +275 -0
- data/lib/moneykit/models/link_session_customer_user_phone.rb +307 -0
- data/lib/moneykit/models/link_session_error_forbidden_config_response.rb +280 -0
- data/lib/moneykit/models/link_session_error_invalid_token_exchange.rb +280 -0
- data/lib/moneykit/models/link_session_setting_overrides.rb +268 -0
- data/lib/moneykit/models/link_state.rb +43 -0
- data/lib/moneykit/models/link_state_changed_webhook.rb +392 -0
- data/lib/moneykit/models/location_inner.rb +230 -0
- data/lib/moneykit/models/money_kit_env.rb +40 -0
- data/lib/moneykit/models/money_link_features.rb +234 -0
- data/lib/moneykit/models/moneylink_features.rb +242 -0
- data/lib/moneykit/models/numbers.rb +286 -0
- data/lib/moneykit/models/owner.rb +278 -0
- data/lib/moneykit/models/phone.rb +315 -0
- data/lib/moneykit/models/phone_number.rb +273 -0
- data/lib/moneykit/models/phone_number_type.rb +42 -0
- data/lib/moneykit/models/product.rb +42 -0
- data/lib/moneykit/models/products.rb +254 -0
- data/lib/moneykit/models/products1.rb +245 -0
- data/lib/moneykit/models/products_settings.rb +237 -0
- data/lib/moneykit/models/provider.rb +43 -0
- data/lib/moneykit/models/refresh_products_request.rb +237 -0
- data/lib/moneykit/models/requested_link_permission.rb +276 -0
- data/lib/moneykit/models/response401_disconnect_links_id_delete.rb +302 -0
- data/lib/moneykit/models/response401_exchange_token_link_session_exchange_token_post.rb +300 -0
- data/lib/moneykit/models/response401_get_account_links_id_accounts_account_id_get.rb +302 -0
- data/lib/moneykit/models/response401_get_account_numbers_links_id_accounts_numbers_get.rb +302 -0
- data/lib/moneykit/models/response401_get_accounts_links_id_accounts_get.rb +302 -0
- data/lib/moneykit/models/response401_get_identities_links_id_identity_get.rb +302 -0
- data/lib/moneykit/models/response401_get_institution_institutions_institution_id_get.rb +300 -0
- data/lib/moneykit/models/response401_get_institution_styling_institutions_institution_id_styling_get.rb +300 -0
- data/lib/moneykit/models/response401_get_institutions_institutions_get.rb +300 -0
- data/lib/moneykit/models/response401_get_link_links_id_get.rb +302 -0
- data/lib/moneykit/models/response401_get_transactions_diff_links_id_transactions_sync_get.rb +302 -0
- data/lib/moneykit/models/response401_get_transactions_links_id_transactions_get.rb +302 -0
- data/lib/moneykit/models/response401_get_user_accounts_users_id_accounts_get.rb +300 -0
- data/lib/moneykit/models/response401_get_user_links_users_id_links_get.rb +300 -0
- data/lib/moneykit/models/response401_get_user_transactions_users_id_transactions_get.rb +300 -0
- data/lib/moneykit/models/response401_get_well_known_jwks_well_known_jwks_json_get.rb +300 -0
- data/lib/moneykit/models/response401_instrospect_client_auth_introspect_get.rb +300 -0
- data/lib/moneykit/models/response401_refresh_products_links_id_products_post.rb +302 -0
- data/lib/moneykit/models/response401_update_link_links_id_patch.rb +302 -0
- data/lib/moneykit/models/settings.rb +276 -0
- data/lib/moneykit/models/supported_version.rb +39 -0
- data/lib/moneykit/models/transaction.rb +369 -0
- data/lib/moneykit/models/transaction_diff.rb +261 -0
- data/lib/moneykit/models/transaction_sync_response.rb +267 -0
- data/lib/moneykit/models/transaction_type.rb +40 -0
- data/lib/moneykit/models/transaction_type_filter.rb +40 -0
- data/lib/moneykit/models/transactions.rb +253 -0
- data/lib/moneykit/models/transactions1.rb +269 -0
- data/lib/moneykit/models/transactions_link_product.rb +246 -0
- data/lib/moneykit/models/transactions_product_settings.rb +246 -0
- data/lib/moneykit/models/update_link_request.rb +258 -0
- data/lib/moneykit/models/user_accounts_out.rb +221 -0
- data/lib/moneykit/models/user_links_out.rb +221 -0
- data/lib/moneykit/models/user_transactions_paged_response.rb +221 -0
- data/lib/moneykit/models/validation_error.rb +254 -0
- data/lib/moneykit/version.rb +15 -0
- data/lib/moneykit.rb +180 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/api/plaid_api.rb +744 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_client.rb +400 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_error.rb +57 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/configuration.rb +287 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_balance.rb +254 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_base.rb +289 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_identity.rb +306 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_subtype.rb +110 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_type.rb +43 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request.rb +256 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request_options.rb +223 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_response.rb +256 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address.rb +235 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address_data.rb +269 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_numbers.rb +278 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request.rb +256 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request_options.rb +223 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_response.rb +270 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/country_code.rb +40 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/email.rb +240 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/http_validation_error.rb +220 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request.rb +256 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request_options.rb +223 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_response.rb +256 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institution.rb +279 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_request.rb +260 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_response.rb +239 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item.rb +317 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_error_webhook.rb +279 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_request.rb +247 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_response.rb +249 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_request.rb +247 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_response.rb +255 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_request.rb +247 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_response.rb +225 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_investments.rb +232 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_last_webhook.rb +232 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_nullable.rb +240 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_transactions.rb +232 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request.rb +352 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request_user.rb +269 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_response.rb +255 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_ach.rb +266 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_bacs.rb +255 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_eft.rb +270 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_international.rb +255 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/owner.rb +278 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/personal_finance_category.rb +240 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/phone_number.rb +255 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error.rb +322 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error_type.rb +51 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/products.rb +41 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/removed_transaction.rb +221 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transaction.rb +378 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request.rb +286 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request_options.rb +267 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_response.rb +288 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_request.rb +247 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_response.rb +225 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request.rb +278 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request_options.rb +232 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_response.rb +306 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/validation_error.rb +253 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/webhook_environment_values.rb +40 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible/version.rb +15 -0
- data/lib/plaid_compatible/money_kit_plaid_compatible.rb +100 -0
- data/moneykit-0.0.0.gem +0 -0
- data/moneykit.gemspec +39 -0
- metadata +309 -0
@@ -0,0 +1,281 @@
|
|
1
|
+
=begin
|
2
|
+
#MoneyKit API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.5.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module MoneyKit
|
17
|
+
# MoneyKit API client for an application.
|
18
|
+
class IntrospectClientResponse
|
19
|
+
# Your application's MoneyKit client ID.
|
20
|
+
attr_accessor :client_id
|
21
|
+
|
22
|
+
# Friendly API client name for identification.
|
23
|
+
attr_accessor :client_name
|
24
|
+
|
25
|
+
# Actions allowed by the client.
|
26
|
+
attr_accessor :scope
|
27
|
+
|
28
|
+
attr_accessor :app
|
29
|
+
|
30
|
+
# Set to timestamp if the client has been disabled.
|
31
|
+
attr_accessor :disabled_at
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'client_id' => :'client_id',
|
37
|
+
:'client_name' => :'client_name',
|
38
|
+
:'scope' => :'scope',
|
39
|
+
:'app' => :'app',
|
40
|
+
:'disabled_at' => :'disabled_at'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# Returns all the JSON keys this model knows about
|
45
|
+
def self.acceptable_attributes
|
46
|
+
attribute_map.values
|
47
|
+
end
|
48
|
+
|
49
|
+
# Attribute type mapping.
|
50
|
+
def self.openapi_types
|
51
|
+
{
|
52
|
+
:'client_id' => :'String',
|
53
|
+
:'client_name' => :'String',
|
54
|
+
:'scope' => :'String',
|
55
|
+
:'app' => :'App',
|
56
|
+
:'disabled_at' => :'Time'
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# List of attributes with nullable: true
|
61
|
+
def self.openapi_nullable
|
62
|
+
Set.new([
|
63
|
+
:'disabled_at'
|
64
|
+
])
|
65
|
+
end
|
66
|
+
|
67
|
+
# Initializes the object
|
68
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
69
|
+
def initialize(attributes = {})
|
70
|
+
if (!attributes.is_a?(Hash))
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::IntrospectClientResponse` initialize method"
|
72
|
+
end
|
73
|
+
|
74
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
76
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::IntrospectClientResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
78
|
+
end
|
79
|
+
h[k.to_sym] = v
|
80
|
+
}
|
81
|
+
|
82
|
+
if attributes.key?(:'client_id')
|
83
|
+
self.client_id = attributes[:'client_id']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.key?(:'client_name')
|
87
|
+
self.client_name = attributes[:'client_name']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'scope')
|
91
|
+
self.scope = attributes[:'scope']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'app')
|
95
|
+
self.app = attributes[:'app']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.key?(:'disabled_at')
|
99
|
+
self.disabled_at = attributes[:'disabled_at']
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
104
|
+
# @return Array for valid properties with the reasons
|
105
|
+
def list_invalid_properties
|
106
|
+
invalid_properties = Array.new
|
107
|
+
if @client_id.nil?
|
108
|
+
invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
|
109
|
+
end
|
110
|
+
|
111
|
+
if @client_name.nil?
|
112
|
+
invalid_properties.push('invalid value for "client_name", client_name cannot be nil.')
|
113
|
+
end
|
114
|
+
|
115
|
+
if @scope.nil?
|
116
|
+
invalid_properties.push('invalid value for "scope", scope cannot be nil.')
|
117
|
+
end
|
118
|
+
|
119
|
+
if @app.nil?
|
120
|
+
invalid_properties.push('invalid value for "app", app cannot be nil.')
|
121
|
+
end
|
122
|
+
|
123
|
+
invalid_properties
|
124
|
+
end
|
125
|
+
|
126
|
+
# Check to see if the all the properties in the model are valid
|
127
|
+
# @return true if the model is valid
|
128
|
+
def valid?
|
129
|
+
return false if @client_id.nil?
|
130
|
+
return false if @client_name.nil?
|
131
|
+
return false if @scope.nil?
|
132
|
+
return false if @app.nil?
|
133
|
+
true
|
134
|
+
end
|
135
|
+
|
136
|
+
# Checks equality by comparing each attribute.
|
137
|
+
# @param [Object] Object to be compared
|
138
|
+
def ==(o)
|
139
|
+
return true if self.equal?(o)
|
140
|
+
self.class == o.class &&
|
141
|
+
client_id == o.client_id &&
|
142
|
+
client_name == o.client_name &&
|
143
|
+
scope == o.scope &&
|
144
|
+
app == o.app &&
|
145
|
+
disabled_at == o.disabled_at
|
146
|
+
end
|
147
|
+
|
148
|
+
# @see the `==` method
|
149
|
+
# @param [Object] Object to be compared
|
150
|
+
def eql?(o)
|
151
|
+
self == o
|
152
|
+
end
|
153
|
+
|
154
|
+
# Calculates hash code according to all attributes.
|
155
|
+
# @return [Integer] Hash code
|
156
|
+
def hash
|
157
|
+
[client_id, client_name, scope, app, disabled_at].hash
|
158
|
+
end
|
159
|
+
|
160
|
+
# Builds the object from hash
|
161
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
162
|
+
# @return [Object] Returns the model itself
|
163
|
+
def self.build_from_hash(attributes)
|
164
|
+
new.build_from_hash(attributes)
|
165
|
+
end
|
166
|
+
|
167
|
+
# Builds the object from hash
|
168
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
169
|
+
# @return [Object] Returns the model itself
|
170
|
+
def build_from_hash(attributes)
|
171
|
+
return nil unless attributes.is_a?(Hash)
|
172
|
+
attributes = attributes.transform_keys(&:to_sym)
|
173
|
+
self.class.openapi_types.each_pair do |key, type|
|
174
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
175
|
+
self.send("#{key}=", nil)
|
176
|
+
elsif type =~ /\AArray<(.*)>/i
|
177
|
+
# check to ensure the input is an array given that the attribute
|
178
|
+
# is documented as an array but the input is not
|
179
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
180
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
181
|
+
end
|
182
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
183
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
self
|
188
|
+
end
|
189
|
+
|
190
|
+
# Deserializes the data based on type
|
191
|
+
# @param string type Data type
|
192
|
+
# @param string value Value to be deserialized
|
193
|
+
# @return [Object] Deserialized data
|
194
|
+
def _deserialize(type, value)
|
195
|
+
case type.to_sym
|
196
|
+
when :Time
|
197
|
+
Time.parse(value)
|
198
|
+
when :Date
|
199
|
+
Date.parse(value)
|
200
|
+
when :String
|
201
|
+
value.to_s
|
202
|
+
when :Integer
|
203
|
+
value.to_i
|
204
|
+
when :Float
|
205
|
+
value.to_f
|
206
|
+
when :Boolean
|
207
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
208
|
+
true
|
209
|
+
else
|
210
|
+
false
|
211
|
+
end
|
212
|
+
when :Object
|
213
|
+
# generic object (usually a Hash), return directly
|
214
|
+
value
|
215
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
216
|
+
inner_type = Regexp.last_match[:inner_type]
|
217
|
+
value.map { |v| _deserialize(inner_type, v) }
|
218
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
219
|
+
k_type = Regexp.last_match[:k_type]
|
220
|
+
v_type = Regexp.last_match[:v_type]
|
221
|
+
{}.tap do |hash|
|
222
|
+
value.each do |k, v|
|
223
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
224
|
+
end
|
225
|
+
end
|
226
|
+
else # model
|
227
|
+
# models (e.g. Pet) or oneOf
|
228
|
+
klass = MoneyKit.const_get(type)
|
229
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
# Returns the string representation of the object
|
234
|
+
# @return [String] String presentation of the object
|
235
|
+
def to_s
|
236
|
+
to_hash.to_s
|
237
|
+
end
|
238
|
+
|
239
|
+
# to_body is an alias to to_hash (backward compatibility)
|
240
|
+
# @return [Hash] Returns the object in the form of hash
|
241
|
+
def to_body
|
242
|
+
to_hash
|
243
|
+
end
|
244
|
+
|
245
|
+
# Returns the object in the form of hash
|
246
|
+
# @return [Hash] Returns the object in the form of hash
|
247
|
+
def to_hash
|
248
|
+
hash = {}
|
249
|
+
self.class.attribute_map.each_pair do |attr, param|
|
250
|
+
value = self.send(attr)
|
251
|
+
if value.nil?
|
252
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
253
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
254
|
+
end
|
255
|
+
|
256
|
+
hash[param] = _to_hash(value)
|
257
|
+
end
|
258
|
+
hash
|
259
|
+
end
|
260
|
+
|
261
|
+
# Outputs non-array value in the form of hash
|
262
|
+
# For object, use to_hash. Otherwise, just return the value
|
263
|
+
# @param [Object] value Any valid value
|
264
|
+
# @return [Hash] Returns the value in the form of hash
|
265
|
+
def _to_hash(value)
|
266
|
+
if value.is_a?(Array)
|
267
|
+
value.compact.map { |v| _to_hash(v) }
|
268
|
+
elsif value.is_a?(Hash)
|
269
|
+
{}.tap do |hash|
|
270
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
271
|
+
end
|
272
|
+
elsif value.respond_to? :to_hash
|
273
|
+
value.to_hash
|
274
|
+
else
|
275
|
+
value
|
276
|
+
end
|
277
|
+
end
|
278
|
+
|
279
|
+
end
|
280
|
+
|
281
|
+
end
|
@@ -0,0 +1,227 @@
|
|
1
|
+
=begin
|
2
|
+
#MoneyKit API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.5.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module MoneyKit
|
17
|
+
class JWKSet
|
18
|
+
# JWKs used for validating MoneyKit-issued tokens.
|
19
|
+
attr_accessor :keys
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'keys' => :'keys'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Returns all the JSON keys this model knows about
|
29
|
+
def self.acceptable_attributes
|
30
|
+
attribute_map.values
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute type mapping.
|
34
|
+
def self.openapi_types
|
35
|
+
{
|
36
|
+
:'keys' => :'Array<Object>'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# List of attributes with nullable: true
|
41
|
+
def self.openapi_nullable
|
42
|
+
Set.new([
|
43
|
+
])
|
44
|
+
end
|
45
|
+
|
46
|
+
# Initializes the object
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
+
def initialize(attributes = {})
|
49
|
+
if (!attributes.is_a?(Hash))
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MoneyKit::JWKSet` initialize method"
|
51
|
+
end
|
52
|
+
|
53
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MoneyKit::JWKSet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
|
+
end
|
58
|
+
h[k.to_sym] = v
|
59
|
+
}
|
60
|
+
|
61
|
+
if attributes.key?(:'keys')
|
62
|
+
if (value = attributes[:'keys']).is_a?(Array)
|
63
|
+
self.keys = value
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
69
|
+
# @return Array for valid properties with the reasons
|
70
|
+
def list_invalid_properties
|
71
|
+
invalid_properties = Array.new
|
72
|
+
if @keys.nil?
|
73
|
+
invalid_properties.push('invalid value for "keys", keys cannot be nil.')
|
74
|
+
end
|
75
|
+
|
76
|
+
invalid_properties
|
77
|
+
end
|
78
|
+
|
79
|
+
# Check to see if the all the properties in the model are valid
|
80
|
+
# @return true if the model is valid
|
81
|
+
def valid?
|
82
|
+
return false if @keys.nil?
|
83
|
+
true
|
84
|
+
end
|
85
|
+
|
86
|
+
# Checks equality by comparing each attribute.
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def ==(o)
|
89
|
+
return true if self.equal?(o)
|
90
|
+
self.class == o.class &&
|
91
|
+
keys == o.keys
|
92
|
+
end
|
93
|
+
|
94
|
+
# @see the `==` method
|
95
|
+
# @param [Object] Object to be compared
|
96
|
+
def eql?(o)
|
97
|
+
self == o
|
98
|
+
end
|
99
|
+
|
100
|
+
# Calculates hash code according to all attributes.
|
101
|
+
# @return [Integer] Hash code
|
102
|
+
def hash
|
103
|
+
[keys].hash
|
104
|
+
end
|
105
|
+
|
106
|
+
# Builds the object from hash
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
+
# @return [Object] Returns the model itself
|
109
|
+
def self.build_from_hash(attributes)
|
110
|
+
new.build_from_hash(attributes)
|
111
|
+
end
|
112
|
+
|
113
|
+
# Builds the object from hash
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
115
|
+
# @return [Object] Returns the model itself
|
116
|
+
def build_from_hash(attributes)
|
117
|
+
return nil unless attributes.is_a?(Hash)
|
118
|
+
attributes = attributes.transform_keys(&:to_sym)
|
119
|
+
self.class.openapi_types.each_pair do |key, type|
|
120
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
121
|
+
self.send("#{key}=", nil)
|
122
|
+
elsif type =~ /\AArray<(.*)>/i
|
123
|
+
# check to ensure the input is an array given that the attribute
|
124
|
+
# is documented as an array but the input is not
|
125
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
126
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
127
|
+
end
|
128
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
129
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
self
|
134
|
+
end
|
135
|
+
|
136
|
+
# Deserializes the data based on type
|
137
|
+
# @param string type Data type
|
138
|
+
# @param string value Value to be deserialized
|
139
|
+
# @return [Object] Deserialized data
|
140
|
+
def _deserialize(type, value)
|
141
|
+
case type.to_sym
|
142
|
+
when :Time
|
143
|
+
Time.parse(value)
|
144
|
+
when :Date
|
145
|
+
Date.parse(value)
|
146
|
+
when :String
|
147
|
+
value.to_s
|
148
|
+
when :Integer
|
149
|
+
value.to_i
|
150
|
+
when :Float
|
151
|
+
value.to_f
|
152
|
+
when :Boolean
|
153
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
154
|
+
true
|
155
|
+
else
|
156
|
+
false
|
157
|
+
end
|
158
|
+
when :Object
|
159
|
+
# generic object (usually a Hash), return directly
|
160
|
+
value
|
161
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
162
|
+
inner_type = Regexp.last_match[:inner_type]
|
163
|
+
value.map { |v| _deserialize(inner_type, v) }
|
164
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
165
|
+
k_type = Regexp.last_match[:k_type]
|
166
|
+
v_type = Regexp.last_match[:v_type]
|
167
|
+
{}.tap do |hash|
|
168
|
+
value.each do |k, v|
|
169
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
else # model
|
173
|
+
# models (e.g. Pet) or oneOf
|
174
|
+
klass = MoneyKit.const_get(type)
|
175
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the string representation of the object
|
180
|
+
# @return [String] String presentation of the object
|
181
|
+
def to_s
|
182
|
+
to_hash.to_s
|
183
|
+
end
|
184
|
+
|
185
|
+
# to_body is an alias to to_hash (backward compatibility)
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_body
|
188
|
+
to_hash
|
189
|
+
end
|
190
|
+
|
191
|
+
# Returns the object in the form of hash
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
193
|
+
def to_hash
|
194
|
+
hash = {}
|
195
|
+
self.class.attribute_map.each_pair do |attr, param|
|
196
|
+
value = self.send(attr)
|
197
|
+
if value.nil?
|
198
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
199
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
200
|
+
end
|
201
|
+
|
202
|
+
hash[param] = _to_hash(value)
|
203
|
+
end
|
204
|
+
hash
|
205
|
+
end
|
206
|
+
|
207
|
+
# Outputs non-array value in the form of hash
|
208
|
+
# For object, use to_hash. Otherwise, just return the value
|
209
|
+
# @param [Object] value Any valid value
|
210
|
+
# @return [Hash] Returns the value in the form of hash
|
211
|
+
def _to_hash(value)
|
212
|
+
if value.is_a?(Array)
|
213
|
+
value.compact.map { |v| _to_hash(v) }
|
214
|
+
elsif value.is_a?(Hash)
|
215
|
+
{}.tap do |hash|
|
216
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
217
|
+
end
|
218
|
+
elsif value.respond_to? :to_hash
|
219
|
+
value.to_hash
|
220
|
+
else
|
221
|
+
value
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
end
|
226
|
+
|
227
|
+
end
|