ynab 3.1.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/README.md +1 -1
  2. package/dist/apis/AccountsApi.js +3 -3
  3. package/dist/apis/CategoriesApi.js +8 -8
  4. package/dist/apis/MoneyMovementsApi.js +4 -4
  5. package/dist/apis/MonthsApi.js +2 -2
  6. package/dist/apis/PayeeLocationsApi.js +3 -3
  7. package/dist/apis/PayeesApi.d.ts +15 -1
  8. package/dist/apis/PayeesApi.js +42 -3
  9. package/dist/apis/PlansApi.js +3 -3
  10. package/dist/apis/ScheduledTransactionsApi.js +5 -5
  11. package/dist/apis/TransactionsApi.js +11 -11
  12. package/dist/browser/ynab.js +1 -1
  13. package/dist/esm/apis/AccountsApi.js +3 -3
  14. package/dist/esm/apis/CategoriesApi.js +8 -8
  15. package/dist/esm/apis/MoneyMovementsApi.js +4 -4
  16. package/dist/esm/apis/MonthsApi.js +2 -2
  17. package/dist/esm/apis/PayeeLocationsApi.js +3 -3
  18. package/dist/esm/apis/PayeesApi.d.ts +15 -1
  19. package/dist/esm/apis/PayeesApi.js +65 -4
  20. package/dist/esm/apis/PlansApi.js +3 -3
  21. package/dist/esm/apis/ScheduledTransactionsApi.js +5 -5
  22. package/dist/esm/apis/TransactionsApi.js +11 -11
  23. package/dist/esm/models/Account.d.ts +40 -4
  24. package/dist/esm/models/Account.js +12 -0
  25. package/dist/esm/models/AccountBase.d.ts +136 -0
  26. package/dist/esm/models/AccountBase.js +92 -0
  27. package/dist/esm/models/Category.d.ts +100 -16
  28. package/dist/esm/models/Category.js +28 -0
  29. package/dist/esm/models/CategoryBase.d.ts +188 -0
  30. package/dist/esm/models/CategoryBase.js +113 -0
  31. package/dist/esm/models/ExistingCategory.d.ts +7 -1
  32. package/dist/esm/models/ExistingCategory.js +2 -0
  33. package/dist/esm/models/HybridTransaction.d.ts +12 -0
  34. package/dist/esm/models/HybridTransaction.js +4 -0
  35. package/dist/esm/models/MoneyMovement.d.ts +19 -7
  36. package/dist/esm/models/MoneyMovement.js +4 -0
  37. package/dist/esm/models/MoneyMovementBase.d.ts +75 -0
  38. package/dist/esm/models/MoneyMovementBase.js +57 -0
  39. package/dist/esm/models/MonthDetail.d.ts +48 -0
  40. package/dist/esm/models/MonthDetail.js +16 -0
  41. package/dist/esm/models/MonthDetailBase.d.ts +76 -0
  42. package/dist/esm/models/MonthDetailBase.js +68 -0
  43. package/dist/esm/models/MonthSummary.d.ts +50 -2
  44. package/dist/esm/models/MonthSummary.js +16 -0
  45. package/dist/esm/models/MonthSummaryBase.d.ts +69 -0
  46. package/dist/esm/models/MonthSummaryBase.js +63 -0
  47. package/dist/esm/models/NewCategory.d.ts +7 -1
  48. package/dist/esm/models/NewCategory.js +2 -0
  49. package/dist/esm/models/PlanDetail.d.ts +21 -21
  50. package/dist/esm/models/PlanDetail.js +21 -21
  51. package/dist/esm/models/PlanDetailResponseData.d.ts +1 -1
  52. package/dist/esm/models/PlanDetailResponseData.js +3 -3
  53. package/dist/esm/models/PlanSummaryResponseData.d.ts +2 -2
  54. package/dist/esm/models/PlanSummaryResponseData.js +5 -5
  55. package/dist/esm/models/PostPayee.d.ts +27 -0
  56. package/dist/esm/models/PostPayee.js +39 -0
  57. package/dist/esm/models/PostPayeeWrapper.d.ts +28 -0
  58. package/dist/esm/models/PostPayeeWrapper.js +40 -0
  59. package/dist/esm/models/SaveAccount.d.ts +3 -3
  60. package/dist/esm/models/SaveAccount.js +3 -3
  61. package/dist/esm/models/SaveAccountType.d.ts +24 -0
  62. package/dist/esm/models/SaveAccountType.js +42 -0
  63. package/dist/esm/models/SaveCategory.d.ts +7 -1
  64. package/dist/esm/models/SaveCategory.js +2 -0
  65. package/dist/esm/models/SavePayee.d.ts +1 -1
  66. package/dist/esm/models/ScheduledSubTransaction.d.ts +18 -6
  67. package/dist/esm/models/ScheduledSubTransaction.js +4 -0
  68. package/dist/esm/models/ScheduledSubTransactionBase.d.ts +81 -0
  69. package/dist/esm/models/ScheduledSubTransactionBase.js +63 -0
  70. package/dist/esm/models/ScheduledTransactionDetail.d.ts +12 -0
  71. package/dist/esm/models/ScheduledTransactionDetail.js +4 -0
  72. package/dist/esm/models/ScheduledTransactionSummary.d.ts +17 -5
  73. package/dist/esm/models/ScheduledTransactionSummary.js +4 -0
  74. package/dist/esm/models/ScheduledTransactionSummaryBase.d.ts +119 -0
  75. package/dist/esm/models/ScheduledTransactionSummaryBase.js +94 -0
  76. package/dist/esm/models/SubTransaction.d.ts +19 -7
  77. package/dist/esm/models/SubTransaction.js +4 -0
  78. package/dist/esm/models/SubTransactionBase.d.ts +87 -0
  79. package/dist/esm/models/SubTransactionBase.js +65 -0
  80. package/dist/esm/models/TransactionDetail.d.ts +12 -0
  81. package/dist/esm/models/TransactionDetail.js +4 -0
  82. package/dist/esm/models/TransactionSummary.d.ts +22 -10
  83. package/dist/esm/models/TransactionSummary.js +4 -0
  84. package/dist/esm/models/TransactionSummaryBase.d.ts +151 -0
  85. package/dist/esm/models/TransactionSummaryBase.js +102 -0
  86. package/dist/esm/models/index.d.ts +12 -0
  87. package/dist/esm/models/index.js +12 -0
  88. package/dist/models/Account.d.ts +40 -4
  89. package/dist/models/Account.js +12 -0
  90. package/dist/models/AccountBase.d.ts +136 -0
  91. package/dist/models/AccountBase.js +98 -0
  92. package/dist/models/Category.d.ts +100 -16
  93. package/dist/models/Category.js +28 -0
  94. package/dist/models/CategoryBase.d.ts +188 -0
  95. package/dist/models/CategoryBase.js +120 -0
  96. package/dist/models/ExistingCategory.d.ts +7 -1
  97. package/dist/models/ExistingCategory.js +2 -0
  98. package/dist/models/HybridTransaction.d.ts +12 -0
  99. package/dist/models/HybridTransaction.js +4 -0
  100. package/dist/models/MoneyMovement.d.ts +19 -7
  101. package/dist/models/MoneyMovement.js +4 -0
  102. package/dist/models/MoneyMovementBase.d.ts +75 -0
  103. package/dist/models/MoneyMovementBase.js +63 -0
  104. package/dist/models/MonthDetail.d.ts +48 -0
  105. package/dist/models/MonthDetail.js +16 -0
  106. package/dist/models/MonthDetailBase.d.ts +76 -0
  107. package/dist/models/MonthDetailBase.js +74 -0
  108. package/dist/models/MonthSummary.d.ts +50 -2
  109. package/dist/models/MonthSummary.js +16 -0
  110. package/dist/models/MonthSummaryBase.d.ts +69 -0
  111. package/dist/models/MonthSummaryBase.js +69 -0
  112. package/dist/models/NewCategory.d.ts +7 -1
  113. package/dist/models/NewCategory.js +2 -0
  114. package/dist/models/PlanDetail.d.ts +21 -21
  115. package/dist/models/PlanDetail.js +21 -21
  116. package/dist/models/PlanDetailResponseData.d.ts +1 -1
  117. package/dist/models/PlanDetailResponseData.js +3 -3
  118. package/dist/models/PlanSummaryResponseData.d.ts +2 -2
  119. package/dist/models/PlanSummaryResponseData.js +5 -5
  120. package/dist/models/PostPayee.d.ts +27 -0
  121. package/dist/models/PostPayee.js +45 -0
  122. package/dist/models/PostPayeeWrapper.d.ts +28 -0
  123. package/dist/models/PostPayeeWrapper.js +46 -0
  124. package/dist/models/SaveAccount.d.ts +3 -3
  125. package/dist/models/SaveAccount.js +3 -3
  126. package/dist/models/SaveAccountType.d.ts +24 -0
  127. package/dist/models/SaveAccountType.js +50 -0
  128. package/dist/models/SaveCategory.d.ts +7 -1
  129. package/dist/models/SaveCategory.js +2 -0
  130. package/dist/models/SavePayee.d.ts +1 -1
  131. package/dist/models/ScheduledSubTransaction.d.ts +18 -6
  132. package/dist/models/ScheduledSubTransaction.js +4 -0
  133. package/dist/models/ScheduledSubTransactionBase.d.ts +81 -0
  134. package/dist/models/ScheduledSubTransactionBase.js +69 -0
  135. package/dist/models/ScheduledTransactionDetail.d.ts +12 -0
  136. package/dist/models/ScheduledTransactionDetail.js +4 -0
  137. package/dist/models/ScheduledTransactionSummary.d.ts +17 -5
  138. package/dist/models/ScheduledTransactionSummary.js +4 -0
  139. package/dist/models/ScheduledTransactionSummaryBase.d.ts +119 -0
  140. package/dist/models/ScheduledTransactionSummaryBase.js +101 -0
  141. package/dist/models/SubTransaction.d.ts +19 -7
  142. package/dist/models/SubTransaction.js +4 -0
  143. package/dist/models/SubTransactionBase.d.ts +87 -0
  144. package/dist/models/SubTransactionBase.js +71 -0
  145. package/dist/models/TransactionDetail.d.ts +12 -0
  146. package/dist/models/TransactionDetail.js +4 -0
  147. package/dist/models/TransactionSummary.d.ts +22 -10
  148. package/dist/models/TransactionSummary.js +4 -0
  149. package/dist/models/TransactionSummaryBase.d.ts +151 -0
  150. package/dist/models/TransactionSummaryBase.js +109 -0
  151. package/dist/models/index.d.ts +12 -0
  152. package/dist/models/index.js +12 -0
  153. package/package.json +2 -2
