ynab 2.4.0 → 2.5.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 (216) hide show
  1. package/README.md +1 -1
  2. package/dist/esm/apis/AccountsApi.d.ts +1 -6
  3. package/dist/esm/apis/AccountsApi.js +2 -7
  4. package/dist/esm/apis/BudgetsApi.d.ts +1 -6
  5. package/dist/esm/apis/BudgetsApi.js +2 -7
  6. package/dist/esm/apis/CategoriesApi.d.ts +1 -6
  7. package/dist/esm/apis/CategoriesApi.js +2 -7
  8. package/dist/esm/apis/DeprecatedApi.js +1 -1
  9. package/dist/esm/apis/MonthsApi.d.ts +1 -6
  10. package/dist/esm/apis/MonthsApi.js +2 -7
  11. package/dist/esm/apis/PayeeLocationsApi.d.ts +1 -6
  12. package/dist/esm/apis/PayeeLocationsApi.js +2 -7
  13. package/dist/esm/apis/PayeesApi.d.ts +17 -7
  14. package/dist/esm/apis/PayeesApi.js +67 -8
  15. package/dist/esm/apis/ScheduledTransactionsApi.d.ts +16 -7
  16. package/dist/esm/apis/ScheduledTransactionsApi.js +64 -8
  17. package/dist/esm/apis/TransactionsApi.d.ts +40 -20
  18. package/dist/esm/apis/TransactionsApi.js +87 -17
  19. package/dist/esm/apis/UserApi.d.ts +1 -6
  20. package/dist/esm/apis/UserApi.js +2 -7
  21. package/dist/esm/models/Account.d.ts +2 -7
  22. package/dist/esm/models/Account.js +51 -51
  23. package/dist/esm/models/AccountResponse.d.ts +2 -7
  24. package/dist/esm/models/AccountResponse.js +8 -16
  25. package/dist/esm/models/AccountResponseData.d.ts +2 -7
  26. package/dist/esm/models/AccountResponseData.js +8 -16
  27. package/dist/esm/models/AccountType.d.ts +3 -7
  28. package/dist/esm/models/AccountType.js +11 -6
  29. package/dist/esm/models/AccountsResponse.d.ts +2 -7
  30. package/dist/esm/models/AccountsResponse.js +8 -16
  31. package/dist/esm/models/AccountsResponseData.d.ts +2 -7
  32. package/dist/esm/models/AccountsResponseData.js +11 -18
  33. package/dist/esm/models/BudgetDetail.d.ts +6 -11
  34. package/dist/esm/models/BudgetDetail.js +45 -53
  35. package/dist/esm/models/BudgetDetailResponse.d.ts +2 -7
  36. package/dist/esm/models/BudgetDetailResponse.js +8 -16
  37. package/dist/esm/models/BudgetDetailResponseData.d.ts +2 -7
  38. package/dist/esm/models/BudgetDetailResponseData.js +11 -18
  39. package/dist/esm/models/BudgetSettings.d.ts +2 -7
  40. package/dist/esm/models/BudgetSettings.js +11 -18
  41. package/dist/esm/models/BudgetSettingsResponse.d.ts +2 -7
  42. package/dist/esm/models/BudgetSettingsResponse.js +8 -16
  43. package/dist/esm/models/BudgetSettingsResponseData.d.ts +2 -7
  44. package/dist/esm/models/BudgetSettingsResponseData.js +8 -16
  45. package/dist/esm/models/BudgetSummary.d.ts +2 -7
  46. package/dist/esm/models/BudgetSummary.js +23 -31
  47. package/dist/esm/models/BudgetSummaryResponse.d.ts +2 -7
  48. package/dist/esm/models/BudgetSummaryResponse.js +8 -16
  49. package/dist/esm/models/BudgetSummaryResponseData.d.ts +2 -7
  50. package/dist/esm/models/BudgetSummaryResponseData.js +10 -19
  51. package/dist/esm/models/BulkResponse.d.ts +2 -7
  52. package/dist/esm/models/BulkResponse.js +8 -16
  53. package/dist/esm/models/BulkResponseData.d.ts +2 -7
  54. package/dist/esm/models/BulkResponseData.js +8 -16
  55. package/dist/esm/models/BulkResponseDataBulk.d.ts +2 -7
  56. package/dist/esm/models/BulkResponseDataBulk.js +11 -18
  57. package/dist/esm/models/BulkTransactions.d.ts +5 -10
  58. package/dist/esm/models/BulkTransactions.js +10 -18
  59. package/dist/esm/models/CategoriesResponse.d.ts +2 -7
  60. package/dist/esm/models/CategoriesResponse.js +8 -16
  61. package/dist/esm/models/CategoriesResponseData.d.ts +2 -7
  62. package/dist/esm/models/CategoriesResponseData.js +11 -18
  63. package/dist/esm/models/Category.d.ts +10 -9
  64. package/dist/esm/models/Category.js +61 -61
  65. package/dist/esm/models/CategoryGroup.d.ts +2 -7
  66. package/dist/esm/models/CategoryGroup.js +17 -22
  67. package/dist/esm/models/CategoryGroupWithCategories.d.ts +2 -7
  68. package/dist/esm/models/CategoryGroupWithCategories.js +20 -24
  69. package/dist/esm/models/CategoryResponse.d.ts +2 -7
  70. package/dist/esm/models/CategoryResponse.js +8 -16
  71. package/dist/esm/models/CategoryResponseData.d.ts +2 -7
  72. package/dist/esm/models/CategoryResponseData.js +8 -16
  73. package/dist/esm/models/CurrencyFormat.d.ts +2 -7
  74. package/dist/esm/models/CurrencyFormat.js +29 -30
  75. package/dist/esm/models/DateFormat.d.ts +2 -7
  76. package/dist/esm/models/DateFormat.js +8 -16
  77. package/dist/esm/models/ErrorDetail.d.ts +2 -7
  78. package/dist/esm/models/ErrorDetail.js +14 -20
  79. package/dist/esm/models/ErrorResponse.d.ts +2 -7
  80. package/dist/esm/models/ErrorResponse.js +8 -16
  81. package/dist/esm/models/ExistingTransaction.d.ts +89 -0
  82. package/dist/esm/models/ExistingTransaction.js +56 -0
  83. package/dist/esm/models/HybridTransaction.d.ts +12 -11
  84. package/dist/esm/models/HybridTransaction.js +63 -62
  85. package/dist/esm/models/HybridTransactionAllOf.d.ts +1 -1
  86. package/dist/esm/models/HybridTransactionsResponse.d.ts +2 -7
  87. package/dist/esm/models/HybridTransactionsResponse.js +8 -16
  88. package/dist/esm/models/HybridTransactionsResponseData.d.ts +2 -7
  89. package/dist/esm/models/HybridTransactionsResponseData.js +10 -19
  90. package/dist/esm/models/MonthDetail.d.ts +2 -7
  91. package/dist/esm/models/MonthDetail.js +30 -33
  92. package/dist/esm/models/MonthDetailResponse.d.ts +2 -7
  93. package/dist/esm/models/MonthDetailResponse.js +8 -16
  94. package/dist/esm/models/MonthDetailResponseData.d.ts +2 -7
  95. package/dist/esm/models/MonthDetailResponseData.js +8 -16
  96. package/dist/esm/models/MonthSummariesResponse.d.ts +2 -7
  97. package/dist/esm/models/MonthSummariesResponse.js +8 -16
  98. package/dist/esm/models/MonthSummariesResponseData.d.ts +2 -7
  99. package/dist/esm/models/MonthSummariesResponseData.js +11 -18
  100. package/dist/esm/models/MonthSummary.d.ts +2 -7
  101. package/dist/esm/models/MonthSummary.js +27 -31
  102. package/dist/esm/models/NewTransaction.d.ts +95 -0
  103. package/dist/esm/models/NewTransaction.js +58 -0
  104. package/dist/esm/models/PatchCategoryWrapper.d.ts +2 -7
  105. package/dist/esm/models/PatchCategoryWrapper.js +8 -16
  106. package/dist/esm/models/PatchMonthCategoryWrapper.d.ts +2 -7
  107. package/dist/esm/models/PatchMonthCategoryWrapper.js +8 -16
  108. package/dist/esm/models/PatchPayeeWrapper.d.ts +27 -0
  109. package/dist/esm/models/PatchPayeeWrapper.js +36 -0
  110. package/dist/esm/models/PatchTransactionsWrapper.d.ts +5 -10
  111. package/dist/esm/models/PatchTransactionsWrapper.js +10 -18
  112. package/dist/esm/models/Payee.d.ts +2 -7
  113. package/dist/esm/models/Payee.js +16 -23
  114. package/dist/esm/models/PayeeLocation.d.ts +2 -7
  115. package/dist/esm/models/PayeeLocation.js +20 -24
  116. package/dist/esm/models/PayeeLocationResponse.d.ts +2 -7
  117. package/dist/esm/models/PayeeLocationResponse.js +8 -16
  118. package/dist/esm/models/PayeeLocationResponseData.d.ts +2 -7
  119. package/dist/esm/models/PayeeLocationResponseData.js +8 -16
  120. package/dist/esm/models/PayeeLocationsResponse.d.ts +2 -7
  121. package/dist/esm/models/PayeeLocationsResponse.js +8 -16
  122. package/dist/esm/models/PayeeLocationsResponseData.d.ts +2 -7
  123. package/dist/esm/models/PayeeLocationsResponseData.js +8 -16
  124. package/dist/esm/models/PayeeResponse.d.ts +2 -7
  125. package/dist/esm/models/PayeeResponse.js +8 -16
  126. package/dist/esm/models/PayeeResponseData.d.ts +2 -7
  127. package/dist/esm/models/PayeeResponseData.js +8 -16
  128. package/dist/esm/models/PayeesResponse.d.ts +2 -7
  129. package/dist/esm/models/PayeesResponse.js +8 -16
  130. package/dist/esm/models/PayeesResponseData.d.ts +2 -7
  131. package/dist/esm/models/PayeesResponseData.js +11 -18
  132. package/dist/esm/models/PostAccountWrapper.d.ts +2 -7
  133. package/dist/esm/models/PostAccountWrapper.js +8 -16
  134. package/dist/esm/models/PostScheduledTransactionWrapper.d.ts +27 -0
  135. package/dist/esm/models/PostScheduledTransactionWrapper.js +36 -0
  136. package/dist/esm/models/PostTransactionsWrapper.d.ts +7 -12
  137. package/dist/esm/models/PostTransactionsWrapper.js +10 -20
  138. package/dist/esm/models/PutTransactionWrapper.d.ts +5 -10
  139. package/dist/esm/models/PutTransactionWrapper.js +10 -18
  140. package/dist/esm/models/SaveAccount.d.ts +2 -7
  141. package/dist/esm/models/SaveAccount.js +14 -20
  142. package/dist/esm/models/SaveCategory.d.ts +2 -7
  143. package/dist/esm/models/SaveCategory.js +11 -21
  144. package/dist/esm/models/SaveCategoryResponse.d.ts +2 -7
  145. package/dist/esm/models/SaveCategoryResponse.js +8 -16
  146. package/dist/esm/models/SaveCategoryResponseData.d.ts +2 -7
  147. package/dist/esm/models/SaveCategoryResponseData.js +11 -18
  148. package/dist/esm/models/SaveMonthCategory.d.ts +2 -7
  149. package/dist/esm/models/SaveMonthCategory.js +8 -16
  150. package/dist/esm/models/SavePayee.d.ts +26 -0
  151. package/dist/esm/models/SavePayee.js +33 -0
  152. package/dist/esm/models/SavePayeeResponse.d.ts +27 -0
  153. package/dist/esm/models/SavePayeeResponse.js +36 -0
  154. package/dist/esm/models/SavePayeeResponseData.d.ts +33 -0
  155. package/dist/esm/models/SavePayeeResponseData.js +40 -0
  156. package/dist/esm/models/SaveScheduledTransaction.d.ts +76 -0
  157. package/dist/esm/models/SaveScheduledTransaction.js +55 -0
  158. package/dist/esm/models/SaveSubTransaction.d.ts +2 -7
  159. package/dist/esm/models/SaveSubTransaction.js +16 -25
  160. package/dist/esm/models/SaveTransactionWithIdOrImportId.d.ts +101 -0
  161. package/dist/esm/models/SaveTransactionWithIdOrImportId.js +60 -0
  162. package/dist/esm/models/SaveTransactionWithOptionalFields.d.ts +5 -16
  163. package/dist/esm/models/SaveTransactionWithOptionalFields.js +29 -41
  164. package/dist/esm/models/SaveTransactionsResponse.d.ts +2 -7
  165. package/dist/esm/models/SaveTransactionsResponse.js +8 -16
  166. package/dist/esm/models/SaveTransactionsResponseData.d.ts +2 -7
  167. package/dist/esm/models/SaveTransactionsResponseData.js +17 -25
  168. package/dist/esm/models/ScheduledSubTransaction.d.ts +2 -7
  169. package/dist/esm/models/ScheduledSubTransaction.js +25 -31
  170. package/dist/esm/models/ScheduledTransactionDetail.d.ts +10 -9
  171. package/dist/esm/models/ScheduledTransactionDetail.js +49 -48
  172. package/dist/esm/models/ScheduledTransactionFrequency.d.ts +30 -0
  173. package/dist/esm/models/ScheduledTransactionFrequency.js +46 -0
  174. package/dist/esm/models/ScheduledTransactionResponse.d.ts +2 -7
  175. package/dist/esm/models/ScheduledTransactionResponse.js +8 -16
  176. package/dist/esm/models/ScheduledTransactionResponseData.d.ts +2 -7
  177. package/dist/esm/models/ScheduledTransactionResponseData.js +8 -16
  178. package/dist/esm/models/ScheduledTransactionSummary.d.ts +9 -8
  179. package/dist/esm/models/ScheduledTransactionSummary.js +38 -39
  180. package/dist/esm/models/ScheduledTransactionsResponse.d.ts +2 -7
  181. package/dist/esm/models/ScheduledTransactionsResponse.js +8 -16
  182. package/dist/esm/models/ScheduledTransactionsResponseData.d.ts +2 -7
  183. package/dist/esm/models/ScheduledTransactionsResponseData.js +11 -18
  184. package/dist/esm/models/SubTransaction.d.ts +2 -7
  185. package/dist/esm/models/SubTransaction.js +31 -37
  186. package/dist/esm/models/TransactionClearedStatus.d.ts +3 -7
  187. package/dist/esm/models/TransactionClearedStatus.js +11 -6
  188. package/dist/esm/models/TransactionDetail.d.ts +12 -11
  189. package/dist/esm/models/TransactionDetail.js +62 -61
  190. package/dist/esm/models/TransactionFlagColor.d.ts +3 -7
  191. package/dist/esm/models/TransactionFlagColor.js +11 -6
  192. package/dist/esm/models/TransactionResponse.d.ts +2 -7
  193. package/dist/esm/models/TransactionResponse.js +8 -16
  194. package/dist/esm/models/TransactionResponseData.d.ts +2 -7
  195. package/dist/esm/models/TransactionResponseData.js +8 -16
  196. package/dist/esm/models/TransactionSummary.d.ts +11 -10
  197. package/dist/esm/models/TransactionSummary.js +51 -52
  198. package/dist/esm/models/TransactionsImportResponse.d.ts +2 -7
  199. package/dist/esm/models/TransactionsImportResponse.js +8 -16
  200. package/dist/esm/models/TransactionsImportResponseData.d.ts +2 -7
  201. package/dist/esm/models/TransactionsImportResponseData.js +8 -16
  202. package/dist/esm/models/TransactionsResponse.d.ts +2 -7
  203. package/dist/esm/models/TransactionsResponse.js +8 -16
  204. package/dist/esm/models/TransactionsResponseData.d.ts +2 -7
  205. package/dist/esm/models/TransactionsResponseData.js +11 -18
  206. package/dist/esm/models/User.d.ts +2 -7
  207. package/dist/esm/models/User.js +8 -16
  208. package/dist/esm/models/UserResponse.d.ts +2 -7
  209. package/dist/esm/models/UserResponse.js +8 -16
  210. package/dist/esm/models/UserResponseData.d.ts +2 -7
  211. package/dist/esm/models/UserResponseData.js +8 -16
  212. package/dist/esm/models/index.d.ts +10 -9
  213. package/dist/esm/models/index.js +10 -9
  214. package/dist/esm/runtime.d.ts +10 -15
  215. package/dist/esm/runtime.js +2 -7
  216. package/package.json +1 -1
