ynab 5.2.0 → 5.3.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.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/DEVELOPMENT.md +6 -3
  3. data/Gemfile.lock +21 -19
  4. data/Rakefile +9 -8
  5. data/docs/ExistingCategory.md +4 -3
  6. data/docs/ExistingTransaction.md +1 -1
  7. data/docs/NewCategory.md +4 -3
  8. data/docs/NewTransaction.md +1 -1
  9. data/docs/SaveCategory.md +4 -3
  10. data/docs/SaveTransactionWithIdOrImportId.md +1 -1
  11. data/docs/SaveTransactionWithOptionalFields.md +1 -1
  12. data/docs/TransactionsApi.md +1 -1
  13. data/lib/ynab/api/accounts_api.rb +1 -1
  14. data/lib/ynab/api/categories_api.rb +1 -1
  15. data/lib/ynab/api/money_movements_api.rb +1 -1
  16. data/lib/ynab/api/months_api.rb +1 -1
  17. data/lib/ynab/api/payee_locations_api.rb +1 -1
  18. data/lib/ynab/api/payees_api.rb +1 -1
  19. data/lib/ynab/api/plans_api.rb +1 -1
  20. data/lib/ynab/api/scheduled_transactions_api.rb +1 -1
  21. data/lib/ynab/api/transactions_api.rb +3 -3
  22. data/lib/ynab/api/user_api.rb +1 -1
  23. data/lib/ynab/api_client.rb +1 -1
  24. data/lib/ynab/api_model_base.rb +1 -1
  25. data/lib/ynab/configuration.rb +1 -1
  26. data/lib/ynab/models/account.rb +38 -13
  27. data/lib/ynab/models/account_base.rb +34 -12
  28. data/lib/ynab/models/account_response.rb +31 -12
  29. data/lib/ynab/models/account_response_data.rb +31 -12
  30. data/lib/ynab/models/account_type.rb +1 -1
  31. data/lib/ynab/models/accounts_response.rb +31 -12
  32. data/lib/ynab/models/accounts_response_data.rb +31 -12
  33. data/lib/ynab/models/bulk_response.rb +31 -12
  34. data/lib/ynab/models/bulk_response_data.rb +31 -12
  35. data/lib/ynab/models/bulk_response_data_bulk.rb +31 -12
  36. data/lib/ynab/models/bulk_transactions.rb +31 -12
  37. data/lib/ynab/models/categories_response.rb +31 -12
  38. data/lib/ynab/models/categories_response_data.rb +31 -12
  39. data/lib/ynab/models/category.rb +47 -12
  40. data/lib/ynab/models/category_base.rb +31 -12
  41. data/lib/ynab/models/category_group.rb +31 -12
  42. data/lib/ynab/models/category_group_with_categories.rb +31 -12
  43. data/lib/ynab/models/category_response.rb +31 -12
  44. data/lib/ynab/models/category_response_data.rb +31 -12
  45. data/lib/ynab/models/currency_format.rb +31 -12
  46. data/lib/ynab/models/date_format.rb +31 -12
  47. data/lib/ynab/models/error_detail.rb +31 -12
  48. data/lib/ynab/models/error_response.rb +31 -12
  49. data/lib/ynab/models/existing_category.rb +83 -19
  50. data/lib/ynab/models/existing_transaction.rb +36 -13
  51. data/lib/ynab/models/hybrid_transaction.rb +41 -12
  52. data/lib/ynab/models/hybrid_transactions_response.rb +31 -12
  53. data/lib/ynab/models/hybrid_transactions_response_data.rb +31 -12
  54. data/lib/ynab/models/money_movement.rb +38 -12
  55. data/lib/ynab/models/money_movement_base.rb +31 -12
  56. data/lib/ynab/models/money_movement_group.rb +31 -12
  57. data/lib/ynab/models/money_movement_groups_response.rb +31 -12
  58. data/lib/ynab/models/money_movement_groups_response_data.rb +31 -12
  59. data/lib/ynab/models/money_movements_response.rb +31 -12
  60. data/lib/ynab/models/money_movements_response_data.rb +31 -12
  61. data/lib/ynab/models/month_detail.rb +33 -12
  62. data/lib/ynab/models/month_detail_base.rb +33 -12
  63. data/lib/ynab/models/month_detail_response.rb +31 -12
  64. data/lib/ynab/models/month_detail_response_data.rb +31 -12
  65. data/lib/ynab/models/month_summaries_response.rb +31 -12
  66. data/lib/ynab/models/month_summaries_response_data.rb +31 -12
  67. data/lib/ynab/models/month_summary.rb +33 -12
  68. data/lib/ynab/models/month_summary_base.rb +31 -12
  69. data/lib/ynab/models/new_category.rb +83 -19
  70. data/lib/ynab/models/new_transaction.rb +36 -13
  71. data/lib/ynab/models/patch_category_group_wrapper.rb +31 -12
  72. data/lib/ynab/models/patch_category_wrapper.rb +31 -12
  73. data/lib/ynab/models/patch_month_category_wrapper.rb +31 -12
  74. data/lib/ynab/models/patch_payee_wrapper.rb +31 -12
  75. data/lib/ynab/models/patch_transactions_wrapper.rb +31 -12
  76. data/lib/ynab/models/payee.rb +31 -12
  77. data/lib/ynab/models/payee_location.rb +31 -12
  78. data/lib/ynab/models/payee_location_response.rb +31 -12
  79. data/lib/ynab/models/payee_location_response_data.rb +31 -12
  80. data/lib/ynab/models/payee_locations_response.rb +31 -12
  81. data/lib/ynab/models/payee_locations_response_data.rb +31 -12
  82. data/lib/ynab/models/payee_response.rb +31 -12
  83. data/lib/ynab/models/payee_response_data.rb +31 -12
  84. data/lib/ynab/models/payees_response.rb +31 -12
  85. data/lib/ynab/models/payees_response_data.rb +31 -12
  86. data/lib/ynab/models/plan_detail.rb +33 -12
  87. data/lib/ynab/models/plan_detail_response.rb +31 -12
  88. data/lib/ynab/models/plan_detail_response_data.rb +31 -12
  89. data/lib/ynab/models/plan_settings.rb +33 -14
  90. data/lib/ynab/models/plan_settings_response.rb +31 -12
  91. data/lib/ynab/models/plan_settings_response_data.rb +31 -12
  92. data/lib/ynab/models/plan_summary.rb +33 -12
  93. data/lib/ynab/models/plan_summary_response.rb +31 -12
  94. data/lib/ynab/models/plan_summary_response_data.rb +31 -12
  95. data/lib/ynab/models/post_account_wrapper.rb +31 -12
  96. data/lib/ynab/models/post_category_group_wrapper.rb +31 -12
  97. data/lib/ynab/models/post_category_wrapper.rb +31 -12
  98. data/lib/ynab/models/post_payee.rb +31 -12
  99. data/lib/ynab/models/post_payee_wrapper.rb +31 -12
  100. data/lib/ynab/models/post_scheduled_transaction_wrapper.rb +31 -12
  101. data/lib/ynab/models/post_transactions_wrapper.rb +31 -12
  102. data/lib/ynab/models/put_scheduled_transaction_wrapper.rb +31 -12
  103. data/lib/ynab/models/put_transaction_wrapper.rb +31 -12
  104. data/lib/ynab/models/save_account.rb +31 -12
  105. data/lib/ynab/models/save_account_type.rb +1 -1
  106. data/lib/ynab/models/save_category.rb +79 -20
  107. data/lib/ynab/models/save_category_group.rb +31 -12
  108. data/lib/ynab/models/save_category_group_response.rb +31 -12
  109. data/lib/ynab/models/save_category_group_response_data.rb +31 -12
  110. data/lib/ynab/models/save_category_response.rb +31 -12
  111. data/lib/ynab/models/save_category_response_data.rb +31 -12
  112. data/lib/ynab/models/save_month_category.rb +31 -12
  113. data/lib/ynab/models/save_payee.rb +31 -12
  114. data/lib/ynab/models/save_payee_response.rb +31 -12
  115. data/lib/ynab/models/save_payee_response_data.rb +31 -12
  116. data/lib/ynab/models/save_scheduled_transaction.rb +31 -12
  117. data/lib/ynab/models/save_sub_transaction.rb +31 -12
  118. data/lib/ynab/models/save_transaction_with_id_or_import_id.rb +36 -13
  119. data/lib/ynab/models/save_transaction_with_optional_fields.rb +32 -13
  120. data/lib/ynab/models/save_transactions_response.rb +31 -12
  121. data/lib/ynab/models/save_transactions_response_data.rb +31 -12
  122. data/lib/ynab/models/scheduled_sub_transaction.rb +37 -12
  123. data/lib/ynab/models/scheduled_sub_transaction_base.rb +31 -12
  124. data/lib/ynab/models/scheduled_transaction_detail.rb +36 -12
  125. data/lib/ynab/models/scheduled_transaction_frequency.rb +1 -1
  126. data/lib/ynab/models/scheduled_transaction_response.rb +31 -12
  127. data/lib/ynab/models/scheduled_transaction_response_data.rb +31 -12
  128. data/lib/ynab/models/scheduled_transaction_summary.rb +36 -12
  129. data/lib/ynab/models/scheduled_transaction_summary_base.rb +31 -12
  130. data/lib/ynab/models/scheduled_transactions_response.rb +31 -12
  131. data/lib/ynab/models/scheduled_transactions_response_data.rb +31 -12
  132. data/lib/ynab/models/sub_transaction.rb +38 -12
  133. data/lib/ynab/models/sub_transaction_base.rb +31 -12
  134. data/lib/ynab/models/transaction_cleared_status.rb +1 -1
  135. data/lib/ynab/models/transaction_detail.rb +41 -12
  136. data/lib/ynab/models/transaction_flag_color.rb +1 -1
  137. data/lib/ynab/models/transaction_response.rb +31 -12
  138. data/lib/ynab/models/transaction_response_data.rb +31 -12
  139. data/lib/ynab/models/transaction_summary.rb +41 -12
  140. data/lib/ynab/models/transaction_summary_base.rb +31 -12
  141. data/lib/ynab/models/transactions_import_response.rb +31 -12
  142. data/lib/ynab/models/transactions_import_response_data.rb +31 -12
  143. data/lib/ynab/models/transactions_response.rb +31 -12
  144. data/lib/ynab/models/transactions_response_data.rb +31 -12
  145. data/lib/ynab/models/user.rb +31 -12
  146. data/lib/ynab/models/user_response.rb +31 -12
  147. data/lib/ynab/models/user_response_data.rb +31 -12
  148. data/lib/ynab/version.rb +1 -1
  149. data/lib/ynab.rb +1 -1
  150. data/open_api_spec.yaml +61 -30
  151. data/templates/partial_model_generic.mustache +37 -11
  152. data/ynab.gemspec +2 -2
  153. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f8eb3003dda34ba7c9269b35452dd0d0bec02ddee8bef688f8e52e2503943b2
