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