@@ -0,0 +1,102 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * YNAB API Endpoints
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
+ *
7
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
8
+ */
9
+ import { TransactionFlagColorFromJSON, TransactionFlagColorToJSON, } from './TransactionFlagColor';
10
+ import { TransactionClearedStatusFromJSON, TransactionClearedStatusToJSON, } from './TransactionClearedStatus';
11
+ /**
12
+ * @export
13
+ */
14
+ export var TransactionSummaryBaseDebtTransactionTypeEnum = {
15
+ Payment: 'payment',
16
+ Refund: 'refund',
17
+ Fee: 'fee',
18
+ Interest: 'interest',
19
+ Escrow: 'escrow',
20
+ BalanceAdjustment: 'balanceAdjustment',
21
+ Credit: 'credit',
22
+ Charge: 'charge'
23
+ };
24
+ /**
25
+ * Check if a given object implements the TransactionSummaryBase interface.
26
+ */
27
+ export function instanceOfTransactionSummaryBase(value) {
28
+ if (!('id' in value) || value['id'] === undefined)
29
+ return false;
30
+ if (!('date' in value) || value['date'] === undefined)
31
+ return false;
32
+ if (!('amount' in value) || value['amount'] === undefined)
33
+ return false;
34
+ if (!('cleared' in value) || value['cleared'] === undefined)
35
+ return false;
36
+ if (!('approved' in value) || value['approved'] === undefined)
37
+ return false;
38
+ if (!('account_id' in value) || value['account_id'] === undefined)
39
+ return false;
40
+ if (!('deleted' in value) || value['deleted'] === undefined)
41
+ return false;
42
+ return true;
43
+ }
44
+ export function TransactionSummaryBaseFromJSON(json) {
45
+ return TransactionSummaryBaseFromJSONTyped(json, false);
46
+ }
47
+ export function TransactionSummaryBaseFromJSONTyped(json, ignoreDiscriminator) {
48
+ if (json == null) {
49
+ return json;
50
+ }
51
+ return {
52
+ 'id': json['id'],
53
+ 'date': json['date'],
54
+ 'amount': json['amount'],
55
+ 'memo': json['memo'] == null ? undefined : json['memo'],
56
+ 'cleared': TransactionClearedStatusFromJSON(json['cleared']),
57
+ 'approved': json['approved'],
58
+ 'flag_color': json['flag_color'] == null ? undefined : TransactionFlagColorFromJSON(json['flag_color']),
59
+ 'flag_name': json['flag_name'] == null ? undefined : json['flag_name'],
60
+ 'account_id': json['account_id'],
61
+ 'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
62
+ 'category_id': json['category_id'] == null ? undefined : json['category_id'],
63
+ 'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
64
+ 'transfer_transaction_id': json['transfer_transaction_id'] == null ? undefined : json['transfer_transaction_id'],
65
+ 'matched_transaction_id': json['matched_transaction_id'] == null ? undefined : json['matched_transaction_id'],
66
+ 'import_id': json['import_id'] == null ? undefined : json['import_id'],
67
+ 'import_payee_name': json['import_payee_name'] == null ? undefined : json['import_payee_name'],
68
+ 'import_payee_name_original': json['import_payee_name_original'] == null ? undefined : json['import_payee_name_original'],
69
+ 'debt_transaction_type': json['debt_transaction_type'] == null ? undefined : json['debt_transaction_type'],
70
+ 'deleted': json['deleted'],
71
+ };
72
+ }
73
+ export function TransactionSummaryBaseToJSON(json) {
74
+ return TransactionSummaryBaseToJSONTyped(json, false);
75
+ }
76
+ export function TransactionSummaryBaseToJSONTyped(value, ignoreDiscriminator) {
77
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+ return {
82
+ 'id': value['id'],
83
+ 'date': value['date'],
84
+ 'amount': value['amount'],
85
+ 'memo': value['memo'],
86
+ 'cleared': TransactionClearedStatusToJSON(value['cleared']),
87
+ 'approved': value['approved'],
88
+ 'flag_color': TransactionFlagColorToJSON(value['flag_color']),
89
+ 'flag_name': value['flag_name'],
90
+ 'account_id': value['account_id'],
91
+ 'payee_id': value['payee_id'],
92
+ 'category_id': value['category_id'],
93
+ 'transfer_account_id': value['transfer_account_id'],
94
+ 'transfer_transaction_id': value['transfer_transaction_id'],
95
+ 'matched_transaction_id': value['matched_transaction_id'],
96
+ 'import_id': value['import_id'],
97
+ 'import_payee_name': value['import_payee_name'],
98
+ 'import_payee_name_original': value['import_payee_name_original'],
99
+ 'debt_transaction_type': value['debt_transaction_type'],
100
+ 'deleted': value['deleted'],
101
+ };
102
+ }
@@ -1,4 +1,5 @@
1
1
  export * from './Account';