4
- data.tar.gz: '0197df1eeddea055b045788c268801986ea6887c31d657e8c85c852dd5ccdf90'
3
+ metadata.gz: 9c519478ec4054d5871fc144b246fc1c7307de1c61d2b2220c0dce9a9ff0879e
4
+ data.tar.gz: 959cf4ba89fdbccc05488eef03f0f16c6892bce297a65addb26955940c212404
5
5
  SHA512:
6
- metadata.gz: ed5479594b0ddd569194cfe466a8dd8c66d28dfee79a949a5e2706f1ebb38aefb9801bc2629cc36ac6129105a05733592c624759e49e80dc4b60cc9331d497ee
7
- data.tar.gz: 020c79b873bff0825173718cebab3025fcb22f06e19e0456cc3444c80e7944a0e77a96b659146411980f7fd3a4c4cb1e96ffc81ad1e955d66ee6abca5f77aaa2
6
+ metadata.gz: 18f35e85a46e13c5ecc8e3d852523faa17a29f1629a8c3bee087fb2876bfbe504bde3325e68fedd2131291e0d0688f32e7d77a24bad503a33f0828628e12ed33
7
+ data.tar.gz: 55295030f22d58f95383d178b268416d8ee5232900279c835d3c7fae38a602bba6a5f9e1de74ee21681cffcb0e30feae261d5e85c4fcba2a8c15602d46b88008
data/DEVELOPMENT.md CHANGED
@@ -8,10 +8,13 @@
8
8
 
