ynab 2.2.0 → 2.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 (208) hide show
  1. package/dist/apis/AccountsApi.d.ts +1 -1
  2. package/dist/apis/AccountsApi.js +1 -1
  3. package/dist/apis/BudgetsApi.d.ts +1 -1
  4. package/dist/apis/BudgetsApi.js +1 -1
  5. package/dist/apis/CategoriesApi.d.ts +1 -1
  6. package/dist/apis/CategoriesApi.js +1 -1
  7. package/dist/apis/MonthsApi.d.ts +1 -1
  8. package/dist/apis/MonthsApi.js +1 -1
  9. package/dist/apis/PayeeLocationsApi.d.ts +1 -1
  10. package/dist/apis/PayeeLocationsApi.js +1 -1
  11. package/dist/apis/PayeesApi.d.ts +17 -2
  12. package/dist/apis/PayeesApi.js +43 -1
  13. package/dist/apis/ScheduledTransactionsApi.d.ts +1 -1
  14. package/dist/apis/ScheduledTransactionsApi.js +1 -1
  15. package/dist/apis/TransactionsApi.d.ts +9 -9
  16. package/dist/apis/TransactionsApi.js +9 -9
  17. package/dist/apis/UserApi.d.ts +1 -1
  18. package/dist/apis/UserApi.js +1 -1
  19. package/dist/browser/ynab.js +1 -1
  20. package/dist/models/Account.d.ts +8 -8
  21. package/dist/models/Account.js +51 -46
  22. package/dist/models/AccountResponse.d.ts +2 -2
  23. package/dist/models/AccountResponse.js +8 -11
  24. package/dist/models/AccountResponseData.d.ts +2 -2
  25. package/dist/models/AccountResponseData.js +8 -11
  26. package/dist/models/AccountType.d.ts +2 -1
  27. package/dist/models/AccountType.js +13 -2
  28. package/dist/models/AccountsResponse.d.ts +2 -2
  29. package/dist/models/AccountsResponse.js +8 -11
  30. package/dist/models/AccountsResponseData.d.ts +2 -2
  31. package/dist/models/AccountsResponseData.js +11 -13
  32. package/dist/models/BudgetDetail.d.ts +8 -8
  33. package/dist/models/BudgetDetail.js +45 -48
  34. package/dist/models/BudgetDetailResponse.d.ts +2 -2
  35. package/dist/models/BudgetDetailResponse.js +8 -11
  36. package/dist/models/BudgetDetailResponseData.d.ts +2 -2
  37. package/dist/models/BudgetDetailResponseData.js +11 -13
  38. package/dist/models/BudgetSettings.d.ts +2 -2
  39. package/dist/models/BudgetSettings.js +11 -13
  40. package/dist/models/BudgetSettingsResponse.d.ts +2 -2
  41. package/dist/models/BudgetSettingsResponse.js +8 -11
  42. package/dist/models/BudgetSettingsResponseData.d.ts +2 -2
  43. package/dist/models/BudgetSettingsResponseData.js +8 -11
  44. package/dist/models/BudgetSummary.d.ts +4 -4
  45. package/dist/models/BudgetSummary.js +23 -26
  46. package/dist/models/BudgetSummaryResponse.d.ts +2 -2
  47. package/dist/models/BudgetSummaryResponse.js +8 -11
  48. package/dist/models/BudgetSummaryResponseData.d.ts +2 -2
  49. package/dist/models/BudgetSummaryResponseData.js +10 -14
  50. package/dist/models/BulkResponse.d.ts +2 -2
  51. package/dist/models/BulkResponse.js +8 -11
  52. package/dist/models/BulkResponseData.d.ts +2 -2
  53. package/dist/models/BulkResponseData.js +8 -11
  54. package/dist/models/BulkResponseDataBulk.d.ts +2 -2
  55. package/dist/models/BulkResponseDataBulk.js +11 -13
  56. package/dist/models/BulkTransactions.d.ts +5 -5
  57. package/dist/models/BulkTransactions.js +10 -13
  58. package/dist/models/CategoriesResponse.d.ts +2 -2
  59. package/dist/models/CategoriesResponse.js +8 -11
  60. package/dist/models/CategoriesResponseData.d.ts +2 -2
  61. package/dist/models/CategoriesResponseData.js +11 -13
  62. package/dist/models/Category.d.ts +21 -15
  63. package/dist/models/Category.js +61 -56
  64. package/dist/models/CategoryGroup.d.ts +2 -2
  65. package/dist/models/CategoryGroup.js +17 -17
  66. package/dist/models/CategoryGroupWithCategories.d.ts +2 -2
  67. package/dist/models/CategoryGroupWithCategories.js +20 -19
  68. package/dist/models/CategoryResponse.d.ts +2 -2
  69. package/dist/models/CategoryResponse.js +8 -11
  70. package/dist/models/CategoryResponseData.d.ts +2 -2
  71. package/dist/models/CategoryResponseData.js +8 -11
  72. package/dist/models/CurrencyFormat.d.ts +2 -2
  73. package/dist/models/CurrencyFormat.js +29 -25
  74. package/dist/models/DateFormat.d.ts +2 -2
  75. package/dist/models/DateFormat.js +8 -11
  76. package/dist/models/ErrorDetail.d.ts +2 -2
  77. package/dist/models/ErrorDetail.js +14 -15
  78. package/dist/models/ErrorResponse.d.ts +2 -2
  79. package/dist/models/ErrorResponse.js +8 -11
  80. package/dist/models/ExistingTransaction.d.ts +94 -0
  81. package/dist/models/ExistingTransaction.js +68 -0
  82. package/dist/models/HybridTransaction.d.ts +21 -15
  83. package/dist/models/HybridTransaction.js +63 -57
  84. package/dist/models/HybridTransactionsResponse.d.ts +2 -2
  85. package/dist/models/HybridTransactionsResponse.js +8 -11
  86. package/dist/models/HybridTransactionsResponseData.d.ts +2 -2
  87. package/dist/models/HybridTransactionsResponseData.js +10 -14
  88. package/dist/models/MonthDetail.d.ts +4 -4
  89. package/dist/models/MonthDetail.js +30 -28
  90. package/dist/models/MonthDetailResponse.d.ts +2 -2
  91. package/dist/models/MonthDetailResponse.js +8 -11
  92. package/dist/models/MonthDetailResponseData.d.ts +2 -2
  93. package/dist/models/MonthDetailResponseData.js +8 -11
  94. package/dist/models/MonthSummariesResponse.d.ts +2 -2
  95. package/dist/models/MonthSummariesResponse.js +8 -11
  96. package/dist/models/MonthSummariesResponseData.d.ts +2 -2
  97. package/dist/models/MonthSummariesResponseData.js +11 -13
  98. package/dist/models/MonthSummary.d.ts +4 -4
  99. package/dist/models/MonthSummary.js +27 -26
  100. package/dist/models/NewTransaction.d.ts +100 -0
  101. package/dist/models/NewTransaction.js +70 -0
  102. package/dist/models/PatchCategoryWrapper.d.ts +2 -2
  103. package/dist/models/PatchCategoryWrapper.js +8 -11
  104. package/dist/models/PatchMonthCategoryWrapper.d.ts +2 -2
  105. package/dist/models/PatchMonthCategoryWrapper.js +8 -11
  106. package/dist/models/PatchPayeeWrapper.d.ts +32 -0
  107. package/dist/models/PatchPayeeWrapper.js +48 -0
  108. package/dist/models/PatchTransactionsWrapper.d.ts +5 -5
  109. package/dist/models/PatchTransactionsWrapper.js +10 -13
  110. package/dist/models/Payee.d.ts +3 -3
  111. package/dist/models/Payee.js +16 -18
  112. package/dist/models/PayeeLocation.d.ts +2 -2
  113. package/dist/models/PayeeLocation.js +20 -19
  114. package/dist/models/PayeeLocationResponse.d.ts +2 -2
  115. package/dist/models/PayeeLocationResponse.js +8 -11
  116. package/dist/models/PayeeLocationResponseData.d.ts +2 -2
  117. package/dist/models/PayeeLocationResponseData.js +8 -11
  118. package/dist/models/PayeeLocationsResponse.d.ts +2 -2
  119. package/dist/models/PayeeLocationsResponse.js +8 -11
  120. package/dist/models/PayeeLocationsResponseData.d.ts +2 -2
  121. package/dist/models/PayeeLocationsResponseData.js +8 -11
  122. package/dist/models/PayeeResponse.d.ts +2 -2
  123. package/dist/models/PayeeResponse.js +8 -11
  124. package/dist/models/PayeeResponseData.d.ts +2 -2
  125. package/dist/models/PayeeResponseData.js +8 -11
  126. package/dist/models/PayeesResponse.d.ts +2 -2
  127. package/dist/models/PayeesResponse.js +8 -11
  128. package/dist/models/PayeesResponseData.d.ts +2 -2
  129. package/dist/models/PayeesResponseData.js +11 -13
  130. package/dist/models/PostAccountWrapper.d.ts +2 -2
  131. package/dist/models/PostAccountWrapper.js +8 -11
  132. package/dist/models/PostTransactionsWrapper.d.ts +7 -7
  133. package/dist/models/PostTransactionsWrapper.js +10 -15
  134. package/dist/models/PutTransactionWrapper.d.ts +5 -5
  135. package/dist/models/PutTransactionWrapper.js +10 -13
  136. package/dist/models/SaveAccount.d.ts +2 -2
  137. package/dist/models/SaveAccount.js +14 -15
  138. package/dist/models/SaveCategory.d.ts +4 -4
  139. package/dist/models/SaveCategory.js +11 -16
  140. package/dist/models/SaveCategoryResponse.d.ts +2 -2
  141. package/dist/models/SaveCategoryResponse.js +8 -11
  142. package/dist/models/SaveCategoryResponseData.d.ts +2 -2
  143. package/dist/models/SaveCategoryResponseData.js +11 -13
  144. package/dist/models/SaveMonthCategory.d.ts +2 -2
  145. package/dist/models/SaveMonthCategory.js +8 -11
  146. package/dist/models/SavePayee.d.ts +31 -0
  147. package/dist/models/SavePayee.js +45 -0
  148. package/dist/models/SavePayeeResponse.d.ts +32 -0
  149. package/dist/models/SavePayeeResponse.js +48 -0
  150. package/dist/models/SavePayeeResponseData.d.ts +38 -0
  151. package/dist/models/SavePayeeResponseData.js +52 -0
  152. package/dist/models/SaveSubTransaction.d.ts +6 -6
  153. package/dist/models/SaveSubTransaction.js +16 -20
  154. package/dist/models/SaveTransactionWithIdOrImportId.d.ts +106 -0
  155. package/dist/models/SaveTransactionWithIdOrImportId.js +72 -0
  156. package/dist/models/SaveTransactionWithOptionalFields.d.ts +9 -15
  157. package/dist/models/SaveTransactionWithOptionalFields.js +29 -36
  158. package/dist/models/SaveTransactionsResponse.d.ts +2 -2
  159. package/dist/models/SaveTransactionsResponse.js +8 -11
  160. package/dist/models/SaveTransactionsResponseData.d.ts +2 -2
  161. package/dist/models/SaveTransactionsResponseData.js +17 -20
  162. package/dist/models/ScheduledSubTransaction.d.ts +6 -6
  163. package/dist/models/ScheduledSubTransaction.js +25 -26
  164. package/dist/models/ScheduledTransactionDetail.d.ts +16 -10
  165. package/dist/models/ScheduledTransactionDetail.js +49 -43
  166. package/dist/models/ScheduledTransactionResponse.d.ts +2 -2
  167. package/dist/models/ScheduledTransactionResponse.js +8 -11
  168. package/dist/models/ScheduledTransactionResponseData.d.ts +2 -2
  169. package/dist/models/ScheduledTransactionResponseData.js +8 -11
  170. package/dist/models/ScheduledTransactionSummary.d.ts +13 -7
  171. package/dist/models/ScheduledTransactionSummary.js +38 -34
  172. package/dist/models/ScheduledTransactionsResponse.d.ts +2 -2
  173. package/dist/models/ScheduledTransactionsResponse.js +8 -11
  174. package/dist/models/ScheduledTransactionsResponseData.d.ts +2 -2
  175. package/dist/models/ScheduledTransactionsResponseData.js +11 -13
  176. package/dist/models/SubTransaction.d.ts +9 -9
  177. package/dist/models/SubTransaction.js +31 -32
  178. package/dist/models/TransactionClearedStatus.d.ts +2 -1
  179. package/dist/models/TransactionClearedStatus.js +13 -2
  180. package/dist/models/TransactionDetail.d.ts +22 -16
  181. package/dist/models/TransactionDetail.js +62 -56
  182. package/dist/models/TransactionFlagColor.d.ts +2 -1
  183. package/dist/models/TransactionFlagColor.js +13 -2
  184. package/dist/models/TransactionResponse.d.ts +2 -2
  185. package/dist/models/TransactionResponse.js +8 -11
  186. package/dist/models/TransactionResponseData.d.ts +2 -2
  187. package/dist/models/TransactionResponseData.js +8 -11
  188. package/dist/models/TransactionSummary.d.ts +19 -13
  189. package/dist/models/TransactionSummary.js +51 -47
  190. package/dist/models/TransactionsImportResponse.d.ts +2 -2
  191. package/dist/models/TransactionsImportResponse.js +8 -11
  192. package/dist/models/TransactionsImportResponseData.d.ts +2 -2
  193. package/dist/models/TransactionsImportResponseData.js +8 -11
  194. package/dist/models/TransactionsResponse.d.ts +2 -2
  195. package/dist/models/TransactionsResponse.js +8 -11
  196. package/dist/models/TransactionsResponseData.d.ts +2 -2
  197. package/dist/models/TransactionsResponseData.js +11 -13
  198. package/dist/models/User.d.ts +2 -2
  199. package/dist/models/User.js +8 -11
  200. package/dist/models/UserResponse.d.ts +2 -2
  201. package/dist/models/UserResponse.js +8 -11
  202. package/dist/models/UserResponseData.d.ts +2 -2
  203. package/dist/models/UserResponseData.js +8 -11
  204. package/dist/models/index.d.ts +7 -9
  205. package/dist/models/index.js +7 -9
  206. package/dist/runtime.d.ts +1 -1
  207. package/dist/runtime.js +1 -1
  208. package/package.json +1 -1
