ynab 2.2.0 → 2.4.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 (215) hide show
  1. package/README.md +2 -0
  2. package/dist/apis/AccountsApi.d.ts +1 -6
  3. package/dist/apis/AccountsApi.js +1 -6
  4. package/dist/apis/BudgetsApi.d.ts +1 -6
  5. package/dist/apis/BudgetsApi.js +1 -6
  6. package/dist/apis/CategoriesApi.d.ts +1 -6
  7. package/dist/apis/CategoriesApi.js +1 -6
  8. package/dist/apis/MonthsApi.d.ts +1 -6
  9. package/dist/apis/MonthsApi.js +1 -6
  10. package/dist/apis/PayeeLocationsApi.d.ts +1 -6
  11. package/dist/apis/PayeeLocationsApi.js +1 -6
  12. package/dist/apis/PayeesApi.d.ts +17 -7
  13. package/dist/apis/PayeesApi.js +43 -6
  14. package/dist/apis/ScheduledTransactionsApi.d.ts +16 -7
  15. package/dist/apis/ScheduledTransactionsApi.js +40 -6
  16. package/dist/apis/TransactionsApi.d.ts +36 -16
  17. package/dist/apis/TransactionsApi.js +65 -17
  18. package/dist/apis/UserApi.d.ts +1 -6
  19. package/dist/apis/UserApi.js +1 -6
  20. package/dist/browser/ynab.js +1 -1
  21. package/dist/models/Account.d.ts +2 -7
  22. package/dist/models/Account.js +51 -51
  23. package/dist/models/AccountResponse.d.ts +2 -7
  24. package/dist/models/AccountResponse.js +8 -16
  25. package/dist/models/AccountResponseData.d.ts +2 -7
  26. package/dist/models/AccountResponseData.js +8 -16
  27. package/dist/models/AccountType.d.ts +2 -6
  28. package/dist/models/AccountType.js +13 -7
  29. package/dist/models/AccountsResponse.d.ts +2 -7
  30. package/dist/models/AccountsResponse.js +8 -16
  31. package/dist/models/AccountsResponseData.d.ts +2 -7
  32. package/dist/models/AccountsResponseData.js +11 -18
  33. package/dist/models/BudgetDetail.d.ts +6 -11
  34. package/dist/models/BudgetDetail.js +45 -53
  35. package/dist/models/BudgetDetailResponse.d.ts +2 -7
  36. package/dist/models/BudgetDetailResponse.js +8 -16
  37. package/dist/models/BudgetDetailResponseData.d.ts +2 -7
  38. package/dist/models/BudgetDetailResponseData.js +11 -18
  39. package/dist/models/BudgetSettings.d.ts +2 -7
  40. package/dist/models/BudgetSettings.js +11 -18
  41. package/dist/models/BudgetSettingsResponse.d.ts +2 -7
  42. package/dist/models/BudgetSettingsResponse.js +8 -16
  43. package/dist/models/BudgetSettingsResponseData.d.ts +2 -7
  44. package/dist/models/BudgetSettingsResponseData.js +8 -16
  45. package/dist/models/BudgetSummary.d.ts +2 -7
  46. package/dist/models/BudgetSummary.js +23 -31
  47. package/dist/models/BudgetSummaryResponse.d.ts +2 -7
  48. package/dist/models/BudgetSummaryResponse.js +8 -16
  49. package/dist/models/BudgetSummaryResponseData.d.ts +2 -7
  50. package/dist/models/BudgetSummaryResponseData.js +10 -19
  51. package/dist/models/BulkResponse.d.ts +2 -7
  52. package/dist/models/BulkResponse.js +8 -16
  53. package/dist/models/BulkResponseData.d.ts +2 -7
  54. package/dist/models/BulkResponseData.js +8 -16
  55. package/dist/models/BulkResponseDataBulk.d.ts +2 -7
  56. package/dist/models/BulkResponseDataBulk.js +11 -18
  57. package/dist/models/BulkTransactions.d.ts +5 -10
  58. package/dist/models/BulkTransactions.js +10 -18
  59. package/dist/models/CategoriesResponse.d.ts +2 -7
  60. package/dist/models/CategoriesResponse.js +8 -16
  61. package/dist/models/CategoriesResponseData.d.ts +2 -7
  62. package/dist/models/CategoriesResponseData.js +11 -18
  63. package/dist/models/Category.d.ts +9 -8
  64. package/dist/models/Category.js +61 -61
  65. package/dist/models/CategoryGroup.d.ts +2 -7
  66. package/dist/models/CategoryGroup.js +17 -22
  67. package/dist/models/CategoryGroupWithCategories.d.ts +2 -7
  68. package/dist/models/CategoryGroupWithCategories.js +20 -24
  69. package/dist/models/CategoryResponse.d.ts +2 -7
  70. package/dist/models/CategoryResponse.js +8 -16
  71. package/dist/models/CategoryResponseData.d.ts +2 -7
  72. package/dist/models/CategoryResponseData.js +8 -16
  73. package/dist/models/CurrencyFormat.d.ts +2 -7
  74. package/dist/models/CurrencyFormat.js +29 -30
  75. package/dist/models/DateFormat.d.ts +2 -7
  76. package/dist/models/DateFormat.js +8 -16
  77. package/dist/models/ErrorDetail.d.ts +2 -7
  78. package/dist/models/ErrorDetail.js +14 -20
  79. package/dist/models/ErrorResponse.d.ts +2 -7
  80. package/dist/models/ErrorResponse.js +8 -16
  81. package/dist/models/ExistingTransaction.d.ts +89 -0
  82. package/dist/models/ExistingTransaction.js +63 -0
  83. package/dist/models/HybridTransaction.d.ts +10 -9
  84. package/dist/models/HybridTransaction.js +63 -62
  85. package/dist/models/HybridTransactionsResponse.d.ts +2 -7
  86. package/dist/models/HybridTransactionsResponse.js +8 -16
  87. package/dist/models/HybridTransactionsResponseData.d.ts +2 -7
  88. package/dist/models/HybridTransactionsResponseData.js +10 -19
  89. package/dist/models/MonthDetail.d.ts +2 -7
  90. package/dist/models/MonthDetail.js +30 -33
  91. package/dist/models/MonthDetailResponse.d.ts +2 -7
  92. package/dist/models/MonthDetailResponse.js +8 -16
  93. package/dist/models/MonthDetailResponseData.d.ts +2 -7
  94. package/dist/models/MonthDetailResponseData.js +8 -16
  95. package/dist/models/MonthSummariesResponse.d.ts +2 -7
  96. package/dist/models/MonthSummariesResponse.js +8 -16
  97. package/dist/models/MonthSummariesResponseData.d.ts +2 -7
  98. package/dist/models/MonthSummariesResponseData.js +11 -18
  99. package/dist/models/MonthSummary.d.ts +2 -7
  100. package/dist/models/MonthSummary.js +27 -31
  101. package/dist/models/NewTransaction.d.ts +95 -0
  102. package/dist/models/NewTransaction.js +65 -0
  103. package/dist/models/PatchCategoryWrapper.d.ts +2 -7
  104. package/dist/models/PatchCategoryWrapper.js +8 -16
  105. package/dist/models/PatchMonthCategoryWrapper.d.ts +2 -7
  106. package/dist/models/PatchMonthCategoryWrapper.js +8 -16
  107. package/dist/models/PatchPayeeWrapper.d.ts +27 -0
  108. package/dist/models/PatchPayeeWrapper.js +43 -0
  109. package/dist/models/PatchTransactionsWrapper.d.ts +5 -10
  110. package/dist/models/PatchTransactionsWrapper.js +10 -18
  111. package/dist/models/Payee.d.ts +2 -7
  112. package/dist/models/Payee.js +16 -23
  113. package/dist/models/PayeeLocation.d.ts +2 -7
  114. package/dist/models/PayeeLocation.js +20 -24
  115. package/dist/models/PayeeLocationResponse.d.ts +2 -7
  116. package/dist/models/PayeeLocationResponse.js +8 -16
  117. package/dist/models/PayeeLocationResponseData.d.ts +2 -7
  118. package/dist/models/PayeeLocationResponseData.js +8 -16
  119. package/dist/models/PayeeLocationsResponse.d.ts +2 -7
  120. package/dist/models/PayeeLocationsResponse.js +8 -16
  121. package/dist/models/PayeeLocationsResponseData.d.ts +2 -7
  122. package/dist/models/PayeeLocationsResponseData.js +8 -16
  123. package/dist/models/PayeeResponse.d.ts +2 -7
  124. package/dist/models/PayeeResponse.js +8 -16
  125. package/dist/models/PayeeResponseData.d.ts +2 -7
  126. package/dist/models/PayeeResponseData.js +8 -16
  127. package/dist/models/PayeesResponse.d.ts +2 -7
  128. package/dist/models/PayeesResponse.js +8 -16
  129. package/dist/models/PayeesResponseData.d.ts +2 -7
  130. package/dist/models/PayeesResponseData.js +11 -18
  131. package/dist/models/PostAccountWrapper.d.ts +2 -7
  132. package/dist/models/PostAccountWrapper.js +8 -16
  133. package/dist/models/PostScheduledTransactionWrapper.d.ts +27 -0
  134. package/dist/models/PostScheduledTransactionWrapper.js +43 -0
  135. package/dist/models/PostTransactionsWrapper.d.ts +7 -12
  136. package/dist/models/PostTransactionsWrapper.js +10 -20
  137. package/dist/models/PutTransactionWrapper.d.ts +5 -10
  138. package/dist/models/PutTransactionWrapper.js +10 -18
  139. package/dist/models/SaveAccount.d.ts +2 -7
  140. package/dist/models/SaveAccount.js +14 -20
  141. package/dist/models/SaveCategory.d.ts +2 -7
  142. package/dist/models/SaveCategory.js +11 -21
  143. package/dist/models/SaveCategoryResponse.d.ts +2 -7
  144. package/dist/models/SaveCategoryResponse.js +8 -16
  145. package/dist/models/SaveCategoryResponseData.d.ts +2 -7
  146. package/dist/models/SaveCategoryResponseData.js +11 -18
  147. package/dist/models/SaveMonthCategory.d.ts +2 -7
  148. package/dist/models/SaveMonthCategory.js +8 -16
  149. package/dist/models/SavePayee.d.ts +26 -0
  150. package/dist/models/SavePayee.js +40 -0
  151. package/dist/models/SavePayeeResponse.d.ts +27 -0
  152. package/dist/models/SavePayeeResponse.js +43 -0
  153. package/dist/models/SavePayeeResponseData.d.ts +33 -0
  154. package/dist/models/SavePayeeResponseData.js +47 -0
  155. package/dist/models/SaveScheduledTransaction.d.ts +76 -0
  156. package/dist/models/SaveScheduledTransaction.js +62 -0
  157. package/dist/models/SaveSubTransaction.d.ts +2 -7
  158. package/dist/models/SaveSubTransaction.js +16 -25
  159. package/dist/models/SaveTransactionWithIdOrImportId.d.ts +101 -0
  160. package/dist/models/SaveTransactionWithIdOrImportId.js +67 -0
  161. package/dist/models/SaveTransactionWithOptionalFields.d.ts +5 -16
  162. package/dist/models/SaveTransactionWithOptionalFields.js +29 -41
  163. package/dist/models/SaveTransactionsResponse.d.ts +2 -7
  164. package/dist/models/SaveTransactionsResponse.js +8 -16
  165. package/dist/models/SaveTransactionsResponseData.d.ts +2 -7
  166. package/dist/models/SaveTransactionsResponseData.js +17 -25
  167. package/dist/models/ScheduledSubTransaction.d.ts +2 -7
  168. package/dist/models/ScheduledSubTransaction.js +25 -31
  169. package/dist/models/ScheduledTransactionDetail.d.ts +9 -8
  170. package/dist/models/ScheduledTransactionDetail.js +49 -48
  171. package/dist/models/ScheduledTransactionFrequency.d.ts +30 -0
  172. package/dist/models/ScheduledTransactionFrequency.js +53 -0
  173. package/dist/models/ScheduledTransactionResponse.d.ts +2 -7
  174. package/dist/models/ScheduledTransactionResponse.js +8 -16
  175. package/dist/models/ScheduledTransactionResponseData.d.ts +2 -7
  176. package/dist/models/ScheduledTransactionResponseData.js +8 -16
  177. package/dist/models/ScheduledTransactionSummary.d.ts +8 -7
  178. package/dist/models/ScheduledTransactionSummary.js +38 -39
  179. package/dist/models/ScheduledTransactionsResponse.d.ts +2 -7
  180. package/dist/models/ScheduledTransactionsResponse.js +8 -16
  181. package/dist/models/ScheduledTransactionsResponseData.d.ts +2 -7
  182. package/dist/models/ScheduledTransactionsResponseData.js +11 -18
  183. package/dist/models/SubTransaction.d.ts +2 -7
  184. package/dist/models/SubTransaction.js +31 -37
  185. package/dist/models/TransactionClearedStatus.d.ts +2 -6
  186. package/dist/models/TransactionClearedStatus.js +13 -7
  187. package/dist/models/TransactionDetail.d.ts +11 -10
  188. package/dist/models/TransactionDetail.js +62 -61
  189. package/dist/models/TransactionFlagColor.d.ts +2 -6
  190. package/dist/models/TransactionFlagColor.js +13 -7
  191. package/dist/models/TransactionResponse.d.ts +2 -7
  192. package/dist/models/TransactionResponse.js +8 -16
  193. package/dist/models/TransactionResponseData.d.ts +2 -7
  194. package/dist/models/TransactionResponseData.js +8 -16
  195. package/dist/models/TransactionSummary.d.ts +10 -9
  196. package/dist/models/TransactionSummary.js +51 -52
  197. package/dist/models/TransactionsImportResponse.d.ts +2 -7
  198. package/dist/models/TransactionsImportResponse.js +8 -16
  199. package/dist/models/TransactionsImportResponseData.d.ts +2 -7
  200. package/dist/models/TransactionsImportResponseData.js +8 -16
  201. package/dist/models/TransactionsResponse.d.ts +2 -7
  202. package/dist/models/TransactionsResponse.js +8 -16
  203. package/dist/models/TransactionsResponseData.d.ts +2 -7
  204. package/dist/models/TransactionsResponseData.js +11 -18
  205. package/dist/models/User.d.ts +2 -7
  206. package/dist/models/User.js +8 -16
  207. package/dist/models/UserResponse.d.ts +2 -7
  208. package/dist/models/UserResponse.js +8 -16
  209. package/dist/models/UserResponseData.d.ts +2 -7
  210. package/dist/models/UserResponseData.js +8 -16
  211. package/dist/models/index.d.ts +10 -9
  212. package/dist/models/index.js +10 -9
  213. package/dist/runtime.d.ts +1 -6
  214. package/dist/runtime.js +1 -6
  215. package/package.json +1 -1
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * YNAB API Endpoints
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
+ *
8
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.SavePayeeResponseDataToJSON = exports.SavePayeeResponseDataFromJSONTyped = exports.SavePayeeResponseDataFromJSON = exports.instanceOfSavePayeeResponseData = void 0;
12
+ const Payee_1 = require("./Payee");
13
+ /**
14
+ * Check if a given object implements the SavePayeeResponseData interface.
15
+ */
16
+ function instanceOfSavePayeeResponseData(value) {
17
+ if (!('payee' in value) || value['payee'] === undefined)
18
+ return false;
19
+ if (!('server_knowledge' in value) || value['server_knowledge'] === undefined)
20
+ return false;
21
+ return true;
22
+ }
23
+ exports.instanceOfSavePayeeResponseData = instanceOfSavePayeeResponseData;
24
+ function SavePayeeResponseDataFromJSON(json) {
25
+ return SavePayeeResponseDataFromJSONTyped(json, false);
26
+ }
27
+ exports.SavePayeeResponseDataFromJSON = SavePayeeResponseDataFromJSON;
28
+ function SavePayeeResponseDataFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'payee': (0, Payee_1.PayeeFromJSON)(json['payee']),
34
+ 'server_knowledge': json['server_knowledge'],
35
+ };
36
+ }
37
+ exports.SavePayeeResponseDataFromJSONTyped = SavePayeeResponseDataFromJSONTyped;
38
+ function SavePayeeResponseDataToJSON(value) {
39
+ if (value == null) {
40
+ return value;
41
+ }
42
+ return {
43
+ 'payee': (0, Payee_1.PayeeToJSON)(value['payee']),
44
+ 'server_knowledge': value['server_knowledge'],
45
+ };
46
+ }
47
+ exports.SavePayeeResponseDataToJSON = SavePayeeResponseDataToJSON;
@@ -0,0 +1,76 @@
1
+ /**
2
+ * YNAB API Endpoints
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
+ *
5
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
6
+ */
7
+ import type { TransactionFlagColor } from './TransactionFlagColor';
8
+ import type { ScheduledTransactionFrequency } from './ScheduledTransactionFrequency';
9
+ /**
10
+ *
11
+ * @export
12
+ * @interface SaveScheduledTransaction
13
+ */
14
+ export interface SaveScheduledTransaction {
15
+ /**
16
+ *
17
+ * @type {string}
18
+ * @memberof SaveScheduledTransaction
19
+ */
20
+ account_id: string;
21
+ /**
22
+ * The scheduled transaction date in ISO format (e.g. 2016-12-01).
23
+ * @type {string}
24
+ * @memberof SaveScheduledTransaction
25
+ */
26
+ date: string;
27
+ /**
28
+ * The scheduled transaction amount in milliunits format.
29
+ * @type {number}
30
+ * @memberof SaveScheduledTransaction
31
+ */
32
+ amount?: number;
33
+ /**
34
+ * The payee for the scheduled transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `transfer_payee_id` on the account resource.
35
+ * @type {string}
36
+ * @memberof SaveScheduledTransaction
37
+ */
38
+ payee_id?: string | null;
39
+ /**
40
+ * The payee name for the the scheduled transaction. If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a payee with the same name or (2) creation of a new payee.
41
+ * @type {string}
42
+ * @memberof SaveScheduledTransaction
43
+ */
44
+ payee_name?: string | null;
45
+ /**
46
+ * The category for the scheduled transaction. Credit Card Payment categories are not permitted. Creating a split scheduled transaction is not currently supported.
47
+ * @type {string}
48
+ * @memberof SaveScheduledTransaction
49
+ */
50
+ category_id?: string | null;
51
+ /**
52
+ *
53
+ * @type {string}
54
+ * @memberof SaveScheduledTransaction
55
+ */
56
+ memo?: string | null;
57
+ /**
58
+ *
59
+ * @type {TransactionFlagColor}
60
+ * @memberof SaveScheduledTransaction
61
+ */
62
+ flag_color?: TransactionFlagColor | null;
63
+ /**
64
+ *
65
+ * @type {ScheduledTransactionFrequency}
66
+ * @memberof SaveScheduledTransaction
67
+ */
68
+ frequency?: ScheduledTransactionFrequency;
69
+ }
70
+ /**
71
+ * Check if a given object implements the SaveScheduledTransaction interface.
72
+ */
73
+ export declare function instanceOfSaveScheduledTransaction(value: object): value is SaveScheduledTransaction;
74
+ export declare function SaveScheduledTransactionFromJSON(json: any): SaveScheduledTransaction;
75
+ export declare function SaveScheduledTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SaveScheduledTransaction;
76
+ export declare function SaveScheduledTransactionToJSON(value?: SaveScheduledTransaction | null): any;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * YNAB API Endpoints
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
+ *
8
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.SaveScheduledTransactionToJSON = exports.SaveScheduledTransactionFromJSONTyped = exports.SaveScheduledTransactionFromJSON = exports.instanceOfSaveScheduledTransaction = void 0;
12
+ const TransactionFlagColor_1 = require("./TransactionFlagColor");
13
+ const ScheduledTransactionFrequency_1 = require("./ScheduledTransactionFrequency");
14
+ /**
15
+ * Check if a given object implements the SaveScheduledTransaction interface.
16
+ */
17
+ function instanceOfSaveScheduledTransaction(value) {
18
+ if (!('account_id' in value) || value['account_id'] === undefined)
19
+ return false;
20
+ if (!('date' in value) || value['date'] === undefined)
21
+ return false;
22
+ return true;
23
+ }
24
+ exports.instanceOfSaveScheduledTransaction = instanceOfSaveScheduledTransaction;
25
+ function SaveScheduledTransactionFromJSON(json) {
26
+ return SaveScheduledTransactionFromJSONTyped(json, false);
27
+ }
28
+ exports.SaveScheduledTransactionFromJSON = SaveScheduledTransactionFromJSON;
29
+ function SaveScheduledTransactionFromJSONTyped(json, ignoreDiscriminator) {
30
+ if (json == null) {
31
+ return json;
32
+ }
33
+ return {
34
+ 'account_id': json['account_id'],
35
+ 'date': json['date'],
36
+ 'amount': json['amount'] == null ? undefined : json['amount'],
37
+ 'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
38
+ 'payee_name': json['payee_name'] == null ? undefined : json['payee_name'],
39
+ 'category_id': json['category_id'] == null ? undefined : json['category_id'],
40
+ 'memo': json['memo'] == null ? undefined : json['memo'],
41
+ 'flag_color': json['flag_color'] == null ? undefined : (0, TransactionFlagColor_1.TransactionFlagColorFromJSON)(json['flag_color']),
42
+ 'frequency': json['frequency'] == null ? undefined : (0, ScheduledTransactionFrequency_1.ScheduledTransactionFrequencyFromJSON)(json['frequency']),
43
+ };
44
+ }
45
+ exports.SaveScheduledTransactionFromJSONTyped = SaveScheduledTransactionFromJSONTyped;
46
+ function SaveScheduledTransactionToJSON(value) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'account_id': value['account_id'],
52
+ 'date': value['date'],
53
+ 'amount': value['amount'],
54
+ 'payee_id': value['payee_id'],
55
+ 'payee_name': value['payee_name'],
56
+ 'category_id': value['category_id'],
57
+ 'memo': value['memo'],
58
+ 'flag_color': (0, TransactionFlagColor_1.TransactionFlagColorToJSON)(value['flag_color']),
59
+ 'frequency': (0, ScheduledTransactionFrequency_1.ScheduledTransactionFrequencyToJSON)(value['frequency']),
60
+ };
61
+ }
62
+ exports.SaveScheduledTransactionToJSON = SaveScheduledTransactionToJSON;
@@ -2,12 +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
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
5
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
11
6
  */