9
9
  ## Generating
10
10
 
11
- Run `bundle exec rake generate`. This will generate the API client from the latest OpenAPI spec. Once generated, you should open a PR and merge the changes.
11
+ Run `bundle exec rake generate`. This will generate the API client from the latest OpenAPI spec and bump the version. The bump defaults to `minor`; pass `major` or `patch` to change it (`bundle exec rake "generate[patch]"`). Once generated, you should open a PR and merge the changes.
12
12
 
13
13
  ## Publishing
14
14
 
15
- Run the "Publish" GitHub Actions workflow
15
+ The version that gets published is whatever `lib/ynab/version.rb` on the `main` branch says, so publishing is two steps.
16
16
 
17
- Note: Use the Publish workflow to bump the version number in `lib/ynab/version.rb`
17
+ 1. Merge a PR that sets the new version. `bundle exec rake generate` does this for you. For a release that does not involve re-generating the client, run `bundle exec rake "bump_version_number[minor]"` (or `major` / `patch`), which updates `lib/ynab/version.rb` and `Gemfile.lock` without creating a commit or tag.
18
+ 2. Run the "Publish" GitHub Actions workflow. This runs the specs and publishes that version to RubyGems, then tags the commit and creates a GitHub release.
19
+
20
+ The workflow never changes the version itself. If the version in `lib/ynab/version.rb` has already been released, the workflow fails before publishing anything.
data/Gemfile.lock CHANGED
@@ -1,34 +1,36 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ynab (5.1.0)
4
+ ynab (5.3.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  base64 (0.3.0)
11
- diff-lcs (1.3)
12
- ethon (0.16.0)
11
+ diff-lcs (1.6.2)
12
+ ethon (0.18.0)
13
13
  ffi (>= 1.15.0)
14
- ffi (1.17.3)
15
- rake (13.0.1)
16
- rspec (3.8.0)
17
- rspec-core (~> 3.8.0)
18
- rspec-expectations (~> 3.8.0)
19
- rspec-mocks (~> 3.8.0)
20
- rspec-core (3.8.0)
21
- rspec-support (~> 3.8.0)
22
- rspec-expectations (3.8.2)
14
+ logger
15
+ ffi (1.17.4)
16
+ logger (1.7.0)
17
+ rake (13.4.2)
18
+ rspec (3.13.2)
19
+ rspec-core (~> 3.13.0)
20
+ rspec-expectations (~> 3.13.0)
21
+ rspec-mocks (~> 3.13.0)
22
+ rspec-core (3.13.6)
23
+ rspec-support (~> 3.13.0)
24
+ rspec-expectations (3.13.5)
23
25
  diff-lcs (>= 1.2.0, < 2.0)
24
- rspec-support (~> 3.8.0)
25
- rspec-mocks (3.8.0)
26
+ rspec-support (~> 3.13.0)
27
+ rspec-mocks (3.13.8)
26
28
  diff-lcs (>= 1.2.0, < 2.0)
27
- rspec-support (~> 3.8.0)
28
- rspec-support (3.8.0)
29
- typhoeus (1.4.0)
30
- ethon (>= 0.9.0)
31
- vcr (6.2.0)
29
+ rspec-support (~> 3.13.0)
30
+ rspec-support (3.13.7)
31
+ typhoeus (1.6.0)
32
+ ethon (>= 0.18.0)
33
+ vcr (6.4.0)
32
34
 
33
35
  PLATFORMS
34
36
  ruby
data/Rakefile CHANGED
@@ -12,8 +12,8 @@ end
12
12
 
13
13
  task :default => [:spec]
14
14
 
15
- desc "Run OpenAPI Generator to update the client from the spec"
16
- task :generate do
15
+ desc "Run OpenAPI Generator to update the client from the spec and bump the version"
16
+ task :generate, [:version_type] do |t, args|
17
17
  spec_filename = 'open_api_spec.yaml'
18
18
  # Download latest spec
19
19
  sh "wget https://api.ynab.com/papi/#{spec_filename} -O ./#{spec_filename}"
@@ -21,6 +21,8 @@ task :generate do
21
21
  sh "rm -r docs/ lib/ynab/models/"
22
22
  # Generate the client
23
23
  sh "openapi-generator generate -i ./#{spec_filename} -g ruby -c openapi-generator-config.yaml -o ./"
24
+
25
+ Rake::Task[:bump_version_number].invoke(args[:version_type] || 'minor')
24
26
  end
25
27
 
26
28
  task :get_current_version do
@@ -49,13 +51,12 @@ task :bump_version_number, [:version_type] do |t, args|
49
51
  new_version_file_text = current_version_file_text.gsub(current_version, new_version)
50
52
  File.open(version_file_path, "w") {|file| file.puts new_version_file_text }
51
53
 
52
- puts new_version
53
- end
54
+ # Gemfile.lock pins this gem's own version, so it has to be re-resolved
55
+ sh "bundle lock"
54
56
 
55
- task :commit_version_bump do
56
- sh "git add lib/ynab/version.rb Gemfile.lock && git diff-index --quiet HEAD || git commit -m 'Bumping version for release'"
57
+ puts new_version
57
58
  end
58
59
 
59
- desc "Bump version, run specs build a gem and release on RubyGems"
60
- task :publish => ['spec', 'commit_version_bump', 'clobber', 'release']
60
+ desc "Run specs, build a gem and release it on RubyGems"
61
+ task :publish => ['spec', 'clobber', 'release:rubygem_push']
61
62
 
@@ -7,7 +7,8 @@
7
7
  | **name** | **String** | | [optional] |
8
8
  | **note** | **String** | | [optional] |
9
9
  | **category_group_id** | **String** | The id of the category group to which this category belongs. An internal category group may not be specified. | [optional] |
10
- | **goal_target** | **Integer** | The goal target amount in milliunits format. If value is specified and goal has not already been configured for category, a monthly goal will be created for the category with this target amount. If goal_type is not specified, it will default to &#39;NEED&#39; or &#39;MF&#39; for Credit Card Payment categories. | [optional] |
11
- | **goal_target_date** | **Date** | The goal target date in ISO format (e.g. 2016-12-01). | [optional] |
12
- | **goal_needs_whole_amount** | **Boolean** | Whether the goal requires the full target amount each period. Only supported for &#39;NEED&#39; goals. When true, the goal is configured as &#39;Set aside another...&#39;. When false, the goal is configured as &#39;Refill up to...&#39;. | [optional] |
10
+ | **goal_target** | **Integer** | The goal target amount in milliunits format. If value is specified and goal has not already been configured for category, a monthly goal will be created for the category with this target amount. If goal_type is not specified, it will default to &#39;NEED&#39;, or to &#39;MF&#39; for Credit Card Payment categories and &#39;DEBT&#39; for categories paired to a loan account. When updating a category, passing null removes any existing target. | [optional] |
11
+ | **goal_target_date** | **Date** | The goal target date in ISO format (e.g. 2016-12-01). Not supported for categories paired to a loan account. | [optional] |
12
+ | **goal_needs_whole_amount** | **Boolean** | Whether the goal requires the full target amount each period. Only supported for &#39;NEED&#39; goals, and not supported for Credit Card Payment categories or categories paired to a loan account. When true, the goal is configured as &#39;Set aside another...&#39;. When false, the goal is configured as &#39;Refill up to...&#39;. | [optional] |
13
+ | **goal_frequency** | **String** | When specified, configures a recurring &#39;NEED&#39; target of goal_target that repeats at this frequency, replacing any existing target. Requires goal_target. Cannot be combined with goal_target_date and is not supported for Credit Card Payment categories or categories paired to a loan account. Omit to leave an existing target&#39;s cadence unchanged. | [optional] |
13
14
 
@@ -14,5 +14,5 @@
14
14
  | **cleared** | [**TransactionClearedStatus**](TransactionClearedStatus.md) | | [optional] |
15
15
  | **approved** | **Boolean** | Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. | [optional] |
16
16
  | **flag_color** | [**TransactionFlagColor**](TransactionFlagColor.md) | | [optional] |
17
- | **subtransactions** | [**Array&lt;SaveSubTransaction&gt;**](SaveSubTransaction.md) | An array of subtransactions to configure a transaction as a split. Updating &#x60;subtransactions&#x60; on an existing split transaction is not supported. | [optional] |
17
+ | **subtransactions** | [**Array&lt;SaveSubTransaction&gt;**](SaveSubTransaction.md) | An array of subtransactions to configure a transaction as a split. Updating &#x60;subtransactions&#x60; on an existing split transaction is not supported and will return an error. Splits are not allowed on tracking accounts or on transfers between on-budget accounts; a transfer to a tracking account can be a split. | [optional] |
18
18
 
data/docs/NewCategory.md CHANGED
@@ -7,7 +7,8 @@
7
7
  | **name** | **String** | | [optional] |
8
8
  | **note** | **String** | | [optional] |
9
9
  | **category_group_id** | **String** | The id of the category group to which this category belongs. An internal category group may not be specified. | [optional] |
10
- | **goal_target** | **Integer** | The goal target amount in milliunits format. If value is specified and goal has not already been configured for category, a monthly goal will be created for the category with this target amount. If goal_type is not specified, it will default to &#39;NEED&#39; or &#39;MF&#39; for Credit Card Payment categories. | [optional] |
11
- | **goal_target_date** | **Date** | The goal target date in ISO format (e.g. 2016-12-01). | [optional] |
12
- | **goal_needs_whole_amount** | **Boolean** | Whether the goal requires the full target amount each period. Only supported for &#39;NEED&#39; goals. When true, the goal is configured as &#39;Set aside another...&#39;. When false, the goal is configured as &#39;Refill up to...&#39;. | [optional] |
10
+ | **goal_target** | **Integer** | The goal target amount in milliunits format. If value is specified and goal has not already been configured for category, a monthly goal will be created for the category with this target amount. If goal_type is not specified, it will default to &#39;NEED&#39;, or to &#39;MF&#39; for Credit Card Payment categories and &#39;DEBT&#39; for categories paired to a loan account. When updating a category, passing null removes any existing target. | [optional] |
11
+ | **goal_target_date** | **Date** | The goal target date in ISO format (e.g. 2016-12-01). Not supported for categories paired to a loan account. | [optional] |
12
+ | **goal_needs_whole_amount** | **Boolean** | Whether the goal requires the full target amount each period. Only supported for &#39;NEED&#39; goals, and not supported for Credit Card Payment categories or categories paired to a loan account. When true, the goal is configured as &#39;Set aside another...&#39;. When false, the goal is configured as &#39;Refill up to...&#39;. | [optional] |
13
+ | **goal_frequency** | **String** | When specified, configures a recurring &#39;NEED&#39; target of goal_target that repeats at this frequency, replacing any existing target. Requires goal_target. Cannot be combined with goal_target_date and is not supported for Credit Card Payment categories or categories paired to a loan account. Omit to leave an existing target&#39;s cadence unchanged. | [optional] |
13
14
 
@@ -14,6 +14,6 @@
14
14
  | **cleared** | [**TransactionClearedStatus**](TransactionClearedStatus.md) | | [optional] |
15
15
  | **approved** | **Boolean** | Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. | [optional] |
16
16
  | **flag_color** | [**TransactionFlagColor**](TransactionFlagColor.md) | | [optional] |
17
- | **subtransactions** | [**Array&lt;SaveSubTransaction&gt;**](SaveSubTransaction.md) | An array of subtransactions to configure a transaction as a split. Updating &#x60;subtransactions&#x60; on an existing split transaction is not supported. | [optional] |
17
+ | **subtransactions** | [**Array&lt;SaveSubTransaction&gt;**](SaveSubTransaction.md) | An array of subtransactions to configure a transaction as a split. Updating &#x60;subtransactions&#x60; on an existing split transaction is not supported and will return an error. Splits are not allowed on tracking accounts or on transfers between on-budget accounts; a transfer to a tracking account can be a split. | [optional] |
18
18
  | **import_id** | **String** | If specified, a new transaction will be assigned this &#x60;import_id&#x60; and considered \&quot;imported\&quot;. We will also attempt to match this imported transaction to an existing \&quot;user-entered\&quot; transaction on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.&lt;br&gt;&lt;br&gt;Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: &#39;YNAB:[milliunit_amount]:[iso_date]:[occurrence]&#39;. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of &#39;YNAB:-294230:2015-12-30:1&#39;. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be &#39;YNAB:-294230:2015-12-30:2&#39;. Using a consistent format will prevent duplicates through Direct Import and File Based Import.&lt;br&gt;&lt;br&gt;If import_id is omitted or specified as null, the transaction will be treated as a \&quot;user-entered\&quot; transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API). | [optional] |
19
19
 
data/docs/SaveCategory.md CHANGED
@@ -7,7 +7,8 @@
7
7
  | **name** | **String** | | [optional] |
8
8
  | **note** | **String** | | [optional] |
9
9
  | **category_group_id** | **String** | The id of the category group to which this category belongs. An internal category group may not be specified. | [optional] |
10
- | **goal_target** | **Integer** | The goal target amount in milliunits format. If value is specified and goal has not already been configured for category, a monthly goal will be created for the category with this target amount. If goal_type is not specified, it will default to &#39;NEED&#39; or &#39;MF&#39; for Credit Card Payment categories. | [optional] |
11
- | **goal_target_date** | **Date** | The goal target date in ISO format (e.g. 2016-12-01). | [optional] |
12
- | **goal_needs_whole_amount** | **Boolean** | Whether the goal requires the full target amount each period. Only supported for &#39;NEED&#39; goals. When true, the goal is configured as &#39;Set aside another...&#39;. When false, the goal is configured as &#39;Refill up to...&#39;. | [optional] |
10
+ | **goal_target** | **Integer** | The goal target amount in milliunits format. If value is specified and goal has not already been configured for category, a monthly goal will be created for the category with this target amount. If goal_type is not specified, it will default to &#39;NEED&#39;, or to &#39;MF&#39; for Credit Card Payment categories and &#39;DEBT&#39; for categories paired to a loan account. When updating a category, passing null removes any existing target. | [optional] |
11
+ | **goal_target_date** | **Date** | The goal target date in ISO format (e.g. 2016-12-01). Not supported for categories paired to a loan account. | [optional] |
12
+ | **goal_needs_whole_amount** | **Boolean** | Whether the goal requires the full target amount each period. Only supported for &#39;NEED&#39; goals, and not supported for Credit Card Payment categories or categories paired to a loan account. When true, the goal is configured as &#39;Set aside another...&#39;. When false, the goal is configured as &#39;Refill up to...&#39;. | [optional] |
13
+ | **goal_frequency** | **String** | When specified, configures a recurring &#39;NEED&#39; target of goal_target that repeats at this frequency, replacing any existing target. Requires goal_target. Cannot be combined with goal_target_date and is not supported for Credit Card Payment categories or categories paired to a loan account. Omit to leave an existing target&#39;s cadence unchanged. | [optional] |
13
14
 
@@ -14,7 +14,7 @@
14
14
  | **cleared** | [**TransactionClearedStatus**](TransactionClearedStatus.md) | | [optional] |
15
15
  | **approved** | **Boolean** | Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. | [optional] |
16
16
  | **flag_color** | [**TransactionFlagColor**](TransactionFlagColor.md) | | [optional] |
17
- | **subtransactions** | [**Array&lt;SaveSubTransaction&gt;**](SaveSubTransaction.md) | An array of subtransactions to configure a transaction as a split. Updating &#x60;subtransactions&#x60; on an existing split transaction is not supported. | [optional] |
17
+ | **subtransactions** | [**Array&lt;SaveSubTransaction&gt;**](SaveSubTransaction.md) | An array of subtransactions to configure a transaction as a split. Updating &#x60;subtransactions&#x60; on an existing split transaction is not supported and will return an error. Splits are not allowed on tracking accounts or on transfers between on-budget accounts; a transfer to a tracking account can be a split. | [optional] |
18
18
  | **id** | **String** | If specified, this id will be used to lookup a transaction by its &#x60;id&#x60; for the purpose of updating the transaction itself. If not specified, an &#x60;import_id&#x60; should be supplied. | [optional] |
19
19
  | **import_id** | **String** | If specified, this id will be used to lookup a transaction by its &#x60;import_id&#x60; for the purpose of updating the transaction itself. If not specified, an &#x60;id&#x60; should be supplied. You may not provide both an &#x60;id&#x60; and an &#x60;import_id&#x60; and updating an &#x60;import_id&#x60; on an existing transaction is not allowed. | [optional] |
20
20
 
@@ -14,5 +14,5 @@
14
14
  | **cleared** | [**TransactionClearedStatus**](TransactionClearedStatus.md) | | [optional] |
15
15
  | **approved** | **Boolean** | Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. | [optional] |
16
16
  | **flag_color** | [**TransactionFlagColor**](TransactionFlagColor.md) | | [optional] |
17
- | **subtransactions** | [**Array&lt;SaveSubTransaction&gt;**](SaveSubTransaction.md) | An array of subtransactions to configure a transaction as a split. Updating &#x60;subtransactions&#x60; on an existing split transaction is not supported. | [optional] |
17
+ | **subtransactions** | [**Array&lt;SaveSubTransaction&gt;**](SaveSubTransaction.md) | An array of subtransactions to configure a transaction as a split. Updating &#x60;subtransactions&#x60; on an existing split transaction is not supported and will return an error. Splits are not allowed on tracking accounts or on transfers between on-budget accounts; a transfer to a tracking account can be a split. | [optional] |
18
18
 
@@ -202,7 +202,7 @@ Returns all transactions for a specified payee, excluding any pending transactio
202
202
 
203
203
  Import transactions
204
204
 
205
- Imports available transactions on all linked accounts for the given plan. Linked accounts allow transactions to be imported directly from a specified financial institution and this endpoint initiates that import. Sending a request to this endpoint is the equivalent of clicking \"Import\" on each account in the web application or tapping the \"New Transactions\" banner in the mobile applications. The response for this endpoint contains the transaction ids that have been imported.
205
+ DEPRECATED: This endpoint is no longer needed because YNAB now automatically imports transactions on linked accounts. Requests are still accepted for backwards compatibility but no import is performed and the response will always contain an empty list of transaction ids.
206
206
 
207
207
  ### Parameters
208
208
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #YNAB API Endpoints
3
3
 
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
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. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
5
5
 
6
6
  Generated by: OpenAPI Generator (https://openapi-generator.tech)
7
7
  =end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #YNAB API Endpoints
3
3
 
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
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. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
5
5
 
6
6
  Generated by: OpenAPI Generator (https://openapi-generator.tech)
7
7
  =end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #YNAB API Endpoints
3
3
 
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
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. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
5
5
 
6
6
  Generated by: OpenAPI Generator (https://openapi-generator.tech)
7
7
  =end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #YNAB API Endpoints
3
3
 
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
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. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
5
5
 
6
6
  Generated by: OpenAPI Generator (https://openapi-generator.tech)
7
7
  =end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #YNAB API Endpoints
3
3
 
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
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. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
5
5
 
6
6
  Generated by: OpenAPI Generator (https://openapi-generator.tech)
7
7
  =end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #YNAB API Endpoints
3
3
 
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
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. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
5
5
 
6
6
  Generated by: OpenAPI Generator (https://openapi-generator.tech)
7
7
  =end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #YNAB API Endpoints
3
3
 
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
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. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
5
5
 
6
6
  Generated by: OpenAPI Generator (https://openapi-generator.tech)
7
7
  =end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #YNAB API Endpoints
3
3
 
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
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. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
5
5
 
6
6
  Generated by: OpenAPI Generator (https://openapi-generator.tech)
7
7
  =end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #YNAB API Endpoints
3
3
 
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
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. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
5
5
 
6
6
  Generated by: OpenAPI Generator (https://openapi-generator.tech)
7
7
  =end
@@ -627,7 +627,7 @@ module YNAB
627
627
  end
628
628
 
629
629
  # Import transactions
630
- # Imports available transactions on all linked accounts for the given plan. Linked accounts allow transactions to be imported directly from a specified financial institution and this endpoint initiates that import. Sending a request to this endpoint is the equivalent of clicking \"Import\" on each account in the web application or tapping the \"New Transactions\" banner in the mobile applications. The response for this endpoint contains the transaction ids that have been imported.
630
+ # DEPRECATED: This endpoint is no longer needed because YNAB now automatically imports transactions on linked accounts. Requests are still accepted for backwards compatibility but no import is performed and the response will always contain an empty list of transaction ids.
631
631
  # @param plan_id [String] The id of the plan. \&quot;last-used\&quot; can be used to specify the last used plan and \&quot;default\&quot; can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
632
632
  # @param [Hash] opts the optional parameters
633
633
  # @return [TransactionsImportResponse]
@@ -637,7 +637,7 @@ module YNAB
637
637
  end
638
638
 
639
639
  # Import transactions
640
- # Imports available transactions on all linked accounts for the given plan. Linked accounts allow transactions to be imported directly from a specified financial institution and this endpoint initiates that import. Sending a request to this endpoint is the equivalent of clicking \&quot;Import\&quot; on each account in the web application or tapping the \&quot;New Transactions\&quot; banner in the mobile applications. The response for this endpoint contains the transaction ids that have been imported.
640
+ # DEPRECATED: This endpoint is no longer needed because YNAB now automatically imports transactions on linked accounts. Requests are still accepted for backwards compatibility but no import is performed and the response will always contain an empty list of transaction ids.
641
641
  # @param plan_id [String] The id of the plan. \&quot;last-used\&quot; can be used to specify the last used plan and \&quot;default\&quot; can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
642
642
  # @param [Hash] opts the optional parameters
643
643
  # @return [Array<(TransactionsImportResponse, Integer, Hash)>] TransactionsImportResponse data, response status code and response headers
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #YNAB API Endpoints
3
3
 
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
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. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
5
5
 
6
6
  Generated by: OpenAPI Generator (https://openapi-generator.tech)
7
7
  =end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #YNAB API Endpoints
3
3
 
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
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. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
5
5
 
6
6
  Generated by: OpenAPI Generator (https://openapi-generator.tech)
7
7
  =end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #YNAB API Endpoints
3
3
 
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
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. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
5
5
 
6
6
  Generated by: OpenAPI Generator (https://openapi-generator.tech)
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #YNAB API Endpoints
3
3
 
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
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. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
5
5
 
6
6
  Generated by: OpenAPI Generator (https://openapi-generator.tech)
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #YNAB API Endpoints
3
3
 
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
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. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
5
5
 
6
6
  Generated by: OpenAPI Generator (https://openapi-generator.tech)
7
7
 
@@ -129,9 +129,14 @@ module YNAB
129
129
  }
130
130
  end
131
131
 
132
+ # Returns attribute mapping this model knows about
133
+ def self.acceptable_attribute_map
134
+ attribute_map
135
+ end
136
+
132
137
  # Returns all the JSON keys this model knows about
133
138
  def self.acceptable_attributes
134
- attribute_map.values
139
+ acceptable_attribute_map.values
135
140
  end
136
141
 
137
142
  # Attribute type mapping.
@@ -167,9 +172,26 @@ module YNAB
167
172
  # List of attributes with nullable: true
168
173
  def self.openapi_nullable
169
174
  Set.new([
175
+ :'note',
176
+ :'transfer_payee_id',
177
+ :'last_reconciled_at',
178
+ :'debt_original_balance',
179
+ :'debt_interest_rates',
180
+ :'debt_minimum_payments',
181
+ :'debt_escrow_amounts',
170
182
  ])
171
183
  end
172
184
 
185
+ # Returns attribute type mapping
186
+ def self.acceptable_openapi_types
187
+ openapi_types
188
+ end
189
+
190
+ # Returns the nullable attributes
191
+ def self.acceptable_openapi_nullable
192
+ openapi_nullable
193
+ end
194
+
173
195
  # List of class defined in allOf (OpenAPI v3)
174
196
  def self.openapi_all_of
175
197
  [
@@ -185,9 +207,10 @@ module YNAB
185
207
  end
186
208
 
187
209
  # check to see if the attribute exists and convert string to symbol for hash key
210
+ acceptable_attribute_map = self.class.acceptable_attribute_map
188
211
  attributes = attributes.each_with_object({}) { |(k, v), h|
189
- if (!self.class.attribute_map.key?(k.to_sym))
190
- fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::Account`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
212
+ if (!acceptable_attribute_map.key?(k.to_sym))
213
+ fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::Account`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
191
214
  end
192
215
  h[k.to_sym] = v
193
216
  }
@@ -313,7 +336,6 @@ module YNAB
313
336
  return false if @balance.nil?
314
337
  return false if @cleared_balance.nil?
315
338
  return false if @uncleared_balance.nil?
316
- return false if @transfer_payee_id.nil?
317
339
  return false if @deleted.nil?
318
340
  true
319
341
  end
@@ -367,18 +389,20 @@ module YNAB
367
389
  def self.build_from_hash(attributes)
368
390
  return nil unless attributes.is_a?(Hash)
369
391
  attributes = attributes.transform_keys(&:to_sym)
392
+ # include attributes inherited from allOf parents (the nearest declaration wins)
393
+ map = acceptable_attribute_map
370
394
  transformed_hash = {}
371
- openapi_types.each_pair do |key, type|
372
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
395
+ acceptable_openapi_types.each_pair do |key, type|
396
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
373
397
  transformed_hash["#{key}"] = nil
374
398
  elsif type =~ /\AArray<(.*)>/i
375
399
  # check to ensure the input is an array given that the attribute
376
400
  # is documented as an array but the input is not
377
- if attributes[attribute_map[key]].is_a?(Array)
378
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
401
+ if attributes[map[key]].is_a?(Array)
402
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
379
403
  end
380
- elsif !attributes[attribute_map[key]].nil?
381
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
404
+ elsif !attributes[map[key]].nil?
405
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
382
406
  end
383
407
  end
384
408
  new(transformed_hash)
@@ -388,10 +412,11 @@ module YNAB
388
412
  # @return [Hash] Returns the object in the form of hash
389
413
  def to_hash
390
414
  hash = {}
391
- self.class.attribute_map.each_pair do |attr, param|
415
+ # include attributes inherited from allOf parents (the nearest declaration wins)
416
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
392
417
  value = self.send(attr)
393
418
  if value.nil?
394
- is_nullable = self.class.openapi_nullable.include?(attr)
419
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
395
420
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
396
421
  end
397
422
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #YNAB API Endpoints
3
3
 
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
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. Read the [API Documentation](https://api.ynab.com) for more information about the API, including how to obtain an access token and how to use it to make requests.
5
5
 
6
6
  Generated by: OpenAPI Generator (https://openapi-generator.tech)
7
7
 
@@ -105,9 +105,14 @@ module YNAB
105
105
  }
106
106
  end
107
107
 
108
+ # Returns attribute mapping this model knows about
109
+ def self.acceptable_attribute_map
110
+ attribute_map
111
+ end
112
+
108
113
  # Returns all the JSON keys this model knows about
109
114
  def self.acceptable_attributes
110
- attribute_map.values
115
+ acceptable_attribute_map.values
111
116
  end
112
117
 
113
118
  # Attribute type mapping.
@@ -141,9 +146,22 @@ module YNAB
141
146
  :'transfer_payee_id',
142
147
  :'last_reconciled_at',
143
148
  :'debt_original_balance',
149
+ :'debt_interest_rates',
150
+ :'debt_minimum_payments',
151
+ :'debt_escrow_amounts',
144
152
  ])
145
153
  end
146
154
 
155
+ # Returns attribute type mapping
156
+ def self.acceptable_openapi_types
157
+ openapi_types
158
+ end
159
+
160
+ # Returns the nullable attributes
161
+ def self.acceptable_openapi_nullable
162
+ openapi_nullable
163
+ end
164
+
147
165
  # Initializes the object
148
166
  # @param [Hash] attributes Model attributes in the form of hash
149
167
  def initialize(attributes = {})
@@ -152,9 +170,10 @@ module YNAB
152
170
  end
153
171
 
154
172
  # check to see if the attribute exists and convert string to symbol for hash key
173
+ acceptable_attribute_map = self.class.acceptable_attribute_map
155
174
  attributes = attributes.each_with_object({}) { |(k, v), h|
156
- if (!self.class.attribute_map.key?(k.to_sym))
157
- fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::AccountBase`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
175
+ if (!acceptable_attribute_map.key?(k.to_sym))
176
+ fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::AccountBase`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
158
177
  end
159
178
  h[k.to_sym] = v
160
179
  }
@@ -303,18 +322,20 @@ module YNAB
303
322
  def self.build_from_hash(attributes)
304
323
  return nil unless attributes.is_a?(Hash)
305
324
  attributes = attributes.transform_keys(&:to_sym)
325
+ # include attributes inherited from allOf parents (the nearest declaration wins)
326
+ map = acceptable_attribute_map
306
327
  transformed_hash = {}
307
- openapi_types.each_pair do |key, type|
308
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
328
+ acceptable_openapi_types.each_pair do |key, type|
329
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
309
330
  transformed_hash["#{key}"] = nil
310
331
  elsif type =~ /\AArray<(.*)>/i
311
332
  # check to ensure the input is an array given that the attribute
312
333
  # is documented as an array but the input is not
313
- if attributes[attribute_map[key]].is_a?(Array)
314
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
334
+ if attributes[map[key]].is_a?(Array)
335
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
315
336
  end
316
- elsif !attributes[attribute_map[key]].nil?
317
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
337
+ elsif !attributes[map[key]].nil?
338
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
318
339
  end
319
340
  end
320
341
  new(transformed_hash)
@@ -324,10 +345,11 @@ module YNAB
324
345
  # @return [Hash] Returns the object in the form of hash
325
346
  def to_hash
326
347
  hash = {}
327
- self.class.attribute_map.each_pair do |attr, param|
348
+ # include attributes inherited from allOf parents (the nearest declaration wins)
349
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
328
350
  value = self.send(attr)
329
351
  if value.nil?
330
- is_nullable = self.class.openapi_nullable.include?(attr)
352
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
331
353
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
332
354
  end
333
355