2
+ export * from './AccountBase';
2
3
  export * from './AccountResponse';
3
4
  export * from './AccountResponseData';
4
5
  export * from './AccountType';
@@ -11,6 +12,7 @@ export * from './BulkTransactions';
11
12
  export * from './CategoriesResponse';
12
13
  export * from './CategoriesResponseData';
13
14
  export * from './Category';
15
+ export * from './CategoryBase';
14
16
  export * from './CategoryGroup';
15
17
  export * from './CategoryGroupWithCategories';
16
18
  export * from './CategoryResponse';
@@ -25,17 +27,20 @@ export * from './HybridTransaction';
25
27
  export * from './HybridTransactionsResponse';
26
28
  export * from './HybridTransactionsResponseData';
27
29
  export * from './MoneyMovement';
30
+ export * from './MoneyMovementBase';
28
31
  export * from './MoneyMovementGroup';
29
32
  export * from './MoneyMovementGroupsResponse';
30
33
  export * from './MoneyMovementGroupsResponseData';
31
34
  export * from './MoneyMovementsResponse';
32
35
  export * from './MoneyMovementsResponseData';
33
36
  export * from './MonthDetail';
37
+ export * from './MonthDetailBase';
34
38
  export * from './MonthDetailResponse';
35
39
  export * from './MonthDetailResponseData';