12
7
  /**
13
8
  *
@@ -49,7 +44,7 @@ export interface SaveSubTransaction {
49
44
  /**
50
45
  * Check if a given object implements the SaveSubTransaction interface.
51
46
  */
52
- export declare function instanceOfSaveSubTransaction(value: object): boolean;
47
+ export declare function instanceOfSaveSubTransaction(value: object): value is SaveSubTransaction;
53
48
  export declare function SaveSubTransactionFromJSON(json: any): SaveSubTransaction;
54
49
  export declare function SaveSubTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SaveSubTransaction;
55
50
  export declare function SaveSubTransactionToJSON(value?: SaveSubTransaction | null): any;
@@ -5,23 +5,17 @@
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
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
8
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
14
9
  */
15
10
  Object.defineProperty(exports, "__esModule", { value: true });
16
11
  exports.SaveSubTransactionToJSON = exports.SaveSubTransactionFromJSONTyped = exports.SaveSubTransactionFromJSON = exports.instanceOfSaveSubTransaction = void 0;
17
- const runtime_1 = require("../runtime");
18
12
  /**
19
13
  * Check if a given object implements the SaveSubTransaction interface.
20
14
  */
21
15
  function instanceOfSaveSubTransaction(value) {
22
- let isInstance = true;
23
- isInstance = isInstance && "amount" in value;
24
- return isInstance;
16
+ if (!('amount' in value) || value['amount'] === undefined)
17
+ return false;
18
+ return true;
25
19
  }
