ynab 3.8.0 → 4.9.0
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/Gemfile +1 -0
- data/Gemfile.lock +3 -1
- data/README.md +48 -40
- data/Rakefile +1 -1
- data/docs/Account.md +3 -3
- data/docs/AccountsApi.md +12 -12
- data/docs/CategoriesApi.md +89 -25
- data/docs/Category.md +5 -3
- data/docs/CategoryGroupWithCategories.md +1 -1
- data/docs/ExistingCategory.md +12 -0
- data/docs/MoneyMovement.md +16 -0
- data/docs/MoneyMovementGroup.md +12 -0
- data/docs/MoneyMovementGroupsResponse.md +8 -0
- data/docs/MoneyMovementGroupsResponseData.md +9 -0
- data/docs/MoneyMovementsApi.md +89 -0
- data/docs/{BudgetSettingsResponse.md → MoneyMovementsResponse.md} +2 -2
- data/docs/MoneyMovementsResponseData.md +9 -0
- data/docs/MonthDetail.md +2 -2
- data/docs/MonthSummary.md +1 -1
- data/docs/MonthsApi.md +13 -13
- data/docs/NewCategory.md +12 -0
- data/docs/PatchCategoryGroupWrapper.md +8 -0
- data/docs/PatchCategoryWrapper.md +1 -1
- data/docs/PayeeLocationsApi.md +12 -12
- data/docs/PayeesApi.md +11 -11
- data/docs/{BudgetDetail.md → PlanDetail.md} +4 -4
- data/docs/PlanDetailResponse.md +8 -0
- data/docs/{BudgetDetailResponseData.md → PlanDetailResponseData.md} +2 -2
- data/docs/{BudgetSettings.md → PlanSettings.md} +1 -1
- data/docs/{BudgetDetailResponse.md → PlanSettingsResponse.md} +2 -2
- data/docs/PlanSettingsResponseData.md +8 -0
- data/docs/PlanSummary.md +15 -0
- data/docs/PlanSummaryResponse.md +8 -0
- data/docs/PlanSummaryResponseData.md +9 -0
- data/docs/PlansApi.md +68 -0
- data/docs/PostCategoryGroupWrapper.md +8 -0
- data/docs/PostCategoryWrapper.md +8 -0
- data/docs/SaveCategory.md +2 -1
- data/docs/SaveCategoryGroup.md +8 -0
- data/docs/SaveCategoryGroupResponse.md +8 -0
- data/docs/SaveCategoryGroupResponseData.md +9 -0
- data/docs/SaveMonthCategory.md +1 -1
- data/docs/ScheduledTransactionsApi.md +20 -20
- data/docs/TransactionResponseData.md +1 -0
- data/docs/TransactionsApi.md +48 -48
- data/docs/UserApi.md +2 -2
- data/examples/category-balance.rb +2 -2
- data/examples/create-multiple-transactions.rb +2 -2
- data/examples/create-transaction.rb +2 -2
- data/examples/{budget-list.rb → plan-list.rb} +6 -6
- data/examples/{budget-month.rb → plan-month.rb} +9 -10
- data/examples/update-category-budgeted.rb +2 -2
- data/examples/update-multiple-transactions.rb +3 -3
- data/lib/ynab/api/accounts_api.rb +33 -34
- data/lib/ynab/api/categories_api.rb +293 -66
- data/lib/ynab/api/deprecated_api.rb +11 -11
- data/lib/ynab/api/money_movements_api.rb +282 -0
- data/lib/ynab/api/months_api.rb +35 -36
- data/lib/ynab/api/payee_locations_api.rb +33 -34
- data/lib/ynab/api/payees_api.rb +31 -32
- data/lib/ynab/api/{budgets_api.rb → plans_api.rb} +54 -55
- data/lib/ynab/api/scheduled_transactions_api.rb +55 -56
- data/lib/ynab/api/transactions_api.rb +130 -131
- data/lib/ynab/api/user_api.rb +2 -3
- data/lib/ynab/api_client.rb +0 -2
- data/lib/ynab/api_model_base.rb +85 -0
- data/lib/ynab/models/account.rb +4 -81
- data/lib/ynab/models/account_response.rb +1 -75
- data/lib/ynab/models/account_response_data.rb +1 -75
- data/lib/ynab/models/accounts_response.rb +1 -75
- data/lib/ynab/models/accounts_response_data.rb +1 -75
- data/lib/ynab/models/bulk_response.rb +1 -75
- data/lib/ynab/models/bulk_response_data.rb +1 -75
- data/lib/ynab/models/bulk_response_data_bulk.rb +1 -75
- data/lib/ynab/models/bulk_transactions.rb +1 -75
- data/lib/ynab/models/categories_response.rb +1 -75
- data/lib/ynab/models/categories_response_data.rb +1 -75
- data/lib/ynab/models/category.rb +27 -79
- data/lib/ynab/models/category_group.rb +1 -75
- data/lib/ynab/models/category_group_with_categories.rb +2 -76
- data/lib/ynab/models/category_response.rb +1 -75
- data/lib/ynab/models/category_response_data.rb +1 -75
- data/lib/ynab/models/currency_format.rb +2 -76
- data/lib/ynab/models/date_format.rb +2 -76
- data/lib/ynab/models/error_detail.rb +1 -75
- data/lib/ynab/models/error_response.rb +1 -75
- data/lib/ynab/models/existing_category.rb +180 -0
- data/lib/ynab/models/existing_transaction.rb +1 -79
- data/lib/ynab/models/hybrid_transaction.rb +1 -85
- data/lib/ynab/models/hybrid_transactions_response.rb +1 -75
- data/lib/ynab/models/hybrid_transactions_response_data.rb +1 -75
- data/lib/ynab/models/money_movement.rb +223 -0
- data/lib/ynab/models/money_movement_group.rb +179 -0
- data/lib/ynab/models/{budget_summary_response.rb → money_movement_groups_response.rb} +4 -78
- data/lib/ynab/models/money_movement_groups_response_data.rb +149 -0
- data/lib/ynab/models/{budget_settings_response.rb → money_movements_response.rb} +4 -78
- data/lib/ynab/models/money_movements_response_data.rb +149 -0
- data/lib/ynab/models/month_detail.rb +3 -79
- data/lib/ynab/models/month_detail_response.rb +1 -75
- data/lib/ynab/models/month_detail_response_data.rb +1 -75
- data/lib/ynab/models/month_summaries_response.rb +1 -75
- data/lib/ynab/models/month_summaries_response_data.rb +1 -75
- data/lib/ynab/models/month_summary.rb +2 -76
- data/lib/ynab/models/new_category.rb +180 -0
- data/lib/ynab/models/new_transaction.rb +1 -79
- data/lib/ynab/models/patch_category_group_wrapper.rb +136 -0
- data/lib/ynab/models/patch_category_wrapper.rb +2 -76
- data/lib/ynab/models/patch_month_category_wrapper.rb +1 -75
- data/lib/ynab/models/patch_payee_wrapper.rb +1 -75
- data/lib/ynab/models/patch_transactions_wrapper.rb +1 -75
- data/lib/ynab/models/payee.rb +1 -75
- data/lib/ynab/models/payee_location.rb +1 -75
- data/lib/ynab/models/payee_location_response.rb +1 -75
- data/lib/ynab/models/payee_location_response_data.rb +1 -75
- data/lib/ynab/models/payee_locations_response.rb +1 -75
- data/lib/ynab/models/payee_locations_response_data.rb +1 -75
- data/lib/ynab/models/payee_response.rb +1 -75
- data/lib/ynab/models/payee_response_data.rb +1 -75
- data/lib/ynab/models/payees_response.rb +1 -75
- data/lib/ynab/models/payees_response_data.rb +1 -75
- data/lib/ynab/models/{budget_detail.rb → plan_detail.rb} +7 -83
- data/lib/ynab/models/plan_detail_response.rb +136 -0
- data/lib/ynab/models/{budget_detail_response_data.rb → plan_detail_response_data.rb} +4 -78
- data/lib/ynab/models/{budget_settings.rb → plan_settings.rb} +5 -79
- data/lib/ynab/models/{budget_detail_response.rb → plan_settings_response.rb} +4 -78
- data/lib/ynab/models/{budget_settings_response_data.rb → plan_settings_response_data.rb} +4 -78
- data/lib/ynab/models/{budget_summary.rb → plan_summary.rb} +7 -83
- data/lib/ynab/models/plan_summary_response.rb +136 -0
- data/lib/ynab/models/{budget_summary_response_data.rb → plan_summary_response_data.rb} +5 -79
- data/lib/ynab/models/post_account_wrapper.rb +1 -75
- data/lib/ynab/models/post_category_group_wrapper.rb +136 -0
- data/lib/ynab/models/post_category_wrapper.rb +136 -0
- data/lib/ynab/models/post_scheduled_transaction_wrapper.rb +1 -75
- data/lib/ynab/models/post_transactions_wrapper.rb +1 -75
- data/lib/ynab/models/put_scheduled_transaction_wrapper.rb +1 -75
- data/lib/ynab/models/put_transaction_wrapper.rb +1 -75
- data/lib/ynab/models/save_account.rb +1 -75
- data/lib/ynab/models/save_category.rb +18 -81
- data/lib/ynab/models/save_category_group.rb +148 -0
- data/lib/ynab/models/save_category_group_response.rb +136 -0
- data/lib/ynab/models/save_category_group_response_data.rb +147 -0
- data/lib/ynab/models/save_category_response.rb +1 -75
- data/lib/ynab/models/save_category_response_data.rb +1 -75
- data/lib/ynab/models/save_month_category.rb +2 -76
- data/lib/ynab/models/save_payee.rb +1 -75
- data/lib/ynab/models/save_payee_response.rb +1 -75
- data/lib/ynab/models/save_payee_response_data.rb +1 -75
- data/lib/ynab/models/save_scheduled_transaction.rb +1 -75
- data/lib/ynab/models/save_sub_transaction.rb +1 -75
- data/lib/ynab/models/save_transaction_with_id_or_import_id.rb +1 -79
- data/lib/ynab/models/save_transaction_with_optional_fields.rb +1 -75
- data/lib/ynab/models/save_transactions_response.rb +1 -75
- data/lib/ynab/models/save_transactions_response_data.rb +1 -75
- data/lib/ynab/models/scheduled_sub_transaction.rb +1 -75
- data/lib/ynab/models/scheduled_transaction_detail.rb +1 -80
- data/lib/ynab/models/scheduled_transaction_response.rb +1 -75
- data/lib/ynab/models/scheduled_transaction_response_data.rb +1 -75
- data/lib/ynab/models/scheduled_transaction_summary.rb +1 -75
- data/lib/ynab/models/scheduled_transactions_response.rb +1 -75
- data/lib/ynab/models/scheduled_transactions_response_data.rb +1 -75
- data/lib/ynab/models/sub_transaction.rb +1 -75
- data/lib/ynab/models/transaction_detail.rb +1 -85
- data/lib/ynab/models/transaction_flag_color.rb +2 -1
- data/lib/ynab/models/transaction_response.rb +1 -75
- data/lib/ynab/models/transaction_response_data.rb +16 -79
- data/lib/ynab/models/transaction_summary.rb +1 -75
- data/lib/ynab/models/transactions_import_response.rb +1 -75
- data/lib/ynab/models/transactions_import_response_data.rb +1 -75
- data/lib/ynab/models/transactions_response.rb +1 -75
- data/lib/ynab/models/transactions_response_data.rb +1 -75
- data/lib/ynab/models/user.rb +1 -75
- data/lib/ynab/models/user_response.rb +1 -75
- data/lib/ynab/models/user_response_data.rb +1 -75
- data/lib/ynab/overrides/transactions_api.rb +6 -6
- data/lib/ynab/version.rb +1 -1
- data/lib/ynab.rb +28 -13
- data/open_api_spec.yaml +1163 -905
- data/spec/api/accounts_spec.rb +9 -9
- data/spec/api/categories_spec.rb +9 -9
- data/spec/api/months_spec.rb +7 -7
- data/spec/api/payee_locations_spec.rb +7 -7
- data/spec/api/payees_spec.rb +7 -7
- data/spec/api/{budgets_spec.rb → plans_spec.rb} +12 -12
- data/spec/api/scheduled_transactions_spec.rb +9 -9
- data/spec/api/transactions_spec.rb +28 -28
- data/spec/fixtures/vcr_cassettes/plans.yml +49 -0
- data/spec/fixtures/vcr_cassettes/plans_unauthorized.yml +49 -0
- data/templates/gem.mustache +3 -2
- data/templates/partial_model_generic.mustache +1 -1
- data/ynab.gemspec +1 -2
- metadata +94 -59
- data/docs/BudgetSettingsResponseData.md +0 -8
- data/docs/BudgetSummary.md +0 -15
- data/docs/BudgetSummaryResponse.md +0 -8
- data/docs/BudgetSummaryResponseData.md +0 -9
- data/docs/BudgetsApi.md +0 -68
|
@@ -11,7 +11,7 @@ require 'date'
|
|
|
11
11
|
require 'time'
|
|
12
12
|
|
|
13
13
|
module YNAB
|
|
14
|
-
class SaveTransactionsResponseData
|
|
14
|
+
class SaveTransactionsResponseData < ApiModelBase
|
|
15
15
|
# The transaction ids that were saved
|
|
16
16
|
attr_accessor :transaction_ids
|
|
17
17
|
|
|
@@ -163,61 +163,6 @@ module YNAB
|
|
|
163
163
|
new(transformed_hash)
|
|
164
164
|
end
|
|
165
165
|
|
|
166
|
-
# Deserializes the data based on type
|
|
167
|
-
# @param string type Data type
|
|
168
|
-
# @param string value Value to be deserialized
|
|
169
|
-
# @return [Object] Deserialized data
|
|
170
|
-
def self._deserialize(type, value)
|
|
171
|
-
case type.to_sym
|
|
172
|
-
when :Time
|
|
173
|
-
Time.parse(value)
|
|
174
|
-
when :Date
|
|
175
|
-
Date.parse(value)
|
|
176
|
-
when :String
|
|
177
|
-
value.to_s
|
|
178
|
-
when :Integer
|
|
179
|
-
value.to_i
|
|
180
|
-
when :Float
|
|
181
|
-
value.to_f
|
|
182
|
-
when :Boolean
|
|
183
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
184
|
-
true
|
|
185
|
-
else
|
|
186
|
-
false
|
|
187
|
-
end
|
|
188
|
-
when :Object
|
|
189
|
-
# generic object (usually a Hash), return directly
|
|
190
|
-
value
|
|
191
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
192
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
193
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
194
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
195
|
-
k_type = Regexp.last_match[:k_type]
|
|
196
|
-
v_type = Regexp.last_match[:v_type]
|
|
197
|
-
{}.tap do |hash|
|
|
198
|
-
value.each do |k, v|
|
|
199
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
200
|
-
end
|
|
201
|
-
end
|
|
202
|
-
else # model
|
|
203
|
-
# models (e.g. Pet) or oneOf
|
|
204
|
-
klass = YNAB.const_get(type)
|
|
205
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
206
|
-
end
|
|
207
|
-
end
|
|
208
|
-
|
|
209
|
-
# Returns the string representation of the object
|
|
210
|
-
# @return [String] String presentation of the object
|
|
211
|
-
def to_s
|
|
212
|
-
to_hash.to_s
|
|
213
|
-
end
|
|
214
|
-
|
|
215
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
216
|
-
# @return [Hash] Returns the object in the form of hash
|
|
217
|
-
def to_body
|
|
218
|
-
to_hash
|
|
219
|
-
end
|
|
220
|
-
|
|
221
166
|
# Returns the object in the form of hash
|
|
222
167
|
# @return [Hash] Returns the object in the form of hash
|
|
223
168
|
def to_hash
|
|
@@ -233,25 +178,6 @@ module YNAB
|
|
|
233
178
|
end
|
|
234
179
|
hash
|
|
235
180
|
end
|
|
236
|
-
|
|
237
|
-
# Outputs non-array value in the form of hash
|
|
238
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
239
|
-
# @param [Object] value Any valid value
|
|
240
|
-
# @return [Hash] Returns the value in the form of hash
|
|
241
|
-
def _to_hash(value)
|
|
242
|
-
if value.is_a?(Array)
|
|
243
|
-
value.compact.map { |v| _to_hash(v) }
|
|
244
|
-
elsif value.is_a?(Hash)
|
|
245
|
-
{}.tap do |hash|
|
|
246
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
247
|
-
end
|
|
248
|
-
elsif value.respond_to? :to_hash
|
|
249
|
-
value.to_hash
|
|
250
|
-
else
|
|
251
|
-
value
|
|
252
|
-
end
|
|
253
|
-
end
|
|
254
|
-
|
|
255
181
|
end
|
|
256
182
|
|
|
257
183
|
end
|
|
@@ -11,7 +11,7 @@ require 'date'
|
|
|
11
11
|
require 'time'
|
|
12
12
|
|
|
13
13
|
module YNAB
|
|
14
|
-
class ScheduledSubTransaction
|
|
14
|
+
class ScheduledSubTransaction < ApiModelBase
|
|
15
15
|
attr_accessor :id
|
|
16
16
|
|
|
17
17
|
attr_accessor :scheduled_transaction_id
|
|
@@ -209,61 +209,6 @@ module YNAB
|
|
|
209
209
|
new(transformed_hash)
|
|
210
210
|
end
|
|
211
211
|
|
|
212
|
-
# Deserializes the data based on type
|
|
213
|
-
# @param string type Data type
|
|
214
|
-
# @param string value Value to be deserialized
|
|
215
|
-
# @return [Object] Deserialized data
|
|
216
|
-
def self._deserialize(type, value)
|
|
217
|
-
case type.to_sym
|
|
218
|
-
when :Time
|
|
219
|
-
Time.parse(value)
|
|
220
|
-
when :Date
|
|
221
|
-
Date.parse(value)
|
|
222
|
-
when :String
|
|
223
|
-
value.to_s
|
|
224
|
-
when :Integer
|
|
225
|
-
value.to_i
|
|
226
|
-
when :Float
|
|
227
|
-
value.to_f
|
|
228
|
-
when :Boolean
|
|
229
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
230
|
-
true
|
|
231
|
-
else
|
|
232
|
-
false
|
|
233
|
-
end
|
|
234
|
-
when :Object
|
|
235
|
-
# generic object (usually a Hash), return directly
|
|
236
|
-
value
|
|
237
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
238
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
239
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
240
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
241
|
-
k_type = Regexp.last_match[:k_type]
|
|
242
|
-
v_type = Regexp.last_match[:v_type]
|
|
243
|
-
{}.tap do |hash|
|
|
244
|
-
value.each do |k, v|
|
|
245
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
246
|
-
end
|
|
247
|
-
end
|
|
248
|
-
else # model
|
|
249
|
-
# models (e.g. Pet) or oneOf
|
|
250
|
-
klass = YNAB.const_get(type)
|
|
251
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
252
|
-
end
|
|
253
|
-
end
|
|
254
|
-
|
|
255
|
-
# Returns the string representation of the object
|
|
256
|
-
# @return [String] String presentation of the object
|
|
257
|
-
def to_s
|
|
258
|
-
to_hash.to_s
|
|
259
|
-
end
|
|
260
|
-
|
|
261
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
262
|
-
# @return [Hash] Returns the object in the form of hash
|
|
263
|
-
def to_body
|
|
264
|
-
to_hash
|
|
265
|
-
end
|
|
266
|
-
|
|
267
212
|
# Returns the object in the form of hash
|
|
268
213
|
# @return [Hash] Returns the object in the form of hash
|
|
269
214
|
def to_hash
|
|
@@ -279,25 +224,6 @@ module YNAB
|
|
|
279
224
|
end
|
|
280
225
|
hash
|
|
281
226
|
end
|
|
282
|
-
|
|
283
|
-
# Outputs non-array value in the form of hash
|
|
284
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
285
|
-
# @param [Object] value Any valid value
|
|
286
|
-
# @return [Hash] Returns the value in the form of hash
|
|
287
|
-
def _to_hash(value)
|
|
288
|
-
if value.is_a?(Array)
|
|
289
|
-
value.compact.map { |v| _to_hash(v) }
|
|
290
|
-
elsif value.is_a?(Hash)
|
|
291
|
-
{}.tap do |hash|
|
|
292
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
293
|
-
end
|
|
294
|
-
elsif value.respond_to? :to_hash
|
|
295
|
-
value.to_hash
|
|
296
|
-
else
|
|
297
|
-
value
|
|
298
|
-
end
|
|
299
|
-
end
|
|
300
|
-
|
|
301
227
|
end
|
|
302
228
|
|
|
303
229
|
end
|
|
@@ -11,7 +11,7 @@ require 'date'
|
|
|
11
11
|
require 'time'
|
|
12
12
|
|
|
13
13
|
module YNAB
|
|
14
|
-
class ScheduledTransactionDetail
|
|
14
|
+
class ScheduledTransactionDetail < ApiModelBase
|
|
15
15
|
attr_accessor :id
|
|
16
16
|
|
|
17
17
|
# The first date for which the Scheduled Transaction was scheduled.
|
|
@@ -130,12 +130,7 @@ module YNAB
|
|
|
130
130
|
# List of attributes with nullable: true
|
|
131
131
|
def self.openapi_nullable
|
|
132
132
|
Set.new([
|
|
133
|
-
:'memo',
|
|
134
133
|
:'flag_color',
|
|
135
|
-
:'flag_name',
|
|
136
|
-
:'payee_id',
|
|
137
|
-
:'category_id',
|
|
138
|
-
:'transfer_account_id',
|
|
139
134
|
:'payee_name',
|
|
140
135
|
:'category_name',
|
|
141
136
|
])
|
|
@@ -323,61 +318,6 @@ module YNAB
|
|
|
323
318
|
new(transformed_hash)
|
|
324
319
|
end
|
|
325
320
|
|
|
326
|
-
# Deserializes the data based on type
|
|
327
|
-
# @param string type Data type
|
|
328
|
-
# @param string value Value to be deserialized
|
|
329
|
-
# @return [Object] Deserialized data
|
|
330
|
-
def self._deserialize(type, value)
|
|
331
|
-
case type.to_sym
|
|
332
|
-
when :Time
|
|
333
|
-
Time.parse(value)
|
|
334
|
-
when :Date
|
|
335
|
-
Date.parse(value)
|
|
336
|
-
when :String
|
|
337
|
-
value.to_s
|
|
338
|
-
when :Integer
|
|
339
|
-
value.to_i
|
|
340
|
-
when :Float
|
|
341
|
-
value.to_f
|
|
342
|
-
when :Boolean
|
|
343
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
344
|
-
true
|
|
345
|
-
else
|
|
346
|
-
false
|
|
347
|
-
end
|
|
348
|
-
when :Object
|
|
349
|
-
# generic object (usually a Hash), return directly
|
|
350
|
-
value
|
|
351
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
352
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
353
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
354
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
355
|
-
k_type = Regexp.last_match[:k_type]
|
|
356
|
-
v_type = Regexp.last_match[:v_type]
|
|
357
|
-
{}.tap do |hash|
|
|
358
|
-
value.each do |k, v|
|
|
359
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
360
|
-
end
|
|
361
|
-
end
|
|
362
|
-
else # model
|
|
363
|
-
# models (e.g. Pet) or oneOf
|
|
364
|
-
klass = YNAB.const_get(type)
|
|
365
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
366
|
-
end
|
|
367
|
-
end
|
|
368
|
-
|
|
369
|
-
# Returns the string representation of the object
|
|
370
|
-
# @return [String] String presentation of the object
|
|
371
|
-
def to_s
|
|
372
|
-
to_hash.to_s
|
|
373
|
-
end
|
|
374
|
-
|
|
375
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
376
|
-
# @return [Hash] Returns the object in the form of hash
|
|
377
|
-
def to_body
|
|
378
|
-
to_hash
|
|
379
|
-
end
|
|
380
|
-
|
|
381
321
|
# Returns the object in the form of hash
|
|
382
322
|
# @return [Hash] Returns the object in the form of hash
|
|
383
323
|
def to_hash
|
|
@@ -393,25 +333,6 @@ module YNAB
|
|
|
393
333
|
end
|
|
394
334
|
hash
|
|
395
335
|
end
|
|
396
|
-
|
|
397
|
-
# Outputs non-array value in the form of hash
|
|
398
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
399
|
-
# @param [Object] value Any valid value
|
|
400
|
-
# @return [Hash] Returns the value in the form of hash
|
|
401
|
-
def _to_hash(value)
|
|
402
|
-
if value.is_a?(Array)
|
|
403
|
-
value.compact.map { |v| _to_hash(v) }
|
|
404
|
-
elsif value.is_a?(Hash)
|
|
405
|
-
{}.tap do |hash|
|
|
406
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
407
|
-
end
|
|
408
|
-
elsif value.respond_to? :to_hash
|
|
409
|
-
value.to_hash
|
|
410
|
-
else
|
|
411
|
-
value
|
|
412
|
-
end
|
|
413
|
-
end
|
|
414
|
-
|
|
415
336
|
end
|
|
416
337
|
|
|
417
338
|
end
|
|
@@ -11,7 +11,7 @@ require 'date'
|
|
|
11
11
|
require 'time'
|
|
12
12
|
|
|
13
13
|
module YNAB
|
|
14
|
-
class ScheduledTransactionResponse
|
|
14
|
+
class ScheduledTransactionResponse < ApiModelBase
|
|
15
15
|
attr_accessor :data
|
|
16
16
|
|
|
17
17
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -116,61 +116,6 @@ module YNAB
|
|
|
116
116
|
new(transformed_hash)
|
|
117
117
|
end
|
|
118
118
|
|
|
119
|
-
# Deserializes the data based on type
|
|
120
|
-
# @param string type Data type
|
|
121
|
-
# @param string value Value to be deserialized
|
|
122
|
-
# @return [Object] Deserialized data
|
|
123
|
-
def self._deserialize(type, value)
|
|
124
|
-
case type.to_sym
|
|
125
|
-
when :Time
|
|
126
|
-
Time.parse(value)
|
|
127
|
-
when :Date
|
|
128
|
-
Date.parse(value)
|
|
129
|
-
when :String
|
|
130
|
-
value.to_s
|
|
131
|
-
when :Integer
|
|
132
|
-
value.to_i
|
|
133
|
-
when :Float
|
|
134
|
-
value.to_f
|
|
135
|
-
when :Boolean
|
|
136
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
137
|
-
true
|
|
138
|
-
else
|
|
139
|
-
false
|
|
140
|
-
end
|
|
141
|
-
when :Object
|
|
142
|
-
# generic object (usually a Hash), return directly
|
|
143
|
-
value
|
|
144
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
145
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
146
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
147
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
148
|
-
k_type = Regexp.last_match[:k_type]
|
|
149
|
-
v_type = Regexp.last_match[:v_type]
|
|
150
|
-
{}.tap do |hash|
|
|
151
|
-
value.each do |k, v|
|
|
152
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
153
|
-
end
|
|
154
|
-
end
|
|
155
|
-
else # model
|
|
156
|
-
# models (e.g. Pet) or oneOf
|
|
157
|
-
klass = YNAB.const_get(type)
|
|
158
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
159
|
-
end
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
# Returns the string representation of the object
|
|
163
|
-
# @return [String] String presentation of the object
|
|
164
|
-
def to_s
|
|
165
|
-
to_hash.to_s
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
169
|
-
# @return [Hash] Returns the object in the form of hash
|
|
170
|
-
def to_body
|
|
171
|
-
to_hash
|
|
172
|
-
end
|
|
173
|
-
|
|
174
119
|
# Returns the object in the form of hash
|
|
175
120
|
# @return [Hash] Returns the object in the form of hash
|
|
176
121
|
def to_hash
|
|
@@ -186,25 +131,6 @@ module YNAB
|
|
|
186
131
|
end
|
|
187
132
|
hash
|
|
188
133
|
end
|
|
189
|
-
|
|
190
|
-
# Outputs non-array value in the form of hash
|
|
191
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
192
|
-
# @param [Object] value Any valid value
|
|
193
|
-
# @return [Hash] Returns the value in the form of hash
|
|
194
|
-
def _to_hash(value)
|
|
195
|
-
if value.is_a?(Array)
|
|
196
|
-
value.compact.map { |v| _to_hash(v) }
|
|
197
|
-
elsif value.is_a?(Hash)
|
|
198
|
-
{}.tap do |hash|
|
|
199
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
200
|
-
end
|
|
201
|
-
elsif value.respond_to? :to_hash
|
|
202
|
-
value.to_hash
|
|
203
|
-
else
|
|
204
|
-
value
|
|
205
|
-
end
|
|
206
|
-
end
|
|
207
|
-
|
|
208
134
|
end
|
|
209
135
|
|
|
210
136
|
end
|
|
@@ -11,7 +11,7 @@ require 'date'
|
|
|
11
11
|
require 'time'
|
|
12
12
|
|
|
13
13
|
module YNAB
|
|
14
|
-
class ScheduledTransactionResponseData
|
|
14
|
+
class ScheduledTransactionResponseData < ApiModelBase
|
|
15
15
|
attr_accessor :scheduled_transaction
|
|
16
16
|
|
|
17
17
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -116,61 +116,6 @@ module YNAB
|
|
|
116
116
|
new(transformed_hash)
|
|
117
117
|
end
|
|
118
118
|
|
|
119
|
-
# Deserializes the data based on type
|
|
120
|
-
# @param string type Data type
|
|
121
|
-
# @param string value Value to be deserialized
|
|
122
|
-
# @return [Object] Deserialized data
|
|
123
|
-
def self._deserialize(type, value)
|
|
124
|
-
case type.to_sym
|
|
125
|
-
when :Time
|
|
126
|
-
Time.parse(value)
|
|
127
|
-
when :Date
|
|
128
|
-
Date.parse(value)
|
|
129
|
-
when :String
|
|
130
|
-
value.to_s
|
|
131
|
-
when :Integer
|
|
132
|
-
value.to_i
|
|
133
|
-
when :Float
|
|
134
|
-
value.to_f
|
|
135
|
-
when :Boolean
|
|
136
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
137
|
-
true
|
|
138
|
-
else
|
|
139
|
-
false
|
|
140
|
-
end
|
|
141
|
-
when :Object
|
|
142
|
-
# generic object (usually a Hash), return directly
|
|
143
|
-
value
|
|
144
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
145
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
146
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
147
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
148
|
-
k_type = Regexp.last_match[:k_type]
|
|
149
|
-
v_type = Regexp.last_match[:v_type]
|
|
150
|
-
{}.tap do |hash|
|
|
151
|
-
value.each do |k, v|
|
|
152
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
153
|
-
end
|
|
154
|
-
end
|
|
155
|
-
else # model
|
|
156
|
-
# models (e.g. Pet) or oneOf
|
|
157
|
-
klass = YNAB.const_get(type)
|
|
158
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
159
|
-
end
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
# Returns the string representation of the object
|
|
163
|
-
# @return [String] String presentation of the object
|
|
164
|
-
def to_s
|
|
165
|
-
to_hash.to_s
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
169
|
-
# @return [Hash] Returns the object in the form of hash
|
|
170
|
-
def to_body
|
|
171
|
-
to_hash
|
|
172
|
-
end
|
|
173
|
-
|
|
174
119
|
# Returns the object in the form of hash
|
|
175
120
|
# @return [Hash] Returns the object in the form of hash
|
|
176
121
|
def to_hash
|
|
@@ -186,25 +131,6 @@ module YNAB
|
|
|
186
131
|
end
|
|
187
132
|
hash
|
|
188
133
|
end
|
|
189
|
-
|
|
190
|
-
# Outputs non-array value in the form of hash
|
|
191
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
192
|
-
# @param [Object] value Any valid value
|
|
193
|
-
# @return [Hash] Returns the value in the form of hash
|
|
194
|
-
def _to_hash(value)
|
|
195
|
-
if value.is_a?(Array)
|
|
196
|
-
value.compact.map { |v| _to_hash(v) }
|
|
197
|
-
elsif value.is_a?(Hash)
|
|
198
|
-
{}.tap do |hash|
|
|
199
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
200
|
-
end
|
|
201
|
-
elsif value.respond_to? :to_hash
|
|
202
|
-
value.to_hash
|
|
203
|
-
else
|
|
204
|
-
value
|
|
205
|
-
end
|
|
206
|
-
end
|
|
207
|
-
|
|
208
134
|
end
|
|
209
135
|
|
|
210
136
|
end
|
|
@@ -11,7 +11,7 @@ require 'date'
|
|
|
11
11
|
require 'time'
|
|
12
12
|
|
|
13
13
|
module YNAB
|
|
14
|
-
class ScheduledTransactionSummary
|
|
14
|
+
class ScheduledTransactionSummary < ApiModelBase
|
|
15
15
|
attr_accessor :id
|
|
16
16
|
|
|
17
17
|
# The first date for which the Scheduled Transaction was scheduled.
|
|
@@ -272,61 +272,6 @@ module YNAB
|
|
|
272
272
|
new(transformed_hash)
|
|
273
273
|
end
|
|
274
274
|
|
|
275
|
-
# Deserializes the data based on type
|
|
276
|
-
# @param string type Data type
|
|
277
|
-
# @param string value Value to be deserialized
|
|
278
|
-
# @return [Object] Deserialized data
|
|
279
|
-
def self._deserialize(type, value)
|
|
280
|
-
case type.to_sym
|
|
281
|
-
when :Time
|
|
282
|
-
Time.parse(value)
|
|
283
|
-
when :Date
|
|
284
|
-
Date.parse(value)
|
|
285
|
-
when :String
|
|
286
|
-
value.to_s
|
|
287
|
-
when :Integer
|
|
288
|
-
value.to_i
|
|
289
|
-
when :Float
|
|
290
|
-
value.to_f
|
|
291
|
-
when :Boolean
|
|
292
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
293
|
-
true
|
|
294
|
-
else
|
|
295
|
-
false
|
|
296
|
-
end
|
|
297
|
-
when :Object
|
|
298
|
-
# generic object (usually a Hash), return directly
|
|
299
|
-
value
|
|
300
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
301
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
302
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
303
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
304
|
-
k_type = Regexp.last_match[:k_type]
|
|
305
|
-
v_type = Regexp.last_match[:v_type]
|
|
306
|
-
{}.tap do |hash|
|
|
307
|
-
value.each do |k, v|
|
|
308
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
309
|
-
end
|
|
310
|
-
end
|
|
311
|
-
else # model
|
|
312
|
-
# models (e.g. Pet) or oneOf
|
|
313
|
-
klass = YNAB.const_get(type)
|
|
314
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
315
|
-
end
|
|
316
|
-
end
|
|
317
|
-
|
|
318
|
-
# Returns the string representation of the object
|
|
319
|
-
# @return [String] String presentation of the object
|
|
320
|
-
def to_s
|
|
321
|
-
to_hash.to_s
|
|
322
|
-
end
|
|
323
|
-
|
|
324
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
325
|
-
# @return [Hash] Returns the object in the form of hash
|
|
326
|
-
def to_body
|
|
327
|
-
to_hash
|
|
328
|
-
end
|
|
329
|
-
|
|
330
275
|
# Returns the object in the form of hash
|
|
331
276
|
# @return [Hash] Returns the object in the form of hash
|
|
332
277
|
def to_hash
|
|
@@ -342,25 +287,6 @@ module YNAB
|
|
|
342
287
|
end
|
|
343
288
|
hash
|
|
344
289
|
end
|
|
345
|
-
|
|
346
|
-
# Outputs non-array value in the form of hash
|
|
347
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
348
|
-
# @param [Object] value Any valid value
|
|
349
|
-
# @return [Hash] Returns the value in the form of hash
|
|
350
|
-
def _to_hash(value)
|
|
351
|
-
if value.is_a?(Array)
|
|
352
|
-
value.compact.map { |v| _to_hash(v) }
|
|
353
|
-
elsif value.is_a?(Hash)
|
|
354
|
-
{}.tap do |hash|
|
|
355
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
356
|
-
end
|
|
357
|
-
elsif value.respond_to? :to_hash
|
|
358
|
-
value.to_hash
|
|
359
|
-
else
|
|
360
|
-
value
|
|
361
|
-
end
|
|
362
|
-
end
|
|
363
|
-
|
|
364
290
|
end
|
|
365
291
|
|
|
366
292
|
end
|
|
@@ -11,7 +11,7 @@ require 'date'
|
|
|
11
11
|
require 'time'
|
|
12
12
|
|
|
13
13
|
module YNAB
|
|
14
|
-
class ScheduledTransactionsResponse
|
|
14
|
+
class ScheduledTransactionsResponse < ApiModelBase
|
|
15
15
|
attr_accessor :data
|
|
16
16
|
|
|
17
17
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -116,61 +116,6 @@ module YNAB
|
|
|
116
116
|
new(transformed_hash)
|
|
117
117
|
end
|
|
118
118
|
|
|
119
|
-
# Deserializes the data based on type
|
|
120
|
-
# @param string type Data type
|
|
121
|
-
# @param string value Value to be deserialized
|
|
122
|
-
# @return [Object] Deserialized data
|
|
123
|
-
def self._deserialize(type, value)
|
|
124
|
-
case type.to_sym
|
|
125
|
-
when :Time
|
|
126
|
-
Time.parse(value)
|
|
127
|
-
when :Date
|
|
128
|
-
Date.parse(value)
|
|
129
|
-
when :String
|
|
130
|
-
value.to_s
|
|
131
|
-
when :Integer
|
|
132
|
-
value.to_i
|
|
133
|
-
when :Float
|
|
134
|
-
value.to_f
|
|
135
|
-
when :Boolean
|
|
136
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
137
|
-
true
|
|
138
|
-
else
|
|
139
|
-
false
|
|
140
|
-
end
|
|
141
|
-
when :Object
|
|
142
|
-
# generic object (usually a Hash), return directly
|
|
143
|
-
value
|
|
144
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
145
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
146
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
147
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
148
|
-
k_type = Regexp.last_match[:k_type]
|
|
149
|
-
v_type = Regexp.last_match[:v_type]
|
|
150
|
-
{}.tap do |hash|
|
|
151
|
-
value.each do |k, v|
|
|
152
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
153
|
-
end
|
|
154
|
-
end
|
|
155
|
-
else # model
|
|
156
|
-
# models (e.g. Pet) or oneOf
|
|
157
|
-
klass = YNAB.const_get(type)
|
|
158
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
159
|
-
end
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
# Returns the string representation of the object
|
|
163
|
-
# @return [String] String presentation of the object
|
|
164
|
-
def to_s
|
|
165
|
-
to_hash.to_s
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
169
|
-
# @return [Hash] Returns the object in the form of hash
|
|
170
|
-
def to_body
|
|
171
|
-
to_hash
|
|
172
|
-
end
|
|
173
|
-
|
|
174
119
|
# Returns the object in the form of hash
|
|
175
120
|
# @return [Hash] Returns the object in the form of hash
|
|
176
121
|
def to_hash
|
|
@@ -186,25 +131,6 @@ module YNAB
|
|
|
186
131
|
end
|
|
187
132
|
hash
|
|
188
133
|
end
|
|
189
|
-
|
|
190
|
-
# Outputs non-array value in the form of hash
|
|
191
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
192
|
-
# @param [Object] value Any valid value
|
|
193
|
-
# @return [Hash] Returns the value in the form of hash
|
|
194
|
-
def _to_hash(value)
|
|
195
|
-
if value.is_a?(Array)
|
|
196
|
-
value.compact.map { |v| _to_hash(v) }
|
|
197
|
-
elsif value.is_a?(Hash)
|
|
198
|
-
{}.tap do |hash|
|
|
199
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
200
|
-
end
|
|
201
|
-
elsif value.respond_to? :to_hash
|
|
202
|
-
value.to_hash
|
|
203
|
-
else
|
|
204
|
-
value
|
|
205
|
-
end
|
|
206
|
-
end
|
|
207
|
-
|
|
208
134
|
end
|
|
209
135
|
|
|
210
136
|
end
|