moneykit 0.0.2 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/moneykit/api/access_token_api.rb +53 -55
- data/lib/moneykit/api/account_numbers_api.rb +26 -26
- data/lib/moneykit/api/accounts_api.rb +88 -82
- data/lib/moneykit/api/identity_api.rb +31 -30
- data/lib/moneykit/api/institutions_api.rb +50 -48
- data/lib/moneykit/api/link_session_api.rb +47 -50
- data/lib/moneykit/api/links_api.rb +137 -81
- data/lib/moneykit/api/products_api.rb +33 -35
- data/lib/moneykit/api/transactions_api.rb +126 -101
- data/lib/moneykit/api/users_api.rb +100 -83
- data/lib/moneykit/api/webhooks_api.rb +97 -0
- data/lib/moneykit/api_client.rb +100 -103
- data/lib/moneykit/api_error.rb +14 -16
- data/lib/moneykit/configuration.rb +52 -65
- data/lib/moneykit/models/account.rb +69 -112
- data/lib/moneykit/models/account_balances.rb +64 -78
- data/lib/moneykit/models/account_group.rb +58 -61
- data/lib/moneykit/models/account_identity.rb +79 -124
- data/lib/moneykit/models/account_numbers.rb +96 -71
- data/lib/moneykit/models/account_numbers_link_product.rb +57 -69
- data/lib/moneykit/models/account_numbers_product_settings.rb +59 -63
- data/lib/moneykit/models/account_type.rb +23 -23
- data/lib/moneykit/models/account_with_account_numbers.rb +76 -124
- data/lib/moneykit/models/accounts_link_product.rb +53 -61
- data/lib/moneykit/models/ach_number.rb +57 -65
- data/lib/moneykit/models/address.rb +70 -90
- data/lib/moneykit/models/api_error_auth_expired_access_token_response.rb +72 -78
- data/lib/moneykit/models/api_error_auth_unauthorized_response.rb +69 -78
- data/lib/moneykit/models/api_error_rate_limit_exceeded_response.rb +72 -78
- data/lib/moneykit/models/app.rb +46 -50
- data/lib/moneykit/models/bacs_number.rb +53 -61
- data/lib/moneykit/models/balances.rb +58 -64
- data/lib/moneykit/models/basic_account_details.rb +62 -77
- data/lib/moneykit/models/country.rb +13 -14
- data/lib/moneykit/models/create_link_session_request.rb +109 -119
- data/lib/moneykit/models/create_link_session_response.rb +48 -52
- data/lib/moneykit/models/currency.rb +193 -193
- data/lib/moneykit/models/cursor.rb +40 -39
- data/lib/moneykit/models/cursor_pagination.rb +49 -54
- data/lib/moneykit/models/cursors.rb +40 -39
- data/lib/moneykit/models/customer_app.rb +54 -64
- data/lib/moneykit/models/customer_user.rb +59 -69
- data/lib/moneykit/models/eft_number.rb +56 -67
- data/lib/moneykit/models/email.rb +56 -63
- data/lib/moneykit/models/email1.rb +50 -53
- data/lib/moneykit/models/exchange_token_request.rb +48 -52
- data/lib/moneykit/models/exchange_token_response.rb +54 -64
- data/lib/moneykit/models/generate_access_token_response.rb +59 -73
- data/lib/moneykit/models/get_account_numbers_response.rb +58 -66
- data/lib/moneykit/models/get_account_response.rb +55 -67
- data/lib/moneykit/models/get_accounts_response.rb +58 -67
- data/lib/moneykit/models/get_institutions_response.rb +58 -67
- data/lib/moneykit/models/get_transactions_response.rb +81 -105
- data/lib/moneykit/models/get_user_accounts_response.rb +50 -58
- data/lib/moneykit/models/get_user_links_response.rb +50 -58
- data/lib/moneykit/models/get_user_transactions_response.rb +75 -95
- data/lib/moneykit/models/http_validation_error.rb +77 -84
- data/lib/moneykit/models/identity.rb +49 -49
- data/lib/moneykit/models/identity_link_product.rb +57 -69
- data/lib/moneykit/models/identity_product_settings.rb +59 -63
- data/lib/moneykit/models/identity_response.rb +58 -67
- data/lib/moneykit/models/institution.rb +85 -113
- data/lib/moneykit/models/institution_error_not_found_response.rb +72 -80
- data/lib/moneykit/models/institution_styling_response.rb +77 -93
- data/lib/moneykit/models/international_number.rb +54 -64
- data/lib/moneykit/models/introspect_client_response.rb +70 -89
- data/lib/moneykit/models/jwk_set.rb +51 -55
- data/lib/moneykit/models/link.rb +78 -100
- data/lib/moneykit/models/link1.rb +78 -100
- data/lib/moneykit/models/link2.rb +78 -100
- data/lib/moneykit/models/link3.rb +78 -100
- data/lib/moneykit/models/link4.rb +78 -100
- data/lib/moneykit/models/link_common.rb +82 -117
- data/lib/moneykit/models/link_error.rb +19 -19
- data/lib/moneykit/models/link_error_bad_config_response.rb +269 -0
- data/lib/moneykit/models/link_error_bad_state_response.rb +71 -88
- data/lib/moneykit/models/link_error_deleted_response.rb +72 -80
- data/lib/moneykit/models/link_error_forbidden_action_response.rb +69 -78
- data/lib/moneykit/models/link_error_not_found_response.rb +72 -80
- data/lib/moneykit/models/link_error_unauthorized_access_response.rb +72 -80
- data/lib/moneykit/models/link_permission_scope.rb +14 -15
- data/lib/moneykit/models/link_permissions.rb +52 -62
- data/lib/moneykit/models/link_products.rb +62 -78
- data/lib/moneykit/models/link_response.rb +95 -136
- data/lib/moneykit/models/link_session_customer_user.rb +65 -83
- data/lib/moneykit/models/link_session_customer_user_email.rb +59 -68
- data/lib/moneykit/models/link_session_customer_user_phone.rb +67 -82
- data/lib/moneykit/models/link_session_error_forbidden_config_response.rb +69 -78
- data/lib/moneykit/models/link_session_error_invalid_token_exchange.rb +69 -78
- data/lib/moneykit/models/link_session_setting_overrides.rb +64 -99
- data/lib/moneykit/models/link_state.rb +15 -16
- data/lib/moneykit/models/link_state_changed_webhook.rb +121 -148
- data/lib/moneykit/models/location_inner.rb +41 -46
- data/lib/moneykit/models/money_kit_env.rb +12 -13
- data/lib/moneykit/models/money_link_features.rb +62 -66
- data/lib/moneykit/models/moneylink_features.rb +50 -49
- data/lib/moneykit/models/numbers.rb +60 -73
- data/lib/moneykit/models/owner.rb +76 -89
- data/lib/moneykit/models/phone.rb +60 -68
- data/lib/moneykit/models/phone_number.rb +63 -74
- data/lib/moneykit/models/phone_number_type.rb +14 -15
- data/lib/moneykit/models/product.rb +14 -15
- data/lib/moneykit/models/products.rb +52 -64
- data/lib/moneykit/models/products1.rb +48 -56
- data/lib/moneykit/models/products_settings.rb +58 -70
- data/lib/moneykit/models/provider.rb +18 -17
- data/lib/moneykit/models/public_link_error.rb +43 -0
- data/lib/moneykit/models/refresh_products_request.rb +52 -65
- data/lib/moneykit/models/requested_link_permission.rb +60 -75
- data/lib/moneykit/models/response401_disconnect_links_id_delete.rb +83 -283
- data/lib/moneykit/models/response401_exchange_token_link_session_exchange_token_post.rb +82 -281
- data/lib/moneykit/models/response401_get_account_links_id_accounts_account_id_get.rb +83 -283
- data/lib/moneykit/models/response401_get_account_numbers_links_id_accounts_numbers_get.rb +83 -283
- data/lib/moneykit/models/response401_get_accounts_links_id_accounts_get.rb +83 -283
- data/lib/moneykit/models/response401_get_identities_links_id_identity_get.rb +83 -283
- data/lib/moneykit/models/response401_get_institution_institutions_institution_id_get.rb +82 -281
- data/lib/moneykit/models/response401_get_institution_styling_institutions_institution_id_styling_get.rb +66 -72
- data/lib/moneykit/models/response401_get_institutions_institutions_get.rb +82 -281
- data/lib/moneykit/models/response401_get_link_links_id_get.rb +83 -283
- data/lib/moneykit/models/response401_get_transactions_diff_links_id_transactions_sync_get.rb +83 -283
- data/lib/moneykit/models/response401_get_transactions_links_id_transactions_get.rb +83 -283
- data/lib/moneykit/models/response401_get_user_accounts_users_id_accounts_get.rb +82 -281
- data/lib/moneykit/models/response401_get_user_links_users_id_links_get.rb +82 -281
- data/lib/moneykit/models/response401_get_user_transactions_users_id_transactions_get.rb +82 -281
- data/lib/moneykit/models/response401_get_well_known_jwks_well_known_jwks_json_get.rb +82 -281
- data/lib/moneykit/models/response401_instrospect_client_auth_introspect_get.rb +82 -281
- data/lib/moneykit/models/response401_refresh_products_links_id_products_post.rb +83 -283
- data/lib/moneykit/models/response401_reset_login_links_id_reset_post.rb +102 -0
- data/lib/moneykit/models/response401_trigger_test_link_webhook_event_webhooks_test_link_id_post.rb +102 -0
- data/lib/moneykit/models/response401_update_link_links_id_patch.rb +83 -283
- data/lib/moneykit/models/settings.rb +61 -73
- data/lib/moneykit/models/supported_version.rb +11 -12
- data/lib/moneykit/models/transaction.rb +104 -131
- data/lib/moneykit/models/transaction_diff.rb +69 -78
- data/lib/moneykit/models/transaction_sync_response.rb +65 -87
- data/lib/moneykit/models/transaction_type.rb +12 -13
- data/lib/moneykit/models/transaction_type_filter.rb +12 -13
- data/lib/moneykit/models/transactions.rb +58 -57
- data/lib/moneykit/models/transactions1.rb +55 -63
- data/lib/moneykit/models/transactions_link_product.rb +57 -69
- data/lib/moneykit/models/transactions_product_settings.rb +67 -71
- data/lib/moneykit/models/update_link_request.rb +63 -69
- data/lib/moneykit/models/user_accounts_out.rb +40 -40
- data/lib/moneykit/models/user_links_out.rb +40 -40
- data/lib/moneykit/models/user_transactions_paged_response.rb +40 -40
- data/lib/moneykit/models/validation_error.rb +63 -77
- data/lib/moneykit/models/validation_error_location_inner.rb +101 -0
- data/lib/moneykit/models/webhook_link_test_event.rb +40 -0
- data/lib/moneykit/models/webhook_test_link_request.rb +252 -0
- data/lib/moneykit/models/webhook_test_link_response.rb +220 -0
- data/lib/moneykit/version.rb +10 -12
- data/lib/moneykit.rb +18 -39
- data/lib/plaid_compatible/money_kit_plaid_compatible/api/plaid_api.rb +738 -737
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_client.rb +339 -340
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_error.rb +47 -47
- data/lib/plaid_compatible/money_kit_plaid_compatible/configuration.rb +258 -260
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_balance.rb +210 -212
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_base.rb +221 -237
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_identity.rb +231 -252
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_subtype.rb +100 -101
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_type.rb +35 -36
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request.rb +209 -211
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request_options.rb +188 -185
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_response.rb +205 -210
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address.rb +195 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address_data.rb +222 -226
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_numbers.rb +218 -226
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request.rb +209 -211
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request_options.rb +188 -185
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_response.rb +211 -222
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/country_code.rb +32 -33
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/email.rb +197 -198
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/http_validation_error.rb +183 -181
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request.rb +209 -211
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request_options.rb +188 -185
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_response.rb +205 -210
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institution.rb +228 -232
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_request.rb +216 -217
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_response.rb +195 -196
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item.rb +251 -261
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_error_webhook.rb +217 -229
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_request.rb +205 -205
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_response.rb +201 -205
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_request.rb +205 -205
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_response.rb +206 -211
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_request.rb +205 -205
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_response.rb +188 -185
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_investments.rb +195 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_last_webhook.rb +195 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_nullable.rb +194 -198
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_transactions.rb +195 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request.rb +272 -291
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request_user.rb +225 -225
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_response.rb +206 -211
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_ach.rb +215 -221
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_bacs.rb +206 -211
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_eft.rb +215 -224
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_international.rb +206 -211
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/owner.rb +218 -226
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/personal_finance_category.rb +197 -198
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/phone_number.rb +206 -211
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error.rb +253 -266
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error_type.rb +43 -44
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/products.rb +33 -34
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/removed_transaction.rb +187 -183
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transaction.rb +288 -315
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request.rb +225 -235
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request_options.rb +222 -224
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_response.rb +225 -236
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_request.rb +205 -205
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_response.rb +188 -185
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request.rb +223 -229
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request_options.rb +197 -193
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_response.rb +235 -252
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/validation_error.rb +198 -207
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/webhook_environment_values.rb +32 -33
- data/lib/plaid_compatible/money_kit_plaid_compatible/version.rb +14 -14
- data/lib/plaid_compatible/money_kit_plaid_compatible.rb +24 -24
- data/moneykit.gemspec +22 -25
- metadata +14 -5
@@ -1,43 +1,23 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=end
|
1
|
+
# #MoneyKit API
|
2
|
+
#
|
3
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
#
|
5
|
+
# The version of the OpenAPI document: 0.1.0
|
6
|
+
#
|
7
|
+
# Generated by: https://openapi-generator.tech
|
8
|
+
# OpenAPI Generator version: 7.1.0
|
9
|
+
#
|
12
10
|
|
13
11
|
require 'date'
|
14
12
|
require 'time'
|
15
13
|
|
16
14
|
module MoneyKit
|
17
15
|
class LinkStateChangedWebhook
|
18
|
-
attr_accessor :webhook_event
|
19
|
-
|
20
|
-
attr_accessor :webhook_major_version
|
21
|
-
|
22
|
-
attr_accessor :webhook_minor_version
|
23
|
-
|
24
|
-
attr_accessor :webhook_idempotency_key
|
25
|
-
|
26
|
-
attr_accessor :webhook_timestamp
|
27
|
-
|
28
|
-
attr_accessor :link_id
|
29
|
-
|
30
|
-
attr_accessor :link_tags
|
31
|
-
|
32
|
-
attr_accessor :state
|
33
|
-
|
34
|
-
attr_accessor :error
|
35
|
-
|
36
|
-
attr_accessor :error_message
|
16
|
+
attr_accessor :webhook_event, :webhook_major_version, :webhook_minor_version, :webhook_idempotency_key,
|
17
|
+
:webhook_timestamp, :link_id, :link_tags, :state, :error, :error_message
|
37
18
|
|
38
19
|
class EnumAttributeValidator
|
39
|
-
attr_reader :datatype
|
40
|
-
attr_reader :allowable_values
|
20
|
+
attr_reader :datatype, :allowable_values
|
41
21
|
|
42
22
|
def initialize(datatype, allowable_values)
|
43
23
|
@allowable_values = allowable_values.map do |value|
|
@@ -60,16 +40,16 @@ module MoneyKit
|
|
60
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
61
41
|
def self.attribute_map
|
62
42
|
{
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
43
|
+
'webhook_event': :webhook_event,
|
44
|
+
'webhook_major_version': :webhook_major_version,
|
45
|
+
'webhook_minor_version': :webhook_minor_version,
|
46
|
+
'webhook_idempotency_key': :webhook_idempotency_key,
|
47
|
+
'webhook_timestamp': :webhook_timestamp,
|
48
|
+
'link_id': :link_id,
|
49
|
+
'link_tags': :link_tags,
|
50
|
+
'state': :state,
|
51
|
+
'error': :error,
|
52
|
+
'error_message': :error_message
|
73
53
|
}
|
74
54
|
end
|
75
55
|
|
@@ -81,94 +61,88 @@ module MoneyKit
|
|
81
61
|
# Attribute type mapping.
|
82
62
|
def self.openapi_types
|
83
63
|
{
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
64
|
+
'webhook_event': :String,
|
65
|
+
'webhook_major_version': :Integer,
|
66
|
+
'webhook_minor_version': :Integer,
|
67
|
+
'webhook_idempotency_key': :String,
|
68
|
+
'webhook_timestamp': :Time,
|
69
|
+
'link_id': :String,
|
70
|
+
'link_tags': :'Array<String>',
|
71
|
+
'state': :LinkState,
|
72
|
+
'error': :PublicLinkError,
|
73
|
+
'error_message': :String
|
94
74
|
}
|
95
75
|
end
|
96
76
|
|
97
77
|
# List of attributes with nullable: true
|
98
78
|
def self.openapi_nullable
|
99
|
-
Set.new([
|
100
|
-
:'error_message'
|
101
|
-
])
|
79
|
+
Set.new([])
|
102
80
|
end
|
103
81
|
|
104
82
|
# Initializes the object
|
105
83
|
# @param [Hash] attributes Model attributes in the form of hash
|
106
84
|
def initialize(attributes = {})
|
107
|
-
|
108
|
-
|
85
|
+
unless attributes.is_a?(Hash)
|
86
|
+
raise ArgumentError,
|
87
|
+
'The input argument (attributes) must be a hash in `MoneyKit::LinkStateChangedWebhook` initialize method'
|
109
88
|
end
|
110
89
|
|
111
90
|
# check to see if the attribute exists and convert string to symbol for hash key
|
112
|
-
attributes = attributes.each_with_object({})
|
113
|
-
|
114
|
-
|
91
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
92
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
93
|
+
raise ArgumentError,
|
94
|
+
"`#{k}` is not a valid attribute in `MoneyKit::LinkStateChangedWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
115
95
|
end
|
116
|
-
h[k.to_sym] = v
|
117
|
-
}
|
118
96
|
|
119
|
-
|
120
|
-
self.webhook_event = attributes[:'webhook_event']
|
121
|
-
else
|
122
|
-
self.webhook_event = 'link.state_changed'
|
97
|
+
h[k.to_sym] = v
|
123
98
|
end
|
124
99
|
|
125
|
-
if attributes.key?(:
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
100
|
+
self.webhook_event = if attributes.key?(:webhook_event)
|
101
|
+
attributes[:webhook_event]
|
102
|
+
else
|
103
|
+
'link.state_changed'
|
104
|
+
end
|
130
105
|
|
131
|
-
if attributes.key?(:
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
106
|
+
self.webhook_major_version = if attributes.key?(:webhook_major_version)
|
107
|
+
attributes[:webhook_major_version]
|
108
|
+
else
|
109
|
+
WEBHOOK_MAJOR_VERSION::N1
|
110
|
+
end
|
136
111
|
|
137
|
-
if attributes.key?(:
|
138
|
-
|
139
|
-
|
112
|
+
self.webhook_minor_version = if attributes.key?(:webhook_minor_version)
|
113
|
+
attributes[:webhook_minor_version]
|
114
|
+
else
|
115
|
+
WEBHOOK_MINOR_VERSION::N0
|
116
|
+
end
|
140
117
|
|
141
|
-
if attributes.key?(:
|
142
|
-
self.webhook_timestamp = attributes[:'webhook_timestamp']
|
143
|
-
end
|
118
|
+
self.webhook_idempotency_key = (attributes[:webhook_idempotency_key] if attributes.key?(:webhook_idempotency_key))
|
144
119
|
|
145
|
-
if attributes.key?(:
|
146
|
-
self.link_id = attributes[:'link_id']
|
147
|
-
end
|
120
|
+
self.webhook_timestamp = (attributes[:webhook_timestamp] if attributes.key?(:webhook_timestamp))
|
148
121
|
|
149
|
-
if attributes.key?(:
|
150
|
-
|
122
|
+
self.link_id = (attributes[:link_id] if attributes.key?(:link_id))
|
123
|
+
|
124
|
+
if attributes.key?(:link_tags)
|
125
|
+
if (value = attributes[:link_tags]).is_a?(Array)
|
151
126
|
self.link_tags = value
|
152
127
|
end
|
128
|
+
else
|
129
|
+
self.link_tags = nil
|
153
130
|
end
|
154
131
|
|
155
|
-
if attributes.key?(:
|
156
|
-
self.state = attributes[:'state']
|
157
|
-
end
|
132
|
+
self.state = (attributes[:state] if attributes.key?(:state))
|
158
133
|
|
159
|
-
if attributes.key?(:
|
160
|
-
self.error = attributes[:'error']
|
161
|
-
end
|
134
|
+
self.error = attributes[:error] if attributes.key?(:error)
|
162
135
|
|
163
|
-
|
164
|
-
|
165
|
-
|
136
|
+
return unless attributes.key?(:error_message)
|
137
|
+
|
138
|
+
self.error_message = attributes[:error_message]
|
166
139
|
end
|
167
140
|
|
168
141
|
# Show invalid properties with the reasons. Usually used together with valid?
|
169
142
|
# @return Array for valid properties with the reasons
|
170
143
|
def list_invalid_properties
|
171
|
-
|
144
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
145
|
+
invalid_properties = []
|
172
146
|
if @webhook_idempotency_key.nil?
|
173
147
|
invalid_properties.push('invalid value for "webhook_idempotency_key", webhook_idempotency_key cannot be nil.')
|
174
148
|
end
|
@@ -177,17 +151,11 @@ module MoneyKit
|
|
177
151
|
invalid_properties.push('invalid value for "webhook_timestamp", webhook_timestamp cannot be nil.')
|
178
152
|
end
|
179
153
|
|
180
|
-
if @link_id.nil?
|
181
|
-
invalid_properties.push('invalid value for "link_id", link_id cannot be nil.')
|
182
|
-
end
|
154
|
+
invalid_properties.push('invalid value for "link_id", link_id cannot be nil.') if @link_id.nil?
|
183
155
|
|
184
|
-
if @link_tags.nil?
|
185
|
-
invalid_properties.push('invalid value for "link_tags", link_tags cannot be nil.')
|
186
|
-
end
|
156
|
+
invalid_properties.push('invalid value for "link_tags", link_tags cannot be nil.') if @link_tags.nil?
|
187
157
|
|
188
|
-
if @state.nil?
|
189
|
-
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
190
|
-
end
|
158
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.') if @state.nil?
|
191
159
|
|
192
160
|
invalid_properties
|
193
161
|
end
|
@@ -195,10 +163,13 @@ module MoneyKit
|
|
195
163
|
# Check to see if the all the properties in the model are valid
|
196
164
|
# @return true if the model is valid
|
197
165
|
def valid?
|
198
|
-
|
166
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
167
|
+
webhook_event_validator = EnumAttributeValidator.new('String', ['link.state_changed'])
|
199
168
|
return false unless webhook_event_validator.valid?(@webhook_event)
|
169
|
+
|
200
170
|
webhook_major_version_validator = EnumAttributeValidator.new('Integer', [1])
|
201
171
|
return false unless webhook_major_version_validator.valid?(@webhook_major_version)
|
172
|
+
|
202
173
|
webhook_minor_version_validator = EnumAttributeValidator.new('Integer', [0])
|
203
174
|
return false unless webhook_minor_version_validator.valid?(@webhook_minor_version)
|
204
175
|
return false if @webhook_idempotency_key.nil?
|
@@ -206,16 +177,18 @@ module MoneyKit
|
|
206
177
|
return false if @link_id.nil?
|
207
178
|
return false if @link_tags.nil?
|
208
179
|
return false if @state.nil?
|
180
|
+
|
209
181
|
true
|
210
182
|
end
|
211
183
|
|
212
184
|
# Custom attribute writer method checking allowed values (enum).
|
213
185
|
# @param [Object] webhook_event Object to be assigned
|
214
186
|
def webhook_event=(webhook_event)
|
215
|
-
validator = EnumAttributeValidator.new('String', [
|
187
|
+
validator = EnumAttributeValidator.new('String', ['link.state_changed'])
|
216
188
|
unless validator.valid?(webhook_event)
|
217
|
-
|
189
|
+
raise ArgumentError, "invalid value for \"webhook_event\", must be one of #{validator.allowable_values}."
|
218
190
|
end
|
191
|
+
|
219
192
|
@webhook_event = webhook_event
|
220
193
|
end
|
221
194
|
|
@@ -224,8 +197,10 @@ module MoneyKit
|
|
224
197
|
def webhook_major_version=(webhook_major_version)
|
225
198
|
validator = EnumAttributeValidator.new('Integer', [1])
|
226
199
|
unless validator.valid?(webhook_major_version)
|
227
|
-
|
200
|
+
raise ArgumentError,
|
201
|
+
"invalid value for \"webhook_major_version\", must be one of #{validator.allowable_values}."
|
228
202
|
end
|
203
|
+
|
229
204
|
@webhook_major_version = webhook_major_version
|
230
205
|
end
|
231
206
|
|
@@ -234,75 +209,75 @@ module MoneyKit
|
|
234
209
|
def webhook_minor_version=(webhook_minor_version)
|
235
210
|
validator = EnumAttributeValidator.new('Integer', [0])
|
236
211
|
unless validator.valid?(webhook_minor_version)
|
237
|
-
|
212
|
+
raise ArgumentError,
|
213
|
+
"invalid value for \"webhook_minor_version\", must be one of #{validator.allowable_values}."
|
238
214
|
end
|
215
|
+
|
239
216
|
@webhook_minor_version = webhook_minor_version
|
240
217
|
end
|
241
218
|
|
242
219
|
# Checks equality by comparing each attribute.
|
243
220
|
# @param [Object] Object to be compared
|
244
|
-
def ==(
|
245
|
-
return true if
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
221
|
+
def ==(other)
|
222
|
+
return true if equal?(other)
|
223
|
+
|
224
|
+
self.class == other.class &&
|
225
|
+
webhook_event == other.webhook_event &&
|
226
|
+
webhook_major_version == other.webhook_major_version &&
|
227
|
+
webhook_minor_version == other.webhook_minor_version &&
|
228
|
+
webhook_idempotency_key == other.webhook_idempotency_key &&
|
229
|
+
webhook_timestamp == other.webhook_timestamp &&
|
230
|
+
link_id == other.link_id &&
|
231
|
+
link_tags == other.link_tags &&
|
232
|
+
state == other.state &&
|
233
|
+
error == other.error &&
|
234
|
+
error_message == other.error_message
|
257
235
|
end
|
258
236
|
|
259
237
|
# @see the `==` method
|
260
238
|
# @param [Object] Object to be compared
|
261
|
-
def eql?(
|
262
|
-
self ==
|
239
|
+
def eql?(other)
|
240
|
+
self == other
|
263
241
|
end
|
264
242
|
|
265
243
|
# Calculates hash code according to all attributes.
|
266
244
|
# @return [Integer] Hash code
|
267
245
|
def hash
|
268
|
-
[webhook_event, webhook_major_version, webhook_minor_version, webhook_idempotency_key, webhook_timestamp,
|
246
|
+
[webhook_event, webhook_major_version, webhook_minor_version, webhook_idempotency_key, webhook_timestamp,
|
247
|
+
link_id, link_tags, state, error, error_message].hash
|
269
248
|
end
|
270
249
|
|
271
250
|
# Builds the object from hash
|
272
251
|
# @param [Hash] attributes Model attributes in the form of hash
|
273
252
|
# @return [Object] Returns the model itself
|
274
253
|
def self.build_from_hash(attributes)
|
275
|
-
new.build_from_hash(attributes)
|
276
|
-
end
|
277
|
-
|
278
|
-
# Builds the object from hash
|
279
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
280
|
-
# @return [Object] Returns the model itself
|
281
|
-
def build_from_hash(attributes)
|
282
254
|
return nil unless attributes.is_a?(Hash)
|
255
|
+
|
283
256
|
attributes = attributes.transform_keys(&:to_sym)
|
284
|
-
|
285
|
-
|
286
|
-
|
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
|
287
261
|
elsif type =~ /\AArray<(.*)>/i
|
288
262
|
# check to ensure the input is an array given that the attribute
|
289
263
|
# is documented as an array but the input is not
|
290
|
-
if attributes[
|
291
|
-
|
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
|
292
268
|
end
|
293
|
-
elsif !attributes[
|
294
|
-
|
269
|
+
elsif !attributes[attribute_map[key]].nil?
|
270
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
295
271
|
end
|
296
272
|
end
|
297
|
-
|
298
|
-
self
|
273
|
+
new(transformed_hash)
|
299
274
|
end
|
300
275
|
|
301
276
|
# Deserializes the data based on type
|
302
277
|
# @param string type Data type
|
303
278
|
# @param string value Value to be deserialized
|
304
279
|
# @return [Object] Deserialized data
|
305
|
-
def _deserialize(type, value)
|
280
|
+
def self._deserialize(type, value)
|
306
281
|
case type.to_sym
|
307
282
|
when :Time
|
308
283
|
Time.parse(value)
|
@@ -337,7 +312,7 @@ module MoneyKit
|
|
337
312
|
else # model
|
338
313
|
# models (e.g. Pet) or oneOf
|
339
314
|
klass = MoneyKit.const_get(type)
|
340
|
-
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)
|
341
316
|
end
|
342
317
|
end
|
343
318
|
|
@@ -358,7 +333,7 @@ module MoneyKit
|
|
358
333
|
def to_hash
|
359
334
|
hash = {}
|
360
335
|
self.class.attribute_map.each_pair do |attr, param|
|
361
|
-
value =
|
336
|
+
value = send(attr)
|
362
337
|
if value.nil?
|
363
338
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
364
339
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -386,7 +361,5 @@ module MoneyKit
|
|
386
361
|
value
|
387
362
|
end
|
388
363
|
end
|
389
|
-
|
390
364
|
end
|
391
|
-
|
392
365
|
end
|
@@ -1,14 +1,12 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=end
|
1
|
+
# #MoneyKit API
|
2
|
+
#
|
3
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
#
|
5
|
+
# The version of the OpenAPI document: 0.1.0
|
6
|
+
#
|
7
|
+
# Generated by: https://openapi-generator.tech
|
8
|
+
# OpenAPI Generator version: 6.5.0
|
9
|
+
#
|
12
10
|
|
13
11
|
require 'date'
|
14
12
|
require 'time'
|
@@ -17,8 +15,7 @@ module MoneyKit
|
|
17
15
|
class LocationInner
|
18
16
|
# Attribute mapping from ruby-style variable name to JSON key.
|
19
17
|
def self.attribute_map
|
20
|
-
{
|
21
|
-
}
|
18
|
+
{}
|
22
19
|
end
|
23
20
|
|
24
21
|
# Returns all the JSON keys this model knows about
|
@@ -28,45 +25,45 @@ module MoneyKit
|
|
28
25
|
|
29
26
|
# Attribute type mapping.
|
30
27
|
def self.openapi_types
|
31
|
-
{
|
32
|
-
}
|
28
|
+
{}
|
33
29
|
end
|
34
30
|
|
35
31
|
# List of attributes with nullable: true
|
36
32
|
def self.openapi_nullable
|
37
|
-
Set.new([
|
38
|
-
])
|
33
|
+
Set.new([])
|
39
34
|
end
|
40
35
|
|
41
36
|
# List of class defined in anyOf (OpenAPI v3)
|
42
37
|
def self.openapi_any_of
|
43
|
-
[
|
44
|
-
|
45
|
-
|
38
|
+
%i[
|
39
|
+
Integer
|
40
|
+
String
|
46
41
|
]
|
47
42
|
end
|
48
43
|
|
49
44
|
# Initializes the object
|
50
45
|
# @param [Hash] attributes Model attributes in the form of hash
|
51
46
|
def initialize(attributes = {})
|
52
|
-
|
53
|
-
|
47
|
+
unless attributes.is_a?(Hash)
|
48
|
+
raise ArgumentError,
|
49
|
+
'The input argument (attributes) must be a hash in `MoneyKit::LocationInner` initialize method'
|
54
50
|
end
|
55
51
|
|
56
52
|
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
-
attributes = attributes.each_with_object({})
|
58
|
-
|
59
|
-
|
53
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
54
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
55
|
+
raise ArgumentError,
|
56
|
+
"`#{k}` is not a valid attribute in `MoneyKit::LocationInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
57
|
end
|
58
|
+
|
61
59
|
h[k.to_sym] = v
|
62
|
-
|
60
|
+
end
|
63
61
|
end
|
64
62
|
|
65
63
|
# Show invalid properties with the reasons. Usually used together with valid?
|
66
64
|
# @return Array for valid properties with the reasons
|
67
65
|
def list_invalid_properties
|
68
|
-
|
69
|
-
invalid_properties
|
66
|
+
[]
|
70
67
|
end
|
71
68
|
|
72
69
|
# Check to see if the all the properties in the model are valid
|
@@ -74,30 +71,27 @@ module MoneyKit
|
|
74
71
|
def valid?
|
75
72
|
_any_of_found = false
|
76
73
|
self.class.openapi_any_of.each do |_class|
|
77
|
-
_any_of = MoneyKit.const_get(_class).build_from_hash(
|
78
|
-
if _any_of.valid?
|
79
|
-
_any_of_found = true
|
80
|
-
end
|
74
|
+
_any_of = MoneyKit.const_get(_class).build_from_hash(to_hash)
|
75
|
+
_any_of_found = true if _any_of.valid?
|
81
76
|
end
|
82
77
|
|
83
|
-
|
84
|
-
return false
|
85
|
-
end
|
78
|
+
return false unless _any_of_found
|
86
79
|
|
87
80
|
true
|
88
81
|
end
|
89
82
|
|
90
83
|
# Checks equality by comparing each attribute.
|
91
84
|
# @param [Object] Object to be compared
|
92
|
-
def ==(
|
93
|
-
return true if
|
94
|
-
|
85
|
+
def ==(other)
|
86
|
+
return true if equal?(other)
|
87
|
+
|
88
|
+
self.class == other.class
|
95
89
|
end
|
96
90
|
|
97
91
|
# @see the `==` method
|
98
92
|
# @param [Object] Object to be compared
|
99
|
-
def eql?(
|
100
|
-
self ==
|
93
|
+
def eql?(other)
|
94
|
+
self == other
|
101
95
|
end
|
102
96
|
|
103
97
|
# Calculates hash code according to all attributes.
|
@@ -118,18 +112,21 @@ module MoneyKit
|
|
118
112
|
# @return [Object] Returns the model itself
|
119
113
|
def build_from_hash(attributes)
|
120
114
|
return nil unless attributes.is_a?(Hash)
|
115
|
+
|
121
116
|
attributes = attributes.transform_keys(&:to_sym)
|
122
117
|
self.class.openapi_types.each_pair do |key, type|
|
123
118
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
124
|
-
|
119
|
+
send("#{key}=", nil)
|
125
120
|
elsif type =~ /\AArray<(.*)>/i
|
126
121
|
# check to ensure the input is an array given that the attribute
|
127
122
|
# is documented as an array but the input is not
|
128
123
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
129
|
-
|
124
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
|
125
|
+
_deserialize(::Regexp.last_match(1), v)
|
126
|
+
end)
|
130
127
|
end
|
131
128
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
132
|
-
|
129
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
133
130
|
end
|
134
131
|
end
|
135
132
|
|
@@ -196,7 +193,7 @@ module MoneyKit
|
|
196
193
|
def to_hash
|
197
194
|
hash = {}
|
198
195
|
self.class.attribute_map.each_pair do |attr, param|
|
199
|
-
value =
|
196
|
+
value = send(attr)
|
200
197
|
if value.nil?
|
201
198
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
202
199
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -224,7 +221,5 @@ module MoneyKit
|
|
224
221
|
value
|
225
222
|
end
|
226
223
|
end
|
227
|
-
|
228
224
|
end
|
229
|
-
|
230
225
|
end
|
@@ -1,22 +1,20 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=end
|
1
|
+
# #MoneyKit API
|
2
|
+
#
|
3
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
#
|
5
|
+
# The version of the OpenAPI document: 0.1.0
|
6
|
+
#
|
7
|
+
# Generated by: https://openapi-generator.tech
|
8
|
+
# OpenAPI Generator version: 6.5.0
|
9
|
+
#
|
12
10
|
|
13
11
|
require 'date'
|
14
12
|
require 'time'
|
15
13
|
|
16
14
|
module MoneyKit
|
17
15
|
class MoneyKitEnv
|
18
|
-
PRODUCTION =
|
19
|
-
SANDBOX =
|
16
|
+
PRODUCTION = 'production'.freeze
|
17
|
+
SANDBOX = 'sandbox'.freeze
|
20
18
|
|
21
19
|
def self.all_vars
|
22
20
|
@all_vars ||= [PRODUCTION, SANDBOX].freeze
|
@@ -34,6 +32,7 @@ module MoneyKit
|
|
34
32
|
# @return [String] The enum value
|
35
33
|
def build_from_hash(value)
|
36
34
|
return value if MoneyKitEnv.all_vars.include?(value)
|
35
|
+
|
37
36
|
raise "Invalid ENUM value #{value} for class #MoneyKitEnv"
|
38
37
|
end
|
39
38
|
end
|