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,9 +14,8 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.ScheduledTransactionDetailToJSON = exports.ScheduledTransactionDetailFromJSONTyped = exports.ScheduledTransactionDetailFromJSON = exports.instanceOfScheduledTransactionDetail = exports.ScheduledTransactionDetailFrequencyEnum = void 0;
17
- const runtime_1 = require("../runtime");
18
- const ScheduledSubTransaction_1 = require("./ScheduledSubTransaction");
19
17
  const TransactionFlagColor_1 = require("./TransactionFlagColor");
18
+ const ScheduledSubTransaction_1 = require("./ScheduledSubTransaction");
20
19
  /**
21
20
  * @export
22
21
  */
@@ -39,17 +38,25 @@ exports.ScheduledTransactionDetailFrequencyEnum = {
39
38
  * Check if a given object implements the ScheduledTransactionDetail interface.
40
39
  */
41
40
  function instanceOfScheduledTransactionDetail(value) {
42
- let isInstance = true;
43
- isInstance = isInstance && "id" in value;
44
- isInstance = isInstance && "date_first" in value;
45
- isInstance = isInstance && "date_next" in value;
46
- isInstance = isInstance && "frequency" in value;
47
- isInstance = isInstance && "amount" in value;
48
- isInstance = isInstance && "account_id" in value;
49
- isInstance = isInstance && "deleted" in value;
50
- isInstance = isInstance && "account_name" in value;
51
- isInstance = isInstance && "subtransactions" in value;
52
- return isInstance;
41
+ if (!('id' in value) || value['id'] === undefined)
42
+ return false;
43
+ if (!('date_first' in value) || value['date_first'] === undefined)
44
+ return false;
45
+ if (!('date_next' in value) || value['date_next'] === undefined)
46
+ return false;
47
+ if (!('frequency' in value) || value['frequency'] === undefined)
48
+ return false;
49
+ if (!('amount' in value) || value['amount'] === undefined)
50
+ return false;
51
+ if (!('account_id' in value) || value['account_id'] === undefined)
52
+ return false;
53
+ if (!('deleted' in value) || value['deleted'] === undefined)
54
+ return false;
55
+ if (!('account_name' in value) || value['account_name'] === undefined)
56
+ return false;
57
+ if (!('subtransactions' in value) || value['subtransactions'] === undefined)
58
+ return false;
59
+ return true;
53
60
  }
54
61
  exports.instanceOfScheduledTransactionDetail = instanceOfScheduledTransactionDetail;
55
62
  function ScheduledTransactionDetailFromJSON(json) {
@@ -57,7 +64,7 @@ function ScheduledTransactionDetailFromJSON(json) {
57
64
  }
58
65
  exports.ScheduledTransactionDetailFromJSON = ScheduledTransactionDetailFromJSON;
59
66
  function ScheduledTransactionDetailFromJSONTyped(json, ignoreDiscriminator) {
60
- if ((json === undefined) || (json === null)) {
67
+ if (json == null) {
61
68
  return json;
62
69
  }
63
70
  return {
@@ -66,44 +73,43 @@ function ScheduledTransactionDetailFromJSONTyped(json, ignoreDiscriminator) {
66
73
  'date_next': json['date_next'],
67
74
  'frequency': json['frequency'],
68
75
  'amount': json['amount'],
69
- 'memo': !(0, runtime_1.exists)(json, 'memo') ? undefined : json['memo'],
70
- 'flag_color': !(0, runtime_1.exists)(json, 'flag_color') ? undefined : (0, TransactionFlagColor_1.TransactionFlagColorFromJSON)(json['flag_color']),
76
+ 'memo': json['memo'] == null ? undefined : json['memo'],
77
+ 'flag_color': json['flag_color'] == null ? undefined : (0, TransactionFlagColor_1.TransactionFlagColorFromJSON)(json['flag_color']),
78
+ 'flag_name': json['flag_name'] == null ? undefined : json['flag_name'],
71
79
  'account_id': json['account_id'],
72
- 'payee_id': !(0, runtime_1.exists)(json, 'payee_id') ? undefined : json['payee_id'],
73
- 'category_id': !(0, runtime_1.exists)(json, 'category_id') ? undefined : json['category_id'],
74
- 'transfer_account_id': !(0, runtime_1.exists)(json, 'transfer_account_id') ? undefined : json['transfer_account_id'],
80
+ 'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
81
+ 'category_id': json['category_id'] == null ? undefined : json['category_id'],
82
+ 'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
75
83
  'deleted': json['deleted'],
76
84
  'account_name': json['account_name'],
77
- 'payee_name': !(0, runtime_1.exists)(json, 'payee_name') ? undefined : json['payee_name'],
78
- 'category_name': !(0, runtime_1.exists)(json, 'category_name') ? undefined : json['category_name'],
85
+ 'payee_name': json['payee_name'] == null ? undefined : json['payee_name'],
86
+ 'category_name': json['category_name'] == null ? undefined : json['category_name'],
79
87
  'subtransactions': (json['subtransactions'].map(ScheduledSubTransaction_1.ScheduledSubTransactionFromJSON)),
80
88
  };
81
89
  }
82
90
  exports.ScheduledTransactionDetailFromJSONTyped = ScheduledTransactionDetailFromJSONTyped;
83
91
  function ScheduledTransactionDetailToJSON(value) {
84
- if (value === undefined) {
85
- return undefined;
86
- }
87
- if (value === null) {
88
- return null;
92
+ if (value == null) {
93
+ return value;
89
94
  }
90
95
  return {
91
- 'id': value.id,
92
- 'date_first': value.date_first,
93
- 'date_next': value.date_next,
94
- 'frequency': value.frequency,
95
- 'amount': value.amount,
96
- 'memo': value.memo,
97
- 'flag_color': (0, TransactionFlagColor_1.TransactionFlagColorToJSON)(value.flag_color),
98
- 'account_id': value.account_id,
99
- 'payee_id': value.payee_id,
100
- 'category_id': value.category_id,
101
- 'transfer_account_id': value.transfer_account_id,
102
- 'deleted': value.deleted,
103
- 'account_name': value.account_name,
104
- 'payee_name': value.payee_name,
105
- 'category_name': value.category_name,
106
- 'subtransactions': (value.subtransactions.map(ScheduledSubTransaction_1.ScheduledSubTransactionToJSON)),
96
+ 'id': value['id'],
97
+ 'date_first': value['date_first'],
98
+ 'date_next': value['date_next'],
99
+ 'frequency': value['frequency'],
100
+ 'amount': value['amount'],
101
+ 'memo': value['memo'],
102
+ 'flag_color': (0, TransactionFlagColor_1.TransactionFlagColorToJSON)(value['flag_color']),
103
+ 'flag_name': value['flag_name'],
104
+ 'account_id': value['account_id'],
105
+ 'payee_id': value['payee_id'],
106
+ 'category_id': value['category_id'],
107
+ 'transfer_account_id': value['transfer_account_id'],
108
+ 'deleted': value['deleted'],
109
+ 'account_name': value['account_name'],
110
+ 'payee_name': value['payee_name'],
111
+ 'category_name': value['category_name'],
112
+ 'subtransactions': (value['subtransactions'].map(ScheduledSubTransaction_1.ScheduledSubTransactionToJSON)),
107
113
  };
108
114
  }
109
115
  exports.ScheduledTransactionDetailToJSON = ScheduledTransactionDetailToJSON;
@@ -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 ScheduledTransactionResponse {
26
26
  /**
27
27
  * Check if a given object implements the ScheduledTransactionResponse interface.
28
28
  */
29
- export declare function instanceOfScheduledTransactionResponse(value: object): boolean;
29
+ export declare function instanceOfScheduledTransactionResponse(value: object): value is ScheduledTransactionResponse;
30
30
  export declare function ScheduledTransactionResponseFromJSON(json: any): ScheduledTransactionResponse;
31
31
  export declare function ScheduledTransactionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScheduledTransactionResponse;
32
32
  export declare function ScheduledTransactionResponseToJSON(value?: ScheduledTransactionResponse | 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 ScheduledTransactionResponseData_1 = require("./ScheduledTransactionRespon
19
19
  * Check if a given object implements the ScheduledTransactionResponse interface.
20
20
  */
21
21
  function instanceOfScheduledTransactionResponse(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.instanceOfScheduledTransactionResponse = instanceOfScheduledTransactionResponse;
27
27
  function ScheduledTransactionResponseFromJSON(json) {
@@ -29,7 +29,7 @@ function ScheduledTransactionResponseFromJSON(json) {
29
29
  }
30
30
  exports.ScheduledTransactionResponseFromJSON = ScheduledTransactionResponseFromJSON;
31
31
  function ScheduledTransactionResponseFromJSONTyped(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 ScheduledTransactionResponseFromJSONTyped(json, ignoreDiscriminator) {
38
38
  }
39
39
  exports.ScheduledTransactionResponseFromJSONTyped = ScheduledTransactionResponseFromJSONTyped;
40
40
  function ScheduledTransactionResponseToJSON(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, ScheduledTransactionResponseData_1.ScheduledTransactionResponseDataToJSON)(value.data),
45
+ 'data': (0, ScheduledTransactionResponseData_1.ScheduledTransactionResponseDataToJSON)(value['data']),
49
46
  };
50
47
  }
51
48
  exports.ScheduledTransactionResponseToJSON = ScheduledTransactionResponseToJSON;
@@ -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 ScheduledTransactionResponseData {
26
26
  /**
27
27
  * Check if a given object implements the ScheduledTransactionResponseData interface.
28
28
  */
29
- export declare function instanceOfScheduledTransactionResponseData(value: object): boolean;
29
+ export declare function instanceOfScheduledTransactionResponseData(value: object): value is ScheduledTransactionResponseData;
30
30
  export declare function ScheduledTransactionResponseDataFromJSON(json: any): ScheduledTransactionResponseData;
31
31
  export declare function ScheduledTransactionResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScheduledTransactionResponseData;
32
32
  export declare function ScheduledTransactionResponseDataToJSON(value?: ScheduledTransactionResponseData | 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 ScheduledTransactionDetail_1 = require("./ScheduledTransactionDetail");
19
19
  * Check if a given object implements the ScheduledTransactionResponseData interface.
20
20
  */
21
21
  function instanceOfScheduledTransactionResponseData(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "scheduled_transaction" in value;
24
- return isInstance;
22
+ if (!('scheduled_transaction' in value) || value['scheduled_transaction'] === undefined)
23
+ return false;
24
+ return true;
25
25
  }
26
26
  exports.instanceOfScheduledTransactionResponseData = instanceOfScheduledTransactionResponseData;
27
27
  function ScheduledTransactionResponseDataFromJSON(json) {
@@ -29,7 +29,7 @@ function ScheduledTransactionResponseDataFromJSON(json) {
29
29
  }
30
30
  exports.ScheduledTransactionResponseDataFromJSON = ScheduledTransactionResponseDataFromJSON;
31
31
  function ScheduledTransactionResponseDataFromJSONTyped(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 ScheduledTransactionResponseDataFromJSONTyped(json, ignoreDiscriminator
38
38
  }
39
39
  exports.ScheduledTransactionResponseDataFromJSONTyped = ScheduledTransactionResponseDataFromJSONTyped;
40
40
  function ScheduledTransactionResponseDataToJSON(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
- 'scheduled_transaction': (0, ScheduledTransactionDetail_1.ScheduledTransactionDetailToJSON)(value.scheduled_transaction),
45
+ 'scheduled_transaction': (0, ScheduledTransactionDetail_1.ScheduledTransactionDetailToJSON)(value['scheduled_transaction']),
49
46
  };
50
47
  }
51
48
  exports.ScheduledTransactionResponseDataToJSON = ScheduledTransactionResponseDataToJSON;
@@ -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).
@@ -51,13 +51,19 @@ export interface ScheduledTransactionSummary {
51
51
  * @type {string}
52
52
  * @memberof ScheduledTransactionSummary
53
53
  */
54
- memo?: string | null;
54
+ memo?: string;
55
55
  /**
56
56
  *
57
57
  * @type {TransactionFlagColor}
58
58
  * @memberof ScheduledTransactionSummary
59
59
  */
60
- flag_color?: TransactionFlagColor | null;
60
+ flag_color?: TransactionFlagColor;
61
+ /**
62
+ * The customized name of a transaction flag
63
+ * @type {string}
64
+ * @memberof ScheduledTransactionSummary
65
+ */
66
+ flag_name?: string;
61
67
  /**
62
68
  *
63
69
  * @type {string}
@@ -69,19 +75,19 @@ export interface ScheduledTransactionSummary {
69
75
  * @type {string}
70
76
  * @memberof ScheduledTransactionSummary
71
77
  */
72
- payee_id?: string | null;
78
+ payee_id?: string;
73
79
  /**
74
80
  *
75
81
  * @type {string}
76
82
  * @memberof ScheduledTransactionSummary
77
83
  */
78
- category_id?: string | null;
84
+ category_id?: string;
79
85
  /**
80
86
  * If a transfer, the account_id which the scheduled transaction transfers to
81
87
  * @type {string}
82
88
  * @memberof ScheduledTransactionSummary
83
89
  */
84
- transfer_account_id?: string | null;
90
+ transfer_account_id?: string;
85
91
  /**
86
92
  * Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests.
87
93
  * @type {boolean}
@@ -111,7 +117,7 @@ export type ScheduledTransactionSummaryFrequencyEnum = typeof ScheduledTransacti
111
117
  /**
112
118
  * Check if a given object implements the ScheduledTransactionSummary interface.
113
119
  */
114
- export declare function instanceOfScheduledTransactionSummary(value: object): boolean;
120
+ export declare function instanceOfScheduledTransactionSummary(value: object): value is ScheduledTransactionSummary;
115
121
  export declare function ScheduledTransactionSummaryFromJSON(json: any): ScheduledTransactionSummary;
116
122
  export declare function ScheduledTransactionSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScheduledTransactionSummary;
117
123
  export declare function ScheduledTransactionSummaryToJSON(value?: ScheduledTransactionSummary | 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.ScheduledTransactionSummaryToJSON = exports.ScheduledTransactionSummaryFromJSONTyped = exports.ScheduledTransactionSummaryFromJSON = exports.instanceOfScheduledTransactionSummary = exports.ScheduledTransactionSummaryFrequencyEnum = void 0;
17
- const runtime_1 = require("../runtime");
18
17
  const TransactionFlagColor_1 = require("./TransactionFlagColor");
19
18
  /**
20
19
  * @export
@@ -38,15 +37,21 @@ exports.ScheduledTransactionSummaryFrequencyEnum = {
38
37
  * Check if a given object implements the ScheduledTransactionSummary interface.
39
38
  */
40
39
  function instanceOfScheduledTransactionSummary(value) {
41
- let isInstance = true;
42
- isInstance = isInstance && "id" in value;
43
- isInstance = isInstance && "date_first" in value;
44
- isInstance = isInstance && "date_next" in value;
45
- isInstance = isInstance && "frequency" in value;
46
- isInstance = isInstance && "amount" in value;
47
- isInstance = isInstance && "account_id" in value;
48
- isInstance = isInstance && "deleted" in value;
49
- return isInstance;
40
+ if (!('id' in value) || value['id'] === undefined)
41
+ return false;
42
+ if (!('date_first' in value) || value['date_first'] === undefined)
43
+ return false;
44
+ if (!('date_next' in value) || value['date_next'] === undefined)
45
+ return false;
46
+ if (!('frequency' in value) || value['frequency'] === undefined)
47
+ return false;
48
+ if (!('amount' in value) || value['amount'] === undefined)
49
+ return false;
50
+ if (!('account_id' in value) || value['account_id'] === undefined)
51
+ return false;
52
+ if (!('deleted' in value) || value['deleted'] === undefined)
53
+ return false;
54
+ return true;
50
55
  }
51
56
  exports.instanceOfScheduledTransactionSummary = instanceOfScheduledTransactionSummary;
52
57
  function ScheduledTransactionSummaryFromJSON(json) {
@@ -54,7 +59,7 @@ function ScheduledTransactionSummaryFromJSON(json) {
54
59
  }
55
60
  exports.ScheduledTransactionSummaryFromJSON = ScheduledTransactionSummaryFromJSON;
56
61
  function ScheduledTransactionSummaryFromJSONTyped(json, ignoreDiscriminator) {
57
- if ((json === undefined) || (json === null)) {
62
+ if (json == null) {
58
63
  return json;
59
64
  }
60
65
  return {
@@ -63,36 +68,35 @@ function ScheduledTransactionSummaryFromJSONTyped(json, ignoreDiscriminator) {
63
68
  'date_next': json['date_next'],
64
69
  'frequency': json['frequency'],
65
70
  'amount': json['amount'],
66
- 'memo': !(0, runtime_1.exists)(json, 'memo') ? undefined : json['memo'],
67
- 'flag_color': !(0, runtime_1.exists)(json, 'flag_color') ? undefined : (0, TransactionFlagColor_1.TransactionFlagColorFromJSON)(json['flag_color']),
71
+ 'memo': json['memo'] == null ? undefined : json['memo'],
72
+ 'flag_color': json['flag_color'] == null ? undefined : (0, TransactionFlagColor_1.TransactionFlagColorFromJSON)(json['flag_color']),
73
+ 'flag_name': json['flag_name'] == null ? undefined : json['flag_name'],
68
74
  'account_id': json['account_id'],
69
- 'payee_id': !(0, runtime_1.exists)(json, 'payee_id') ? undefined : json['payee_id'],
70
- 'category_id': !(0, runtime_1.exists)(json, 'category_id') ? undefined : json['category_id'],
71
- 'transfer_account_id': !(0, runtime_1.exists)(json, 'transfer_account_id') ? undefined : json['transfer_account_id'],
75
+ 'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
76
+ 'category_id': json['category_id'] == null ? undefined : json['category_id'],
77
+ 'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
72
78
  'deleted': json['deleted'],
73
79
  };
74
80
  }
75
81
  exports.ScheduledTransactionSummaryFromJSONTyped = ScheduledTransactionSummaryFromJSONTyped;
76
82
  function ScheduledTransactionSummaryToJSON(value) {
77
- if (value === undefined) {
78
- return undefined;
79
- }
80
- if (value === null) {
81
- return null;
83
+ if (value == null) {
84
+ return value;
82
85
  }
83
86
  return {
84
- 'id': value.id,
85
- 'date_first': value.date_first,
86
- 'date_next': value.date_next,
87
- 'frequency': value.frequency,
88
- 'amount': value.amount,
89
- 'memo': value.memo,
90
- 'flag_color': (0, TransactionFlagColor_1.TransactionFlagColorToJSON)(value.flag_color),
91
- 'account_id': value.account_id,
92
- 'payee_id': value.payee_id,
93
- 'category_id': value.category_id,
94
- 'transfer_account_id': value.transfer_account_id,
95
- 'deleted': value.deleted,
87
+ 'id': value['id'],
88
+ 'date_first': value['date_first'],
89
+ 'date_next': value['date_next'],
90
+ 'frequency': value['frequency'],
91
+ 'amount': value['amount'],
92
+ 'memo': value['memo'],
93
+ 'flag_color': (0, TransactionFlagColor_1.TransactionFlagColorToJSON)(value['flag_color']),
94
+ 'flag_name': value['flag_name'],
95
+ 'account_id': value['account_id'],
96
+ 'payee_id': value['payee_id'],
97
+ 'category_id': value['category_id'],
98
+ 'transfer_account_id': value['transfer_account_id'],
99
+ 'deleted': value['deleted'],
96
100
  };
97
101
  }
98
102
  exports.ScheduledTransactionSummaryToJSON = ScheduledTransactionSummaryToJSON;
@@ -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 ScheduledTransactionsResponse {
26
26
  /**
27
27
  * Check if a given object implements the ScheduledTransactionsResponse interface.
28
28
  */
29
- export declare function instanceOfScheduledTransactionsResponse(value: object): boolean;
29
+ export declare function instanceOfScheduledTransactionsResponse(value: object): value is ScheduledTransactionsResponse;
30
30
  export declare function ScheduledTransactionsResponseFromJSON(json: any): ScheduledTransactionsResponse;
31
31
  export declare function ScheduledTransactionsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScheduledTransactionsResponse;
32
32
  export declare function ScheduledTransactionsResponseToJSON(value?: ScheduledTransactionsResponse | 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 ScheduledTransactionsResponseData_1 = require("./ScheduledTransactionsResp
19
19
  * Check if a given object implements the ScheduledTransactionsResponse interface.
20
20
  */
21
21
  function instanceOfScheduledTransactionsResponse(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.instanceOfScheduledTransactionsResponse = instanceOfScheduledTransactionsResponse;
27
27
  function ScheduledTransactionsResponseFromJSON(json) {
@@ -29,7 +29,7 @@ function ScheduledTransactionsResponseFromJSON(json) {
29
29
  }
30
30
  exports.ScheduledTransactionsResponseFromJSON = ScheduledTransactionsResponseFromJSON;
31
31
  function ScheduledTransactionsResponseFromJSONTyped(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 ScheduledTransactionsResponseFromJSONTyped(json, ignoreDiscriminator) {
38
38
  }
39
39
  exports.ScheduledTransactionsResponseFromJSONTyped = ScheduledTransactionsResponseFromJSONTyped;
40
40
  function ScheduledTransactionsResponseToJSON(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, ScheduledTransactionsResponseData_1.ScheduledTransactionsResponseDataToJSON)(value.data),
45
+ 'data': (0, ScheduledTransactionsResponseData_1.ScheduledTransactionsResponseDataToJSON)(value['data']),
49
46
  };
50
47
  }
51
48
  exports.ScheduledTransactionsResponseToJSON = ScheduledTransactionsResponseToJSON;
@@ -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 ScheduledTransactionsResponseData {
32
32
  /**
33
33
  * Check if a given object implements the ScheduledTransactionsResponseData interface.
34
34
  */
35
- export declare function instanceOfScheduledTransactionsResponseData(value: object): boolean;
35
+ export declare function instanceOfScheduledTransactionsResponseData(value: object): value is ScheduledTransactionsResponseData;
36
36
  export declare function ScheduledTransactionsResponseDataFromJSON(json: any): ScheduledTransactionsResponseData;
37
37
  export declare function ScheduledTransactionsResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScheduledTransactionsResponseData;
38
38
  export declare function ScheduledTransactionsResponseDataToJSON(value?: ScheduledTransactionsResponseData | 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 ScheduledTransactionDetail_1 = require("./ScheduledTransactionDetail");
19
19
  * Check if a given object implements the ScheduledTransactionsResponseData interface.
20
20
  */
21
21
  function instanceOfScheduledTransactionsResponseData(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "scheduled_transactions" in value;
24
- isInstance = isInstance && "server_knowledge" in value;
25
- return isInstance;
22
+ if (!('scheduled_transactions' in value) || value['scheduled_transactions'] === 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.instanceOfScheduledTransactionsResponseData = instanceOfScheduledTransactionsResponseData;
28
29
  function ScheduledTransactionsResponseDataFromJSON(json) {
@@ -30,7 +31,7 @@ function ScheduledTransactionsResponseDataFromJSON(json) {
30
31
  }
31
32
  exports.ScheduledTransactionsResponseDataFromJSON = ScheduledTransactionsResponseDataFromJSON;
32
33
  function ScheduledTransactionsResponseDataFromJSONTyped(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 ScheduledTransactionsResponseDataFromJSONTyped(json, ignoreDiscriminato
40
41
  }
41
42
  exports.ScheduledTransactionsResponseDataFromJSONTyped = ScheduledTransactionsResponseDataFromJSONTyped;
42
43
  function ScheduledTransactionsResponseDataToJSON(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
- 'scheduled_transactions': (value.scheduled_transactions.map(ScheduledTransactionDetail_1.ScheduledTransactionDetailToJSON)),
51
- 'server_knowledge': value.server_knowledge,
48
+ 'scheduled_transactions': (value['scheduled_transactions'].map(ScheduledTransactionDetail_1.ScheduledTransactionDetailToJSON)),
49
+ 'server_knowledge': value['server_knowledge'],
52
50
  };
53
51
  }
54
52
  exports.ScheduledTransactionsResponseDataToJSON = ScheduledTransactionsResponseDataToJSON;