36
40
  export * from './MonthSummariesResponse';
37
41
  export * from './MonthSummariesResponseData';
38
42
  export * from './MonthSummary';
43
+ export * from './MonthSummaryBase';
39
44
  export * from './NewCategory';
40
45
  export * from './NewTransaction';
41
46
  export * from './PatchCategoryGroupWrapper';
@@ -65,11 +70,14 @@ export * from './PlanSummaryResponseData';
65
70
  export * from './PostAccountWrapper';
66
71
  export * from './PostCategoryGroupWrapper';
67
72
  export * from './PostCategoryWrapper';
73
+ export * from './PostPayee';
74
+ export * from './PostPayeeWrapper';
68
75
  export * from './PostScheduledTransactionWrapper';
69
76
  export * from './PostTransactionsWrapper';
70
77
  export * from './PutScheduledTransactionWrapper';
71
78
  export * from './PutTransactionWrapper';
72
79
  export * from './SaveAccount';
80
+ export * from './SaveAccountType';
73
81
  export * from './SaveCategory';
74
82
  export * from './SaveCategoryGroup';
75
83
  export * from './SaveCategoryGroupResponse';
@@ -87,20 +95,24 @@ export * from './SaveTransactionWithOptionalFields';
87
95
  export * from './SaveTransactionsResponse';
88
96
  export * from './SaveTransactionsResponseData';
89
97
  export * from './ScheduledSubTransaction';
98
+ export * from './ScheduledSubTransactionBase';
90
99
  export * from './ScheduledTransactionDetail';
