ynab 2.1.0 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/DEVELOPMENT.md +6 -2
- data/Gemfile.lock +1 -1
- data/README.md +3 -1
- data/Rakefile +3 -1
- data/docs/BulkTransactions.md +1 -1
- data/docs/CategoriesApi.md +22 -0
- data/docs/Category.md +1 -0
- data/docs/ExistingTransaction.md +18 -0
- data/docs/HybridTransaction.md +3 -2
- data/docs/NewTransaction.md +19 -0
- data/docs/PatchCategoryWrapper.md +8 -0
- data/docs/PatchPayeeWrapper.md +8 -0
- data/docs/PatchTransactionsWrapper.md +1 -1
- data/docs/PayeesApi.md +22 -0
- data/docs/PostTransactionsWrapper.md +2 -2
- data/docs/PutTransactionWrapper.md +1 -1
- data/docs/SaveCategory.md +10 -0
- data/docs/SavePayee.md +8 -0
- data/docs/SavePayeeResponse.md +8 -0
- data/docs/SavePayeeResponseData.md +9 -0
- data/docs/SaveTransactionWithIdOrImportId.md +20 -0
- data/docs/SaveTransactionWithOptionalFields.md +2 -3
- data/docs/ScheduledTransactionDetail.md +2 -1
- data/docs/ScheduledTransactionSummary.md +2 -1
- data/docs/TransactionClearedStatus.md +7 -0
- data/docs/TransactionDetail.md +3 -2
- data/docs/TransactionFlagColor.md +7 -0
- data/docs/TransactionSummary.md +3 -2
- data/docs/TransactionsApi.md +7 -7
- data/lib/ynab/api/accounts_api.rb +2 -2
- data/lib/ynab/api/budgets_api.rb +2 -2
- data/lib/ynab/api/categories_api.rb +82 -2
- data/lib/ynab/api/months_api.rb +2 -2
- data/lib/ynab/api/payee_locations_api.rb +2 -2
- data/lib/ynab/api/payees_api.rb +82 -2
- data/lib/ynab/api/scheduled_transactions_api.rb +2 -2
- data/lib/ynab/api/transactions_api.rb +12 -12
- data/lib/ynab/api/user_api.rb +2 -2
- data/lib/ynab/api_client.rb +2 -2
- data/lib/ynab/configuration.rb +14 -11
- data/lib/ynab/models/account.rb +13 -20
- data/lib/ynab/models/account_response.rb +13 -20
- data/lib/ynab/models/account_response_data.rb +13 -20
- data/lib/ynab/models/account_type.rb +2 -2
- data/lib/ynab/models/accounts_response.rb +13 -20
- data/lib/ynab/models/accounts_response_data.rb +13 -20
- data/lib/ynab/models/budget_detail.rb +13 -21
- data/lib/ynab/models/budget_detail_response.rb +13 -20
- data/lib/ynab/models/budget_detail_response_data.rb +13 -20
- data/lib/ynab/models/budget_settings.rb +13 -20
- data/lib/ynab/models/budget_settings_response.rb +13 -20
- data/lib/ynab/models/budget_settings_response_data.rb +13 -20
- data/lib/ynab/models/budget_summary.rb +13 -20
- data/lib/ynab/models/budget_summary_response.rb +13 -20
- data/lib/ynab/models/budget_summary_response_data.rb +13 -20
- data/lib/ynab/models/bulk_response.rb +13 -20
- data/lib/ynab/models/bulk_response_data.rb +13 -20
- data/lib/ynab/models/bulk_response_data_bulk.rb +13 -20
- data/lib/ynab/models/bulk_transactions.rb +14 -21
- data/lib/ynab/models/categories_response.rb +13 -20
- data/lib/ynab/models/categories_response_data.rb +13 -20
- data/lib/ynab/models/category.rb +25 -21
- data/lib/ynab/models/category_group.rb +13 -20
- data/lib/ynab/models/category_group_with_categories.rb +14 -22
- data/lib/ynab/models/category_response.rb +13 -20
- data/lib/ynab/models/category_response_data.rb +13 -20
- data/lib/ynab/models/currency_format.rb +13 -20
- data/lib/ynab/models/date_format.rb +13 -20
- data/lib/ynab/models/error_detail.rb +13 -20
- data/lib/ynab/models/error_response.rb +13 -20
- data/lib/ynab/models/existing_transaction.rb +359 -0
- data/lib/ynab/models/hybrid_transaction.rb +28 -43
- data/lib/ynab/models/hybrid_transactions_response.rb +13 -20
- data/lib/ynab/models/hybrid_transactions_response_data.rb +13 -20
- data/lib/ynab/models/month_detail.rb +13 -21
- data/lib/ynab/models/month_detail_response.rb +13 -20
- data/lib/ynab/models/month_detail_response_data.rb +13 -20
- data/lib/ynab/models/month_summaries_response.rb +13 -20
- data/lib/ynab/models/month_summaries_response_data.rb +13 -20
- data/lib/ynab/models/month_summary.rb +13 -20
- data/lib/ynab/models/new_transaction.rb +377 -0
- data/lib/ynab/models/patch_category_wrapper.rb +213 -0
- data/lib/ynab/models/patch_month_category_wrapper.rb +13 -20
- data/lib/ynab/models/patch_payee_wrapper.rb +213 -0
- data/lib/ynab/models/patch_transactions_wrapper.rb +14 -21
- data/lib/ynab/models/payee.rb +13 -20
- data/lib/ynab/models/payee_location.rb +13 -20
- data/lib/ynab/models/payee_location_response.rb +13 -20
- data/lib/ynab/models/payee_location_response_data.rb +13 -20
- data/lib/ynab/models/payee_locations_response.rb +13 -20
- data/lib/ynab/models/payee_locations_response_data.rb +13 -20
- data/lib/ynab/models/payee_response.rb +13 -20
- data/lib/ynab/models/payee_response_data.rb +13 -20
- data/lib/ynab/models/payees_response.rb +13 -20
- data/lib/ynab/models/payees_response_data.rb +13 -20
- data/lib/ynab/models/post_account_wrapper.rb +13 -20
- data/lib/ynab/models/post_transactions_wrapper.rb +15 -22
- data/lib/ynab/models/put_transaction_wrapper.rb +14 -21
- data/lib/ynab/models/save_account.rb +13 -20
- data/lib/ynab/models/save_category.rb +232 -0
- data/lib/ynab/models/save_category_response.rb +13 -20
- data/lib/ynab/models/save_category_response_data.rb +13 -20
- data/lib/ynab/models/save_month_category.rb +13 -20
- data/lib/ynab/models/save_payee.rb +220 -0
- data/lib/ynab/models/save_payee_response.rb +213 -0
- data/lib/ynab/models/save_payee_response_data.rb +224 -0
- data/lib/ynab/models/save_sub_transaction.rb +13 -20
- data/lib/ynab/models/save_transaction_with_id_or_import_id.rb +388 -0
- data/lib/ynab/models/save_transaction_with_optional_fields.rb +17 -59
- data/lib/ynab/models/save_transactions_response.rb +13 -20
- data/lib/ynab/models/save_transactions_response_data.rb +13 -20
- data/lib/ynab/models/scheduled_sub_transaction.rb +13 -20
- data/lib/ynab/models/scheduled_transaction_detail.rb +26 -32
- data/lib/ynab/models/scheduled_transaction_response.rb +13 -20
- data/lib/ynab/models/scheduled_transaction_response_data.rb +13 -20
- data/lib/ynab/models/scheduled_transaction_summary.rb +26 -31
- data/lib/ynab/models/scheduled_transactions_response.rb +13 -20
- data/lib/ynab/models/scheduled_transactions_response_data.rb +13 -20
- data/lib/ynab/models/sub_transaction.rb +13 -20
- data/lib/ynab/models/transaction_cleared_status.rb +41 -0
- data/lib/ynab/models/transaction_detail.rb +28 -43
- data/lib/ynab/models/transaction_flag_color.rb +45 -0
- data/lib/ynab/models/transaction_response.rb +13 -20
- data/lib/ynab/models/transaction_response_data.rb +13 -20
- data/lib/ynab/models/transaction_summary.rb +28 -42
- data/lib/ynab/models/transactions_import_response.rb +13 -20
- data/lib/ynab/models/transactions_import_response_data.rb +13 -20
- data/lib/ynab/models/transactions_response.rb +13 -20
- data/lib/ynab/models/transactions_response_data.rb +13 -20
- data/lib/ynab/models/user.rb +13 -20
- data/lib/ynab/models/user_response.rb +13 -20
- data/lib/ynab/models/user_response_data.rb +13 -20
- data/lib/ynab/version.rb +1 -1
- data/lib/ynab.rb +13 -12
- data/open_api_spec.yaml +464 -343
- data/ynab.gemspec +4 -3
- metadata +53 -31
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.
|
6
|
+
The version of the OpenAPI document: 1.70.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.6.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -100,37 +100,30 @@ module YNAB
|
|
100
100
|
# @param [Hash] attributes Model attributes in the form of hash
|
101
101
|
# @return [Object] Returns the model itself
|
102
102
|
def self.build_from_hash(attributes)
|
103
|
-
new.build_from_hash(attributes)
|
104
|
-
end
|
105
|
-
|
106
|
-
# Builds the object from hash
|
107
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
-
# @return [Object] Returns the model itself
|
109
|
-
def build_from_hash(attributes)
|
110
103
|
return nil unless attributes.is_a?(Hash)
|
111
104
|
attributes = attributes.transform_keys(&:to_sym)
|
112
|
-
|
113
|
-
|
114
|
-
|
105
|
+
transformed_hash = {}
|
106
|
+
openapi_types.each_pair do |key, type|
|
107
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
108
|
+
transformed_hash["#{key}"] = nil
|
115
109
|
elsif type =~ /\AArray<(.*)>/i
|
116
110
|
# check to ensure the input is an array given that the attribute
|
117
111
|
# is documented as an array but the input is not
|
118
|
-
if attributes[
|
119
|
-
|
112
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
113
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
120
114
|
end
|
121
|
-
elsif !attributes[
|
122
|
-
|
115
|
+
elsif !attributes[attribute_map[key]].nil?
|
116
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
123
117
|
end
|
124
118
|
end
|
125
|
-
|
126
|
-
self
|
119
|
+
new(transformed_hash)
|
127
120
|
end
|
128
121
|
|
129
122
|
# Deserializes the data based on type
|
130
123
|
# @param string type Data type
|
131
124
|
# @param string value Value to be deserialized
|
132
125
|
# @return [Object] Deserialized data
|
133
|
-
def _deserialize(type, value)
|
126
|
+
def self._deserialize(type, value)
|
134
127
|
case type.to_sym
|
135
128
|
when :Time
|
136
129
|
Time.parse(value)
|
@@ -165,7 +158,7 @@ module YNAB
|
|
165
158
|
else # model
|
166
159
|
# models (e.g. Pet) or oneOf
|
167
160
|
klass = YNAB.const_get(type)
|
168
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
161
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
162
|
end
|
170
163
|
end
|
171
164
|
|
data/lib/ynab/version.rb
CHANGED
data/lib/ynab.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.
|
6
|
+
The version of the OpenAPI document: 1.70.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.6.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -24,7 +24,6 @@ require 'ynab/models/account_type'
|
|
24
24
|
require 'ynab/models/accounts_response'
|
25
25
|
require 'ynab/models/accounts_response_data'
|
26
26
|
require 'ynab/models/budget_detail'
|
27
|
-
require 'ynab/models/budget_detail_all_of'
|
28
27
|
require 'ynab/models/budget_detail_response'
|
29
28
|
require 'ynab/models/budget_detail_response_data'
|
30
29
|
require 'ynab/models/budget_settings'
|
@@ -42,25 +41,26 @@ require 'ynab/models/categories_response_data'
|
|
42
41
|
require 'ynab/models/category'
|
43
42
|
require 'ynab/models/category_group'
|
44
43
|
require 'ynab/models/category_group_with_categories'
|
45
|
-
require 'ynab/models/category_group_with_categories_all_of'
|
46
44
|
require 'ynab/models/category_response'
|
47
45
|
require 'ynab/models/category_response_data'
|
48
46
|
require 'ynab/models/currency_format'
|
49
47
|
require 'ynab/models/date_format'
|
50
48
|
require 'ynab/models/error_detail'
|
51
49
|
require 'ynab/models/error_response'
|
50
|
+
require 'ynab/models/existing_transaction'
|
52
51
|
require 'ynab/models/hybrid_transaction'
|
53
|
-
require 'ynab/models/hybrid_transaction_all_of'
|
54
52
|
require 'ynab/models/hybrid_transactions_response'
|
55
53
|
require 'ynab/models/hybrid_transactions_response_data'
|
56
54
|
require 'ynab/models/month_detail'
|
57
|
-
require 'ynab/models/month_detail_all_of'
|
58
55
|
require 'ynab/models/month_detail_response'
|
59
56
|
require 'ynab/models/month_detail_response_data'
|
60
57
|
require 'ynab/models/month_summaries_response'
|
61
58
|
require 'ynab/models/month_summaries_response_data'
|
62
59
|
require 'ynab/models/month_summary'
|
60
|
+
require 'ynab/models/new_transaction'
|
61
|
+
require 'ynab/models/patch_category_wrapper'
|
63
62
|
require 'ynab/models/patch_month_category_wrapper'
|
63
|
+
require 'ynab/models/patch_payee_wrapper'
|
64
64
|
require 'ynab/models/patch_transactions_wrapper'
|
65
65
|
require 'ynab/models/payee'
|
66
66
|
require 'ynab/models/payee_location'
|
@@ -76,27 +76,29 @@ require 'ynab/models/post_account_wrapper'
|
|
76
76
|
require 'ynab/models/post_transactions_wrapper'
|
77
77
|
require 'ynab/models/put_transaction_wrapper'
|
78
78
|
require 'ynab/models/save_account'
|
79
|
+
require 'ynab/models/save_category'
|
79
80
|
require 'ynab/models/save_category_response'
|
80
81
|
require 'ynab/models/save_category_response_data'
|
81
82
|
require 'ynab/models/save_month_category'
|
83
|
+
require 'ynab/models/save_payee'
|
84
|
+
require 'ynab/models/save_payee_response'
|
85
|
+
require 'ynab/models/save_payee_response_data'
|
82
86
|
require 'ynab/models/save_sub_transaction'
|
83
|
-
require 'ynab/models/
|
84
|
-
require 'ynab/models/save_transaction_with_id'
|
85
|
-
require 'ynab/models/save_transaction_with_id_all_of'
|
87
|
+
require 'ynab/models/save_transaction_with_id_or_import_id'
|
86
88
|
require 'ynab/models/save_transaction_with_optional_fields'
|
87
89
|
require 'ynab/models/save_transactions_response'
|
88
90
|
require 'ynab/models/save_transactions_response_data'
|
89
91
|
require 'ynab/models/scheduled_sub_transaction'
|
90
92
|
require 'ynab/models/scheduled_transaction_detail'
|
91
|
-
require 'ynab/models/scheduled_transaction_detail_all_of'
|
92
93
|
require 'ynab/models/scheduled_transaction_response'
|
93
94
|
require 'ynab/models/scheduled_transaction_response_data'
|
94
95
|
require 'ynab/models/scheduled_transaction_summary'
|
95
96
|
require 'ynab/models/scheduled_transactions_response'
|
96
97
|
require 'ynab/models/scheduled_transactions_response_data'
|
97
98
|
require 'ynab/models/sub_transaction'
|
99
|
+
require 'ynab/models/transaction_cleared_status'
|
98
100
|
require 'ynab/models/transaction_detail'
|
99
|
-
require 'ynab/models/
|
101
|
+
require 'ynab/models/transaction_flag_color'
|
100
102
|
require 'ynab/models/transaction_response'
|
101
103
|
require 'ynab/models/transaction_response_data'
|
102
104
|
require 'ynab/models/transaction_summary'
|
@@ -112,7 +114,6 @@ require 'ynab/models/user_response_data'
|
|
112
114
|
require 'ynab/api/accounts_api'
|
113
115
|
require 'ynab/api/budgets_api'
|
114
116
|
require 'ynab/api/categories_api'
|
115
|
-
require 'ynab/api/deprecated_api'
|
116
117
|
require 'ynab/api/months_api'
|
117
118
|
require 'ynab/api/payee_locations_api'
|
118
119
|
require 'ynab/api/payees_api'
|