@@ -5,7 +5,7 @@
5
5
  * YNAB API Endpoints
6
6
  * 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
7
7
  *
8
- * The version of the OpenAPI document: 1.0.0
8
+ * The version of the OpenAPI document: 1.70.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,27 +14,27 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.BudgetDetailToJSON = exports.BudgetDetailFromJSONTyped = exports.BudgetDetailFromJSON = exports.instanceOfBudgetDetail = void 0;
17
- const runtime_1 = require("../runtime");
17
+ const PayeeLocation_1 = require("./PayeeLocation");
18
18
  const Account_1 = require("./Account");
19
+ const ScheduledTransactionSummary_1 = require("./ScheduledTransactionSummary");
19
20
  const Category_1 = require("./Category");
20
- const CategoryGroup_1 = require("./CategoryGroup");
21
21
  const CurrencyFormat_1 = require("./CurrencyFormat");
22
22
  const DateFormat_1 = require("./DateFormat");
23
+ const SubTransaction_1 = require("./SubTransaction");
23
24
  const MonthDetail_1 = require("./MonthDetail");
24
25
  const Payee_1 = require("./Payee");
25
- const PayeeLocation_1 = require("./PayeeLocation");
26
26
  const ScheduledSubTransaction_1 = require("./ScheduledSubTransaction");