91
100
  export * from './ScheduledTransactionFrequency';
92
101
  export * from './ScheduledTransactionResponse';
93
102
  export * from './ScheduledTransactionResponseData';
94
103
  export * from './ScheduledTransactionSummary';
104
+ export * from './ScheduledTransactionSummaryBase';
95
105
  export * from './ScheduledTransactionsResponse';
96
106
  export * from './ScheduledTransactionsResponseData';
97
107
  export * from './SubTransaction';
108
+ export * from './SubTransactionBase';
98
109
  export * from './TransactionClearedStatus';
99
110
  export * from './TransactionDetail';
100
111
  export * from './TransactionFlagColor';
101
112
  export * from './TransactionResponse';
102
113
  export * from './TransactionResponseData';
103
114
  export * from './TransactionSummary';
115
+ export * from './TransactionSummaryBase';
104
116
  export * from './TransactionsImportResponse';
105
117
  export * from './TransactionsImportResponseData';
106
118
  export * from './TransactionsResponse';
@@ -1,6 +1,7 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export * from './Account';
4
+ export * from './AccountBase';
4
5
  export * from './AccountResponse';
5
6
  export * from './AccountResponseData';
6
7
  export * from './AccountType';
@@ -13,6 +14,7 @@ export * from './BulkTransactions';
13
14
  export * from './CategoriesResponse';
14
15
  export * from './CategoriesResponseData';
15
16
  export * from './Category';
17
+ export * from './CategoryBase';
16
18
  export * from './CategoryGroup';
17
19
  export * from './CategoryGroupWithCategories';
18
20
  export * from './CategoryResponse';
@@ -27,17 +29,20 @@ export * from './HybridTransaction';
27
29
  export * from './HybridTransactionsResponse';
28
30
  export * from './HybridTransactionsResponseData';
29
31
  export * from './MoneyMovement';
32
+ export * from './MoneyMovementBase';
30
33
  export * from './MoneyMovementGroup';
31
34
  export * from './MoneyMovementGroupsResponse';
32
35
  export * from './MoneyMovementGroupsResponseData';
33
36
  export * from './MoneyMovementsResponse';
34
37
  export * from './MoneyMovementsResponseData';
35
38
  export * from './MonthDetail';
39
+ export * from './MonthDetailBase';
36
40
  export * from './MonthDetailResponse';
37
41
  export * from './MonthDetailResponseData';
38
42
  export * from './MonthSummariesResponse';
39
43
  export * from './MonthSummariesResponseData';
40
44
  export * from './MonthSummary';
45
+ export * from './MonthSummaryBase';
41
46
  export * from './NewCategory';
42
47
  export * from './NewTransaction';
43
48
  export * from './PatchCategoryGroupWrapper';
@@ -67,11 +72,14 @@ export * from './PlanSummaryResponseData';
67
72
  export * from './PostAccountWrapper';
68
73
  export * from './PostCategoryGroupWrapper';
69
74
  export * from './PostCategoryWrapper';
75
+ export * from './PostPayee';
76
+ export * from './PostPayeeWrapper';
70
77
  export * from './PostScheduledTransactionWrapper';
71
78
  export * from './PostTransactionsWrapper';
72
79
  export * from './PutScheduledTransactionWrapper';
73
80
  export * from './PutTransactionWrapper';
74
81
  export * from './SaveAccount';
82
+ export * from './SaveAccountType';
75
83
  export * from './SaveCategory';
76
84
  export * from './SaveCategoryGroup';
77
85
  export * from './SaveCategoryGroupResponse';
@@ -89,20 +97,24 @@ export * from './SaveTransactionWithOptionalFields';
89
97
  export * from './SaveTransactionsResponse';
90
98
  export * from './SaveTransactionsResponseData';
91
99
  export * from './ScheduledSubTransaction';
100
+ export * from './ScheduledSubTransactionBase';
92
101
  export * from './ScheduledTransactionDetail';
93
102
  export * from './ScheduledTransactionFrequency';
94
103
  export * from './ScheduledTransactionResponse';
95
104
  export * from './ScheduledTransactionResponseData';
96
105
  export * from './ScheduledTransactionSummary';
106
+ export * from './ScheduledTransactionSummaryBase';
97
107
  export * from './ScheduledTransactionsResponse';
98
108
  export * from './ScheduledTransactionsResponseData';
99
109
  export * from './SubTransaction';
110
+ export * from './SubTransactionBase';
100
111
  export * from './TransactionClearedStatus';
101
112
  export * from './TransactionDetail';
102
113
  export * from './TransactionFlagColor';
103
114
  export * from './TransactionResponse';
