moneykit 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/moneykit/api/access_token_api.rb +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'
|
@@ -47,9 +47,7 @@ module MoneyKit
|
|
47
47
|
|
48
48
|
# List of attributes with nullable: true
|
49
49
|
def self.openapi_nullable
|
50
|
-
Set.new([
|
51
|
-
:wire_routing_number
|
52
|
-
])
|
50
|
+
Set.new([])
|
53
51
|
end
|
54
52
|
|
55
53
|
# Initializes the object
|
@@ -69,9 +67,9 @@ module MoneyKit
|
|
69
67
|
h[k.to_sym] = v
|
70
68
|
end
|
71
69
|
|
72
|
-
self.account_number = attributes[:account_number] if attributes.key?(:account_number)
|
70
|
+
self.account_number = (attributes[:account_number] if attributes.key?(:account_number))
|
73
71
|
|
74
|
-
self.routing_number = attributes[:routing_number] if attributes.key?(:routing_number)
|
72
|
+
self.routing_number = (attributes[:routing_number] if attributes.key?(:routing_number))
|
75
73
|
|
76
74
|
return unless attributes.key?(:wire_routing_number)
|
77
75
|
|
@@ -81,6 +79,7 @@ module MoneyKit
|
|
81
79
|
# Show invalid properties with the reasons. Usually used together with valid?
|
82
80
|
# @return Array for valid properties with the reasons
|
83
81
|
def list_invalid_properties
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
84
83
|
invalid_properties = []
|
85
84
|
if @account_number.nil?
|
86
85
|
invalid_properties.push('invalid value for "account_number", account_number cannot be nil.')
|
@@ -96,6 +95,7 @@ module MoneyKit
|
|
96
95
|
# Check to see if the all the properties in the model are valid
|
97
96
|
# @return true if the model is valid
|
98
97
|
def valid?
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
99
99
|
return false if @account_number.nil?
|
100
100
|
return false if @routing_number.nil?
|
101
101
|
|
@@ -129,40 +129,33 @@ module MoneyKit
|
|
129
129
|
# @param [Hash] attributes Model attributes in the form of hash
|
130
130
|
# @return [Object] Returns the model itself
|
131
131
|
def self.build_from_hash(attributes)
|
132
|
-
new.build_from_hash(attributes)
|
133
|
-
end
|
134
|
-
|
135
|
-
# Builds the object from hash
|
136
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
-
# @return [Object] Returns the model itself
|
138
|
-
def build_from_hash(attributes)
|
139
132
|
return nil unless attributes.is_a?(Hash)
|
140
133
|
|
141
134
|
attributes = attributes.transform_keys(&:to_sym)
|
142
|
-
|
143
|
-
|
144
|
-
|
135
|
+
transformed_hash = {}
|
136
|
+
openapi_types.each_pair do |key, type|
|
137
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
138
|
+
transformed_hash["#{key}"] = nil
|
145
139
|
elsif type =~ /\AArray<(.*)>/i
|
146
140
|
# check to ensure the input is an array given that the attribute
|
147
141
|
# is documented as an array but the input is not
|
148
|
-
if attributes[
|
149
|
-
|
150
|
-
|
151
|
-
|
142
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
143
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map do |v|
|
144
|
+
_deserialize(::Regexp.last_match(1), v)
|
145
|
+
end
|
152
146
|
end
|
153
|
-
elsif !attributes[
|
154
|
-
|
147
|
+
elsif !attributes[attribute_map[key]].nil?
|
148
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
155
149
|
end
|
156
150
|
end
|
157
|
-
|
158
|
-
self
|
151
|
+
new(transformed_hash)
|
159
152
|
end
|
160
153
|
|
161
154
|
# Deserializes the data based on type
|
162
155
|
# @param string type Data type
|
163
156
|
# @param string value Value to be deserialized
|
164
157
|
# @return [Object] Deserialized data
|
165
|
-
def _deserialize(type, value)
|
158
|
+
def self._deserialize(type, value)
|
166
159
|
case type.to_sym
|
167
160
|
when :Time
|
168
161
|
Time.parse(value)
|
@@ -197,7 +190,7 @@ module MoneyKit
|
|
197
190
|
else # model
|
198
191
|
# models (e.g. Pet) or oneOf
|
199
192
|
klass = MoneyKit.const_get(type)
|
200
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
193
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
201
194
|
end
|
202
195
|
end
|
203
196
|
|
@@ -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'
|
@@ -62,13 +62,7 @@ module MoneyKit
|
|
62
62
|
|
63
63
|
# List of attributes with nullable: true
|
64
64
|
def self.openapi_nullable
|
65
|
-
Set.new(
|
66
|
-
city
|
67
|
-
country
|
68
|
-
postal_code
|
69
|
-
region
|
70
|
-
street
|
71
|
-
])
|
65
|
+
Set.new([])
|
72
66
|
end
|
73
67
|
|
74
68
|
# Initializes the object
|
@@ -108,12 +102,14 @@ module MoneyKit
|
|
108
102
|
# Show invalid properties with the reasons. Usually used together with valid?
|
109
103
|
# @return Array for valid properties with the reasons
|
110
104
|
def list_invalid_properties
|
105
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
111
106
|
[]
|
112
107
|
end
|
113
108
|
|
114
109
|
# Check to see if the all the properties in the model are valid
|
115
110
|
# @return true if the model is valid
|
116
111
|
def valid?
|
112
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
117
113
|
true
|
118
114
|
end
|
119
115
|
|
@@ -147,40 +143,33 @@ module MoneyKit
|
|
147
143
|
# @param [Hash] attributes Model attributes in the form of hash
|
148
144
|
# @return [Object] Returns the model itself
|
149
145
|
def self.build_from_hash(attributes)
|
150
|
-
new.build_from_hash(attributes)
|
151
|
-
end
|
152
|
-
|
153
|
-
# Builds the object from hash
|
154
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
155
|
-
# @return [Object] Returns the model itself
|
156
|
-
def build_from_hash(attributes)
|
157
146
|
return nil unless attributes.is_a?(Hash)
|
158
147
|
|
159
148
|
attributes = attributes.transform_keys(&:to_sym)
|
160
|
-
|
161
|
-
|
162
|
-
|
149
|
+
transformed_hash = {}
|
150
|
+
openapi_types.each_pair do |key, type|
|
151
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
152
|
+
transformed_hash["#{key}"] = nil
|
163
153
|
elsif type =~ /\AArray<(.*)>/i
|
164
154
|
# check to ensure the input is an array given that the attribute
|
165
155
|
# is documented as an array but the input is not
|
166
|
-
if attributes[
|
167
|
-
|
168
|
-
|
169
|
-
|
156
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
157
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map do |v|
|
158
|
+
_deserialize(::Regexp.last_match(1), v)
|
159
|
+
end
|
170
160
|
end
|
171
|
-
elsif !attributes[
|
172
|
-
|
161
|
+
elsif !attributes[attribute_map[key]].nil?
|
162
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
173
163
|
end
|
174
164
|
end
|
175
|
-
|
176
|
-
self
|
165
|
+
new(transformed_hash)
|
177
166
|
end
|
178
167
|
|
179
168
|
# Deserializes the data based on type
|
180
169
|
# @param string type Data type
|
181
170
|
# @param string value Value to be deserialized
|
182
171
|
# @return [Object] Deserialized data
|
183
|
-
def _deserialize(type, value)
|
172
|
+
def self._deserialize(type, value)
|
184
173
|
case type.to_sym
|
185
174
|
when :Time
|
186
175
|
Time.parse(value)
|
@@ -215,7 +204,7 @@ module MoneyKit
|
|
215
204
|
else # model
|
216
205
|
# models (e.g. Pet) or oneOf
|
217
206
|
klass = MoneyKit.const_get(type)
|
218
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
207
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
219
208
|
end
|
220
209
|
end
|
221
210
|
|
@@ -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
|
@@ -107,12 +105,14 @@ module MoneyKit
|
|
107
105
|
# Show invalid properties with the reasons. Usually used together with valid?
|
108
106
|
# @return Array for valid properties with the reasons
|
109
107
|
def list_invalid_properties
|
108
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
110
109
|
[]
|
111
110
|
end
|
112
111
|
|
113
112
|
# Check to see if the all the properties in the model are valid
|
114
113
|
# @return true if the model is valid
|
115
114
|
def valid?
|
115
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
116
116
|
error_code_validator = EnumAttributeValidator.new('String', ['api_error.auth.expired_access_token'])
|
117
117
|
return false unless error_code_validator.valid?(@error_code)
|
118
118
|
|
@@ -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'
|
@@ -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
|
'api_error.auth.unauthorized'
|
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', ['api_error.auth.unauthorized'])
|
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'
|
@@ -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
|
@@ -107,12 +105,14 @@ module MoneyKit
|
|
107
105
|
# Show invalid properties with the reasons. Usually used together with valid?
|
108
106
|
# @return Array for valid properties with the reasons
|
109
107
|
def list_invalid_properties
|
108
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
110
109
|
[]
|
111
110
|
end
|
112
111
|
|
113
112
|
# Check to see if the all the properties in the model are valid
|
114
113
|
# @return true if the model is valid
|
115
114
|
def valid?
|
115
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
116
116
|
error_code_validator = EnumAttributeValidator.new('String', ['api_error.rate_limit_exceeded'])
|
117
117
|
return false unless error_code_validator.valid?(@error_code)
|
118
118
|
|
@@ -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'
|
@@ -63,16 +63,15 @@ module MoneyKit
|
|
63
63
|
h[k.to_sym] = v
|
64
64
|
end
|
65
65
|
|
66
|
-
self.account_number = attributes[:account_number] if attributes.key?(:account_number)
|
66
|
+
self.account_number = (attributes[:account_number] if attributes.key?(:account_number))
|
67
67
|
|
68
|
-
|
69
|
-
|
70
|
-
self.sort_code = attributes[:sort_code]
|
68
|
+
self.sort_code = (attributes[:sort_code] if attributes.key?(:sort_code))
|
71
69
|
end
|
72
70
|
|
73
71
|
# Show invalid properties with the reasons. Usually used together with valid?
|
74
72
|
# @return Array for valid properties with the reasons
|
75
73
|
def list_invalid_properties
|
74
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
76
75
|
invalid_properties = []
|
77
76
|
if @account_number.nil?
|
78
77
|
invalid_properties.push('invalid value for "account_number", account_number cannot be nil.')
|
@@ -86,6 +85,7 @@ module MoneyKit
|
|
86
85
|
# Check to see if the all the properties in the model are valid
|
87
86
|
# @return true if the model is valid
|
88
87
|
def valid?
|
88
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
89
89
|
return false if @account_number.nil?
|
90
90
|
return false if @sort_code.nil?
|
91
91
|
|
@@ -118,40 +118,33 @@ module MoneyKit
|
|
118
118
|
# @param [Hash] attributes Model attributes in the form of hash
|
119
119
|
# @return [Object] Returns the model itself
|
120
120
|
def self.build_from_hash(attributes)
|
121
|
-
new.build_from_hash(attributes)
|
122
|
-
end
|
123
|
-
|
124
|
-
# Builds the object from hash
|
125
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
126
|
-
# @return [Object] Returns the model itself
|
127
|
-
def build_from_hash(attributes)
|
128
121
|
return nil unless attributes.is_a?(Hash)
|
129
122
|
|
130
123
|
attributes = attributes.transform_keys(&:to_sym)
|
131
|
-
|
132
|
-
|
133
|
-
|
124
|
+
transformed_hash = {}
|
125
|
+
openapi_types.each_pair do |key, type|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
127
|
+
transformed_hash["#{key}"] = nil
|
134
128
|
elsif type =~ /\AArray<(.*)>/i
|
135
129
|
# check to ensure the input is an array given that the attribute
|
136
130
|
# is documented as an array but the input is not
|
137
|
-
if attributes[
|
138
|
-
|
139
|
-
|
140
|
-
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map do |v|
|
133
|
+
_deserialize(::Regexp.last_match(1), v)
|
134
|
+
end
|
141
135
|
end
|
142
|
-
elsif !attributes[
|
143
|
-
|
136
|
+
elsif !attributes[attribute_map[key]].nil?
|
137
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
144
138
|
end
|
145
139
|
end
|
146
|
-
|
147
|
-
self
|
140
|
+
new(transformed_hash)
|
148
141
|
end
|
149
142
|
|
150
143
|
# Deserializes the data based on type
|
151
144
|
# @param string type Data type
|
152
145
|
# @param string value Value to be deserialized
|
153
146
|
# @return [Object] Deserialized data
|
154
|
-
def _deserialize(type, value)
|
147
|
+
def self._deserialize(type, value)
|
155
148
|
case type.to_sym
|
156
149
|
when :Time
|
157
150
|
Time.parse(value)
|
@@ -186,7 +179,7 @@ module MoneyKit
|
|
186
179
|
else # model
|
187
180
|
# models (e.g. Pet) or oneOf
|
188
181
|
klass = MoneyKit.const_get(type)
|
189
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
182
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
190
183
|
end
|
191
184
|
end
|
192
185
|
|