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,19 +1,18 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=end
|
1
|
+
# #Plaid Compatibility Layer
|
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: 5.1.1
|
9
|
+
#
|
12
10
|
|
13
11
|
require 'date'
|
14
12
|
require 'time'
|
15
13
|
|
16
|
-
module MoneyKit
|
14
|
+
module MoneyKit
|
15
|
+
module PlaidCompatible
|
17
16
|
# A representation of a transaction
|
18
17
|
class Transaction
|
19
18
|
# The ID of the account in which this transaction occurred.
|
@@ -57,19 +56,19 @@ module MoneyKit::PlaidCompatible
|
|
57
56
|
# Attribute mapping from ruby-style variable name to JSON key.
|
58
57
|
def self.attribute_map
|
59
58
|
{
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
59
|
+
'account_id': :account_id,
|
60
|
+
'amount': :amount,
|
61
|
+
'iso_currency_code': :iso_currency_code,
|
62
|
+
'category': :category,
|
63
|
+
'category_id': :category_id,
|
64
|
+
'date': :date,
|
65
|
+
'name': :name,
|
66
|
+
'merchant_name': :merchant_name,
|
67
|
+
'original_description': :original_description,
|
68
|
+
'pending': :pending,
|
69
|
+
'transaction_id': :transaction_id,
|
70
|
+
'datetime': :datetime,
|
71
|
+
'personal_finance_category': :personal_finance_category
|
73
72
|
}
|
74
73
|
end
|
75
74
|
|
@@ -81,128 +80,97 @@ module MoneyKit::PlaidCompatible
|
|
81
80
|
# Attribute type mapping.
|
82
81
|
def self.openapi_types
|
83
82
|
{
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
83
|
+
'account_id': :String,
|
84
|
+
'amount': :Float,
|
85
|
+
'iso_currency_code': :String,
|
86
|
+
'category': :'Array<String>',
|
87
|
+
'category_id': :String,
|
88
|
+
'date': :Date,
|
89
|
+
'name': :String,
|
90
|
+
'merchant_name': :String,
|
91
|
+
'original_description': :String,
|
92
|
+
'pending': :Boolean,
|
93
|
+
'transaction_id': :String,
|
94
|
+
'datetime': :Time,
|
95
|
+
'personal_finance_category': :PersonalFinanceCategory
|
97
96
|
}
|
98
97
|
end
|
99
98
|
|
100
99
|
# List of attributes with nullable: true
|
101
100
|
def self.openapi_nullable
|
102
|
-
Set.new([
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
101
|
+
Set.new(%i[
|
102
|
+
iso_currency_code
|
103
|
+
category
|
104
|
+
category_id
|
105
|
+
merchant_name
|
106
|
+
original_description
|
107
|
+
datetime
|
108
|
+
personal_finance_category
|
109
|
+
])
|
111
110
|
end
|
112
111
|
|
113
112
|
# Initializes the object
|
114
113
|
# @param [Hash] attributes Model attributes in the form of hash
|
115
114
|
def initialize(attributes = {})
|
116
|
-
|
117
|
-
|
115
|
+
unless attributes.is_a?(Hash)
|
116
|
+
raise ArgumentError,
|
117
|
+
'The input argument (attributes) must be a hash in `MoneyKit::PlaidCompatible::Transaction` initialize method'
|
118
118
|
end
|
119
119
|
|
120
120
|
# check to see if the attribute exists and convert string to symbol for hash key
|
121
|
-
attributes = attributes.each_with_object({})
|
122
|
-
|
123
|
-
|
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::PlaidCompatible::Transaction`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
124
125
|
end
|
125
|
-
h[k.to_sym] = v
|
126
|
-
}
|
127
126
|
|
128
|
-
|
129
|
-
self.account_id = attributes[:'account_id']
|
127
|
+
h[k.to_sym] = v
|
130
128
|
end
|
131
129
|
|
132
|
-
if attributes.key?(:
|
133
|
-
self.amount = attributes[:'amount']
|
134
|
-
end
|
130
|
+
self.account_id = attributes[:account_id] if attributes.key?(:account_id)
|
135
131
|
|
136
|
-
if attributes.key?(:
|
137
|
-
self.iso_currency_code = attributes[:'iso_currency_code']
|
138
|
-
end
|
132
|
+
self.amount = attributes[:amount] if attributes.key?(:amount)
|
139
133
|
|
140
|
-
if attributes.key?(:
|
141
|
-
if (value = attributes[:'category']).is_a?(Array)
|
142
|
-
self.category = value
|
143
|
-
end
|
144
|
-
end
|
134
|
+
self.iso_currency_code = attributes[:iso_currency_code] if attributes.key?(:iso_currency_code)
|
145
135
|
|
146
|
-
if attributes.key?(:
|
147
|
-
self.
|
136
|
+
if attributes.key?(:category) && (value = attributes[:category]).is_a?(Array)
|
137
|
+
self.category = value
|
148
138
|
end
|
149
139
|
|
150
|
-
if attributes.key?(:
|
151
|
-
self.date = attributes[:'date']
|
152
|
-
end
|
140
|
+
self.category_id = attributes[:category_id] if attributes.key?(:category_id)
|
153
141
|
|
154
|
-
if attributes.key?(:
|
155
|
-
self.name = attributes[:'name']
|
156
|
-
end
|
142
|
+
self.date = attributes[:date] if attributes.key?(:date)
|
157
143
|
|
158
|
-
if attributes.key?(:
|
159
|
-
self.merchant_name = attributes[:'merchant_name']
|
160
|
-
end
|
144
|
+
self.name = attributes[:name] if attributes.key?(:name)
|
161
145
|
|
162
|
-
if attributes.key?(:
|
163
|
-
self.original_description = attributes[:'original_description']
|
164
|
-
end
|
146
|
+
self.merchant_name = attributes[:merchant_name] if attributes.key?(:merchant_name)
|
165
147
|
|
166
|
-
if attributes.key?(:
|
167
|
-
self.pending = attributes[:'pending']
|
168
|
-
end
|
148
|
+
self.original_description = attributes[:original_description] if attributes.key?(:original_description)
|
169
149
|
|
170
|
-
if attributes.key?(:
|
171
|
-
self.transaction_id = attributes[:'transaction_id']
|
172
|
-
end
|
150
|
+
self.pending = attributes[:pending] if attributes.key?(:pending)
|
173
151
|
|
174
|
-
if attributes.key?(:
|
175
|
-
self.datetime = attributes[:'datetime']
|
176
|
-
end
|
152
|
+
self.transaction_id = attributes[:transaction_id] if attributes.key?(:transaction_id)
|
177
153
|
|
178
|
-
if attributes.key?(:
|
179
|
-
|
180
|
-
|
154
|
+
self.datetime = attributes[:datetime] if attributes.key?(:datetime)
|
155
|
+
|
156
|
+
return unless attributes.key?(:personal_finance_category)
|
157
|
+
|
158
|
+
self.personal_finance_category = attributes[:personal_finance_category]
|
181
159
|
end
|
182
160
|
|
183
161
|
# Show invalid properties with the reasons. Usually used together with valid?
|
184
162
|
# @return Array for valid properties with the reasons
|
185
163
|
def list_invalid_properties
|
186
|
-
invalid_properties =
|
187
|
-
if @account_id.nil?
|
188
|
-
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
189
|
-
end
|
164
|
+
invalid_properties = []
|
165
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') if @account_id.nil?
|
190
166
|
|
191
|
-
if @amount.nil?
|
192
|
-
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
193
|
-
end
|
167
|
+
invalid_properties.push('invalid value for "amount", amount cannot be nil.') if @amount.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 @name.nil?
|
200
|
-
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
201
|
-
end
|
171
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.') if @name.nil?
|
202
172
|
|
203
|
-
if @pending.nil?
|
204
|
-
invalid_properties.push('invalid value for "pending", pending cannot be nil.')
|
205
|
-
end
|
173
|
+
invalid_properties.push('invalid value for "pending", pending cannot be nil.') if @pending.nil?
|
206
174
|
|
207
175
|
if @transaction_id.nil?
|
208
176
|
invalid_properties.push('invalid value for "transaction_id", transaction_id cannot be nil.')
|
@@ -220,39 +188,42 @@ module MoneyKit::PlaidCompatible
|
|
220
188
|
return false if @name.nil?
|
221
189
|
return false if @pending.nil?
|
222
190
|
return false if @transaction_id.nil?
|
191
|
+
|
223
192
|
true
|
224
193
|
end
|
225
194
|
|
226
195
|
# Checks equality by comparing each attribute.
|
227
196
|
# @param [Object] Object to be compared
|
228
|
-
def ==(
|
229
|
-
return true if
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
197
|
+
def ==(other)
|
198
|
+
return true if equal?(other)
|
199
|
+
|
200
|
+
self.class == other.class &&
|
201
|
+
account_id == other.account_id &&
|
202
|
+
amount == other.amount &&
|
203
|
+
iso_currency_code == other.iso_currency_code &&
|
204
|
+
category == other.category &&
|
205
|
+
category_id == other.category_id &&
|
206
|
+
date == other.date &&
|
207
|
+
name == other.name &&
|
208
|
+
merchant_name == other.merchant_name &&
|
209
|
+
original_description == other.original_description &&
|
210
|
+
pending == other.pending &&
|
211
|
+
transaction_id == other.transaction_id &&
|
212
|
+
datetime == other.datetime &&
|
213
|
+
personal_finance_category == other.personal_finance_category
|
244
214
|
end
|
245
215
|
|
246
216
|
# @see the `==` method
|
247
217
|
# @param [Object] Object to be compared
|
248
|
-
def eql?(
|
249
|
-
self ==
|
218
|
+
def eql?(other)
|
219
|
+
self == other
|
250
220
|
end
|
251
221
|
|
252
222
|
# Calculates hash code according to all attributes.
|
253
223
|
# @return [Integer] Hash code
|
254
224
|
def hash
|
255
|
-
[account_id, amount, iso_currency_code, category, category_id, date, name, merchant_name, original_description,
|
225
|
+
[account_id, amount, iso_currency_code, category, category_id, date, name, merchant_name, original_description,
|
226
|
+
pending, transaction_id, datetime, personal_finance_category].hash
|
256
227
|
end
|
257
228
|
|
258
229
|
# Builds the object from hash
|
@@ -267,17 +238,20 @@ module MoneyKit::PlaidCompatible
|
|
267
238
|
# @return [Object] Returns the model itself
|
268
239
|
def build_from_hash(attributes)
|
269
240
|
return nil unless attributes.is_a?(Hash)
|
241
|
+
|
270
242
|
self.class.openapi_types.each_pair do |key, type|
|
271
243
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
272
|
-
|
244
|
+
send("#{key}=", nil)
|
273
245
|
elsif type =~ /\AArray<(.*)>/i
|
274
246
|
# check to ensure the input is an array given that the attribute
|
275
247
|
# is documented as an array but the input is not
|
276
248
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
277
|
-
|
249
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
|
250
|
+
_deserialize(::Regexp.last_match(1), v)
|
251
|
+
end)
|
278
252
|
end
|
279
253
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
280
|
-
|
254
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
281
255
|
end
|
282
256
|
end
|
283
257
|
|
@@ -344,7 +318,7 @@ module MoneyKit::PlaidCompatible
|
|
344
318
|
def to_hash
|
345
319
|
hash = {}
|
346
320
|
self.class.attribute_map.each_pair do |attr, param|
|
347
|
-
value =
|
321
|
+
value = send(attr)
|
348
322
|
if value.nil?
|
349
323
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
350
324
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -372,7 +346,6 @@ module MoneyKit::PlaidCompatible
|
|
372
346
|
value
|
373
347
|
end
|
374
348
|
end
|
375
|
-
|
376
349
|
end
|
377
|
-
|
350
|
+
end
|
378
351
|
end
|
@@ -1,19 +1,18 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=end
|
1
|
+
# #Plaid Compatibility Layer
|
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: 5.1.1
|
9
|
+
#
|
12
10
|
|
13
11
|
require 'date'
|
14
12
|
require 'time'
|
15
13
|
|
16
|
-
module MoneyKit
|
14
|
+
module MoneyKit
|
15
|
+
module PlaidCompatible
|
17
16
|
# TransactionsGetRequest defines the request schema for `/transactions/get`
|
18
17
|
class TransactionsGetRequest
|
19
18
|
# Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.
|
@@ -36,12 +35,12 @@ module MoneyKit::PlaidCompatible
|
|
36
35
|
# Attribute mapping from ruby-style variable name to JSON key.
|
37
36
|
def self.attribute_map
|
38
37
|
{
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
38
|
+
'client_id': :client_id,
|
39
|
+
'options': :options,
|
40
|
+
'access_token': :access_token,
|
41
|
+
'secret': :secret,
|
42
|
+
'start_date': :start_date,
|
43
|
+
'end_date': :end_date
|
45
44
|
}
|
46
45
|
end
|
47
46
|
|
@@ -53,78 +52,65 @@ module MoneyKit::PlaidCompatible
|
|
53
52
|
# Attribute type mapping.
|
54
53
|
def self.openapi_types
|
55
54
|
{
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
55
|
+
'client_id': :String,
|
56
|
+
'options': :TransactionsGetRequestOptions,
|
57
|
+
'access_token': :String,
|
58
|
+
'secret': :String,
|
59
|
+
'start_date': :Date,
|
60
|
+
'end_date': :Date
|
62
61
|
}
|
63
62
|
end
|
64
63
|
|
65
64
|
# List of attributes with nullable: true
|
66
65
|
def self.openapi_nullable
|
67
|
-
Set.new([
|
68
|
-
|
69
|
-
|
70
|
-
|
66
|
+
Set.new(%i[
|
67
|
+
client_id
|
68
|
+
secret
|
69
|
+
])
|
71
70
|
end
|
72
71
|
|
73
72
|
# Initializes the object
|
74
73
|
# @param [Hash] attributes Model attributes in the form of hash
|
75
74
|
def initialize(attributes = {})
|
76
|
-
|
77
|
-
|
75
|
+
unless attributes.is_a?(Hash)
|
76
|
+
raise ArgumentError,
|
77
|
+
'The input argument (attributes) must be a hash in `MoneyKit::PlaidCompatible::TransactionsGetRequest` initialize method'
|
78
78
|
end
|
79
79
|
|
80
80
|
# check to see if the attribute exists and convert string to symbol for hash key
|
81
|
-
attributes = attributes.each_with_object({})
|
82
|
-
|
83
|
-
|
81
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
82
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
83
|
+
raise ArgumentError,
|
84
|
+
"`#{k}` is not a valid attribute in `MoneyKit::PlaidCompatible::TransactionsGetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
84
85
|
end
|
85
|
-
h[k.to_sym] = v
|
86
|
-
}
|
87
86
|
|
88
|
-
|
89
|
-
self.client_id = attributes[:'client_id']
|
87
|
+
h[k.to_sym] = v
|
90
88
|
end
|
91
89
|
|
92
|
-
if attributes.key?(:
|
93
|
-
self.options = attributes[:'options']
|
94
|
-
end
|
90
|
+
self.client_id = attributes[:client_id] if attributes.key?(:client_id)
|
95
91
|
|
96
|
-
if attributes.key?(:
|
97
|
-
self.access_token = attributes[:'access_token']
|
98
|
-
end
|
92
|
+
self.options = attributes[:options] if attributes.key?(:options)
|
99
93
|
|
100
|
-
if attributes.key?(:
|
101
|
-
self.secret = attributes[:'secret']
|
102
|
-
end
|
94
|
+
self.access_token = attributes[:access_token] if attributes.key?(:access_token)
|
103
95
|
|
104
|
-
if attributes.key?(:
|
105
|
-
self.start_date = attributes[:'start_date']
|
106
|
-
end
|
96
|
+
self.secret = attributes[:secret] if attributes.key?(:secret)
|
107
97
|
|
108
|
-
if attributes.key?(:
|
109
|
-
|
110
|
-
|
98
|
+
self.start_date = attributes[:start_date] if attributes.key?(:start_date)
|
99
|
+
|
100
|
+
return unless attributes.key?(:end_date)
|
101
|
+
|
102
|
+
self.end_date = attributes[:end_date]
|
111
103
|
end
|
112
104
|
|
113
105
|
# Show invalid properties with the reasons. Usually used together with valid?
|
114
106
|
# @return Array for valid properties with the reasons
|
115
107
|
def list_invalid_properties
|
116
|
-
invalid_properties =
|
117
|
-
if @access_token.nil?
|
118
|
-
invalid_properties.push('invalid value for "access_token", access_token cannot be nil.')
|
119
|
-
end
|
108
|
+
invalid_properties = []
|
109
|
+
invalid_properties.push('invalid value for "access_token", access_token cannot be nil.') if @access_token.nil?
|
120
110
|
|
121
|
-
if @start_date.nil?
|
122
|
-
invalid_properties.push('invalid value for "start_date", start_date cannot be nil.')
|
123
|
-
end
|
111
|
+
invalid_properties.push('invalid value for "start_date", start_date cannot be nil.') if @start_date.nil?
|
124
112
|
|
125
|
-
if @end_date.nil?
|
126
|
-
invalid_properties.push('invalid value for "end_date", end_date cannot be nil.')
|
127
|
-
end
|
113
|
+
invalid_properties.push('invalid value for "end_date", end_date cannot be nil.') if @end_date.nil?
|
128
114
|
|
129
115
|
invalid_properties
|
130
116
|
end
|
@@ -135,26 +121,28 @@ module MoneyKit::PlaidCompatible
|
|
135
121
|
return false if @access_token.nil?
|
136
122
|
return false if @start_date.nil?
|
137
123
|
return false if @end_date.nil?
|
124
|
+
|
138
125
|
true
|
139
126
|
end
|
140
127
|
|
141
128
|
# Checks equality by comparing each attribute.
|
142
129
|
# @param [Object] Object to be compared
|
143
|
-
def ==(
|
144
|
-
return true if
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
130
|
+
def ==(other)
|
131
|
+
return true if equal?(other)
|
132
|
+
|
133
|
+
self.class == other.class &&
|
134
|
+
client_id == other.client_id &&
|
135
|
+
options == other.options &&
|
136
|
+
access_token == other.access_token &&
|
137
|
+
secret == other.secret &&
|
138
|
+
start_date == other.start_date &&
|
139
|
+
end_date == other.end_date
|
152
140
|
end
|
153
141
|
|
154
142
|
# @see the `==` method
|
155
143
|
# @param [Object] Object to be compared
|
156
|
-
def eql?(
|
157
|
-
self ==
|
144
|
+
def eql?(other)
|
145
|
+
self == other
|
158
146
|
end
|
159
147
|
|
160
148
|
# Calculates hash code according to all attributes.
|
@@ -175,17 +163,20 @@ module MoneyKit::PlaidCompatible
|
|
175
163
|
# @return [Object] Returns the model itself
|
176
164
|
def build_from_hash(attributes)
|
177
165
|
return nil unless attributes.is_a?(Hash)
|
166
|
+
|
178
167
|
self.class.openapi_types.each_pair do |key, type|
|
179
168
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
180
|
-
|
169
|
+
send("#{key}=", nil)
|
181
170
|
elsif type =~ /\AArray<(.*)>/i
|
182
171
|
# check to ensure the input is an array given that the attribute
|
183
172
|
# is documented as an array but the input is not
|
184
173
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
185
|
-
|
174
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
|
175
|
+
_deserialize(::Regexp.last_match(1), v)
|
176
|
+
end)
|
186
177
|
end
|
187
178
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
188
|
-
|
179
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
189
180
|
end
|
190
181
|
end
|
191
182
|
|
@@ -252,7 +243,7 @@ module MoneyKit::PlaidCompatible
|
|
252
243
|
def to_hash
|
253
244
|
hash = {}
|
254
245
|
self.class.attribute_map.each_pair do |attr, param|
|
255
|
-
value =
|
246
|
+
value = send(attr)
|
256
247
|
if value.nil?
|
257
248
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
258
249
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -280,7 +271,6 @@ module MoneyKit::PlaidCompatible
|
|
280
271
|
value
|
281
272
|
end
|
282
273
|
end
|
283
|
-
|
284
274
|
end
|
285
|
-
|
275
|
+
end
|
286
276
|
end
|