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,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: 7.1.0
|
9
|
+
#
|
12
10
|
|
13
11
|
require 'date'
|
14
12
|
require 'time'
|
@@ -29,9 +27,12 @@ module MoneyKit
|
|
29
27
|
# The ISO-4217 currency code of the transaction.
|
30
28
|
attr_accessor :currency
|
31
29
|
|
32
|
-
# The effective (posted) date the transaction, in ISO-8601 format. For pending transactions, this date is when the transaction was initiated.
|
30
|
+
# The effective (posted) date of the transaction, in ISO-8601 format. For pending transactions, this date is when the transaction was initiated.
|
33
31
|
attr_accessor :date
|
34
32
|
|
33
|
+
# If the institution has provided the actual time of the transaction, this field contains the full date and time of the transaction, in ISO-8601 format. If the time is not available, this field will be null. <p>Note that the time is generally reported in the timezone of the institution or the account holder.
|
34
|
+
attr_accessor :datetime
|
35
|
+
|
35
36
|
# A normalized, cleaned transaction description suitable for presentation to the end user. Commonly this will be the merchant or counterparty name.
|
36
37
|
attr_accessor :description
|
37
38
|
|
@@ -45,8 +46,7 @@ module MoneyKit
|
|
45
46
|
attr_accessor :category
|
46
47
|
|
47
48
|
class EnumAttributeValidator
|
48
|
-
attr_reader :datatype
|
49
|
-
attr_reader :allowable_values
|
49
|
+
attr_reader :datatype, :allowable_values
|
50
50
|
|
51
51
|
def initialize(datatype, allowable_values)
|
52
52
|
@allowable_values = allowable_values.map do |value|
|
@@ -69,16 +69,17 @@ module MoneyKit
|
|
69
69
|
# Attribute mapping from ruby-style variable name to JSON key.
|
70
70
|
def self.attribute_map
|
71
71
|
{
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
72
|
+
'transaction_id': :transaction_id,
|
73
|
+
'account_id': :account_id,
|
74
|
+
'amount': :amount,
|
75
|
+
'type': :type,
|
76
|
+
'currency': :currency,
|
77
|
+
'date': :date,
|
78
|
+
'datetime': :datetime,
|
79
|
+
'description': :description,
|
80
|
+
'raw_description': :raw_description,
|
81
|
+
'pending': :pending,
|
82
|
+
'category': :category
|
82
83
|
}
|
83
84
|
end
|
84
85
|
|
@@ -90,115 +91,88 @@ module MoneyKit
|
|
90
91
|
# Attribute type mapping.
|
91
92
|
def self.openapi_types
|
92
93
|
{
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
94
|
+
'transaction_id': :String,
|
95
|
+
'account_id': :String,
|
96
|
+
'amount': :String,
|
97
|
+
'type': :TransactionType,
|
98
|
+
'currency': :String,
|
99
|
+
'date': :Date,
|
100
|
+
'datetime': :Time,
|
101
|
+
'description': :String,
|
102
|
+
'raw_description': :String,
|
103
|
+
'pending': :Boolean,
|
104
|
+
'category': :String
|
103
105
|
}
|
104
106
|
end
|
105
107
|
|
106
108
|
# List of attributes with nullable: true
|
107
109
|
def self.openapi_nullable
|
108
|
-
Set.new([
|
109
|
-
:'description',
|
110
|
-
:'raw_description',
|
111
|
-
:'category'
|
112
|
-
])
|
110
|
+
Set.new([])
|
113
111
|
end
|
114
112
|
|
115
113
|
# Initializes the object
|
116
114
|
# @param [Hash] attributes Model attributes in the form of hash
|
117
115
|
def initialize(attributes = {})
|
118
|
-
|
119
|
-
|
116
|
+
unless attributes.is_a?(Hash)
|
117
|
+
raise ArgumentError,
|
118
|
+
'The input argument (attributes) must be a hash in `MoneyKit::Transaction` initialize method'
|
120
119
|
end
|
121
120
|
|
122
121
|
# check to see if the attribute exists and convert string to symbol for hash key
|
123
|
-
attributes = attributes.each_with_object({})
|
124
|
-
|
125
|
-
|
122
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
123
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
124
|
+
raise ArgumentError,
|
125
|
+
"`#{k}` is not a valid attribute in `MoneyKit::Transaction`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
126
126
|
end
|
127
|
-
h[k.to_sym] = v
|
128
|
-
}
|
129
127
|
|
130
|
-
|
131
|
-
self.transaction_id = attributes[:'transaction_id']
|
128
|
+
h[k.to_sym] = v
|
132
129
|
end
|
133
130
|
|
134
|
-
if attributes.key?(:
|
135
|
-
self.account_id = attributes[:'account_id']
|
136
|
-
end
|
131
|
+
self.transaction_id = (attributes[:transaction_id] if attributes.key?(:transaction_id))
|
137
132
|
|
138
|
-
if attributes.key?(:
|
139
|
-
self.amount = attributes[:'amount']
|
140
|
-
end
|
133
|
+
self.account_id = (attributes[:account_id] if attributes.key?(:account_id))
|
141
134
|
|
142
|
-
if attributes.key?(:
|
143
|
-
self.type = attributes[:'type']
|
144
|
-
end
|
135
|
+
self.amount = (attributes[:amount] if attributes.key?(:amount))
|
145
136
|
|
146
|
-
if attributes.key?(:
|
147
|
-
self.currency = attributes[:'currency']
|
148
|
-
end
|
137
|
+
self.type = (attributes[:type] if attributes.key?(:type))
|
149
138
|
|
150
|
-
if attributes.key?(:
|
151
|
-
self.date = attributes[:'date']
|
152
|
-
end
|
139
|
+
self.currency = (attributes[:currency] if attributes.key?(:currency))
|
153
140
|
|
154
|
-
if attributes.key?(:
|
155
|
-
self.description = attributes[:'description']
|
156
|
-
end
|
141
|
+
self.date = (attributes[:date] if attributes.key?(:date))
|
157
142
|
|
158
|
-
if attributes.key?(:
|
159
|
-
self.raw_description = attributes[:'raw_description']
|
160
|
-
end
|
143
|
+
self.datetime = attributes[:datetime] if attributes.key?(:datetime)
|
161
144
|
|
162
|
-
if attributes.key?(:
|
163
|
-
self.pending = attributes[:'pending']
|
164
|
-
end
|
145
|
+
self.description = attributes[:description] if attributes.key?(:description)
|
165
146
|
|
166
|
-
if attributes.key?(:
|
167
|
-
|
168
|
-
|
147
|
+
self.raw_description = attributes[:raw_description] if attributes.key?(:raw_description)
|
148
|
+
|
149
|
+
self.pending = (attributes[:pending] if attributes.key?(:pending))
|
150
|
+
|
151
|
+
return unless attributes.key?(:category)
|
152
|
+
|
153
|
+
self.category = attributes[:category]
|
169
154
|
end
|
170
155
|
|
171
156
|
# Show invalid properties with the reasons. Usually used together with valid?
|
172
157
|
# @return Array for valid properties with the reasons
|
173
158
|
def list_invalid_properties
|
174
|
-
|
159
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
160
|
+
invalid_properties = []
|
175
161
|
if @transaction_id.nil?
|
176
162
|
invalid_properties.push('invalid value for "transaction_id", transaction_id cannot be nil.')
|
177
163
|
end
|
178
164
|
|
179
|
-
if @account_id.nil?
|
180
|
-
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
181
|
-
end
|
165
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') if @account_id.nil?
|
182
166
|
|
183
|
-
if @amount.nil?
|
184
|
-
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
185
|
-
end
|
167
|
+
invalid_properties.push('invalid value for "amount", amount cannot be nil.') if @amount.nil?
|
186
168
|
|
187
|
-
if @type.nil?
|
188
|
-
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
189
|
-
end
|
169
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.') if @type.nil?
|
190
170
|
|
191
|
-
if @currency.nil?
|
192
|
-
invalid_properties.push('invalid value for "currency", currency cannot be nil.')
|
193
|
-
end
|
171
|
+
invalid_properties.push('invalid value for "currency", currency cannot be nil.') if @currency.nil?
|
194
172
|
|
195
|
-
if @date.nil?
|
196
|
-
invalid_properties.push('invalid value for "date", date cannot be nil.')
|
197
|
-
end
|
173
|
+
invalid_properties.push('invalid value for "date", date cannot be nil.') if @date.nil?
|
198
174
|
|
199
|
-
if @pending.nil?
|
200
|
-
invalid_properties.push('invalid value for "pending", pending cannot be nil.')
|
201
|
-
end
|
175
|
+
invalid_properties.push('invalid value for "pending", pending cannot be nil.') if @pending.nil?
|
202
176
|
|
203
177
|
invalid_properties
|
204
178
|
end
|
@@ -206,6 +180,7 @@ module MoneyKit
|
|
206
180
|
# Check to see if the all the properties in the model are valid
|
207
181
|
# @return true if the model is valid
|
208
182
|
def valid?
|
183
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
209
184
|
return false if @transaction_id.nil?
|
210
185
|
return false if @account_id.nil?
|
211
186
|
return false if @amount.nil?
|
@@ -213,73 +188,73 @@ module MoneyKit
|
|
213
188
|
return false if @currency.nil?
|
214
189
|
return false if @date.nil?
|
215
190
|
return false if @pending.nil?
|
191
|
+
|
216
192
|
true
|
217
193
|
end
|
218
194
|
|
219
195
|
# Checks equality by comparing each attribute.
|
220
196
|
# @param [Object] Object to be compared
|
221
|
-
def ==(
|
222
|
-
return true if
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
197
|
+
def ==(other)
|
198
|
+
return true if equal?(other)
|
199
|
+
|
200
|
+
self.class == other.class &&
|
201
|
+
transaction_id == other.transaction_id &&
|
202
|
+
account_id == other.account_id &&
|
203
|
+
amount == other.amount &&
|
204
|
+
type == other.type &&
|
205
|
+
currency == other.currency &&
|
206
|
+
date == other.date &&
|
207
|
+
datetime == other.datetime &&
|
208
|
+
description == other.description &&
|
209
|
+
raw_description == other.raw_description &&
|
210
|
+
pending == other.pending &&
|
211
|
+
category == other.category
|
234
212
|
end
|
235
213
|
|
236
214
|
# @see the `==` method
|
237
215
|
# @param [Object] Object to be compared
|
238
|
-
def eql?(
|
239
|
-
self ==
|
216
|
+
def eql?(other)
|
217
|
+
self == other
|
240
218
|
end
|
241
219
|
|
242
220
|
# Calculates hash code according to all attributes.
|
243
221
|
# @return [Integer] Hash code
|
244
222
|
def hash
|
245
|
-
[transaction_id, account_id, amount, type, currency, date, description, raw_description, pending,
|
223
|
+
[transaction_id, account_id, amount, type, currency, date, datetime, description, raw_description, pending,
|
224
|
+
category].hash
|
246
225
|
end
|
247
226
|
|
248
227
|
# Builds the object from hash
|
249
228
|
# @param [Hash] attributes Model attributes in the form of hash
|
250
229
|
# @return [Object] Returns the model itself
|
251
230
|
def self.build_from_hash(attributes)
|
252
|
-
new.build_from_hash(attributes)
|
253
|
-
end
|
254
|
-
|
255
|
-
# Builds the object from hash
|
256
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
257
|
-
# @return [Object] Returns the model itself
|
258
|
-
def build_from_hash(attributes)
|
259
231
|
return nil unless attributes.is_a?(Hash)
|
232
|
+
|
260
233
|
attributes = attributes.transform_keys(&:to_sym)
|
261
|
-
|
262
|
-
|
263
|
-
|
234
|
+
transformed_hash = {}
|
235
|
+
openapi_types.each_pair do |key, type|
|
236
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
237
|
+
transformed_hash["#{key}"] = nil
|
264
238
|
elsif type =~ /\AArray<(.*)>/i
|
265
239
|
# check to ensure the input is an array given that the attribute
|
266
240
|
# is documented as an array but the input is not
|
267
|
-
if attributes[
|
268
|
-
|
241
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
242
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map do |v|
|
243
|
+
_deserialize(::Regexp.last_match(1), v)
|
244
|
+
end
|
269
245
|
end
|
270
|
-
elsif !attributes[
|
271
|
-
|
246
|
+
elsif !attributes[attribute_map[key]].nil?
|
247
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
272
248
|
end
|
273
249
|
end
|
274
|
-
|
275
|
-
self
|
250
|
+
new(transformed_hash)
|
276
251
|
end
|
277
252
|
|
278
253
|
# Deserializes the data based on type
|
279
254
|
# @param string type Data type
|
280
255
|
# @param string value Value to be deserialized
|
281
256
|
# @return [Object] Deserialized data
|
282
|
-
def _deserialize(type, value)
|
257
|
+
def self._deserialize(type, value)
|
283
258
|
case type.to_sym
|
284
259
|
when :Time
|
285
260
|
Time.parse(value)
|
@@ -314,7 +289,7 @@ module MoneyKit
|
|
314
289
|
else # model
|
315
290
|
# models (e.g. Pet) or oneOf
|
316
291
|
klass = MoneyKit.const_get(type)
|
317
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
292
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
318
293
|
end
|
319
294
|
end
|
320
295
|
|
@@ -335,7 +310,7 @@ module MoneyKit
|
|
335
310
|
def to_hash
|
336
311
|
hash = {}
|
337
312
|
self.class.attribute_map.each_pair do |attr, param|
|
338
|
-
value =
|
313
|
+
value = send(attr)
|
339
314
|
if value.nil?
|
340
315
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
341
316
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -363,7 +338,5 @@ module MoneyKit
|
|
363
338
|
value
|
364
339
|
end
|
365
340
|
end
|
366
|
-
|
367
341
|
end
|
368
|
-
|
369
342
|
end
|
@@ -1,35 +1,26 @@
|
|
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 TransactionDiff
|
18
|
-
|
19
|
-
attr_accessor :created
|
20
|
-
|
21
|
-
# A list of transactions that have been updated on the link ordered by ascending datetime.
|
22
|
-
attr_accessor :updated
|
23
|
-
|
24
|
-
# A list of transaction ids that have been removed from the link ordered by ascending datetime.
|
25
|
-
attr_accessor :removed
|
16
|
+
attr_accessor :created, :updated, :removed
|
26
17
|
|
27
18
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
19
|
def self.attribute_map
|
29
20
|
{
|
30
|
-
|
31
|
-
|
32
|
-
|
21
|
+
'created': :created,
|
22
|
+
'updated': :updated,
|
23
|
+
'removed': :removed
|
33
24
|
}
|
34
25
|
end
|
35
26
|
|
@@ -41,67 +32,70 @@ module MoneyKit
|
|
41
32
|
# Attribute type mapping.
|
42
33
|
def self.openapi_types
|
43
34
|
{
|
44
|
-
|
45
|
-
|
46
|
-
|
35
|
+
'created': :'Array<Transaction>',
|
36
|
+
'updated': :'Array<Transaction>',
|
37
|
+
'removed': :'Array<String>'
|
47
38
|
}
|
48
39
|
end
|
49
40
|
|
50
41
|
# List of attributes with nullable: true
|
51
42
|
def self.openapi_nullable
|
52
|
-
Set.new([
|
53
|
-
])
|
43
|
+
Set.new([])
|
54
44
|
end
|
55
45
|
|
56
46
|
# Initializes the object
|
57
47
|
# @param [Hash] attributes Model attributes in the form of hash
|
58
48
|
def initialize(attributes = {})
|
59
|
-
|
60
|
-
|
49
|
+
unless attributes.is_a?(Hash)
|
50
|
+
raise ArgumentError,
|
51
|
+
'The input argument (attributes) must be a hash in `MoneyKit::TransactionDiff` initialize method'
|
61
52
|
end
|
62
53
|
|
63
54
|
# check to see if the attribute exists and convert string to symbol for hash key
|
64
|
-
attributes = attributes.each_with_object({})
|
65
|
-
|
66
|
-
|
55
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
56
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
57
|
+
raise ArgumentError,
|
58
|
+
"`#{k}` is not a valid attribute in `MoneyKit::TransactionDiff`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
59
|
end
|
60
|
+
|
68
61
|
h[k.to_sym] = v
|
69
|
-
|
62
|
+
end
|
70
63
|
|
71
|
-
if attributes.key?(:
|
72
|
-
if (value = attributes[:
|
64
|
+
if attributes.key?(:created)
|
65
|
+
if (value = attributes[:created]).is_a?(Array)
|
73
66
|
self.created = value
|
74
67
|
end
|
68
|
+
else
|
69
|
+
self.created = nil
|
75
70
|
end
|
76
71
|
|
77
|
-
if attributes.key?(:
|
78
|
-
if (value = attributes[:
|
72
|
+
if attributes.key?(:updated)
|
73
|
+
if (value = attributes[:updated]).is_a?(Array)
|
79
74
|
self.updated = value
|
80
75
|
end
|
76
|
+
else
|
77
|
+
self.updated = nil
|
81
78
|
end
|
82
79
|
|
83
|
-
if attributes.key?(:
|
84
|
-
if (value = attributes[:
|
80
|
+
if attributes.key?(:removed)
|
81
|
+
if (value = attributes[:removed]).is_a?(Array)
|
85
82
|
self.removed = value
|
86
83
|
end
|
84
|
+
else
|
85
|
+
self.removed = nil
|
87
86
|
end
|
88
87
|
end
|
89
88
|
|
90
89
|
# Show invalid properties with the reasons. Usually used together with valid?
|
91
90
|
# @return Array for valid properties with the reasons
|
92
91
|
def list_invalid_properties
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
end
|
92
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
93
|
+
invalid_properties = []
|
94
|
+
invalid_properties.push('invalid value for "created", created cannot be nil.') if @created.nil?
|
97
95
|
|
98
|
-
if @updated.nil?
|
99
|
-
invalid_properties.push('invalid value for "updated", updated cannot be nil.')
|
100
|
-
end
|
96
|
+
invalid_properties.push('invalid value for "updated", updated cannot be nil.') if @updated.nil?
|
101
97
|
|
102
|
-
if @removed.nil?
|
103
|
-
invalid_properties.push('invalid value for "removed", removed cannot be nil.')
|
104
|
-
end
|
98
|
+
invalid_properties.push('invalid value for "removed", removed cannot be nil.') if @removed.nil?
|
105
99
|
|
106
100
|
invalid_properties
|
107
101
|
end
|
@@ -109,26 +103,29 @@ module MoneyKit
|
|
109
103
|
# Check to see if the all the properties in the model are valid
|
110
104
|
# @return true if the model is valid
|
111
105
|
def valid?
|
106
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
112
107
|
return false if @created.nil?
|
113
108
|
return false if @updated.nil?
|
114
109
|
return false if @removed.nil?
|
110
|
+
|
115
111
|
true
|
116
112
|
end
|
117
113
|
|
118
114
|
# Checks equality by comparing each attribute.
|
119
115
|
# @param [Object] Object to be compared
|
120
|
-
def ==(
|
121
|
-
return true if
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
116
|
+
def ==(other)
|
117
|
+
return true if equal?(other)
|
118
|
+
|
119
|
+
self.class == other.class &&
|
120
|
+
created == other.created &&
|
121
|
+
updated == other.updated &&
|
122
|
+
removed == other.removed
|
126
123
|
end
|
127
124
|
|
128
125
|
# @see the `==` method
|
129
126
|
# @param [Object] Object to be compared
|
130
|
-
def eql?(
|
131
|
-
self ==
|
127
|
+
def eql?(other)
|
128
|
+
self == other
|
132
129
|
end
|
133
130
|
|
134
131
|
# Calculates hash code according to all attributes.
|
@@ -141,37 +138,33 @@ module MoneyKit
|
|
141
138
|
# @param [Hash] attributes Model attributes in the form of hash
|
142
139
|
# @return [Object] Returns the model itself
|
143
140
|
def self.build_from_hash(attributes)
|
144
|
-
new.build_from_hash(attributes)
|
145
|
-
end
|
146
|
-
|
147
|
-
# Builds the object from hash
|
148
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
149
|
-
# @return [Object] Returns the model itself
|
150
|
-
def build_from_hash(attributes)
|
151
141
|
return nil unless attributes.is_a?(Hash)
|
142
|
+
|
152
143
|
attributes = attributes.transform_keys(&:to_sym)
|
153
|
-
|
154
|
-
|
155
|
-
|
144
|
+
transformed_hash = {}
|
145
|
+
openapi_types.each_pair do |key, type|
|
146
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
147
|
+
transformed_hash["#{key}"] = nil
|
156
148
|
elsif type =~ /\AArray<(.*)>/i
|
157
149
|
# check to ensure the input is an array given that the attribute
|
158
150
|
# is documented as an array but the input is not
|
159
|
-
if attributes[
|
160
|
-
|
151
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
152
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map do |v|
|
153
|
+
_deserialize(::Regexp.last_match(1), v)
|
154
|
+
end
|
161
155
|
end
|
162
|
-
elsif !attributes[
|
163
|
-
|
156
|
+
elsif !attributes[attribute_map[key]].nil?
|
157
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
164
158
|
end
|
165
159
|
end
|
166
|
-
|
167
|
-
self
|
160
|
+
new(transformed_hash)
|
168
161
|
end
|
169
162
|
|
170
163
|
# Deserializes the data based on type
|
171
164
|
# @param string type Data type
|
172
165
|
# @param string value Value to be deserialized
|
173
166
|
# @return [Object] Deserialized data
|
174
|
-
def _deserialize(type, value)
|
167
|
+
def self._deserialize(type, value)
|
175
168
|
case type.to_sym
|
176
169
|
when :Time
|
177
170
|
Time.parse(value)
|
@@ -206,7 +199,7 @@ module MoneyKit
|
|
206
199
|
else # model
|
207
200
|
# models (e.g. Pet) or oneOf
|
208
201
|
klass = MoneyKit.const_get(type)
|
209
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
202
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
210
203
|
end
|
211
204
|
end
|
212
205
|
|
@@ -227,7 +220,7 @@ module MoneyKit
|
|
227
220
|
def to_hash
|
228
221
|
hash = {}
|
229
222
|
self.class.attribute_map.each_pair do |attr, param|
|
230
|
-
value =
|
223
|
+
value = send(attr)
|
231
224
|
if value.nil?
|
232
225
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
233
226
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -255,7 +248,5 @@ module MoneyKit
|
|
255
248
|
value
|
256
249
|
end
|
257
250
|
end
|
258
|
-
|
259
251
|
end
|
260
|
-
|
261
252
|
end
|