104
115
  export * from './TransactionResponseData';
105
116
  export * from './TransactionSummary';
117
+ export * from './TransactionSummaryBase';
106
118
  export * from './TransactionsImportResponse';
107
119
  export * from './TransactionsImportResponseData';
108
120
  export * from './TransactionsResponse';
@@ -46,7 +46,7 @@ export interface Account {
46
46
  * @type {string}
47
47
  * @memberof Account
48
48
  */
49
- note?: string | null;
49
+ note?: string;
50
50
  /**
51
51
  * The current available balance of the account in milliunits format
52
52
  * @type {number}
@@ -70,7 +70,7 @@ export interface Account {
70
70
  * @type {string}
71
71
  * @memberof Account
72
72
  */
73
- transfer_payee_id: string | null;
73
+ transfer_payee_id: string;
74
74
  /**
75
75
  * Whether or not the account is linked to a financial institution for automatic transaction import.
76
76
  * @type {boolean}
@@ -88,13 +88,13 @@ export interface Account {
88
88
  * @type {string}
89
89
  * @memberof Account
90
90
  */
91
- last_reconciled_at?: string | null;
91
+ last_reconciled_at?: string;
92
92
  /**
93
93
  * This field is deprecated and will always be null.
94
94
  * @type {number}
95
95
  * @memberof Account
96
96
  */
97
- debt_original_balance?: number | null;
97
+ debt_original_balance?: number;
98
98
  /**
99
99
  *
100
100
  * @type {{ [key: string]: number; }}
@@ -125,6 +125,42 @@ export interface Account {
125
125
  * @memberof Account
126
126
  */
127
127
  deleted: boolean;
128
+ /**
129
+ * The current available balance of the account formatted in the plan's currency format
130
+ * @type {string}
131
+ * @memberof Account
132
+ */
133
+ balance_formatted?: string;
134
+ /**
135
+ * The current available balance of the account as a decimal currency amount
136
+ * @type {number}
137
+ * @memberof Account
138
+ */
139
+ balance_currency?: number;
140
+ /**
141
+ * The current cleared balance of the account formatted in the plan's currency format
142
+ * @type {string}
143
+ * @memberof Account
144
+ */
145
+ cleared_balance_formatted?: string;
146
+ /**
147
+ * The current cleared balance of the account as a decimal currency amount
148
+ * @type {number}
149
+ * @memberof Account
150
+ */
151
+ cleared_balance_currency?: number;
152
+ /**
153
+ * The current uncleared balance of the account formatted in the plan's currency format
154
+ * @type {string}
155
+ * @memberof Account
156
+ */
157
+ uncleared_balance_formatted?: string;
158
+ /**
159
+ * The current uncleared balance of the account as a decimal currency amount
160
+ * @type {number}
161
+ * @memberof Account
162
+ */
163
+ uncleared_balance_currency?: number;
128
164
  }