26
20
  exports.instanceOfSaveSubTransaction = instanceOfSaveSubTransaction;
27
21
  function SaveSubTransactionFromJSON(json) {
@@ -29,31 +23,28 @@ function SaveSubTransactionFromJSON(json) {
29
23
  }
30
24
  exports.SaveSubTransactionFromJSON = SaveSubTransactionFromJSON;
31
25
  function SaveSubTransactionFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
26
+ if (json == null) {
33
27
  return json;
34
28
  }
35
29
  return {
36
30
  'amount': json['amount'],
37
- 'payee_id': !(0, runtime_1.exists)(json, 'payee_id') ? undefined : json['payee_id'],
38
- 'payee_name': !(0, runtime_1.exists)(json, 'payee_name') ? undefined : json['payee_name'],
39
- 'category_id': !(0, runtime_1.exists)(json, 'category_id') ? undefined : json['category_id'],
40
- 'memo': !(0, runtime_1.exists)(json, 'memo') ? undefined : json['memo'],
31
+ 'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
32
+ 'payee_name': json['payee_name'] == null ? undefined : json['payee_name'],
33
+ 'category_id': json['category_id'] == null ? undefined : json['category_id'],
34
+ 'memo': json['memo'] == null ? undefined : json['memo'],
41
35
  };
42
36
  }