@@ -4,27 +4,23 @@
4
4
  * YNAB API Endpoints
5
5
  * 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
6
6
  *
7
- * The version of the OpenAPI document: 1.0.0
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
7
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
13
8
  */
14
9
  /**
15
10
  * Check if a given object implements the BulkResponseDataBulk interface.
16
11
  */
17
12
  export function instanceOfBulkResponseDataBulk(value) {
18
- var isInstance = true;
19
- isInstance = isInstance && "transaction_ids" in value;
20
- isInstance = isInstance && "duplicate_import_ids" in value;
21
- return isInstance;
13
+ if (!('transaction_ids' in value) || value['transaction_ids'] === undefined)
14
+ return false;
15
+ if (!('duplicate_import_ids' in value) || value['duplicate_import_ids'] === undefined)
16
+ return false;
17
+ return true;
22
18
  }
23
19
  export function BulkResponseDataBulkFromJSON(json) {
24
20
  return BulkResponseDataBulkFromJSONTyped(json, false);
25
21
  }
26
22
  export function BulkResponseDataBulkFromJSONTyped(json, ignoreDiscriminator) {
27
- if ((json === undefined) || (json === null)) {
23
+ if (json == null) {
28
24
  return json;
29
25
  }
30
26
  return {
@@ -33,14 +29,11 @@ export function BulkResponseDataBulkFromJSONTyped(json, ignoreDiscriminator) {
33
29
  };
34
30
  }
35
31
  export function BulkResponseDataBulkToJSON(value) {
36
- if (value === undefined) {
37
- return undefined;
38
- }
39
- if (value === null) {
40
- return null;
32
+ if (value == null) {
33
+ return value;
41
34
  }
42
35
  return {
43
- 'transaction_ids': value.transaction_ids,
44
- 'duplicate_import_ids': value.duplicate_import_ids,
36
+ 'transaction_ids': value['transaction_ids'],
37
+ 'duplicate_import_ids': value['duplicate_import_ids'],
45
38
  };
46
39
  }
@@ -2,14 +2,9 @@
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 { SaveTransaction } from './SaveTransaction';
7
+ import type { SaveTransactionWithOptionalFields } from './SaveTransactionWithOptionalFields';
13
8
  /**
14
9
  *
15
10
  * @export
@@ -18,15 +13,15 @@ import type { SaveTransaction } from './SaveTransaction';
18
13
  export interface BulkTransactions {
19
14
  /**
20
15
  *
21
- * @type {Array<SaveTransaction>}
16
+ * @type {Array<SaveTransactionWithOptionalFields>}
22
17
  * @memberof BulkTransactions
23
18
  */
24
- transactions: Array<SaveTransaction>;
19
+ transactions: Array<SaveTransactionWithOptionalFields>;
25
20
  }
26
21
  /**
27
22
  * Check if a given object implements the BulkTransactions interface.
28
23
  */
29
- export declare function instanceOfBulkTransactions(value: object): boolean;
24
+ export declare function instanceOfBulkTransactions(value: object): value is BulkTransactions;
30
25
  export declare function BulkTransactionsFromJSON(json: any): BulkTransactions;
31
26
  export declare function BulkTransactionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkTransactions;
32
27
  export declare function BulkTransactionsToJSON(value?: BulkTransactions | null): any;
@@ -4,41 +4,33 @@
4
4
  * YNAB API Endpoints
5
5
  * 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
6
6
  *
7
- * The version of the OpenAPI document: 1.0.0
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
7
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
13
8
  */
14
- import { SaveTransactionFromJSON, SaveTransactionToJSON, } from './SaveTransaction';
9
+ import { SaveTransactionWithOptionalFieldsFromJSON, SaveTransactionWithOptionalFieldsToJSON, } from './SaveTransactionWithOptionalFields';
15
10
  /**
16
11
  * Check if a given object implements the BulkTransactions interface.
17
12
  */
18
13
  export function instanceOfBulkTransactions(value) {
19
- var isInstance = true;
20
- isInstance = isInstance && "transactions" in value;
21
- return isInstance;
14
+ if (!('transactions' in value) || value['transactions'] === undefined)
15
+ return false;
16
+ return true;
22
17
  }
23
18
  export function BulkTransactionsFromJSON(json) {
24
19
  return BulkTransactionsFromJSONTyped(json, false);
25
20
  }
26
21
  export function BulkTransactionsFromJSONTyped(json, ignoreDiscriminator) {
27
- if ((json === undefined) || (json === null)) {
22
+ if (json == null) {
28
23
  return json;
29
24
  }
30
25
  return {
31
- 'transactions': (json['transactions'].map(SaveTransactionFromJSON)),
26
+ 'transactions': (json['transactions'].map(SaveTransactionWithOptionalFieldsFromJSON)),
32
27
  };
33
28
  }
34
29
  export function BulkTransactionsToJSON(value) {
35
- if (value === undefined) {
36
- return undefined;
37
- }
38
- if (value === null) {
39
- return null;
30
+ if (value == null) {
31
+ return value;
40
32
  }
41
33
  return {
42
- 'transactions': (value.transactions.map(SaveTransactionToJSON)),
34
+ 'transactions': (value['transactions'].map(SaveTransactionWithOptionalFieldsToJSON)),
43
35
  };
44
36
  }
@@ -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 { CategoriesResponseData } from './CategoriesResponseData';
13
8
  /**
@@ -26,7 +21,7 @@ export interface CategoriesResponse {
26
21
  /**
27
22
  * Check if a given object implements the CategoriesResponse interface.
28
23
  */
29
- export declare function instanceOfCategoriesResponse(value: object): boolean;
24
+ export declare function instanceOfCategoriesResponse(value: object): value is CategoriesResponse;
30
25
  export declare function CategoriesResponseFromJSON(json: any): CategoriesResponse;
31
26
  export declare function CategoriesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CategoriesResponse;
32
27
  export declare function CategoriesResponseToJSON(value?: CategoriesResponse | null): any;
@@ -4,27 +4,22 @@
4
4
  * YNAB API Endpoints
5
5
  * 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
6
6
  *
7
- * The version of the OpenAPI document: 1.0.0
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
7
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
13
8
  */
14
9
  import { CategoriesResponseDataFromJSON, CategoriesResponseDataToJSON, } from './CategoriesResponseData';
15
10
  /**
16
11
  * Check if a given object implements the CategoriesResponse interface.
17
12
  */
18
13
  export function instanceOfCategoriesResponse(value) {
19
- var isInstance = true;
20
- isInstance = isInstance && "data" in value;
21
- return isInstance;
14
+ if (!('data' in value) || value['data'] === undefined)
15
+ return false;
16
+ return true;
22
17
  }
23
18
  export function CategoriesResponseFromJSON(json) {
24
19
  return CategoriesResponseFromJSONTyped(json, false);
25
20
  }
26
21
  export function CategoriesResponseFromJSONTyped(json, ignoreDiscriminator) {
27
- if ((json === undefined) || (json === null)) {
22
+ if (json == null) {
28
23
  return json;
29
24
  }
30
25
  return {
@@ -32,13 +27,10 @@ export function CategoriesResponseFromJSONTyped(json, ignoreDiscriminator) {
32
27
  };
33
28
  }
34
29
  export function CategoriesResponseToJSON(value) {
35
- if (value === undefined) {
36
- return undefined;
37
- }
38
- if (value === null) {
39
- return null;
30
+ if (value == null) {
31
+ return value;
40
32
  }
41
33
  return {
42
- 'data': CategoriesResponseDataToJSON(value.data),
34
+ 'data': CategoriesResponseDataToJSON(value['data']),
43
35
  };
44
36
  }
@@ -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 { CategoryGroupWithCategories } from './CategoryGroupWithCategories';
13
8
  /**
@@ -32,7 +27,7 @@ export interface CategoriesResponseData {
32
27
  /**
33
28
  * Check if a given object implements the CategoriesResponseData interface.
34
29
  */
35
- export declare function instanceOfCategoriesResponseData(value: object): boolean;
30
+ export declare function instanceOfCategoriesResponseData(value: object): value is CategoriesResponseData;
36
31
  export declare function CategoriesResponseDataFromJSON(json: any): CategoriesResponseData;
37
32
  export declare function CategoriesResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CategoriesResponseData;
38
33
  export declare function CategoriesResponseDataToJSON(value?: CategoriesResponseData | null): any;
@@ -4,28 +4,24 @@
4
4
  * YNAB API Endpoints
5
5
  * 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
6
6
  *
7
- * The version of the OpenAPI document: 1.0.0
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
7
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
13
8
  */
14
9
  import { CategoryGroupWithCategoriesFromJSON, CategoryGroupWithCategoriesToJSON, } from './CategoryGroupWithCategories';
15
10
  /**
16
11
  * Check if a given object implements the CategoriesResponseData interface.
17
12
  */
18
13
  export function instanceOfCategoriesResponseData(value) {
19
- var isInstance = true;
20
- isInstance = isInstance && "category_groups" in value;
21
- isInstance = isInstance && "server_knowledge" in value;
22
- return isInstance;
14
+ if (!('category_groups' in value) || value['category_groups'] === undefined)
15
+ return false;
16
+ if (!('server_knowledge' in value) || value['server_knowledge'] === undefined)
17
+ return false;
18
+ return true;
23
19
  }
24
20
  export function CategoriesResponseDataFromJSON(json) {
25
21
  return CategoriesResponseDataFromJSONTyped(json, false);
26
22
  }
27
23
  export function CategoriesResponseDataFromJSONTyped(json, ignoreDiscriminator) {
28
- if ((json === undefined) || (json === null)) {
24
+ if (json == null) {
29
25
  return json;
30
26
  }
31
27
  return {
@@ -34,14 +30,11 @@ export function CategoriesResponseDataFromJSONTyped(json, ignoreDiscriminator) {
34
30
  };
35
31
  }
36
32
  export function CategoriesResponseDataToJSON(value) {
37
- if (value === undefined) {
38
- return undefined;
39
- }
40
- if (value === null) {
41
- return null;
33
+ if (value == null) {
34
+ return value;
42
35
  }
43
36
  return {
44
- 'category_groups': (value.category_groups.map(CategoryGroupWithCategoriesToJSON)),
45
- 'server_knowledge': value.server_knowledge,
37
+ 'category_groups': (value['category_groups'].map(CategoryGroupWithCategoriesToJSON)),
38
+ 'server_knowledge': value['server_knowledge'],
46
39
  };
47
40
  }
@@ -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
  *
@@ -80,7 +75,13 @@ export interface Category {
80
75
  * @type {string}
81
76
  * @memberof Category
82
77
  */
83
- goal_type?: CategoryGoalTypeEnum;
78
+ goal_type?: CategoryGoalTypeEnum | null;
79
+ /**
80
+ * Indicates the monthly rollover behavior for "NEED"-type goals. When "true", the goal will always ask for the target amount in the new month ("Set Aside"). When "false", previous month category funding is used ("Refill"). For other goal types, this field will be null.
81
+ * @type {boolean}
82
+ * @memberof Category
83
+ */
84
+ goal_needs_whole_amount?: boolean | null;
84
85
  /**
85
86
  * A day offset modifier for the goal's due date. When goal_cadence is 2 (Weekly), this value specifies which day of the week the goal is due (0 = Sunday, 6 = Saturday). Otherwise, this value specifies which day of the month the goal is due (1 = 1st, 31 = 31st, null = Last day of Month).
86
87
  * @type {number}
@@ -164,11 +165,11 @@ export declare const CategoryGoalTypeEnum: {
164
165
  readonly Need: "NEED";
165
166
  readonly Debt: "DEBT";
166
167
  };
167
- export declare type CategoryGoalTypeEnum = typeof CategoryGoalTypeEnum[keyof typeof CategoryGoalTypeEnum];
168
+ export type CategoryGoalTypeEnum = typeof CategoryGoalTypeEnum[keyof typeof CategoryGoalTypeEnum];
168
169
  /**
169
170
  * Check if a given object implements the Category interface.
170
171
  */
171
- export declare function instanceOfCategory(value: object): boolean;
172
+ export declare function instanceOfCategory(value: object): value is Category;
172
173
  export declare function CategoryFromJSON(json: any): Category;
173
174
  export declare function CategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): Category;
174
175
  export declare function CategoryToJSON(value?: Category | null): any;
@@ -4,14 +4,8 @@
4
4
  * YNAB API Endpoints
5
5
  * 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
6
6
  *
7
- * The version of the OpenAPI document: 1.0.0
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
7
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
13
8
  */
14
- import { exists } from '../runtime';
15
9
  /**
16
10
  * @export
17
11
  */
@@ -26,80 +20,86 @@ export var CategoryGoalTypeEnum = {
26
20
  * Check if a given object implements the Category interface.
27
21
  */
28
22
  export function instanceOfCategory(value) {
29
- var isInstance = true;
30
- isInstance = isInstance && "id" in value;
31
- isInstance = isInstance && "category_group_id" in value;
32
- isInstance = isInstance && "name" in value;
33
- isInstance = isInstance && "hidden" in value;
34
- isInstance = isInstance && "budgeted" in value;
35
- isInstance = isInstance && "activity" in value;
36
- isInstance = isInstance && "balance" in value;
37
- isInstance = isInstance && "deleted" in value;
38
- return isInstance;
23
+ if (!('id' in value) || value['id'] === undefined)
24
+ return false;
25
+ if (!('category_group_id' in value) || value['category_group_id'] === undefined)
26
+ return false;
27
+ if (!('name' in value) || value['name'] === undefined)
28
+ return false;
29
+ if (!('hidden' in value) || value['hidden'] === undefined)
30
+ return false;
31
+ if (!('budgeted' in value) || value['budgeted'] === undefined)
32
+ return false;
33
+ if (!('activity' in value) || value['activity'] === undefined)
34
+ return false;
35
+ if (!('balance' in value) || value['balance'] === undefined)
36
+ return false;
37
+ if (!('deleted' in value) || value['deleted'] === undefined)
38
+ return false;
39
+ return true;
39
40
  }
40
41
  export function CategoryFromJSON(json) {
41
42
  return CategoryFromJSONTyped(json, false);
42
43
  }
43
44
  export function CategoryFromJSONTyped(json, ignoreDiscriminator) {
44
- if ((json === undefined) || (json === null)) {
45
+ if (json == null) {
45
46
  return json;
46
47
  }
47
48
  return {
48
49
  'id': json['id'],
49
50
  'category_group_id': json['category_group_id'],
50
- 'category_group_name': !exists(json, 'category_group_name') ? undefined : json['category_group_name'],
51
+ 'category_group_name': json['category_group_name'] == null ? undefined : json['category_group_name'],
51
52
  'name': json['name'],
52
53
  'hidden': json['hidden'],
53
- 'original_category_group_id': !exists(json, 'original_category_group_id') ? undefined : json['original_category_group_id'],
54
- 'note': !exists(json, 'note') ? undefined : json['note'],
54
+ 'original_category_group_id': json['original_category_group_id'] == null ? undefined : json['original_category_group_id'],
55
+ 'note': json['note'] == null ? undefined : json['note'],
55
56
  'budgeted': json['budgeted'],
56
57
  'activity': json['activity'],
57
58
  'balance': json['balance'],
58
- 'goal_type': !exists(json, 'goal_type') ? undefined : json['goal_type'],
59
- 'goal_day': !exists(json, 'goal_day') ? undefined : json['goal_day'],
60
- 'goal_cadence': !exists(json, 'goal_cadence') ? undefined : json['goal_cadence'],
61
- 'goal_cadence_frequency': !exists(json, 'goal_cadence_frequency') ? undefined : json['goal_cadence_frequency'],
62
- 'goal_creation_month': !exists(json, 'goal_creation_month') ? undefined : json['goal_creation_month'],
63
- 'goal_target': !exists(json, 'goal_target') ? undefined : json['goal_target'],
64
- 'goal_target_month': !exists(json, 'goal_target_month') ? undefined : json['goal_target_month'],
65
- 'goal_percentage_complete': !exists(json, 'goal_percentage_complete') ? undefined : json['goal_percentage_complete'],
66
- 'goal_months_to_budget': !exists(json, 'goal_months_to_budget') ? undefined : json['goal_months_to_budget'],
67
- 'goal_under_funded': !exists(json, 'goal_under_funded') ? undefined : json['goal_under_funded'],
68
- 'goal_overall_funded': !exists(json, 'goal_overall_funded') ? undefined : json['goal_overall_funded'],
69
- 'goal_overall_left': !exists(json, 'goal_overall_left') ? undefined : json['goal_overall_left'],
59
+ 'goal_type': json['goal_type'] == null ? undefined : json['goal_type'],
60
+ 'goal_needs_whole_amount': json['goal_needs_whole_amount'] == null ? undefined : json['goal_needs_whole_amount'],
61
+ 'goal_day': json['goal_day'] == null ? undefined : json['goal_day'],
62
+ 'goal_cadence': json['goal_cadence'] == null ? undefined : json['goal_cadence'],
63
+ 'goal_cadence_frequency': json['goal_cadence_frequency'] == null ? undefined : json['goal_cadence_frequency'],
64
+ 'goal_creation_month': json['goal_creation_month'] == null ? undefined : json['goal_creation_month'],
65
+ 'goal_target': json['goal_target'] == null ? undefined : json['goal_target'],
66
+ 'goal_target_month': json['goal_target_month'] == null ? undefined : json['goal_target_month'],
67
+ 'goal_percentage_complete': json['goal_percentage_complete'] == null ? undefined : json['goal_percentage_complete'],
68
+ 'goal_months_to_budget': json['goal_months_to_budget'] == null ? undefined : json['goal_months_to_budget'],
69
+ 'goal_under_funded': json['goal_under_funded'] == null ? undefined : json['goal_under_funded'],
70
+ 'goal_overall_funded': json['goal_overall_funded'] == null ? undefined : json['goal_overall_funded'],
71
+ 'goal_overall_left': json['goal_overall_left'] == null ? undefined : json['goal_overall_left'],
70
72
  'deleted': json['deleted'],
71
73
  };
72
74
  }
73
75
  export function CategoryToJSON(value) {
74
- if (value === undefined) {
75
- return undefined;
76
- }
77
- if (value === null) {
78
- return null;
76
+ if (value == null) {
77
+ return value;
79
78
  }
80
79
  return {
81
- 'id': value.id,
82
- 'category_group_id': value.category_group_id,
83
- 'category_group_name': value.category_group_name,
84
- 'name': value.name,
85
- 'hidden': value.hidden,
86
- 'original_category_group_id': value.original_category_group_id,
87
- 'note': value.note,
88
- 'budgeted': value.budgeted,
89
- 'activity': value.activity,
90
- 'balance': value.balance,
91
- 'goal_type': value.goal_type,
92
- 'goal_day': value.goal_day,
93
- 'goal_cadence': value.goal_cadence,
94
- 'goal_cadence_frequency': value.goal_cadence_frequency,
95
- 'goal_creation_month': value.goal_creation_month,
96
- 'goal_target': value.goal_target,
97
- 'goal_target_month': value.goal_target_month,
98
- 'goal_percentage_complete': value.goal_percentage_complete,
99
- 'goal_months_to_budget': value.goal_months_to_budget,
100
- 'goal_under_funded': value.goal_under_funded,
101
- 'goal_overall_funded': value.goal_overall_funded,
102
- 'goal_overall_left': value.goal_overall_left,
103
- 'deleted': value.deleted,
80
+ 'id': value['id'],
81
+ 'category_group_id': value['category_group_id'],
82
+ 'category_group_name': value['category_group_name'],
83
+ 'name': value['name'],
84
+ 'hidden': value['hidden'],
85
+ 'original_category_group_id': value['original_category_group_id'],
86
+ 'note': value['note'],
87
+ 'budgeted': value['budgeted'],
88
+ 'activity': value['activity'],
89
+ 'balance': value['balance'],
90
+ 'goal_type': value['goal_type'],
91
+ 'goal_needs_whole_amount': value['goal_needs_whole_amount'],
92
+ 'goal_day': value['goal_day'],
93
+ 'goal_cadence': value['goal_cadence'],
94
+ 'goal_cadence_frequency': value['goal_cadence_frequency'],
95
+ 'goal_creation_month': value['goal_creation_month'],
96
+ 'goal_target': value['goal_target'],
97
+ 'goal_target_month': value['goal_target_month'],
98
+ 'goal_percentage_complete': value['goal_percentage_complete'],
99
+ 'goal_months_to_budget': value['goal_months_to_budget'],
100
+ 'goal_under_funded': value['goal_under_funded'],
101
+ 'goal_overall_funded': value['goal_overall_funded'],
102
+ 'goal_overall_left': value['goal_overall_left'],
103
+ 'deleted': value['deleted'],
104
104
  };
105
105
  }
@@ -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
  *
@@ -43,7 +38,7 @@ export interface CategoryGroup {
43
38
  /**
44
39
  * Check if a given object implements the CategoryGroup interface.
45
40
  */
46
- export declare function instanceOfCategoryGroup(value: object): boolean;
41
+ export declare function instanceOfCategoryGroup(value: object): value is CategoryGroup;
47
42
  export declare function CategoryGroupFromJSON(json: any): CategoryGroup;
48
43
  export declare function CategoryGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): CategoryGroup;
49
44
  export declare function CategoryGroupToJSON(value?: CategoryGroup | null): any;
@@ -4,29 +4,27 @@
4
4
  * YNAB API Endpoints
5
5
  * 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
6
6
  *
7
- * The version of the OpenAPI document: 1.0.0
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
7
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
13
8
  */
14
9
  /**
15
10
  * Check if a given object implements the CategoryGroup interface.
16
11
  */
17
12
  export function instanceOfCategoryGroup(value) {
18
- var isInstance = true;
19
- isInstance = isInstance && "id" in value;
20
- isInstance = isInstance && "name" in value;
21
- isInstance = isInstance && "hidden" in value;
22
- isInstance = isInstance && "deleted" in value;
23
- return isInstance;
13
+ if (!('id' in value) || value['id'] === undefined)
14
+ return false;
15
+ if (!('name' in value) || value['name'] === undefined)
16
+ return false;
17
+ if (!('hidden' in value) || value['hidden'] === undefined)
18
+ return false;
19
+ if (!('deleted' in value) || value['deleted'] === undefined)
20
+ return false;
21
+ return true;
24
22
  }
25
23
  export function CategoryGroupFromJSON(json) {
26
24
  return CategoryGroupFromJSONTyped(json, false);
27
25
  }
28
26
  export function CategoryGroupFromJSONTyped(json, ignoreDiscriminator) {
29
- if ((json === undefined) || (json === null)) {
27
+ if (json == null) {
30
28
  return json;
31
29
  }
32
30
  return {
@@ -37,16 +35,13 @@ export function CategoryGroupFromJSONTyped(json, ignoreDiscriminator) {
37
35
  };
38
36
  }
39
37
  export function CategoryGroupToJSON(value) {
40
- if (value === undefined) {
41
- return undefined;
42
- }
43
- if (value === null) {
44
- return null;
38
+ if (value == null) {
39
+ return value;
45
40
  }
46
41
  return {
47
- 'id': value.id,
48
- 'name': value.name,
49
- 'hidden': value.hidden,
50
- 'deleted': value.deleted,
42
+ 'id': value['id'],
43
+ 'name': value['name'],
44
+ 'hidden': value['hidden'],
45
+ 'deleted': value['deleted'],
51
46
  };
52
47
  }
@@ -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 { Category } from './Category';
13
8
  /**
@@ -50,7 +45,7 @@ export interface CategoryGroupWithCategories {
50
45
  /**
51
46
  * Check if a given object implements the CategoryGroupWithCategories interface.
52
47
  */
53
- export declare function instanceOfCategoryGroupWithCategories(value: object): boolean;
48
+ export declare function instanceOfCategoryGroupWithCategories(value: object): value is CategoryGroupWithCategories;
54
49
  export declare function CategoryGroupWithCategoriesFromJSON(json: any): CategoryGroupWithCategories;
55
50
  export declare function CategoryGroupWithCategoriesFromJSONTyped(json: any, ignoreDiscriminator: boolean): CategoryGroupWithCategories;
56
51
  export declare function CategoryGroupWithCategoriesToJSON(value?: CategoryGroupWithCategories | null): any;