moneykit 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/moneykit/api/access_token_api.rb +9 -9
- data/lib/moneykit/api/account_numbers_api.rb +6 -6
- data/lib/moneykit/api/accounts_api.rb +15 -15
- data/lib/moneykit/api/identity_api.rb +6 -6
- data/lib/moneykit/api/institutions_api.rb +7 -7
- data/lib/moneykit/api/link_session_api.rb +7 -7
- data/lib/moneykit/api/links_api.rb +76 -13
- data/lib/moneykit/api/products_api.rb +6 -6
- data/lib/moneykit/api/transactions_api.rb +28 -28
- data/lib/moneykit/api/users_api.rb +14 -14
- data/lib/moneykit/api/webhooks_api.rb +97 -0
- data/lib/moneykit/api_client.rb +40 -36
- data/lib/moneykit/api_error.rb +1 -1
- data/lib/moneykit/configuration.rb +20 -30
- data/lib/moneykit/models/account.rb +27 -54
- data/lib/moneykit/models/account_balances.rb +18 -27
- data/lib/moneykit/models/account_group.rb +23 -26
- data/lib/moneykit/models/account_identity.rb +34 -59
- data/lib/moneykit/models/account_numbers.rb +75 -51
- data/lib/moneykit/models/account_numbers_link_product.rb +18 -28
- data/lib/moneykit/models/account_numbers_product_settings.rb +16 -21
- data/lib/moneykit/models/account_with_account_numbers.rb +29 -56
- data/lib/moneykit/models/accounts_link_product.rb +17 -25
- data/lib/moneykit/models/ach_number.rb +19 -26
- data/lib/moneykit/models/address.rb +17 -28
- data/lib/moneykit/models/api_error_auth_expired_access_token_response.rb +17 -24
- data/lib/moneykit/models/api_error_auth_unauthorized_response.rb +18 -25
- data/lib/moneykit/models/api_error_rate_limit_exceeded_response.rb +17 -24
- data/lib/moneykit/models/bacs_number.rb +18 -25
- data/lib/moneykit/models/basic_account_details.rb +20 -29
- data/lib/moneykit/models/country.rb +1 -1
- data/lib/moneykit/models/create_link_session_request.rb +48 -45
- data/lib/moneykit/models/create_link_session_response.rb +17 -24
- data/lib/moneykit/models/currency.rb +1 -1
- data/lib/moneykit/models/cursor_pagination.rb +17 -24
- data/lib/moneykit/models/customer_app.rb +18 -25
- data/lib/moneykit/models/eft_number.rb +19 -26
- data/lib/moneykit/models/email.rb +17 -22
- data/lib/moneykit/models/exchange_token_request.rb +17 -24
- data/lib/moneykit/models/exchange_token_response.rb +19 -26
- data/lib/moneykit/models/generate_access_token_response.rb +19 -26
- data/lib/moneykit/models/get_account_numbers_response.rb +23 -26
- data/lib/moneykit/models/get_account_response.rb +19 -26
- data/lib/moneykit/models/get_accounts_response.rb +25 -31
- data/lib/moneykit/models/get_institutions_response.rb +25 -31
- data/lib/moneykit/models/get_transactions_response.rb +34 -39
- data/lib/moneykit/models/get_user_accounts_response.rb +24 -32
- data/lib/moneykit/models/get_user_links_response.rb +24 -32
- data/lib/moneykit/models/get_user_transactions_response.rb +32 -34
- data/lib/moneykit/models/http_validation_error.rb +24 -28
- data/lib/moneykit/models/identity_link_product.rb +18 -28
- data/lib/moneykit/models/identity_product_settings.rb +16 -21
- data/lib/moneykit/models/identity_response.rb +24 -30
- data/lib/moneykit/models/institution.rb +29 -38
- data/lib/moneykit/models/institution_error_not_found_response.rb +17 -24
- data/lib/moneykit/models/international_number.rb +18 -25
- data/lib/moneykit/models/introspect_client_response.rb +22 -29
- data/lib/moneykit/models/jwk_set.rb +23 -26
- data/lib/moneykit/models/link_common.rb +25 -39
- data/lib/moneykit/models/link_error_bad_config_response.rb +269 -0
- data/lib/moneykit/models/link_error_bad_state_response.rb +19 -28
- data/lib/moneykit/models/link_error_deleted_response.rb +17 -24
- data/lib/moneykit/models/link_error_forbidden_action_response.rb +18 -25
- data/lib/moneykit/models/link_error_not_found_response.rb +17 -24
- data/lib/moneykit/models/link_error_unauthorized_access_response.rb +17 -24
- data/lib/moneykit/models/link_permission_scope.rb +1 -1
- data/lib/moneykit/models/link_permissions.rb +23 -33
- data/lib/moneykit/models/link_products.rb +16 -21
- data/lib/moneykit/models/link_response.rb +26 -39
- data/lib/moneykit/models/link_session_customer_user.rb +20 -28
- data/lib/moneykit/models/link_session_customer_user_email.rb +18 -25
- data/lib/moneykit/models/link_session_customer_user_phone.rb +18 -26
- data/lib/moneykit/models/link_session_error_forbidden_config_response.rb +18 -25
- data/lib/moneykit/models/link_session_error_invalid_token_exchange.rb +18 -25
- data/lib/moneykit/models/link_session_setting_overrides.rb +19 -43
- data/lib/moneykit/models/link_state.rb +1 -1
- data/lib/moneykit/models/link_state_changed_webhook.rb +28 -31
- data/lib/moneykit/models/money_link_features.rb +27 -32
- data/lib/moneykit/models/owner.rb +42 -42
- data/lib/moneykit/models/phone_number.rb +18 -25
- data/lib/moneykit/models/phone_number_type.rb +1 -1
- data/lib/moneykit/models/product.rb +1 -1
- data/lib/moneykit/models/products_settings.rb +19 -24
- data/lib/moneykit/models/provider.rb +4 -2
- data/lib/moneykit/models/public_link_error.rb +43 -0
- data/lib/moneykit/models/refresh_products_request.rb +23 -34
- data/lib/moneykit/models/requested_link_permission.rb +19 -26
- data/lib/moneykit/models/response401_disconnect_links_id_delete.rb +75 -269
- data/lib/moneykit/models/response401_exchange_token_link_session_exchange_token_post.rb +74 -267
- data/lib/moneykit/models/response401_get_account_links_id_accounts_account_id_get.rb +75 -269
- data/lib/moneykit/models/response401_get_account_numbers_links_id_accounts_numbers_get.rb +75 -269
- data/lib/moneykit/models/response401_get_accounts_links_id_accounts_get.rb +75 -269
- data/lib/moneykit/models/response401_get_identities_links_id_identity_get.rb +75 -269
- data/lib/moneykit/models/response401_get_institution_institutions_institution_id_get.rb +74 -267
- data/lib/moneykit/models/response401_get_institutions_institutions_get.rb +74 -267
- data/lib/moneykit/models/response401_get_link_links_id_get.rb +75 -269
- data/lib/moneykit/models/response401_get_transactions_diff_links_id_transactions_sync_get.rb +75 -269
- data/lib/moneykit/models/response401_get_transactions_links_id_transactions_get.rb +75 -269
- data/lib/moneykit/models/response401_get_user_accounts_users_id_accounts_get.rb +74 -267
- data/lib/moneykit/models/response401_get_user_links_users_id_links_get.rb +74 -267
- data/lib/moneykit/models/response401_get_user_transactions_users_id_transactions_get.rb +74 -267
- data/lib/moneykit/models/response401_get_well_known_jwks_well_known_jwks_json_get.rb +74 -267
- data/lib/moneykit/models/response401_instrospect_client_auth_introspect_get.rb +74 -267
- data/lib/moneykit/models/response401_refresh_products_links_id_products_post.rb +75 -269
- 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 +75 -269
- data/lib/moneykit/models/transaction.rb +35 -35
- data/lib/moneykit/models/transaction_diff.rb +36 -37
- data/lib/moneykit/models/transaction_sync_response.rb +23 -30
- data/lib/moneykit/models/transaction_type.rb +1 -1
- data/lib/moneykit/models/transaction_type_filter.rb +1 -1
- data/lib/moneykit/models/transactions_link_product.rb +18 -28
- data/lib/moneykit/models/transactions_product_settings.rb +16 -21
- data/lib/moneykit/models/update_link_request.rb +21 -28
- data/lib/moneykit/models/validation_error.rb +25 -28
- 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 +2 -2
- data/lib/moneykit.rb +10 -29
- data/lib/plaid_compatible/money_kit_plaid_compatible/api/plaid_api.rb +684 -679
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_client.rb +330 -330
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_error.rb +33 -33
- data/lib/plaid_compatible/money_kit_plaid_compatible/configuration.rb +245 -245
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_balance.rb +198 -198
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_base.rb +213 -213
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_identity.rb +223 -223
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_subtype.rb +89 -89
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_type.rb +22 -22
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request.rb +198 -198
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request_options.rb +175 -175
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_response.rb +194 -194
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address.rb +183 -183
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address_data.rb +209 -209
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_numbers.rb +211 -209
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request.rb +198 -198
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request_options.rb +175 -175
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_response.rb +200 -200
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/country_code.rb +19 -19
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/email.rb +184 -184
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/http_validation_error.rb +171 -171
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request.rb +198 -198
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request_options.rb +175 -175
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_response.rb +194 -194
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institution.rb +216 -214
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_request.rb +202 -202
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_response.rb +183 -183
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item.rb +246 -245
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_error_webhook.rb +208 -208
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_request.rb +192 -192
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_response.rb +189 -189
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_request.rb +192 -192
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_response.rb +193 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_request.rb +192 -192
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_response.rb +175 -175
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_investments.rb +182 -182
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_last_webhook.rb +182 -182
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_nullable.rb +183 -183
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_transactions.rb +182 -182
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request.rb +268 -266
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request_user.rb +212 -212
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_response.rb +193 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_ach.rb +202 -202
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_bacs.rb +193 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_eft.rb +202 -202
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_international.rb +193 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/owner.rb +211 -209
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/personal_finance_category.rb +184 -184
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/phone_number.rb +193 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error.rb +247 -245
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error_type.rb +30 -30
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/products.rb +20 -20
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/removed_transaction.rb +174 -174
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transaction.rb +283 -283
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request.rb +217 -217
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request_options.rb +211 -211
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_response.rb +217 -217
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_request.rb +192 -192
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_response.rb +175 -175
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request.rb +215 -215
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request_options.rb +184 -184
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_response.rb +228 -228
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/validation_error.rb +187 -187
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/webhook_environment_values.rb +19 -19
- data/lib/plaid_compatible/money_kit_plaid_compatible/version.rb +1 -1
- data/lib/plaid_compatible/money_kit_plaid_compatible.rb +13 -13
- data/moneykit.gemspec +2 -1
- metadata +14 -5
@@ -5,7 +5,7 @@
|
|
5
5
|
# The version of the OpenAPI document: 0.1.0
|
6
6
|
#
|
7
7
|
# Generated by: https://openapi-generator.tech
|
8
|
-
# OpenAPI Generator version:
|
8
|
+
# OpenAPI Generator version: 7.1.0
|
9
9
|
#
|
10
10
|
|
11
11
|
require 'date'
|
@@ -64,9 +64,7 @@ module MoneyKit
|
|
64
64
|
|
65
65
|
# List of attributes with nullable: true
|
66
66
|
def self.openapi_nullable
|
67
|
-
Set.new([
|
68
|
-
:documentation_url
|
69
|
-
])
|
67
|
+
Set.new([])
|
70
68
|
end
|
71
69
|
|
72
70
|
# Initializes the object
|
@@ -93,7 +91,7 @@ module MoneyKit
|
|
93
91
|
'link_session_error.invalid_token_exchange'
|
94
92
|
end
|
95
93
|
|
96
|
-
self.error_message = attributes[:error_message] if attributes.key?(:error_message)
|
94
|
+
self.error_message = (attributes[:error_message] if attributes.key?(:error_message))
|
97
95
|
|
98
96
|
return unless attributes.key?(:documentation_url)
|
99
97
|
|
@@ -103,6 +101,7 @@ module MoneyKit
|
|
103
101
|
# Show invalid properties with the reasons. Usually used together with valid?
|
104
102
|
# @return Array for valid properties with the reasons
|
105
103
|
def list_invalid_properties
|
104
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
106
105
|
invalid_properties = []
|
107
106
|
invalid_properties.push('invalid value for "error_message", error_message cannot be nil.') if @error_message.nil?
|
108
107
|
|
@@ -112,6 +111,7 @@ module MoneyKit
|
|
112
111
|
# Check to see if the all the properties in the model are valid
|
113
112
|
# @return true if the model is valid
|
114
113
|
def valid?
|
114
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
115
115
|
error_code_validator = EnumAttributeValidator.new('String', ['link_session_error.invalid_token_exchange'])
|
116
116
|
return false unless error_code_validator.valid?(@error_code)
|
117
117
|
return false if @error_message.nil?
|
@@ -157,40 +157,33 @@ module MoneyKit
|
|
157
157
|
# @param [Hash] attributes Model attributes in the form of hash
|
158
158
|
# @return [Object] Returns the model itself
|
159
159
|
def self.build_from_hash(attributes)
|
160
|
-
new.build_from_hash(attributes)
|
161
|
-
end
|
162
|
-
|
163
|
-
# Builds the object from hash
|
164
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
165
|
-
# @return [Object] Returns the model itself
|
166
|
-
def build_from_hash(attributes)
|
167
160
|
return nil unless attributes.is_a?(Hash)
|
168
161
|
|
169
162
|
attributes = attributes.transform_keys(&:to_sym)
|
170
|
-
|
171
|
-
|
172
|
-
|
163
|
+
transformed_hash = {}
|
164
|
+
openapi_types.each_pair do |key, type|
|
165
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
166
|
+
transformed_hash["#{key}"] = nil
|
173
167
|
elsif type =~ /\AArray<(.*)>/i
|
174
168
|
# check to ensure the input is an array given that the attribute
|
175
169
|
# is documented as an array but the input is not
|
176
|
-
if attributes[
|
177
|
-
|
178
|
-
|
179
|
-
|
170
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
171
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map do |v|
|
172
|
+
_deserialize(::Regexp.last_match(1), v)
|
173
|
+
end
|
180
174
|
end
|
181
|
-
elsif !attributes[
|
182
|
-
|
175
|
+
elsif !attributes[attribute_map[key]].nil?
|
176
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
183
177
|
end
|
184
178
|
end
|
185
|
-
|
186
|
-
self
|
179
|
+
new(transformed_hash)
|
187
180
|
end
|
188
181
|
|
189
182
|
# Deserializes the data based on type
|
190
183
|
# @param string type Data type
|
191
184
|
# @param string value Value to be deserialized
|
192
185
|
# @return [Object] Deserialized data
|
193
|
-
def _deserialize(type, value)
|
186
|
+
def self._deserialize(type, value)
|
194
187
|
case type.to_sym
|
195
188
|
when :Time
|
196
189
|
Time.parse(value)
|
@@ -225,7 +218,7 @@ module MoneyKit
|
|
225
218
|
else # model
|
226
219
|
# models (e.g. Pet) or oneOf
|
227
220
|
klass = MoneyKit.const_get(type)
|
228
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
221
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
229
222
|
end
|
230
223
|
end
|
231
224
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# The version of the OpenAPI document: 0.1.0
|
6
6
|
#
|
7
7
|
# Generated by: https://openapi-generator.tech
|
8
|
-
# OpenAPI Generator version:
|
8
|
+
# OpenAPI Generator version: 7.1.0
|
9
9
|
#
|
10
10
|
|
11
11
|
require 'date'
|
@@ -13,13 +13,7 @@ require 'time'
|
|
13
13
|
|
14
14
|
module MoneyKit
|
15
15
|
class LinkSessionSettingOverrides
|
16
|
-
|
17
|
-
attr_accessor :providers
|
18
|
-
|
19
|
-
attr_accessor :link_permissions, :products
|
20
|
-
|
21
|
-
# Restricts the available institutions to those in **any** of these countries.
|
22
|
-
attr_accessor :countries
|
16
|
+
attr_accessor :providers, :link_permissions, :products, :countries
|
23
17
|
|
24
18
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
19
|
def self.attribute_map
|
@@ -41,19 +35,14 @@ module MoneyKit
|
|
41
35
|
{
|
42
36
|
'providers': :'Array<Provider>',
|
43
37
|
'link_permissions': :LinkPermissions,
|
44
|
-
'products': :
|
38
|
+
'products': :ProductsSettings,
|
45
39
|
'countries': :'Array<Country>'
|
46
40
|
}
|
47
41
|
end
|
48
42
|
|
49
43
|
# List of attributes with nullable: true
|
50
44
|
def self.openapi_nullable
|
51
|
-
Set.new(
|
52
|
-
providers
|
53
|
-
link_permissions
|
54
|
-
products
|
55
|
-
countries
|
56
|
-
])
|
45
|
+
Set.new([])
|
57
46
|
end
|
58
47
|
|
59
48
|
# Initializes the object
|
@@ -91,23 +80,17 @@ module MoneyKit
|
|
91
80
|
# Show invalid properties with the reasons. Usually used together with valid?
|
92
81
|
# @return Array for valid properties with the reasons
|
93
82
|
def list_invalid_properties
|
83
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
94
84
|
[]
|
95
85
|
end
|
96
86
|
|
97
87
|
# Check to see if the all the properties in the model are valid
|
98
88
|
# @return true if the model is valid
|
99
89
|
def valid?
|
90
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
100
91
|
true
|
101
92
|
end
|
102
93
|
|
103
|
-
# Custom attribute writer method with validation
|
104
|
-
# @param [Object] providers Value to be assigned
|
105
|
-
attr_writer :providers
|
106
|
-
|
107
|
-
# Custom attribute writer method with validation
|
108
|
-
# @param [Object] countries Value to be assigned
|
109
|
-
attr_writer :countries
|
110
|
-
|
111
94
|
# Checks equality by comparing each attribute.
|
112
95
|
# @param [Object] Object to be compared
|
113
96
|
def ==(other)
|
@@ -136,40 +119,33 @@ module MoneyKit
|
|
136
119
|
# @param [Hash] attributes Model attributes in the form of hash
|
137
120
|
# @return [Object] Returns the model itself
|
138
121
|
def self.build_from_hash(attributes)
|
139
|
-
new.build_from_hash(attributes)
|
140
|
-
end
|
141
|
-
|
142
|
-
# Builds the object from hash
|
143
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
144
|
-
# @return [Object] Returns the model itself
|
145
|
-
def build_from_hash(attributes)
|
146
122
|
return nil unless attributes.is_a?(Hash)
|
147
123
|
|
148
124
|
attributes = attributes.transform_keys(&:to_sym)
|
149
|
-
|
150
|
-
|
151
|
-
|
125
|
+
transformed_hash = {}
|
126
|
+
openapi_types.each_pair do |key, type|
|
127
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
128
|
+
transformed_hash["#{key}"] = nil
|
152
129
|
elsif type =~ /\AArray<(.*)>/i
|
153
130
|
# check to ensure the input is an array given that the attribute
|
154
131
|
# is documented as an array but the input is not
|
155
|
-
if attributes[
|
156
|
-
|
157
|
-
|
158
|
-
|
132
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
133
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map do |v|
|
134
|
+
_deserialize(::Regexp.last_match(1), v)
|
135
|
+
end
|
159
136
|
end
|
160
|
-
elsif !attributes[
|
161
|
-
|
137
|
+
elsif !attributes[attribute_map[key]].nil?
|
138
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
162
139
|
end
|
163
140
|
end
|
164
|
-
|
165
|
-
self
|
141
|
+
new(transformed_hash)
|
166
142
|
end
|
167
143
|
|
168
144
|
# Deserializes the data based on type
|
169
145
|
# @param string type Data type
|
170
146
|
# @param string value Value to be deserialized
|
171
147
|
# @return [Object] Deserialized data
|
172
|
-
def _deserialize(type, value)
|
148
|
+
def self._deserialize(type, value)
|
173
149
|
case type.to_sym
|
174
150
|
when :Time
|
175
151
|
Time.parse(value)
|
@@ -204,7 +180,7 @@ module MoneyKit
|
|
204
180
|
else # model
|
205
181
|
# models (e.g. Pet) or oneOf
|
206
182
|
klass = MoneyKit.const_get(type)
|
207
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
183
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
208
184
|
end
|
209
185
|
end
|
210
186
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# The version of the OpenAPI document: 0.1.0
|
6
6
|
#
|
7
7
|
# Generated by: https://openapi-generator.tech
|
8
|
-
# OpenAPI Generator version:
|
8
|
+
# OpenAPI Generator version: 7.1.0
|
9
9
|
#
|
10
10
|
|
11
11
|
require 'date'
|
@@ -69,16 +69,14 @@ module MoneyKit
|
|
69
69
|
'link_id': :String,
|
70
70
|
'link_tags': :'Array<String>',
|
71
71
|
'state': :LinkState,
|
72
|
-
'error': :
|
72
|
+
'error': :PublicLinkError,
|
73
73
|
'error_message': :String
|
74
74
|
}
|
75
75
|
end
|
76
76
|
|
77
77
|
# List of attributes with nullable: true
|
78
78
|
def self.openapi_nullable
|
79
|
-
Set.new([
|
80
|
-
:error_message
|
81
|
-
])
|
79
|
+
Set.new([])
|
82
80
|
end
|
83
81
|
|
84
82
|
# Initializes the object
|
@@ -117,17 +115,21 @@ module MoneyKit
|
|
117
115
|
WEBHOOK_MINOR_VERSION::N0
|
118
116
|
end
|
119
117
|
|
120
|
-
self.webhook_idempotency_key = attributes[:webhook_idempotency_key] if attributes.key?(:webhook_idempotency_key)
|
118
|
+
self.webhook_idempotency_key = (attributes[:webhook_idempotency_key] if attributes.key?(:webhook_idempotency_key))
|
121
119
|
|
122
|
-
self.webhook_timestamp = attributes[:webhook_timestamp] if attributes.key?(:webhook_timestamp)
|
120
|
+
self.webhook_timestamp = (attributes[:webhook_timestamp] if attributes.key?(:webhook_timestamp))
|
123
121
|
|
124
|
-
self.link_id = attributes[:link_id] if attributes.key?(:link_id)
|
122
|
+
self.link_id = (attributes[:link_id] if attributes.key?(:link_id))
|
125
123
|
|
126
|
-
if attributes.key?(:link_tags)
|
127
|
-
|
124
|
+
if attributes.key?(:link_tags)
|
125
|
+
if (value = attributes[:link_tags]).is_a?(Array)
|
126
|
+
self.link_tags = value
|
127
|
+
end
|
128
|
+
else
|
129
|
+
self.link_tags = nil
|
128
130
|
end
|
129
131
|
|
130
|
-
self.state = attributes[:state] if attributes.key?(:state)
|
132
|
+
self.state = (attributes[:state] if attributes.key?(:state))
|
131
133
|
|
132
134
|
self.error = attributes[:error] if attributes.key?(:error)
|
133
135
|
|
@@ -139,6 +141,7 @@ module MoneyKit
|
|
139
141
|
# Show invalid properties with the reasons. Usually used together with valid?
|
140
142
|
# @return Array for valid properties with the reasons
|
141
143
|
def list_invalid_properties
|
144
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
142
145
|
invalid_properties = []
|
143
146
|
if @webhook_idempotency_key.nil?
|
144
147
|
invalid_properties.push('invalid value for "webhook_idempotency_key", webhook_idempotency_key cannot be nil.')
|
@@ -160,6 +163,7 @@ module MoneyKit
|
|
160
163
|
# Check to see if the all the properties in the model are valid
|
161
164
|
# @return true if the model is valid
|
162
165
|
def valid?
|
166
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
163
167
|
webhook_event_validator = EnumAttributeValidator.new('String', ['link.state_changed'])
|
164
168
|
return false unless webhook_event_validator.valid?(@webhook_event)
|
165
169
|
|
@@ -247,40 +251,33 @@ module MoneyKit
|
|
247
251
|
# @param [Hash] attributes Model attributes in the form of hash
|
248
252
|
# @return [Object] Returns the model itself
|
249
253
|
def self.build_from_hash(attributes)
|
250
|
-
new.build_from_hash(attributes)
|
251
|
-
end
|
252
|
-
|
253
|
-
# Builds the object from hash
|
254
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
255
|
-
# @return [Object] Returns the model itself
|
256
|
-
def build_from_hash(attributes)
|
257
254
|
return nil unless attributes.is_a?(Hash)
|
258
255
|
|
259
256
|
attributes = attributes.transform_keys(&:to_sym)
|
260
|
-
|
261
|
-
|
262
|
-
|
257
|
+
transformed_hash = {}
|
258
|
+
openapi_types.each_pair do |key, type|
|
259
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
260
|
+
transformed_hash["#{key}"] = nil
|
263
261
|
elsif type =~ /\AArray<(.*)>/i
|
264
262
|
# check to ensure the input is an array given that the attribute
|
265
263
|
# is documented as an array but the input is not
|
266
|
-
if attributes[
|
267
|
-
|
268
|
-
|
269
|
-
|
264
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
265
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map do |v|
|
266
|
+
_deserialize(::Regexp.last_match(1), v)
|
267
|
+
end
|
270
268
|
end
|
271
|
-
elsif !attributes[
|
272
|
-
|
269
|
+
elsif !attributes[attribute_map[key]].nil?
|
270
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
273
271
|
end
|
274
272
|
end
|
275
|
-
|
276
|
-
self
|
273
|
+
new(transformed_hash)
|
277
274
|
end
|
278
275
|
|
279
276
|
# Deserializes the data based on type
|
280
277
|
# @param string type Data type
|
281
278
|
# @param string value Value to be deserialized
|
282
279
|
# @return [Object] Deserialized data
|
283
|
-
def _deserialize(type, value)
|
280
|
+
def self._deserialize(type, value)
|
284
281
|
case type.to_sym
|
285
282
|
when :Time
|
286
283
|
Time.parse(value)
|
@@ -315,7 +312,7 @@ module MoneyKit
|
|
315
312
|
else # model
|
316
313
|
# models (e.g. Pet) or oneOf
|
317
314
|
klass = MoneyKit.const_get(type)
|
318
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
315
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
319
316
|
end
|
320
317
|
end
|
321
318
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# The version of the OpenAPI document: 0.1.0
|
6
6
|
#
|
7
7
|
# Generated by: https://openapi-generator.tech
|
8
|
-
# OpenAPI Generator version:
|
8
|
+
# OpenAPI Generator version: 7.1.0
|
9
9
|
#
|
10
10
|
|
11
11
|
require 'date'
|
@@ -13,8 +13,8 @@ require 'time'
|
|
13
13
|
|
14
14
|
module MoneyKit
|
15
15
|
class MoneyLinkFeatures
|
16
|
-
# If enabled, the user can
|
17
|
-
attr_accessor :
|
16
|
+
# If enabled, the user can report linking issues directly to MoneyKit.
|
17
|
+
attr_accessor :issue_reporter
|
18
18
|
|
19
19
|
# If enabled, the user can register for, or login into, Money ID.
|
20
20
|
attr_accessor :enable_money_id
|
@@ -22,7 +22,7 @@ module MoneyKit
|
|
22
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
23
|
def self.attribute_map
|
24
24
|
{
|
25
|
-
'
|
25
|
+
'issue_reporter': :issue_reporter,
|
26
26
|
'enable_money_id': :enable_money_id
|
27
27
|
}
|
28
28
|
end
|
@@ -35,7 +35,7 @@ module MoneyKit
|
|
35
35
|
# Attribute type mapping.
|
36
36
|
def self.openapi_types
|
37
37
|
{
|
38
|
-
'
|
38
|
+
'issue_reporter': :Boolean,
|
39
39
|
'enable_money_id': :Boolean
|
40
40
|
}
|
41
41
|
end
|
@@ -63,11 +63,11 @@ module MoneyKit
|
|
63
63
|
h[k.to_sym] = v
|
64
64
|
end
|
65
65
|
|
66
|
-
self.
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
66
|
+
self.issue_reporter = if attributes.key?(:issue_reporter)
|
67
|
+
attributes[:issue_reporter]
|
68
|
+
else
|
69
|
+
false
|
70
|
+
end
|
71
71
|
|
72
72
|
self.enable_money_id = if attributes.key?(:enable_money_id)
|
73
73
|
attributes[:enable_money_id]
|
@@ -79,12 +79,14 @@ module MoneyKit
|
|
79
79
|
# Show invalid properties with the reasons. Usually used together with valid?
|
80
80
|
# @return Array for valid properties with the reasons
|
81
81
|
def list_invalid_properties
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
82
83
|
[]
|
83
84
|
end
|
84
85
|
|
85
86
|
# Check to see if the all the properties in the model are valid
|
86
87
|
# @return true if the model is valid
|
87
88
|
def valid?
|
89
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
88
90
|
true
|
89
91
|
end
|
90
92
|
|
@@ -94,7 +96,7 @@ module MoneyKit
|
|
94
96
|
return true if equal?(other)
|
95
97
|
|
96
98
|
self.class == other.class &&
|
97
|
-
|
99
|
+
issue_reporter == other.issue_reporter &&
|
98
100
|
enable_money_id == other.enable_money_id
|
99
101
|
end
|
100
102
|
|
@@ -107,47 +109,40 @@ module MoneyKit
|
|
107
109
|
# Calculates hash code according to all attributes.
|
108
110
|
# @return [Integer] Hash code
|
109
111
|
def hash
|
110
|
-
[
|
112
|
+
[issue_reporter, enable_money_id].hash
|
111
113
|
end
|
112
114
|
|
113
115
|
# Builds the object from hash
|
114
116
|
# @param [Hash] attributes Model attributes in the form of hash
|
115
117
|
# @return [Object] Returns the model itself
|
116
118
|
def self.build_from_hash(attributes)
|
117
|
-
new.build_from_hash(attributes)
|
118
|
-
end
|
119
|
-
|
120
|
-
# Builds the object from hash
|
121
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
122
|
-
# @return [Object] Returns the model itself
|
123
|
-
def build_from_hash(attributes)
|
124
119
|
return nil unless attributes.is_a?(Hash)
|
125
120
|
|
126
121
|
attributes = attributes.transform_keys(&:to_sym)
|
127
|
-
|
128
|
-
|
129
|
-
|
122
|
+
transformed_hash = {}
|
123
|
+
openapi_types.each_pair do |key, type|
|
124
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
125
|
+
transformed_hash["#{key}"] = nil
|
130
126
|
elsif type =~ /\AArray<(.*)>/i
|
131
127
|
# check to ensure the input is an array given that the attribute
|
132
128
|
# is documented as an array but the input is not
|
133
|
-
if attributes[
|
134
|
-
|
135
|
-
|
136
|
-
|
129
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
130
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map do |v|
|
131
|
+
_deserialize(::Regexp.last_match(1), v)
|
132
|
+
end
|
137
133
|
end
|
138
|
-
elsif !attributes[
|
139
|
-
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
140
136
|
end
|
141
137
|
end
|
142
|
-
|
143
|
-
self
|
138
|
+
new(transformed_hash)
|
144
139
|
end
|
145
140
|
|
146
141
|
# Deserializes the data based on type
|
147
142
|
# @param string type Data type
|
148
143
|
# @param string value Value to be deserialized
|
149
144
|
# @return [Object] Deserialized data
|
150
|
-
def _deserialize(type, value)
|
145
|
+
def self._deserialize(type, value)
|
151
146
|
case type.to_sym
|
152
147
|
when :Time
|
153
148
|
Time.parse(value)
|
@@ -182,7 +177,7 @@ module MoneyKit
|
|
182
177
|
else # model
|
183
178
|
# models (e.g. Pet) or oneOf
|
184
179
|
klass = MoneyKit.const_get(type)
|
185
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
180
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
186
181
|
end
|
187
182
|
end
|
188
183
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# The version of the OpenAPI document: 0.1.0
|
6
6
|
#
|
7
7
|
# Generated by: https://openapi-generator.tech
|
8
|
-
# OpenAPI Generator version:
|
8
|
+
# OpenAPI Generator version: 7.1.0
|
9
9
|
#
|
10
10
|
|
11
11
|
require 'date'
|
@@ -13,17 +13,7 @@ require 'time'
|
|
13
13
|
|
14
14
|
module MoneyKit
|
15
15
|
class Owner
|
16
|
-
|
17
|
-
attr_accessor :names
|
18
|
-
|
19
|
-
# A list of addresses for the account owner. Some addresses can appear as incomplete.
|
20
|
-
attr_accessor :addresses
|
21
|
-
|
22
|
-
# A list of phone numbers for the account owner.
|
23
|
-
attr_accessor :phone_numbers
|
24
|
-
|
25
|
-
# A list of email addresses for the account owner.
|
26
|
-
attr_accessor :emails
|
16
|
+
attr_accessor :names, :addresses, :phone_numbers, :emails
|
27
17
|
|
28
18
|
# Attribute mapping from ruby-style variable name to JSON key.
|
29
19
|
def self.attribute_map
|
@@ -72,27 +62,43 @@ module MoneyKit
|
|
72
62
|
h[k.to_sym] = v
|
73
63
|
end
|
74
64
|
|
75
|
-
if attributes.key?(:names)
|
76
|
-
|
65
|
+
if attributes.key?(:names)
|
66
|
+
if (value = attributes[:names]).is_a?(Array)
|
67
|
+
self.names = value
|
68
|
+
end
|
69
|
+
else
|
70
|
+
self.names = nil
|
77
71
|
end
|
78
72
|
|
79
|
-
if attributes.key?(:addresses)
|
80
|
-
|
73
|
+
if attributes.key?(:addresses)
|
74
|
+
if (value = attributes[:addresses]).is_a?(Array)
|
75
|
+
self.addresses = value
|
76
|
+
end
|
77
|
+
else
|
78
|
+
self.addresses = nil
|
81
79
|
end
|
82
80
|
|
83
|
-
if attributes.key?(:phone_numbers)
|
84
|
-
|
81
|
+
if attributes.key?(:phone_numbers)
|
82
|
+
if (value = attributes[:phone_numbers]).is_a?(Array)
|
83
|
+
self.phone_numbers = value
|
84
|
+
end
|
85
|
+
else
|
86
|
+
self.phone_numbers = nil
|
85
87
|
end
|
86
88
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
89
|
+
if attributes.key?(:emails)
|
90
|
+
if (value = attributes[:emails]).is_a?(Array)
|
91
|
+
self.emails = value
|
92
|
+
end
|
93
|
+
else
|
94
|
+
self.emails = nil
|
95
|
+
end
|
91
96
|
end
|
92
97
|
|
93
98
|
# Show invalid properties with the reasons. Usually used together with valid?
|
94
99
|
# @return Array for valid properties with the reasons
|
95
100
|
def list_invalid_properties
|
101
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
96
102
|
invalid_properties = []
|
97
103
|
invalid_properties.push('invalid value for "names", names cannot be nil.') if @names.nil?
|
98
104
|
|
@@ -108,6 +114,7 @@ module MoneyKit
|
|
108
114
|
# Check to see if the all the properties in the model are valid
|
109
115
|
# @return true if the model is valid
|
110
116
|
def valid?
|
117
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
111
118
|
return false if @names.nil?
|
112
119
|
return false if @addresses.nil?
|
113
120
|
return false if @phone_numbers.nil?
|
@@ -144,40 +151,33 @@ module MoneyKit
|
|
144
151
|
# @param [Hash] attributes Model attributes in the form of hash
|
145
152
|
# @return [Object] Returns the model itself
|
146
153
|
def self.build_from_hash(attributes)
|
147
|
-
new.build_from_hash(attributes)
|
148
|
-
end
|
149
|
-
|
150
|
-
# Builds the object from hash
|
151
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
152
|
-
# @return [Object] Returns the model itself
|
153
|
-
def build_from_hash(attributes)
|
154
154
|
return nil unless attributes.is_a?(Hash)
|
155
155
|
|
156
156
|
attributes = attributes.transform_keys(&:to_sym)
|
157
|
-
|
158
|
-
|
159
|
-
|
157
|
+
transformed_hash = {}
|
158
|
+
openapi_types.each_pair do |key, type|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
160
|
+
transformed_hash["#{key}"] = nil
|
160
161
|
elsif type =~ /\AArray<(.*)>/i
|
161
162
|
# check to ensure the input is an array given that the attribute
|
162
163
|
# is documented as an array but the input is not
|
163
|
-
if attributes[
|
164
|
-
|
165
|
-
|
166
|
-
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map do |v|
|
166
|
+
_deserialize(::Regexp.last_match(1), v)
|
167
|
+
end
|
167
168
|
end
|
168
|
-
elsif !attributes[
|
169
|
-
|
169
|
+
elsif !attributes[attribute_map[key]].nil?
|
170
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
170
171
|
end
|
171
172
|
end
|
172
|
-
|
173
|
-
self
|
173
|
+
new(transformed_hash)
|
174
174
|
end
|
175
175
|
|
176
176
|
# Deserializes the data based on type
|
177
177
|
# @param string type Data type
|
178
178
|
# @param string value Value to be deserialized
|
179
179
|
# @return [Object] Deserialized data
|
180
|
-
def _deserialize(type, value)
|
180
|
+
def self._deserialize(type, value)
|
181
181
|
case type.to_sym
|
182
182
|
when :Time
|
183
183
|
Time.parse(value)
|
@@ -212,7 +212,7 @@ module MoneyKit
|
|
212
212
|
else # model
|
213
213
|
# models (e.g. Pet) or oneOf
|
214
214
|
klass = MoneyKit.const_get(type)
|
215
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
215
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
216
216
|
end
|
217
217
|
end
|
218
218
|
|