43
37
  exports.SaveSubTransactionFromJSONTyped = SaveSubTransactionFromJSONTyped;
44
38
  function SaveSubTransactionToJSON(value) {
45
- if (value === undefined) {
46
- return undefined;
47
- }
48
- if (value === null) {
49
- return null;
39
+ if (value == null) {
40
+ return value;
50
41
  }
51
42
  return {
52
- 'amount': value.amount,
53
- 'payee_id': value.payee_id,
54
- 'payee_name': value.payee_name,
55
- 'category_id': value.category_id,
56
- 'memo': value.memo,
43
+ 'amount': value['amount'],
44
+ 'payee_id': value['payee_id'],
45
+ 'payee_name': value['payee_name'],
46
+ 'category_id': value['category_id'],
47
+ 'memo': value['memo'],
57
48
  };
58
49
  }
59
50
  exports.SaveSubTransactionToJSON = SaveSubTransactionToJSON;
@@ -0,0 +1,101 @@
1
+ /**
2
+ * YNAB API Endpoints
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
+ *
5
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
6
+ */
7
+ import type { TransactionFlagColor } from './TransactionFlagColor';
8
+ import type { TransactionClearedStatus } from './TransactionClearedStatus';
9
+ import type { SaveSubTransaction } from './SaveSubTransaction';
10
+ /**
11
+ *
12
+ * @export
13
+ * @interface SaveTransactionWithIdOrImportId
14
+ */
15
+ export interface SaveTransactionWithIdOrImportId {
16
+ /**
17
+ *
18
+ * @type {string}
19
+ * @memberof SaveTransactionWithIdOrImportId
20
+ */
21
+ account_id?: string;
22
+ /**
23
+ * The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored.
24
+ * @type {string}
25
+ * @memberof SaveTransactionWithIdOrImportId
26
+ */
27
+ date?: string;
28
+ /**
29
+ * The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored.
30
+ * @type {number}
31
+ * @memberof SaveTransactionWithIdOrImportId
32
+ */
33
+ amount?: number;
34
+ /**
35
+ * The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `transfer_payee_id` on the account resource.
36
+ * @type {string}
37
+ * @memberof SaveTransactionWithIdOrImportId
38
+ */
39
+ payee_id?: string | null;
40
+ /**
41
+ * The payee name. If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if `import_id` is also specified) or (2) a payee with the same name or (3) creation of a new payee.
42
+ * @type {string}
43
+ * @memberof SaveTransactionWithIdOrImportId
44
+ */
45
+ payee_name?: string | null;
46
+ /**
47
+ * The category for the transaction. To configure a split transaction, you can specify null for `category_id` and provide a `subtransactions` array as part of the transaction object. If an existing transaction is a split, the `category_id` cannot be changed. Credit Card Payment categories are not permitted and will be ignored if supplied.
48
+ * @type {string}
49
+ * @memberof SaveTransactionWithIdOrImportId
50
+ */
51
+ category_id?: string | null;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof SaveTransactionWithIdOrImportId
56
+ */
57
+ memo?: string | null;
58
+ /**
59
+ *
60
+ * @type {TransactionClearedStatus}
61
+ * @memberof SaveTransactionWithIdOrImportId
62
+ */
63
+ cleared?: TransactionClearedStatus;
64
+ /**
65
+ * Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default.
66
+ * @type {boolean}
67
+ * @memberof SaveTransactionWithIdOrImportId
68
+ */
69
+ approved?: boolean;
70
+ /**
71
+ *
72
+ * @type {TransactionFlagColor}
73
+ * @memberof SaveTransactionWithIdOrImportId
74
+ */
75
+ flag_color?: TransactionFlagColor | null;
76
+ /**
77
+ * An array of subtransactions to configure a transaction as a split. Updating `subtransactions` on an existing split transaction is not supported.
78
+ * @type {Array<SaveSubTransaction>}
79
+ * @memberof SaveTransactionWithIdOrImportId
80
+ */
81
+ subtransactions?: Array<SaveSubTransaction>;
82
+ /**
83
+ * If specified, this id will be used to lookup a transaction by its `id` for the purpose of updating the transaction itself. If not specified, an `import_id` should be supplied.
84
+ * @type {string}
85
+ * @memberof SaveTransactionWithIdOrImportId
86
+ */
87
+ id?: string | null;
88
+ /**
89
+ * If specified, this id will be used to lookup a transaction by its `import_id` for the purpose of updating the transaction itself. If not specified, an `id` should be supplied. You may not provide both an `id` and an `import_id` and updating an `import_id` on an existing transaction is not allowed.
90
+ * @type {string}
91
+ * @memberof SaveTransactionWithIdOrImportId
92
+ */
93
+ import_id?: string | null;
94
+ }
95
+ /**
96
+ * Check if a given object implements the SaveTransactionWithIdOrImportId interface.
97
+ */
98
+ export declare function instanceOfSaveTransactionWithIdOrImportId(value: object): value is SaveTransactionWithIdOrImportId;
99
+ export declare function SaveTransactionWithIdOrImportIdFromJSON(json: any): SaveTransactionWithIdOrImportId;
100
+ export declare function SaveTransactionWithIdOrImportIdFromJSONTyped(json: any, ignoreDiscriminator: boolean): SaveTransactionWithIdOrImportId;
101
+ export declare function SaveTransactionWithIdOrImportIdToJSON(value?: SaveTransactionWithIdOrImportId | null): any;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * YNAB API Endpoints
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
+ *
8
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.SaveTransactionWithIdOrImportIdToJSON = exports.SaveTransactionWithIdOrImportIdFromJSONTyped = exports.SaveTransactionWithIdOrImportIdFromJSON = exports.instanceOfSaveTransactionWithIdOrImportId = void 0;
12
+ const TransactionFlagColor_1 = require("./TransactionFlagColor");
13
+ const TransactionClearedStatus_1 = require("./TransactionClearedStatus");
14
+ const SaveSubTransaction_1 = require("./SaveSubTransaction");
15
+ /**
16
+ * Check if a given object implements the SaveTransactionWithIdOrImportId interface.
17
+ */
18
+ function instanceOfSaveTransactionWithIdOrImportId(value) {
19
+ return true;
20
+ }
21
+ exports.instanceOfSaveTransactionWithIdOrImportId = instanceOfSaveTransactionWithIdOrImportId;
22
+ function SaveTransactionWithIdOrImportIdFromJSON(json) {
23
+ return SaveTransactionWithIdOrImportIdFromJSONTyped(json, false);
24
+ }
25
+ exports.SaveTransactionWithIdOrImportIdFromJSON = SaveTransactionWithIdOrImportIdFromJSON;
26
+ function SaveTransactionWithIdOrImportIdFromJSONTyped(json, ignoreDiscriminator) {
27
+ if (json == null) {
28
+ return json;
29
+ }
30
+ return {
31
+ 'account_id': json['account_id'] == null ? undefined : json['account_id'],
32
+ 'date': json['date'] == null ? undefined : json['date'],
33
+ 'amount': json['amount'] == null ? undefined : json['amount'],
34
+ 'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
35
+ 'payee_name': json['payee_name'] == null ? undefined : json['payee_name'],
36
+ 'category_id': json['category_id'] == null ? undefined : json['category_id'],
37
+ 'memo': json['memo'] == null ? undefined : json['memo'],
38
+ 'cleared': json['cleared'] == null ? undefined : (0, TransactionClearedStatus_1.TransactionClearedStatusFromJSON)(json['cleared']),
39
+ 'approved': json['approved'] == null ? undefined : json['approved'],
40
+ 'flag_color': json['flag_color'] == null ? undefined : (0, TransactionFlagColor_1.TransactionFlagColorFromJSON)(json['flag_color']),
41
+ 'subtransactions': json['subtransactions'] == null ? undefined : (json['subtransactions'].map(SaveSubTransaction_1.SaveSubTransactionFromJSON)),
42
+ 'id': json['id'] == null ? undefined : json['id'],
43
+ 'import_id': json['import_id'] == null ? undefined : json['import_id'],
44
+ };
45
+ }
46
+ exports.SaveTransactionWithIdOrImportIdFromJSONTyped = SaveTransactionWithIdOrImportIdFromJSONTyped;
47
+ function SaveTransactionWithIdOrImportIdToJSON(value) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'account_id': value['account_id'],
53
+ 'date': value['date'],
54
+ 'amount': value['amount'],
55
+ 'payee_id': value['payee_id'],
56
+ 'payee_name': value['payee_name'],
57
+ 'category_id': value['category_id'],
58
+ 'memo': value['memo'],
59
+ 'cleared': (0, TransactionClearedStatus_1.TransactionClearedStatusToJSON)(value['cleared']),
60
+ 'approved': value['approved'],
61
+ 'flag_color': (0, TransactionFlagColor_1.TransactionFlagColorToJSON)(value['flag_color']),
62
+ 'subtransactions': value['subtransactions'] == null ? undefined : (value['subtransactions'].map(SaveSubTransaction_1.SaveSubTransactionToJSON)),
63
+ 'id': value['id'],
64
+ 'import_id': value['import_id'],
65
+ };
66
+ }
67
+ exports.SaveTransactionWithIdOrImportIdToJSON = SaveTransactionWithIdOrImportIdToJSON;
@@ -2,16 +2,11 @@
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
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
5
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
11
6
  */