27
- const ScheduledTransactionSummary_1 = require("./ScheduledTransactionSummary");
28
- const SubTransaction_1 = require("./SubTransaction");
29
27
  const TransactionSummary_1 = require("./TransactionSummary");
28
+ const CategoryGroup_1 = require("./CategoryGroup");
30
29
  /**
31
30
  * Check if a given object implements the BudgetDetail interface.
32
31
  */
33
32
  function instanceOfBudgetDetail(value) {
34
- let isInstance = true;
35
- isInstance = isInstance && "id" in value;
36
- isInstance = isInstance && "name" in value;
37
- return isInstance;
33
+ if (!('id' in value) || value['id'] === undefined)
34
+ return false;
35
+ if (!('name' in value) || value['name'] === undefined)
36
+ return false;
37
+ return true;
38
38
  }
39
39
  exports.instanceOfBudgetDetail = instanceOfBudgetDetail;
40
40
  function BudgetDetailFromJSON(json) {
@@ -42,55 +42,52 @@ function BudgetDetailFromJSON(json) {
42
42
  }
43
43
  exports.BudgetDetailFromJSON = BudgetDetailFromJSON;
44
44
  function BudgetDetailFromJSONTyped(json, ignoreDiscriminator) {
45
- if ((json === undefined) || (json === null)) {
45
+ if (json == null) {
46
46
  return json;
47
47
  }
48
48
  return {
49
49
  'id': json['id'],
50
50
  'name': json['name'],
51
- 'last_modified_on': !(0, runtime_1.exists)(json, 'last_modified_on') ? undefined : json['last_modified_on'],
52
- 'first_month': !(0, runtime_1.exists)(json, 'first_month') ? undefined : json['first_month'],
53
- 'last_month': !(0, runtime_1.exists)(json, 'last_month') ? undefined : json['last_month'],
54
- 'date_format': !(0, runtime_1.exists)(json, 'date_format') ? undefined : (0, DateFormat_1.DateFormatFromJSON)(json['date_format']),
55
- 'currency_format': !(0, runtime_1.exists)(json, 'currency_format') ? undefined : (0, CurrencyFormat_1.CurrencyFormatFromJSON)(json['currency_format']),
56
- 'accounts': !(0, runtime_1.exists)(json, 'accounts') ? undefined : (json['accounts'].map(Account_1.AccountFromJSON)),
57
- 'payees': !(0, runtime_1.exists)(json, 'payees') ? undefined : (json['payees'].map(Payee_1.PayeeFromJSON)),
58
- 'payee_locations': !(0, runtime_1.exists)(json, 'payee_locations') ? undefined : (json['payee_locations'].map(PayeeLocation_1.PayeeLocationFromJSON)),
59
- 'category_groups': !(0, runtime_1.exists)(json, 'category_groups') ? undefined : (json['category_groups'].map(CategoryGroup_1.CategoryGroupFromJSON)),
60
- 'categories': !(0, runtime_1.exists)(json, 'categories') ? undefined : (json['categories'].map(Category_1.CategoryFromJSON)),
61
- 'months': !(0, runtime_1.exists)(json, 'months') ? undefined : (json['months'].map(MonthDetail_1.MonthDetailFromJSON)),
62
- 'transactions': !(0, runtime_1.exists)(json, 'transactions') ? undefined : (json['transactions'].map(TransactionSummary_1.TransactionSummaryFromJSON)),
63
- 'subtransactions': !(0, runtime_1.exists)(json, 'subtransactions') ? undefined : (json['subtransactions'].map(SubTransaction_1.SubTransactionFromJSON)),
64
- 'scheduled_transactions': !(0, runtime_1.exists)(json, 'scheduled_transactions') ? undefined : (json['scheduled_transactions'].map(ScheduledTransactionSummary_1.ScheduledTransactionSummaryFromJSON)),
65
- 'scheduled_subtransactions': !(0, runtime_1.exists)(json, 'scheduled_subtransactions') ? undefined : (json['scheduled_subtransactions'].map(ScheduledSubTransaction_1.ScheduledSubTransactionFromJSON)),
51
+ 'last_modified_on': json['last_modified_on'] == null ? undefined : json['last_modified_on'],
52
+ 'first_month': json['first_month'] == null ? undefined : json['first_month'],
53
+ 'last_month': json['last_month'] == null ? undefined : json['last_month'],
54
+ 'date_format': json['date_format'] == null ? undefined : (0, DateFormat_1.DateFormatFromJSON)(json['date_format']),
55
+ 'currency_format': json['currency_format'] == null ? undefined : (0, CurrencyFormat_1.CurrencyFormatFromJSON)(json['currency_format']),
56
+ 'accounts': json['accounts'] == null ? undefined : (json['accounts'].map(Account_1.AccountFromJSON)),
57
+ 'payees': json['payees'] == null ? undefined : (json['payees'].map(Payee_1.PayeeFromJSON)),
58
+ 'payee_locations': json['payee_locations'] == null ? undefined : (json['payee_locations'].map(PayeeLocation_1.PayeeLocationFromJSON)),
59
+ 'category_groups': json['category_groups'] == null ? undefined : (json['category_groups'].map(CategoryGroup_1.CategoryGroupFromJSON)),
60
+ 'categories': json['categories'] == null ? undefined : (json['categories'].map(Category_1.CategoryFromJSON)),
61
+ 'months': json['months'] == null ? undefined : (json['months'].map(MonthDetail_1.MonthDetailFromJSON)),
62
+ 'transactions': json['transactions'] == null ? undefined : (json['transactions'].map(TransactionSummary_1.TransactionSummaryFromJSON)),
63
+ 'subtransactions': json['subtransactions'] == null ? undefined : (json['subtransactions'].map(SubTransaction_1.SubTransactionFromJSON)),
64
+ 'scheduled_transactions': json['scheduled_transactions'] == null ? undefined : (json['scheduled_transactions'].map(ScheduledTransactionSummary_1.ScheduledTransactionSummaryFromJSON)),
65
+ 'scheduled_subtransactions': json['scheduled_subtransactions'] == null ? undefined : (json['scheduled_subtransactions'].map(ScheduledSubTransaction_1.ScheduledSubTransactionFromJSON)),
66
66
  };
67
67
  }
68
68
  exports.BudgetDetailFromJSONTyped = BudgetDetailFromJSONTyped;
69
69
  function BudgetDetailToJSON(value) {
70
- if (value === undefined) {
71
- return undefined;
72
- }
73
- if (value === null) {
74
- return null;
70
+ if (value == null) {
71
+ return value;
75
72
  }
76
73
  return {
77
- 'id': value.id,
78
- 'name': value.name,
79
- 'last_modified_on': value.last_modified_on,
80
- 'first_month': value.first_month,
81
- 'last_month': value.last_month,
82
- 'date_format': (0, DateFormat_1.DateFormatToJSON)(value.date_format),
83
- 'currency_format': (0, CurrencyFormat_1.CurrencyFormatToJSON)(value.currency_format),
84
- 'accounts': value.accounts === undefined ? undefined : (value.accounts.map(Account_1.AccountToJSON)),
85
- 'payees': value.payees === undefined ? undefined : (value.payees.map(Payee_1.PayeeToJSON)),
86
- 'payee_locations': value.payee_locations === undefined ? undefined : (value.payee_locations.map(PayeeLocation_1.PayeeLocationToJSON)),
87
- 'category_groups': value.category_groups === undefined ? undefined : (value.category_groups.map(CategoryGroup_1.CategoryGroupToJSON)),
88
- 'categories': value.categories === undefined ? undefined : (value.categories.map(Category_1.CategoryToJSON)),
89
- 'months': value.months === undefined ? undefined : (value.months.map(MonthDetail_1.MonthDetailToJSON)),
90
- 'transactions': value.transactions === undefined ? undefined : (value.transactions.map(TransactionSummary_1.TransactionSummaryToJSON)),
91
- 'subtransactions': value.subtransactions === undefined ? undefined : (value.subtransactions.map(SubTransaction_1.SubTransactionToJSON)),
92
- 'scheduled_transactions': value.scheduled_transactions === undefined ? undefined : (value.scheduled_transactions.map(ScheduledTransactionSummary_1.ScheduledTransactionSummaryToJSON)),
93
- 'scheduled_subtransactions': value.scheduled_subtransactions === undefined ? undefined : (value.scheduled_subtransactions.map(ScheduledSubTransaction_1.ScheduledSubTransactionToJSON)),
74
+ 'id': value['id'],
75
+ 'name': value['name'],
76
+ 'last_modified_on': value['last_modified_on'],
77
+ 'first_month': value['first_month'],
78
+ 'last_month': value['last_month'],
79
+ 'date_format': (0, DateFormat_1.DateFormatToJSON)(value['date_format']),
80
+ 'currency_format': (0, CurrencyFormat_1.CurrencyFormatToJSON)(value['currency_format']),
81
+ 'accounts': value['accounts'] == null ? undefined : (value['accounts'].map(Account_1.AccountToJSON)),
82
+ 'payees': value['payees'] == null ? undefined : (value['payees'].map(Payee_1.PayeeToJSON)),
83
+ 'payee_locations': value['payee_locations'] == null ? undefined : (value['payee_locations'].map(PayeeLocation_1.PayeeLocationToJSON)),
84
+ 'category_groups': value['category_groups'] == null ? undefined : (value['category_groups'].map(CategoryGroup_1.CategoryGroupToJSON)),
85
+ 'categories': value['categories'] == null ? undefined : (value['categories'].map(Category_1.CategoryToJSON)),
86
+ 'months': value['months'] == null ? undefined : (value['months'].map(MonthDetail_1.MonthDetailToJSON)),
87
+ 'transactions': value['transactions'] == null ? undefined : (value['transactions'].map(TransactionSummary_1.TransactionSummaryToJSON)),
88
+ 'subtransactions': value['subtransactions'] == null ? undefined : (value['subtransactions'].map(SubTransaction_1.SubTransactionToJSON)),
89
+ 'scheduled_transactions': value['scheduled_transactions'] == null ? undefined : (value['scheduled_transactions'].map(ScheduledTransactionSummary_1.ScheduledTransactionSummaryToJSON)),
90
+ 'scheduled_subtransactions': value['scheduled_subtransactions'] == null ? undefined : (value['scheduled_subtransactions'].map(ScheduledSubTransaction_1.ScheduledSubTransactionToJSON)),
94
91
  };
95
92
  }
96
93
  exports.BudgetDetailToJSON = BudgetDetailToJSON;
@@ -2,7 +2,7 @@
2
2
  * YNAB API Endpoints
3
3
  * 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
4
  *
5
- * The version of the OpenAPI document: 1.0.0
5
+ * The version of the OpenAPI document: 1.70.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -26,7 +26,7 @@ export interface BudgetDetailResponse {
26
26
  /**
27
27
  * Check if a given object implements the BudgetDetailResponse interface.
28
28
  */
29
- export declare function instanceOfBudgetDetailResponse(value: object): boolean;
29
+ export declare function instanceOfBudgetDetailResponse(value: object): value is BudgetDetailResponse;
30
30
  export declare function BudgetDetailResponseFromJSON(json: any): BudgetDetailResponse;
31
31
  export declare function BudgetDetailResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BudgetDetailResponse;
32
32
  export declare function BudgetDetailResponseToJSON(value?: BudgetDetailResponse | null): any;
@@ -5,7 +5,7 @@
5
5
  * YNAB API Endpoints
6
6
  * 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
7
7
  *
8
- * The version of the OpenAPI document: 1.0.0
8
+ * The version of the OpenAPI document: 1.70.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -19,9 +19,9 @@ const BudgetDetailResponseData_1 = require("./BudgetDetailResponseData");
19
19
  * Check if a given object implements the BudgetDetailResponse interface.
20
20
  */
21
21
  function instanceOfBudgetDetailResponse(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "data" in value;
24
- return isInstance;
22
+ if (!('data' in value) || value['data'] === undefined)
23
+ return false;
24
+ return true;
25
25
  }
26
26
  exports.instanceOfBudgetDetailResponse = instanceOfBudgetDetailResponse;
27
27
  function BudgetDetailResponseFromJSON(json) {
@@ -29,7 +29,7 @@ function BudgetDetailResponseFromJSON(json) {
29
29
  }
30
30
  exports.BudgetDetailResponseFromJSON = BudgetDetailResponseFromJSON;
31
31
  function BudgetDetailResponseFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
32
+ if (json == null) {
33
33
  return json;
34
34
  }
35
35
  return {
@@ -38,14 +38,11 @@ function BudgetDetailResponseFromJSONTyped(json, ignoreDiscriminator) {
38
38
  }
39
39
  exports.BudgetDetailResponseFromJSONTyped = BudgetDetailResponseFromJSONTyped;
40
40
  function BudgetDetailResponseToJSON(value) {
41
- if (value === undefined) {
42
- return undefined;
43
- }
44
- if (value === null) {
45
- return null;
41
+ if (value == null) {
42
+ return value;
46
43
  }
47
44
  return {
48
- 'data': (0, BudgetDetailResponseData_1.BudgetDetailResponseDataToJSON)(value.data),
45
+ 'data': (0, BudgetDetailResponseData_1.BudgetDetailResponseDataToJSON)(value['data']),
49
46
  };
50
47
  }
51
48
  exports.BudgetDetailResponseToJSON = BudgetDetailResponseToJSON;
@@ -2,7 +2,7 @@
2
2
  * YNAB API Endpoints
3
3
  * 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
4
  *
5
- * The version of the OpenAPI document: 1.0.0
5
+ * The version of the OpenAPI document: 1.70.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -32,7 +32,7 @@ export interface BudgetDetailResponseData {
32
32
  /**
33
33
  * Check if a given object implements the BudgetDetailResponseData interface.
34
34
  */
35
- export declare function instanceOfBudgetDetailResponseData(value: object): boolean;
35
+ export declare function instanceOfBudgetDetailResponseData(value: object): value is BudgetDetailResponseData;
36
36
  export declare function BudgetDetailResponseDataFromJSON(json: any): BudgetDetailResponseData;
37
37
  export declare function BudgetDetailResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BudgetDetailResponseData;
38
38
  export declare function BudgetDetailResponseDataToJSON(value?: BudgetDetailResponseData | null): any;
@@ -5,7 +5,7 @@
5
5
  * YNAB API Endpoints
6
6
  * 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
7
7
  *
8
- * The version of the OpenAPI document: 1.0.0
8
+ * The version of the OpenAPI document: 1.70.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -19,10 +19,11 @@ const BudgetDetail_1 = require("./BudgetDetail");
19
19
  * Check if a given object implements the BudgetDetailResponseData interface.
20
20
  */
21
21
  function instanceOfBudgetDetailResponseData(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "budget" in value;
24
- isInstance = isInstance && "server_knowledge" in value;
25
- return isInstance;
22
+ if (!('budget' in value) || value['budget'] === undefined)
23
+ return false;
24
+ if (!('server_knowledge' in value) || value['server_knowledge'] === undefined)
25
+ return false;
26
+ return true;
26
27
  }
27
28
  exports.instanceOfBudgetDetailResponseData = instanceOfBudgetDetailResponseData;
28
29
  function BudgetDetailResponseDataFromJSON(json) {
@@ -30,7 +31,7 @@ function BudgetDetailResponseDataFromJSON(json) {
30
31
  }
31
32
  exports.BudgetDetailResponseDataFromJSON = BudgetDetailResponseDataFromJSON;
32
33
  function BudgetDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
33
- if ((json === undefined) || (json === null)) {
34
+ if (json == null) {
34
35
  return json;
35
36
  }
36
37
  return {
@@ -40,15 +41,12 @@ function BudgetDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
40
41
  }
41
42
  exports.BudgetDetailResponseDataFromJSONTyped = BudgetDetailResponseDataFromJSONTyped;
42
43
  function BudgetDetailResponseDataToJSON(value) {
43
- if (value === undefined) {
44
- return undefined;
45
- }
46
- if (value === null) {
47
- return null;
44
+ if (value == null) {
45
+ return value;
48
46
  }
49
47
  return {
50
- 'budget': (0, BudgetDetail_1.BudgetDetailToJSON)(value.budget),
51
- 'server_knowledge': value.server_knowledge,
48
+ 'budget': (0, BudgetDetail_1.BudgetDetailToJSON)(value['budget']),
49
+ 'server_knowledge': value['server_knowledge'],
52
50
  };
53
51
  }
54
52
  exports.BudgetDetailResponseDataToJSON = BudgetDetailResponseDataToJSON;
@@ -2,7 +2,7 @@
2
2
  * YNAB API Endpoints
3
3
  * 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
4
  *
5
- * The version of the OpenAPI document: 1.0.0
5
+ * The version of the OpenAPI document: 1.70.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -33,7 +33,7 @@ export interface BudgetSettings {
33
33
  /**
34
34
  * Check if a given object implements the BudgetSettings interface.
35
35
  */
36
- export declare function instanceOfBudgetSettings(value: object): boolean;
36
+ export declare function instanceOfBudgetSettings(value: object): value is BudgetSettings;
37
37
  export declare function BudgetSettingsFromJSON(json: any): BudgetSettings;
38
38
  export declare function BudgetSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): BudgetSettings;
39
39
  export declare function BudgetSettingsToJSON(value?: BudgetSettings | null): any;
@@ -5,7 +5,7 @@
5
5
  * YNAB API Endpoints
6
6
  * 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
7
7
  *
8
- * The version of the OpenAPI document: 1.0.0
8
+ * The version of the OpenAPI document: 1.70.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -20,10 +20,11 @@ const DateFormat_1 = require("./DateFormat");
20
20
  * Check if a given object implements the BudgetSettings interface.
21
21
  */
22
22
  function instanceOfBudgetSettings(value) {
23
- let isInstance = true;
24
- isInstance = isInstance && "date_format" in value;
25
- isInstance = isInstance && "currency_format" in value;
26
- return isInstance;
23
+ if (!('date_format' in value) || value['date_format'] === undefined)
24
+ return false;
25
+ if (!('currency_format' in value) || value['currency_format'] === undefined)
26
+ return false;
27
+ return true;
27
28
  }
28
29
  exports.instanceOfBudgetSettings = instanceOfBudgetSettings;
29
30
  function BudgetSettingsFromJSON(json) {
@@ -31,7 +32,7 @@ function BudgetSettingsFromJSON(json) {
31
32
  }
32
33
  exports.BudgetSettingsFromJSON = BudgetSettingsFromJSON;
33
34
  function BudgetSettingsFromJSONTyped(json, ignoreDiscriminator) {
34
- if ((json === undefined) || (json === null)) {
35
+ if (json == null) {
35
36
  return json;
36
37
  }
37
38
  return {
@@ -41,15 +42,12 @@ function BudgetSettingsFromJSONTyped(json, ignoreDiscriminator) {
41
42
  }
42
43
  exports.BudgetSettingsFromJSONTyped = BudgetSettingsFromJSONTyped;
43
44
  function BudgetSettingsToJSON(value) {
44
- if (value === undefined) {
45
- return undefined;
46
- }
47
- if (value === null) {
48
- return null;
45
+ if (value == null) {
46
+ return value;
49
47
  }
50
48
  return {
51
- 'date_format': (0, DateFormat_1.DateFormatToJSON)(value.date_format),
52
- 'currency_format': (0, CurrencyFormat_1.CurrencyFormatToJSON)(value.currency_format),
49
+ 'date_format': (0, DateFormat_1.DateFormatToJSON)(value['date_format']),
50
+ 'currency_format': (0, CurrencyFormat_1.CurrencyFormatToJSON)(value['currency_format']),
53
51
  };
54
52
  }
55
53
  exports.BudgetSettingsToJSON = BudgetSettingsToJSON;
@@ -2,7 +2,7 @@
2
2
  * YNAB API Endpoints
3
3
  * 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
4
  *
5
- * The version of the OpenAPI document: 1.0.0
5
+ * The version of the OpenAPI document: 1.70.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -26,7 +26,7 @@ export interface BudgetSettingsResponse {
26
26
  /**
27
27
  * Check if a given object implements the BudgetSettingsResponse interface.
28
28
  */
29
- export declare function instanceOfBudgetSettingsResponse(value: object): boolean;
29
+ export declare function instanceOfBudgetSettingsResponse(value: object): value is BudgetSettingsResponse;
30
30
  export declare function BudgetSettingsResponseFromJSON(json: any): BudgetSettingsResponse;
31
31
  export declare function BudgetSettingsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BudgetSettingsResponse;
32
32
  export declare function BudgetSettingsResponseToJSON(value?: BudgetSettingsResponse | null): any;
@@ -5,7 +5,7 @@
5
5
  * YNAB API Endpoints
6
6
  * 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
7
7
  *
8
- * The version of the OpenAPI document: 1.0.0
8
+ * The version of the OpenAPI document: 1.70.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -19,9 +19,9 @@ const BudgetSettingsResponseData_1 = require("./BudgetSettingsResponseData");
19
19
  * Check if a given object implements the BudgetSettingsResponse interface.
20
20
  */
21
21
  function instanceOfBudgetSettingsResponse(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "data" in value;
24
- return isInstance;
22
+ if (!('data' in value) || value['data'] === undefined)
23
+ return false;
24
+ return true;
25
25
  }
26
26
  exports.instanceOfBudgetSettingsResponse = instanceOfBudgetSettingsResponse;
27
27
  function BudgetSettingsResponseFromJSON(json) {
@@ -29,7 +29,7 @@ function BudgetSettingsResponseFromJSON(json) {
29
29
  }
30
30
  exports.BudgetSettingsResponseFromJSON = BudgetSettingsResponseFromJSON;
31
31
  function BudgetSettingsResponseFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
32
+ if (json == null) {
33
33
  return json;
34
34
  }
35
35
  return {
@@ -38,14 +38,11 @@ function BudgetSettingsResponseFromJSONTyped(json, ignoreDiscriminator) {
38
38
  }
39
39
  exports.BudgetSettingsResponseFromJSONTyped = BudgetSettingsResponseFromJSONTyped;
40
40
  function BudgetSettingsResponseToJSON(value) {
41
- if (value === undefined) {
42
- return undefined;
43
- }
44
- if (value === null) {
45
- return null;
41
+ if (value == null) {
42
+ return value;
46
43
  }
47
44
  return {
48
- 'data': (0, BudgetSettingsResponseData_1.BudgetSettingsResponseDataToJSON)(value.data),
45
+ 'data': (0, BudgetSettingsResponseData_1.BudgetSettingsResponseDataToJSON)(value['data']),
49
46
  };
50
47
  }
51
48
  exports.BudgetSettingsResponseToJSON = BudgetSettingsResponseToJSON;
@@ -2,7 +2,7 @@
2
2
  * YNAB API Endpoints
3
3
  * 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
4
  *
5
- * The version of the OpenAPI document: 1.0.0
5
+ * The version of the OpenAPI document: 1.70.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -26,7 +26,7 @@ export interface BudgetSettingsResponseData {
26
26
  /**
27
27
  * Check if a given object implements the BudgetSettingsResponseData interface.
28
28
  */
29
- export declare function instanceOfBudgetSettingsResponseData(value: object): boolean;
29
+ export declare function instanceOfBudgetSettingsResponseData(value: object): value is BudgetSettingsResponseData;
30
30
  export declare function BudgetSettingsResponseDataFromJSON(json: any): BudgetSettingsResponseData;
31
31
  export declare function BudgetSettingsResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BudgetSettingsResponseData;
32
32
  export declare function BudgetSettingsResponseDataToJSON(value?: BudgetSettingsResponseData | null): any;
@@ -5,7 +5,7 @@
5
5
  * YNAB API Endpoints
6
6
  * 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
7
7
  *
8
- * The version of the OpenAPI document: 1.0.0
8
+ * The version of the OpenAPI document: 1.70.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -19,9 +19,9 @@ const BudgetSettings_1 = require("./BudgetSettings");
19
19
  * Check if a given object implements the BudgetSettingsResponseData interface.
20
20
  */
21
21
  function instanceOfBudgetSettingsResponseData(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "settings" in value;
24
- return isInstance;
22
+ if (!('settings' in value) || value['settings'] === undefined)
23
+ return false;
24
+ return true;
25
25
  }
26
26
  exports.instanceOfBudgetSettingsResponseData = instanceOfBudgetSettingsResponseData;
27
27
  function BudgetSettingsResponseDataFromJSON(json) {
@@ -29,7 +29,7 @@ function BudgetSettingsResponseDataFromJSON(json) {
29
29
  }
30
30
  exports.BudgetSettingsResponseDataFromJSON = BudgetSettingsResponseDataFromJSON;
31
31
  function BudgetSettingsResponseDataFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
32
+ if (json == null) {
33
33
  return json;
34
34
  }
35
35
  return {
@@ -38,14 +38,11 @@ function BudgetSettingsResponseDataFromJSONTyped(json, ignoreDiscriminator) {
38
38
  }
39
39
  exports.BudgetSettingsResponseDataFromJSONTyped = BudgetSettingsResponseDataFromJSONTyped;
40
40
  function BudgetSettingsResponseDataToJSON(value) {
41
- if (value === undefined) {
42
- return undefined;
43
- }
44
- if (value === null) {
45
- return null;
41
+ if (value == null) {
42
+ return value;
46
43
  }
47
44
  return {
48
- 'settings': (0, BudgetSettings_1.BudgetSettingsToJSON)(value.settings),
45
+ 'settings': (0, BudgetSettings_1.BudgetSettingsToJSON)(value['settings']),
49
46
  };
50
47
  }
51
48
  exports.BudgetSettingsResponseDataToJSON = BudgetSettingsResponseDataToJSON;
@@ -2,7 +2,7 @@
2
2
  * YNAB API Endpoints
3
3
  * 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
4
  *
5
- * The version of the OpenAPI document: 1.0.0
5
+ * The version of the OpenAPI document: 1.70.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -53,13 +53,13 @@ export interface BudgetSummary {
53
53
  * @type {DateFormat}
54
54
  * @memberof BudgetSummary
55
55
  */
56
- date_format?: DateFormat | null;
56
+ date_format?: DateFormat;
57
57
  /**
58
58
  *
59
59
  * @type {CurrencyFormat}
60
60
  * @memberof BudgetSummary
61
61
  */
62
- currency_format?: CurrencyFormat | null;
62
+ currency_format?: CurrencyFormat;
63
63
  /**
64
64
  * The budget accounts (only included if `include_accounts=true` specified as query parameter)
65
65
  * @type {Array<Account>}
@@ -70,7 +70,7 @@ export interface BudgetSummary {
70
70
  /**
71
71
  * Check if a given object implements the BudgetSummary interface.
72
72
  */
73
- export declare function instanceOfBudgetSummary(value: object): boolean;
73
+ export declare function instanceOfBudgetSummary(value: object): value is BudgetSummary;
74
74
  export declare function BudgetSummaryFromJSON(json: any): BudgetSummary;
75
75
  export declare function BudgetSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): BudgetSummary;
76
76
  export declare function BudgetSummaryToJSON(value?: BudgetSummary | null): any;
@@ -5,7 +5,7 @@
5
5
  * YNAB API Endpoints
6
6
  * 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
7
7
  *
8
- * The version of the OpenAPI document: 1.0.0
8
+ * The version of the OpenAPI document: 1.70.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,7 +14,6 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.BudgetSummaryToJSON = exports.BudgetSummaryFromJSONTyped = exports.BudgetSummaryFromJSON = exports.instanceOfBudgetSummary = void 0;
17
- const runtime_1 = require("../runtime");
18
17
  const Account_1 = require("./Account");
19
18
  const CurrencyFormat_1 = require("./CurrencyFormat");
20
19
  const DateFormat_1 = require("./DateFormat");
@@ -22,10 +21,11 @@ const DateFormat_1 = require("./DateFormat");
22
21
  * Check if a given object implements the BudgetSummary interface.
23
22
  */
24
23
  function instanceOfBudgetSummary(value) {
25
- let isInstance = true;
26
- isInstance = isInstance && "id" in value;
27
- isInstance = isInstance && "name" in value;
28
- return isInstance;
24
+ if (!('id' in value) || value['id'] === undefined)
25
+ return false;
26
+ if (!('name' in value) || value['name'] === undefined)
27
+ return false;
28
+ return true;
29
29
  }
30
30
  exports.instanceOfBudgetSummary = instanceOfBudgetSummary;
31
31
  function BudgetSummaryFromJSON(json) {
@@ -33,37 +33,34 @@ function BudgetSummaryFromJSON(json) {
33
33
  }
34
34
  exports.BudgetSummaryFromJSON = BudgetSummaryFromJSON;
35
35
  function BudgetSummaryFromJSONTyped(json, ignoreDiscriminator) {
36
- if ((json === undefined) || (json === null)) {
36
+ if (json == null) {
37
37
  return json;
38
38
  }
39
39
  return {
40
40
  'id': json['id'],
41
41
  'name': json['name'],
42
- 'last_modified_on': !(0, runtime_1.exists)(json, 'last_modified_on') ? undefined : json['last_modified_on'],
43
- 'first_month': !(0, runtime_1.exists)(json, 'first_month') ? undefined : json['first_month'],
44
- 'last_month': !(0, runtime_1.exists)(json, 'last_month') ? undefined : json['last_month'],
45
- 'date_format': !(0, runtime_1.exists)(json, 'date_format') ? undefined : (0, DateFormat_1.DateFormatFromJSON)(json['date_format']),
46
- 'currency_format': !(0, runtime_1.exists)(json, 'currency_format') ? undefined : (0, CurrencyFormat_1.CurrencyFormatFromJSON)(json['currency_format']),
47
- 'accounts': !(0, runtime_1.exists)(json, 'accounts') ? undefined : (json['accounts'].map(Account_1.AccountFromJSON)),
42
+ 'last_modified_on': json['last_modified_on'] == null ? undefined : json['last_modified_on'],
43
+ 'first_month': json['first_month'] == null ? undefined : json['first_month'],
44
+ 'last_month': json['last_month'] == null ? undefined : json['last_month'],
45
+ 'date_format': json['date_format'] == null ? undefined : (0, DateFormat_1.DateFormatFromJSON)(json['date_format']),
46
+ 'currency_format': json['currency_format'] == null ? undefined : (0, CurrencyFormat_1.CurrencyFormatFromJSON)(json['currency_format']),
47
+ 'accounts': json['accounts'] == null ? undefined : (json['accounts'].map(Account_1.AccountFromJSON)),
48
48
  };
49
49
  }
50
50
  exports.BudgetSummaryFromJSONTyped = BudgetSummaryFromJSONTyped;
51
51
  function BudgetSummaryToJSON(value) {
52
- if (value === undefined) {
53
- return undefined;
54
- }
55
- if (value === null) {
56
- return null;
52
+ if (value == null) {
53
+ return value;
57
54
  }
58
55
  return {
59
- 'id': value.id,
60
- 'name': value.name,
61
- 'last_modified_on': value.last_modified_on,
62
- 'first_month': value.first_month,
63
- 'last_month': value.last_month,
64
- 'date_format': (0, DateFormat_1.DateFormatToJSON)(value.date_format),
65
- 'currency_format': (0, CurrencyFormat_1.CurrencyFormatToJSON)(value.currency_format),
66
- 'accounts': value.accounts === undefined ? undefined : (value.accounts.map(Account_1.AccountToJSON)),
56
+ 'id': value['id'],
57
+ 'name': value['name'],
58
+ 'last_modified_on': value['last_modified_on'],
59
+ 'first_month': value['first_month'],
60
+ 'last_month': value['last_month'],
61
+ 'date_format': (0, DateFormat_1.DateFormatToJSON)(value['date_format']),
62
+ 'currency_format': (0, CurrencyFormat_1.CurrencyFormatToJSON)(value['currency_format']),
63
+ 'accounts': value['accounts'] == null ? undefined : (value['accounts'].map(Account_1.AccountToJSON)),
67
64
  };
68
65
  }
69
66
  exports.BudgetSummaryToJSON = BudgetSummaryToJSON;
@@ -2,7 +2,7 @@
2
2
  * YNAB API Endpoints
3
3
  * 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
4
  *
5
- * The version of the OpenAPI document: 1.0.0
5
+ * The version of the OpenAPI document: 1.70.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -26,7 +26,7 @@ export interface BudgetSummaryResponse {
26
26
  /**
27
27
  * Check if a given object implements the BudgetSummaryResponse interface.
28
28
  */
29
- export declare function instanceOfBudgetSummaryResponse(value: object): boolean;
29
+ export declare function instanceOfBudgetSummaryResponse(value: object): value is BudgetSummaryResponse;
30
30
  export declare function BudgetSummaryResponseFromJSON(json: any): BudgetSummaryResponse;
31
31
  export declare function BudgetSummaryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BudgetSummaryResponse;
32
32
  export declare function BudgetSummaryResponseToJSON(value?: BudgetSummaryResponse | null): any;