129
165
  /**
130
166
  * Check if a given object implements the Account interface.
@@ -66,6 +66,12 @@ function AccountFromJSONTyped(json, ignoreDiscriminator) {
66
66
  'debt_minimum_payments': json['debt_minimum_payments'] == null ? undefined : json['debt_minimum_payments'],
67
67
  'debt_escrow_amounts': json['debt_escrow_amounts'] == null ? undefined : json['debt_escrow_amounts'],
68
68
  'deleted': json['deleted'],
69
+ 'balance_formatted': json['balance_formatted'] == null ? undefined : json['balance_formatted'],
70
+ 'balance_currency': json['balance_currency'] == null ? undefined : json['balance_currency'],
71
+ 'cleared_balance_formatted': json['cleared_balance_formatted'] == null ? undefined : json['cleared_balance_formatted'],
72
+ 'cleared_balance_currency': json['cleared_balance_currency'] == null ? undefined : json['cleared_balance_currency'],
73
+ 'uncleared_balance_formatted': json['uncleared_balance_formatted'] == null ? undefined : json['uncleared_balance_formatted'],
74
+ 'uncleared_balance_currency': json['uncleared_balance_currency'] == null ? undefined : json['uncleared_balance_currency'],
69
75
  };
70
76
  }
71
77
  function AccountToJSON(json) {
@@ -94,5 +100,11 @@ function AccountToJSONTyped(value, ignoreDiscriminator = false) {
94
100
  'debt_minimum_payments': value['debt_minimum_payments'],
95
101
  'debt_escrow_amounts': value['debt_escrow_amounts'],
96
102
  'deleted': value['deleted'],
103
+ 'balance_formatted': value['balance_formatted'],
104
+ 'balance_currency': value['balance_currency'],
105
+ 'cleared_balance_formatted': value['cleared_balance_formatted'],
106
+ 'cleared_balance_currency': value['cleared_balance_currency'],
107
+ 'uncleared_balance_formatted': value['uncleared_balance_formatted'],
108
+ 'uncleared_balance_currency': value['uncleared_balance_currency'],
97
109
  };
98
110
  }
@@ -0,0 +1,136 @@
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 { AccountType } from './AccountType';
8
+ /**
9
+ *
10
+ * @export
11
+ * @interface AccountBase
12
+ */
13
+ export interface AccountBase {
14
+ /**
15
+ *
16
+ * @type {string}
17
+ * @memberof AccountBase
18
+ */
19
+ id: string;
20
+ /**
21
+ *
22
+ * @type {string}
23
+ * @memberof AccountBase
24
+ */
25
+ name: string;
26
+ /**
27
+ *
28
+ * @type {AccountType}
29
+ * @memberof AccountBase
30
+ */
31
+ type: AccountType;
32
+ /**
33
+ * Whether this account is "on budget" or not
34
+ * @type {boolean}
35
+ * @memberof AccountBase
36
+ */
37
+ on_budget: boolean;
38
+ /**
39
+ * Whether this account is closed or not
40
+ * @type {boolean}
41
+ * @memberof AccountBase
42
+ */
43
+ closed: boolean;
44
+ /**
45
+ *
46
+ * @type {string}
47
+ * @memberof AccountBase
48
+ */
49
+ note?: string | null;
50
+ /**
51
+ * The current available balance of the account in milliunits format
52
+ * @type {number}
53
+ * @memberof AccountBase
54
+ */
55
+ balance: number;
56
+ /**
57
+ * The current cleared balance of the account in milliunits format
58
+ * @type {number}
59
+ * @memberof AccountBase
60
+ */
61
+ cleared_balance: number;
62
+ /**
63
+ * The current uncleared balance of the account in milliunits format
64
+ * @type {number}
65
+ * @memberof AccountBase
66
+ */
67
+ uncleared_balance: number;
68
+ /**
69
+ * The payee id which should be used when transferring to this account
70
+ * @type {string}
71
+ * @memberof AccountBase
72
+ */
73
+ transfer_payee_id: string | null;
74
+ /**
75
+ * Whether or not the account is linked to a financial institution for automatic transaction import.
76
+ * @type {boolean}
77
+ * @memberof AccountBase
78
+ */
79
+ direct_import_linked?: boolean;
80
+ /**
81
+ * If an account linked to a financial institution (direct_import_linked=true) and the linked connection is not in a healthy state, this will be true.
82
+ * @type {boolean}
83
+ * @memberof AccountBase
84
+ */
85
+ direct_import_in_error?: boolean;
86
+ /**
87
+ * A date/time specifying when the account was last reconciled.
88
+ * @type {string}
89
+ * @memberof AccountBase
90
+ */
91
+ last_reconciled_at?: string | null;
92
+ /**
93
+ * This field is deprecated and will always be null.
94
+ * @type {number}
95
+ * @memberof AccountBase
96
+ */
97
+ debt_original_balance?: number | null;
98
+ /**
99
+ *
100
+ * @type {{ [key: string]: number; }}
101
+ * @memberof AccountBase
102
+ */
103
+ debt_interest_rates?: {
104
+ [key: string]: number;
105
+ };
106
+ /**
107
+ *
108
+ * @type {{ [key: string]: number; }}
109
+ * @memberof AccountBase
110
+ */
111
+ debt_minimum_payments?: {
112
+ [key: string]: number;
113
+ };
114
+ /**
115
+ *
116
+ * @type {{ [key: string]: number; }}
117
+ * @memberof AccountBase
118
+ */
119
+ debt_escrow_amounts?: {
120
+ [key: string]: number;
121
+ };
122
+ /**
123
+ * Whether or not the account has been deleted. Deleted accounts will only be included in delta requests.
124
+ * @type {boolean}
125
+ * @memberof AccountBase
126
+ */
127
+ deleted: boolean;
128
+ }
129
+ /**
130
+ * Check if a given object implements the AccountBase interface.
131
+ */
132
+ export declare function instanceOfAccountBase(value: object): value is AccountBase;
133
+ export declare function AccountBaseFromJSON(json: any): AccountBase;
134
+ export declare function AccountBaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountBase;
135
+ export declare function AccountBaseToJSON(json: any): AccountBase;
136
+ export declare function AccountBaseToJSONTyped(value?: AccountBase | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,98 @@
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.instanceOfAccountBase = instanceOfAccountBase;
12
+ exports.AccountBaseFromJSON = AccountBaseFromJSON;
13
+ exports.AccountBaseFromJSONTyped = AccountBaseFromJSONTyped;
14
+ exports.AccountBaseToJSON = AccountBaseToJSON;
15
+ exports.AccountBaseToJSONTyped = AccountBaseToJSONTyped;
16
+ const AccountType_1 = require("./AccountType");
17
+ /**
18
+ * Check if a given object implements the AccountBase interface.
19
+ */
20
+ function instanceOfAccountBase(value) {
21
+ if (!('id' in value) || value['id'] === undefined)
22
+ return false;
23
+ if (!('name' in value) || value['name'] === undefined)
24
+ return false;
25
+ if (!('type' in value) || value['type'] === undefined)
26
+ return false;
27
+ if (!('on_budget' in value) || value['on_budget'] === undefined)
28
+ return false;
29
+ if (!('closed' in value) || value['closed'] === undefined)
30
+ return false;
31
+ if (!('balance' in value) || value['balance'] === undefined)
32
+ return false;
33
+ if (!('cleared_balance' in value) || value['cleared_balance'] === undefined)
34
+ return false;
35
+ if (!('uncleared_balance' in value) || value['uncleared_balance'] === undefined)
36
+ return false;
37
+ if (!('transfer_payee_id' in value) || value['transfer_payee_id'] === undefined)
38
+ return false;
39
+ if (!('deleted' in value) || value['deleted'] === undefined)
40
+ return false;
41
+ return true;
42
+ }
43
+ function AccountBaseFromJSON(json) {
44
+ return AccountBaseFromJSONTyped(json, false);
45
+ }
46
+ function AccountBaseFromJSONTyped(json, ignoreDiscriminator) {
47
+ if (json == null) {
48
+ return json;
49
+ }
50
+ return {
51
+ 'id': json['id'],
52
+ 'name': json['name'],
53
+ 'type': (0, AccountType_1.AccountTypeFromJSON)(json['type']),
54
+ 'on_budget': json['on_budget'],
55
+ 'closed': json['closed'],
56
+ 'note': json['note'] == null ? undefined : json['note'],
57
+ 'balance': json['balance'],
58
+ 'cleared_balance': json['cleared_balance'],
59
+ 'uncleared_balance': json['uncleared_balance'],
60
+ 'transfer_payee_id': json['transfer_payee_id'],
61
+ 'direct_import_linked': json['direct_import_linked'] == null ? undefined : json['direct_import_linked'],
62
+ 'direct_import_in_error': json['direct_import_in_error'] == null ? undefined : json['direct_import_in_error'],
63
+ 'last_reconciled_at': json['last_reconciled_at'] == null ? undefined : json['last_reconciled_at'],
64
+ 'debt_original_balance': json['debt_original_balance'] == null ? undefined : json['debt_original_balance'],
65
+ 'debt_interest_rates': json['debt_interest_rates'] == null ? undefined : json['debt_interest_rates'],
66
+ 'debt_minimum_payments': json['debt_minimum_payments'] == null ? undefined : json['debt_minimum_payments'],
67
+ 'debt_escrow_amounts': json['debt_escrow_amounts'] == null ? undefined : json['debt_escrow_amounts'],
68
+ 'deleted': json['deleted'],
69
+ };
70
+ }
71
+ function AccountBaseToJSON(json) {
72
+ return AccountBaseToJSONTyped(json, false);
73
+ }
74
+ function AccountBaseToJSONTyped(value, ignoreDiscriminator = false) {
75
+ if (value == null) {
76
+ return value;
77
+ }
78
+ return {
79
+ 'id': value['id'],
80
+ 'name': value['name'],
81
+ 'type': (0, AccountType_1.AccountTypeToJSON)(value['type']),
82
+ 'on_budget': value['on_budget'],
83
+ 'closed': value['closed'],
84
+ 'note': value['note'],
85
+ 'balance': value['balance'],
86
+ 'cleared_balance': value['cleared_balance'],
87
+ 'uncleared_balance': value['uncleared_balance'],
88
+ 'transfer_payee_id': value['transfer_payee_id'],
89
+ 'direct_import_linked': value['direct_import_linked'],
90
+ 'direct_import_in_error': value['direct_import_in_error'],
91
+ 'last_reconciled_at': value['last_reconciled_at'],
92
+ 'debt_original_balance': value['debt_original_balance'],
93
+ 'debt_interest_rates': value['debt_interest_rates'],
94
+ 'debt_minimum_payments': value['debt_minimum_payments'],
95
+ 'debt_escrow_amounts': value['debt_escrow_amounts'],
96
+ 'deleted': value['deleted'],
97
+ };
98
+ }