12
- import type { SaveSubTransaction } from './SaveSubTransaction';
13
- import type { TransactionClearedStatus } from './TransactionClearedStatus';
14
7
  import type { TransactionFlagColor } from './TransactionFlagColor';
8
+ import type { TransactionClearedStatus } from './TransactionClearedStatus';
9
+ import type { SaveSubTransaction } from './SaveSubTransaction';
15
10
  /**
16
11
  *
17
12
  * @export
@@ -37,7 +32,7 @@ export interface SaveTransactionWithOptionalFields {
37
32
  */
38
33
  amount?: number;
39
34
  /**
40
- * The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `tranfer_payee_id` on the account resource.
35
+ * The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `transfer_payee_id` on the account resource.
41
36
  * @type {string}
42
37
  * @memberof SaveTransactionWithOptionalFields
43
38
  */
@@ -78,12 +73,6 @@ export interface SaveTransactionWithOptionalFields {
78
73
  * @memberof SaveTransactionWithOptionalFields
79
74
  */
80
75
  flag_color?: TransactionFlagColor | null;
81
- /**
82
- * If specified, the new transaction will be assigned this `import_id` and considered "imported". We will also attempt to match this imported transaction to an existing "user-entered" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.<br><br>Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.<br><br>If import_id is omitted or specified as null, the transaction will be treated as a "user-entered" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API).
83
- * @type {string}
84
- * @memberof SaveTransactionWithOptionalFields
85
- */
86
- import_id?: string | null;
87
76
  /**
88
77
  * An array of subtransactions to configure a transaction as a split. Updating `subtransactions` on an existing split transaction is not supported.
89
78
  * @type {Array<SaveSubTransaction>}
@@ -94,7 +83,7 @@ export interface SaveTransactionWithOptionalFields {
94
83
  /**
95
84
  * Check if a given object implements the SaveTransactionWithOptionalFields interface.
96
85
  */
97
- export declare function instanceOfSaveTransactionWithOptionalFields(value: object): boolean;
86
+ export declare function instanceOfSaveTransactionWithOptionalFields(value: object): value is SaveTransactionWithOptionalFields;
98
87
  export declare function SaveTransactionWithOptionalFieldsFromJSON(json: any): SaveTransactionWithOptionalFields;
99
88
  export declare function SaveTransactionWithOptionalFieldsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SaveTransactionWithOptionalFields;
100
89
  export declare function SaveTransactionWithOptionalFieldsToJSON(value?: SaveTransactionWithOptionalFields | null): any;
@@ -5,25 +5,18 @@
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
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
8
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
14
9
  */
15
10
  Object.defineProperty(exports, "__esModule", { value: true });
16
11
  exports.SaveTransactionWithOptionalFieldsToJSON = exports.SaveTransactionWithOptionalFieldsFromJSONTyped = exports.SaveTransactionWithOptionalFieldsFromJSON = exports.instanceOfSaveTransactionWithOptionalFields = void 0;
17
- const runtime_1 = require("../runtime");
18
- const SaveSubTransaction_1 = require("./SaveSubTransaction");
19
- const TransactionClearedStatus_1 = require("./TransactionClearedStatus");
20
12
  const TransactionFlagColor_1 = require("./TransactionFlagColor");
13
+ const TransactionClearedStatus_1 = require("./TransactionClearedStatus");
14
+ const SaveSubTransaction_1 = require("./SaveSubTransaction");
21
15
  /**
22
16
  * Check if a given object implements the SaveTransactionWithOptionalFields interface.
23
17
  */
24
18
  function instanceOfSaveTransactionWithOptionalFields(value) {
25
- let isInstance = true;
26
- return isInstance;
19
+ return true;
27
20
  }
28
21
  exports.instanceOfSaveTransactionWithOptionalFields = instanceOfSaveTransactionWithOptionalFields;
29
22
  function SaveTransactionWithOptionalFieldsFromJSON(json) {
@@ -31,45 +24,40 @@ function SaveTransactionWithOptionalFieldsFromJSON(json) {
31
24
  }
32
25
  exports.SaveTransactionWithOptionalFieldsFromJSON = SaveTransactionWithOptionalFieldsFromJSON;
33
26
  function SaveTransactionWithOptionalFieldsFromJSONTyped(json, ignoreDiscriminator) {
34
- if ((json === undefined) || (json === null)) {
27
+ if (json == null) {
35
28
  return json;
36
29
  }
37
30
  return {
38
- 'account_id': !(0, runtime_1.exists)(json, 'account_id') ? undefined : json['account_id'],
39
- 'date': !(0, runtime_1.exists)(json, 'date') ? undefined : json['date'],
40
- 'amount': !(0, runtime_1.exists)(json, 'amount') ? undefined : json['amount'],
41
- 'payee_id': !(0, runtime_1.exists)(json, 'payee_id') ? undefined : json['payee_id'],
42
- 'payee_name': !(0, runtime_1.exists)(json, 'payee_name') ? undefined : json['payee_name'],
43
- 'category_id': !(0, runtime_1.exists)(json, 'category_id') ? undefined : json['category_id'],
44
- 'memo': !(0, runtime_1.exists)(json, 'memo') ? undefined : json['memo'],
45
- 'cleared': !(0, runtime_1.exists)(json, 'cleared') ? undefined : (0, TransactionClearedStatus_1.TransactionClearedStatusFromJSON)(json['cleared']),
46
- 'approved': !(0, runtime_1.exists)(json, 'approved') ? undefined : json['approved'],
47
- 'flag_color': !(0, runtime_1.exists)(json, 'flag_color') ? undefined : (0, TransactionFlagColor_1.TransactionFlagColorFromJSON)(json['flag_color']),
48
- 'import_id': !(0, runtime_1.exists)(json, 'import_id') ? undefined : json['import_id'],
49
- 'subtransactions': !(0, runtime_1.exists)(json, 'subtransactions') ? undefined : (json['subtransactions'].map(SaveSubTransaction_1.SaveSubTransactionFromJSON)),
31
+ 'account_id': json['account_id'] == null ? undefined : json['account_id'],
32
+ 'date': json['date'] == null ? undefined : json['date'],
33
+ 'amount': json['amount'] == null ? undefined : json['amount'],
34
+ 'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
35
+ 'payee_name': json['payee_name'] == null ? undefined : json['payee_name'],
36
+ 'category_id': json['category_id'] == null ? undefined : json['category_id'],
37
+ 'memo': json['memo'] == null ? undefined : json['memo'],
38
+ 'cleared': json['cleared'] == null ? undefined : (0, TransactionClearedStatus_1.TransactionClearedStatusFromJSON)(json['cleared']),
39
+ 'approved': json['approved'] == null ? undefined : json['approved'],
40
+ 'flag_color': json['flag_color'] == null ? undefined : (0, TransactionFlagColor_1.TransactionFlagColorFromJSON)(json['flag_color']),
41
+ 'subtransactions': json['subtransactions'] == null ? undefined : (json['subtransactions'].map(SaveSubTransaction_1.SaveSubTransactionFromJSON)),
50
42
  };
51
43
  }
52
44
  exports.SaveTransactionWithOptionalFieldsFromJSONTyped = SaveTransactionWithOptionalFieldsFromJSONTyped;
53
45
  function SaveTransactionWithOptionalFieldsToJSON(value) {
54
- if (value === undefined) {
55
- return undefined;
56
- }
57
- if (value === null) {
58
- return null;
46
+ if (value == null) {
47
+ return value;
59
48
  }
60
49
  return {
61
- 'account_id': value.account_id,
62
- 'date': value.date,
63
- 'amount': value.amount,
64
- 'payee_id': value.payee_id,
65
- 'payee_name': value.payee_name,
66
- 'category_id': value.category_id,
67
- 'memo': value.memo,
68
- 'cleared': (0, TransactionClearedStatus_1.TransactionClearedStatusToJSON)(value.cleared),
69
- 'approved': value.approved,
70
- 'flag_color': (0, TransactionFlagColor_1.TransactionFlagColorToJSON)(value.flag_color),
71
- 'import_id': value.import_id,
72
- 'subtransactions': value.subtransactions === undefined ? undefined : (value.subtransactions.map(SaveSubTransaction_1.SaveSubTransactionToJSON)),
50
+ 'account_id': value['account_id'],
51
+ 'date': value['date'],
52
+ 'amount': value['amount'],
53
+ 'payee_id': value['payee_id'],
54
+ 'payee_name': value['payee_name'],
55
+ 'category_id': value['category_id'],
56
+ 'memo': value['memo'],
57
+ 'cleared': (0, TransactionClearedStatus_1.TransactionClearedStatusToJSON)(value['cleared']),
58
+ 'approved': value['approved'],
59
+ 'flag_color': (0, TransactionFlagColor_1.TransactionFlagColorToJSON)(value['flag_color']),
60
+ 'subtransactions': value['subtransactions'] == null ? undefined : (value['subtransactions'].map(SaveSubTransaction_1.SaveSubTransactionToJSON)),
73
61
  };
74
62
  }
75
63
  exports.SaveTransactionWithOptionalFieldsToJSON = SaveTransactionWithOptionalFieldsToJSON;
@@ -2,12 +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
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
5
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
11
6
  */
12
7
  import type { SaveTransactionsResponseData } from './SaveTransactionsResponseData';
13
8
  /**
@@ -26,7 +21,7 @@ export interface SaveTransactionsResponse {
26
21
  /**
27
22
  * Check if a given object implements the SaveTransactionsResponse interface.
28
23
  */
29
- export declare function instanceOfSaveTransactionsResponse(value: object): boolean;
24
+ export declare function instanceOfSaveTransactionsResponse(value: object): value is SaveTransactionsResponse;
30
25
  export declare function SaveTransactionsResponseFromJSON(json: any): SaveTransactionsResponse;
31
26
  export declare function SaveTransactionsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SaveTransactionsResponse;
32
27
  export declare function SaveTransactionsResponseToJSON(value?: SaveTransactionsResponse | null): any;