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,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'
|
@@ -45,8 +43,7 @@ module MoneyKit
|
|
45
43
|
attr_accessor :category
|
46
44
|
|
47
45
|
class EnumAttributeValidator
|
48
|
-
attr_reader :datatype
|
49
|
-
attr_reader :allowable_values
|
46
|
+
attr_reader :datatype, :allowable_values
|
50
47
|
|
51
48
|
def initialize(datatype, allowable_values)
|
52
49
|
@allowable_values = allowable_values.map do |value|
|
@@ -69,16 +66,16 @@ module MoneyKit
|
|
69
66
|
# Attribute mapping from ruby-style variable name to JSON key.
|
70
67
|
def self.attribute_map
|
71
68
|
{
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
69
|
+
'transaction_id': :transaction_id,
|
70
|
+
'account_id': :account_id,
|
71
|
+
'amount': :amount,
|
72
|
+
'type': :type,
|
73
|
+
'currency': :currency,
|
74
|
+
'date': :date,
|
75
|
+
'description': :description,
|
76
|
+
'raw_description': :raw_description,
|
77
|
+
'pending': :pending,
|
78
|
+
'category': :category
|
82
79
|
}
|
83
80
|
end
|
84
81
|
|
@@ -90,115 +87,88 @@ module MoneyKit
|
|
90
87
|
# Attribute type mapping.
|
91
88
|
def self.openapi_types
|
92
89
|
{
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
90
|
+
'transaction_id': :String,
|
91
|
+
'account_id': :String,
|
92
|
+
'amount': :String,
|
93
|
+
'type': :TransactionType,
|
94
|
+
'currency': :String,
|
95
|
+
'date': :Date,
|
96
|
+
'description': :String,
|
97
|
+
'raw_description': :String,
|
98
|
+
'pending': :Boolean,
|
99
|
+
'category': :String
|
103
100
|
}
|
104
101
|
end
|
105
102
|
|
106
103
|
# List of attributes with nullable: true
|
107
104
|
def self.openapi_nullable
|
108
|
-
Set.new([
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
105
|
+
Set.new(%i[
|
106
|
+
description
|
107
|
+
raw_description
|
108
|
+
category
|
109
|
+
])
|
113
110
|
end
|
114
111
|
|
115
112
|
# Initializes the object
|
116
113
|
# @param [Hash] attributes Model attributes in the form of hash
|
117
114
|
def initialize(attributes = {})
|
118
|
-
|
119
|
-
|
115
|
+
unless attributes.is_a?(Hash)
|
116
|
+
raise ArgumentError,
|
117
|
+
'The input argument (attributes) must be a hash in `MoneyKit::Transaction` initialize method'
|
120
118
|
end
|
121
119
|
|
122
120
|
# check to see if the attribute exists and convert string to symbol for hash key
|
123
|
-
attributes = attributes.each_with_object({})
|
124
|
-
|
125
|
-
|
121
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
122
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
123
|
+
raise ArgumentError,
|
124
|
+
"`#{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
125
|
end
|
127
|
-
h[k.to_sym] = v
|
128
|
-
}
|
129
126
|
|
130
|
-
|
131
|
-
self.transaction_id = attributes[:'transaction_id']
|
127
|
+
h[k.to_sym] = v
|
132
128
|
end
|
133
129
|
|
134
|
-
if attributes.key?(:
|
135
|
-
self.account_id = attributes[:'account_id']
|
136
|
-
end
|
130
|
+
self.transaction_id = attributes[:transaction_id] if attributes.key?(:transaction_id)
|
137
131
|
|
138
|
-
if attributes.key?(:
|
139
|
-
self.amount = attributes[:'amount']
|
140
|
-
end
|
132
|
+
self.account_id = attributes[:account_id] if attributes.key?(:account_id)
|
141
133
|
|
142
|
-
if attributes.key?(:
|
143
|
-
self.type = attributes[:'type']
|
144
|
-
end
|
134
|
+
self.amount = attributes[:amount] if attributes.key?(:amount)
|
145
135
|
|
146
|
-
if attributes.key?(:
|
147
|
-
self.currency = attributes[:'currency']
|
148
|
-
end
|
136
|
+
self.type = attributes[:type] if attributes.key?(:type)
|
149
137
|
|
150
|
-
if attributes.key?(:
|
151
|
-
self.date = attributes[:'date']
|
152
|
-
end
|
138
|
+
self.currency = attributes[:currency] if attributes.key?(:currency)
|
153
139
|
|
154
|
-
if attributes.key?(:
|
155
|
-
self.description = attributes[:'description']
|
156
|
-
end
|
140
|
+
self.date = attributes[:date] if attributes.key?(:date)
|
157
141
|
|
158
|
-
if attributes.key?(:
|
159
|
-
self.raw_description = attributes[:'raw_description']
|
160
|
-
end
|
142
|
+
self.description = attributes[:description] if attributes.key?(:description)
|
161
143
|
|
162
|
-
if attributes.key?(:
|
163
|
-
self.pending = attributes[:'pending']
|
164
|
-
end
|
144
|
+
self.raw_description = attributes[:raw_description] if attributes.key?(:raw_description)
|
165
145
|
|
166
|
-
if attributes.key?(:
|
167
|
-
|
168
|
-
|
146
|
+
self.pending = attributes[:pending] if attributes.key?(:pending)
|
147
|
+
|
148
|
+
return unless attributes.key?(:category)
|
149
|
+
|
150
|
+
self.category = attributes[:category]
|
169
151
|
end
|
170
152
|
|
171
153
|
# Show invalid properties with the reasons. Usually used together with valid?
|
172
154
|
# @return Array for valid properties with the reasons
|
173
155
|
def list_invalid_properties
|
174
|
-
invalid_properties =
|
156
|
+
invalid_properties = []
|
175
157
|
if @transaction_id.nil?
|
176
158
|
invalid_properties.push('invalid value for "transaction_id", transaction_id cannot be nil.')
|
177
159
|
end
|
178
160
|
|
179
|
-
if @account_id.nil?
|
180
|
-
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
181
|
-
end
|
161
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') if @account_id.nil?
|
182
162
|
|
183
|
-
if @amount.nil?
|
184
|
-
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
185
|
-
end
|
163
|
+
invalid_properties.push('invalid value for "amount", amount cannot be nil.') if @amount.nil?
|
186
164
|
|
187
|
-
if @type.nil?
|
188
|
-
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
189
|
-
end
|
165
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.') if @type.nil?
|
190
166
|
|
191
|
-
if @currency.nil?
|
192
|
-
invalid_properties.push('invalid value for "currency", currency cannot be nil.')
|
193
|
-
end
|
167
|
+
invalid_properties.push('invalid value for "currency", currency cannot be nil.') if @currency.nil?
|
194
168
|
|
195
|
-
if @date.nil?
|
196
|
-
invalid_properties.push('invalid value for "date", date cannot be nil.')
|
197
|
-
end
|
169
|
+
invalid_properties.push('invalid value for "date", date cannot be nil.') if @date.nil?
|
198
170
|
|
199
|
-
if @pending.nil?
|
200
|
-
invalid_properties.push('invalid value for "pending", pending cannot be nil.')
|
201
|
-
end
|
171
|
+
invalid_properties.push('invalid value for "pending", pending cannot be nil.') if @pending.nil?
|
202
172
|
|
203
173
|
invalid_properties
|
204
174
|
end
|
@@ -213,30 +183,32 @@ module MoneyKit
|
|
213
183
|
return false if @currency.nil?
|
214
184
|
return false if @date.nil?
|
215
185
|
return false if @pending.nil?
|
186
|
+
|
216
187
|
true
|
217
188
|
end
|
218
189
|
|
219
190
|
# Checks equality by comparing each attribute.
|
220
191
|
# @param [Object] Object to be compared
|
221
|
-
def ==(
|
222
|
-
return true if
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
192
|
+
def ==(other)
|
193
|
+
return true if equal?(other)
|
194
|
+
|
195
|
+
self.class == other.class &&
|
196
|
+
transaction_id == other.transaction_id &&
|
197
|
+
account_id == other.account_id &&
|
198
|
+
amount == other.amount &&
|
199
|
+
type == other.type &&
|
200
|
+
currency == other.currency &&
|
201
|
+
date == other.date &&
|
202
|
+
description == other.description &&
|
203
|
+
raw_description == other.raw_description &&
|
204
|
+
pending == other.pending &&
|
205
|
+
category == other.category
|
234
206
|
end
|
235
207
|
|
236
208
|
# @see the `==` method
|
237
209
|
# @param [Object] Object to be compared
|
238
|
-
def eql?(
|
239
|
-
self ==
|
210
|
+
def eql?(other)
|
211
|
+
self == other
|
240
212
|
end
|
241
213
|
|
242
214
|
# Calculates hash code according to all attributes.
|
@@ -257,18 +229,21 @@ module MoneyKit
|
|
257
229
|
# @return [Object] Returns the model itself
|
258
230
|
def build_from_hash(attributes)
|
259
231
|
return nil unless attributes.is_a?(Hash)
|
232
|
+
|
260
233
|
attributes = attributes.transform_keys(&:to_sym)
|
261
234
|
self.class.openapi_types.each_pair do |key, type|
|
262
235
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
263
|
-
|
236
|
+
send("#{key}=", nil)
|
264
237
|
elsif type =~ /\AArray<(.*)>/i
|
265
238
|
# check to ensure the input is an array given that the attribute
|
266
239
|
# is documented as an array but the input is not
|
267
240
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
268
|
-
|
241
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
|
242
|
+
_deserialize(::Regexp.last_match(1), v)
|
243
|
+
end)
|
269
244
|
end
|
270
245
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
271
|
-
|
246
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
272
247
|
end
|
273
248
|
end
|
274
249
|
|
@@ -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,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'
|
@@ -27,9 +25,9 @@ module MoneyKit
|
|
27
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
26
|
def self.attribute_map
|
29
27
|
{
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
'created': :created,
|
29
|
+
'updated': :updated,
|
30
|
+
'removed': :removed
|
33
31
|
}
|
34
32
|
end
|
35
33
|
|
@@ -41,67 +39,58 @@ module MoneyKit
|
|
41
39
|
# Attribute type mapping.
|
42
40
|
def self.openapi_types
|
43
41
|
{
|
44
|
-
|
45
|
-
|
46
|
-
|
42
|
+
'created': :'Array<Transaction>',
|
43
|
+
'updated': :'Array<Transaction>',
|
44
|
+
'removed': :'Array<String>'
|
47
45
|
}
|
48
46
|
end
|
49
47
|
|
50
48
|
# List of attributes with nullable: true
|
51
49
|
def self.openapi_nullable
|
52
|
-
Set.new([
|
53
|
-
])
|
50
|
+
Set.new([])
|
54
51
|
end
|
55
52
|
|
56
53
|
# Initializes the object
|
57
54
|
# @param [Hash] attributes Model attributes in the form of hash
|
58
55
|
def initialize(attributes = {})
|
59
|
-
|
60
|
-
|
56
|
+
unless attributes.is_a?(Hash)
|
57
|
+
raise ArgumentError,
|
58
|
+
'The input argument (attributes) must be a hash in `MoneyKit::TransactionDiff` initialize method'
|
61
59
|
end
|
62
60
|
|
63
61
|
# check to see if the attribute exists and convert string to symbol for hash key
|
64
|
-
attributes = attributes.each_with_object({})
|
65
|
-
|
66
|
-
|
62
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
63
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
64
|
+
raise ArgumentError,
|
65
|
+
"`#{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
66
|
end
|
68
|
-
h[k.to_sym] = v
|
69
|
-
}
|
70
67
|
|
71
|
-
|
72
|
-
if (value = attributes[:'created']).is_a?(Array)
|
73
|
-
self.created = value
|
74
|
-
end
|
68
|
+
h[k.to_sym] = v
|
75
69
|
end
|
76
70
|
|
77
|
-
if attributes.key?(:
|
78
|
-
|
79
|
-
self.updated = value
|
80
|
-
end
|
71
|
+
if attributes.key?(:created) && (value = attributes[:created]).is_a?(Array)
|
72
|
+
self.created = value
|
81
73
|
end
|
82
74
|
|
83
|
-
if attributes.key?(:
|
84
|
-
|
85
|
-
self.removed = value
|
86
|
-
end
|
75
|
+
if attributes.key?(:updated) && (value = attributes[:updated]).is_a?(Array)
|
76
|
+
self.updated = value
|
87
77
|
end
|
78
|
+
|
79
|
+
return unless attributes.key?(:removed)
|
80
|
+
return unless (value = attributes[:removed]).is_a?(Array)
|
81
|
+
|
82
|
+
self.removed = value
|
88
83
|
end
|
89
84
|
|
90
85
|
# Show invalid properties with the reasons. Usually used together with valid?
|
91
86
|
# @return Array for valid properties with the reasons
|
92
87
|
def list_invalid_properties
|
93
|
-
invalid_properties =
|
94
|
-
if @created.nil?
|
95
|
-
invalid_properties.push('invalid value for "created", created cannot be nil.')
|
96
|
-
end
|
88
|
+
invalid_properties = []
|
89
|
+
invalid_properties.push('invalid value for "created", created cannot be nil.') if @created.nil?
|
97
90
|
|
98
|
-
if @updated.nil?
|
99
|
-
invalid_properties.push('invalid value for "updated", updated cannot be nil.')
|
100
|
-
end
|
91
|
+
invalid_properties.push('invalid value for "updated", updated cannot be nil.') if @updated.nil?
|
101
92
|
|
102
|
-
if @removed.nil?
|
103
|
-
invalid_properties.push('invalid value for "removed", removed cannot be nil.')
|
104
|
-
end
|
93
|
+
invalid_properties.push('invalid value for "removed", removed cannot be nil.') if @removed.nil?
|
105
94
|
|
106
95
|
invalid_properties
|
107
96
|
end
|
@@ -112,23 +101,25 @@ module MoneyKit
|
|
112
101
|
return false if @created.nil?
|
113
102
|
return false if @updated.nil?
|
114
103
|
return false if @removed.nil?
|
104
|
+
|
115
105
|
true
|
116
106
|
end
|
117
107
|
|
118
108
|
# Checks equality by comparing each attribute.
|
119
109
|
# @param [Object] Object to be compared
|
120
|
-
def ==(
|
121
|
-
return true if
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
110
|
+
def ==(other)
|
111
|
+
return true if equal?(other)
|
112
|
+
|
113
|
+
self.class == other.class &&
|
114
|
+
created == other.created &&
|
115
|
+
updated == other.updated &&
|
116
|
+
removed == other.removed
|
126
117
|
end
|
127
118
|
|
128
119
|
# @see the `==` method
|
129
120
|
# @param [Object] Object to be compared
|
130
|
-
def eql?(
|
131
|
-
self ==
|
121
|
+
def eql?(other)
|
122
|
+
self == other
|
132
123
|
end
|
133
124
|
|
134
125
|
# Calculates hash code according to all attributes.
|
@@ -149,18 +140,21 @@ module MoneyKit
|
|
149
140
|
# @return [Object] Returns the model itself
|
150
141
|
def build_from_hash(attributes)
|
151
142
|
return nil unless attributes.is_a?(Hash)
|
143
|
+
|
152
144
|
attributes = attributes.transform_keys(&:to_sym)
|
153
145
|
self.class.openapi_types.each_pair do |key, type|
|
154
146
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
155
|
-
|
147
|
+
send("#{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
151
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
160
|
-
|
152
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
|
153
|
+
_deserialize(::Regexp.last_match(1), v)
|
154
|
+
end)
|
161
155
|
end
|
162
156
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
163
|
-
|
157
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
164
158
|
end
|
165
159
|
end
|
166
160
|
|
@@ -227,7 +221,7 @@ module MoneyKit
|
|
227
221
|
def to_hash
|
228
222
|
hash = {}
|
229
223
|
self.class.attribute_map.each_pair do |attr, param|
|
230
|
-
value =
|
224
|
+
value = send(attr)
|
231
225
|
if value.nil?
|
232
226
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
233
227
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -255,7 +249,5 @@ module MoneyKit
|
|
255
249
|
value
|
256
250
|
end
|
257
251
|
end
|
258
|
-
|
259
252
|
end
|
260
|
-
|
261
253
|
end
|