ynab 4.0.0 → 4.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 (133) hide show
  1. package/README.md +1 -0
  2. package/dist/apis/PayeesApi.d.ts +15 -1
  3. package/dist/apis/PayeesApi.js +39 -0
  4. package/dist/browser/ynab.js +1 -1
  5. package/dist/esm/apis/PayeesApi.d.ts +15 -1
  6. package/dist/esm/apis/PayeesApi.js +62 -1
  7. package/dist/esm/index.d.ts +5 -0
  8. package/dist/esm/index.js +13 -0
  9. package/dist/esm/models/Account.d.ts +40 -4
  10. package/dist/esm/models/Account.js +12 -0
  11. package/dist/esm/models/AccountBase.d.ts +136 -0
  12. package/dist/esm/models/AccountBase.js +92 -0
  13. package/dist/esm/models/Category.d.ts +100 -16
  14. package/dist/esm/models/Category.js +28 -0
  15. package/dist/esm/models/CategoryBase.d.ts +188 -0
  16. package/dist/esm/models/CategoryBase.js +113 -0
  17. package/dist/esm/models/ExistingCategory.d.ts +7 -1
  18. package/dist/esm/models/ExistingCategory.js +2 -0
  19. package/dist/esm/models/HybridTransaction.d.ts +12 -0
  20. package/dist/esm/models/HybridTransaction.js +4 -0
  21. package/dist/esm/models/MoneyMovement.d.ts +19 -7
  22. package/dist/esm/models/MoneyMovement.js +4 -0
  23. package/dist/esm/models/MoneyMovementBase.d.ts +75 -0
  24. package/dist/esm/models/MoneyMovementBase.js +57 -0
  25. package/dist/esm/models/MonthDetail.d.ts +48 -0
  26. package/dist/esm/models/MonthDetail.js +16 -0
  27. package/dist/esm/models/MonthDetailBase.d.ts +76 -0
  28. package/dist/esm/models/MonthDetailBase.js +68 -0
  29. package/dist/esm/models/MonthSummary.d.ts +50 -2
  30. package/dist/esm/models/MonthSummary.js +16 -0
  31. package/dist/esm/models/MonthSummaryBase.d.ts +69 -0
  32. package/dist/esm/models/MonthSummaryBase.js +63 -0
  33. package/dist/esm/models/NewCategory.d.ts +7 -1
  34. package/dist/esm/models/NewCategory.js +2 -0
  35. package/dist/esm/models/PlanDetail.d.ts +21 -21
  36. package/dist/esm/models/PlanDetail.js +21 -21
  37. package/dist/esm/models/PostPayee.d.ts +27 -0
  38. package/dist/esm/models/PostPayee.js +39 -0
  39. package/dist/esm/models/PostPayeeWrapper.d.ts +28 -0
  40. package/dist/esm/models/PostPayeeWrapper.js +40 -0
  41. package/dist/esm/models/SaveAccount.d.ts +3 -3
  42. package/dist/esm/models/SaveAccount.js +3 -3
  43. package/dist/esm/models/SaveAccountType.d.ts +24 -0
  44. package/dist/esm/models/SaveAccountType.js +42 -0
  45. package/dist/esm/models/SaveCategory.d.ts +7 -1
  46. package/dist/esm/models/SaveCategory.js +2 -0
  47. package/dist/esm/models/SavePayee.d.ts +1 -1
  48. package/dist/esm/models/ScheduledSubTransaction.d.ts +18 -6
  49. package/dist/esm/models/ScheduledSubTransaction.js +4 -0
  50. package/dist/esm/models/ScheduledSubTransactionBase.d.ts +81 -0
  51. package/dist/esm/models/ScheduledSubTransactionBase.js +63 -0
  52. package/dist/esm/models/ScheduledTransactionDetail.d.ts +12 -0
  53. package/dist/esm/models/ScheduledTransactionDetail.js +4 -0
  54. package/dist/esm/models/ScheduledTransactionSummary.d.ts +17 -5
  55. package/dist/esm/models/ScheduledTransactionSummary.js +4 -0
  56. package/dist/esm/models/ScheduledTransactionSummaryBase.d.ts +119 -0
  57. package/dist/esm/models/ScheduledTransactionSummaryBase.js +94 -0
  58. package/dist/esm/models/SubTransaction.d.ts +19 -7
  59. package/dist/esm/models/SubTransaction.js +4 -0
  60. package/dist/esm/models/SubTransactionBase.d.ts +87 -0
  61. package/dist/esm/models/SubTransactionBase.js +65 -0
  62. package/dist/esm/models/TransactionDetail.d.ts +12 -0
  63. package/dist/esm/models/TransactionDetail.js +4 -0
  64. package/dist/esm/models/TransactionSummary.d.ts +22 -10
  65. package/dist/esm/models/TransactionSummary.js +4 -0
  66. package/dist/esm/models/TransactionSummaryBase.d.ts +151 -0
  67. package/dist/esm/models/TransactionSummaryBase.js +102 -0
  68. package/dist/esm/models/index.d.ts +12 -0
  69. package/dist/esm/models/index.js +12 -0
  70. package/dist/index.d.ts +5 -0
  71. package/dist/index.js +9 -0
  72. package/dist/models/Account.d.ts +40 -4
  73. package/dist/models/Account.js +12 -0
  74. package/dist/models/AccountBase.d.ts +136 -0
  75. package/dist/models/AccountBase.js +98 -0
  76. package/dist/models/Category.d.ts +100 -16
  77. package/dist/models/Category.js +28 -0
  78. package/dist/models/CategoryBase.d.ts +188 -0
  79. package/dist/models/CategoryBase.js +120 -0
  80. package/dist/models/ExistingCategory.d.ts +7 -1
  81. package/dist/models/ExistingCategory.js +2 -0
  82. package/dist/models/HybridTransaction.d.ts +12 -0
  83. package/dist/models/HybridTransaction.js +4 -0
  84. package/dist/models/MoneyMovement.d.ts +19 -7
  85. package/dist/models/MoneyMovement.js +4 -0
  86. package/dist/models/MoneyMovementBase.d.ts +75 -0
  87. package/dist/models/MoneyMovementBase.js +63 -0
  88. package/dist/models/MonthDetail.d.ts +48 -0
  89. package/dist/models/MonthDetail.js +16 -0
  90. package/dist/models/MonthDetailBase.d.ts +76 -0
  91. package/dist/models/MonthDetailBase.js +74 -0
  92. package/dist/models/MonthSummary.d.ts +50 -2
  93. package/dist/models/MonthSummary.js +16 -0
  94. package/dist/models/MonthSummaryBase.d.ts +69 -0
  95. package/dist/models/MonthSummaryBase.js +69 -0
  96. package/dist/models/NewCategory.d.ts +7 -1
  97. package/dist/models/NewCategory.js +2 -0
  98. package/dist/models/PlanDetail.d.ts +21 -21
  99. package/dist/models/PlanDetail.js +21 -21
  100. package/dist/models/PostPayee.d.ts +27 -0
  101. package/dist/models/PostPayee.js +45 -0
  102. package/dist/models/PostPayeeWrapper.d.ts +28 -0
  103. package/dist/models/PostPayeeWrapper.js +46 -0
  104. package/dist/models/SaveAccount.d.ts +3 -3
  105. package/dist/models/SaveAccount.js +3 -3
  106. package/dist/models/SaveAccountType.d.ts +24 -0
  107. package/dist/models/SaveAccountType.js +50 -0
  108. package/dist/models/SaveCategory.d.ts +7 -1
  109. package/dist/models/SaveCategory.js +2 -0
  110. package/dist/models/SavePayee.d.ts +1 -1
  111. package/dist/models/ScheduledSubTransaction.d.ts +18 -6
  112. package/dist/models/ScheduledSubTransaction.js +4 -0
  113. package/dist/models/ScheduledSubTransactionBase.d.ts +81 -0
  114. package/dist/models/ScheduledSubTransactionBase.js +69 -0
  115. package/dist/models/ScheduledTransactionDetail.d.ts +12 -0
  116. package/dist/models/ScheduledTransactionDetail.js +4 -0
  117. package/dist/models/ScheduledTransactionSummary.d.ts +17 -5
  118. package/dist/models/ScheduledTransactionSummary.js +4 -0
  119. package/dist/models/ScheduledTransactionSummaryBase.d.ts +119 -0
  120. package/dist/models/ScheduledTransactionSummaryBase.js +101 -0
  121. package/dist/models/SubTransaction.d.ts +19 -7
  122. package/dist/models/SubTransaction.js +4 -0
  123. package/dist/models/SubTransactionBase.d.ts +87 -0
  124. package/dist/models/SubTransactionBase.js +71 -0
  125. package/dist/models/TransactionDetail.d.ts +12 -0
  126. package/dist/models/TransactionDetail.js +4 -0
  127. package/dist/models/TransactionSummary.d.ts +22 -10
  128. package/dist/models/TransactionSummary.js +4 -0
  129. package/dist/models/TransactionSummaryBase.d.ts +151 -0
  130. package/dist/models/TransactionSummaryBase.js +109 -0
  131. package/dist/models/index.d.ts +12 -0
  132. package/dist/models/index.js +12 -0
  133. package/package.json +3 -3
@@ -32,6 +32,7 @@ function ExistingCategoryFromJSONTyped(json, ignoreDiscriminator) {
32
32
  'category_group_id': json['category_group_id'] == null ? undefined : json['category_group_id'],
33
33
  'goal_target': json['goal_target'] == null ? undefined : json['goal_target'],
34
34
  'goal_target_date': json['goal_target_date'] == null ? undefined : json['goal_target_date'],
35
+ 'goal_needs_whole_amount': json['goal_needs_whole_amount'] == null ? undefined : json['goal_needs_whole_amount'],
35
36
  };
36
37
  }
37
38
  function ExistingCategoryToJSON(json) {
@@ -47,5 +48,6 @@ function ExistingCategoryToJSONTyped(value, ignoreDiscriminator = false) {
47
48
  'category_group_id': value['category_group_id'],
48
49
  'goal_target': value['goal_target'],
49
50
  'goal_target_date': value['goal_target_date'],
51
+ 'goal_needs_whole_amount': value['goal_needs_whole_amount'],
50
52
  };
51
53
  }
@@ -126,6 +126,18 @@ export interface HybridTransaction {
126
126
  * @memberof HybridTransaction
127
127
  */
128
128
  deleted: boolean;
129
+ /**
130
+ * The transaction amount formatted in the plan's currency format
131
+ * @type {string}
132
+ * @memberof HybridTransaction
133
+ */
134
+ amount_formatted?: string;
135
+ /**
136
+ * The transaction amount as a decimal currency amount
137
+ * @type {number}
138
+ * @memberof HybridTransaction
139
+ */
140
+ amount_currency?: number;
129
141
  /**
130
142
  * Whether the hybrid transaction represents a regular transaction or a subtransaction
131
143
  * @type {HybridTransactionTypeEnum}
@@ -87,6 +87,8 @@ function HybridTransactionFromJSONTyped(json, ignoreDiscriminator) {
87
87
  'import_payee_name_original': json['import_payee_name_original'] == null ? undefined : json['import_payee_name_original'],
88
88
  'debt_transaction_type': json['debt_transaction_type'] == null ? undefined : json['debt_transaction_type'],
89
89
  'deleted': json['deleted'],
90
+ 'amount_formatted': json['amount_formatted'] == null ? undefined : json['amount_formatted'],
91
+ 'amount_currency': json['amount_currency'] == null ? undefined : json['amount_currency'],
90
92
  'type': json['type'],
91
93
  'parent_transaction_id': json['parent_transaction_id'] == null ? undefined : json['parent_transaction_id'],
92
94
  'account_name': json['account_name'],
@@ -121,6 +123,8 @@ function HybridTransactionToJSONTyped(value, ignoreDiscriminator = false) {
121
123
  'import_payee_name_original': value['import_payee_name_original'],
122
124
  'debt_transaction_type': value['debt_transaction_type'],
123
125
  'deleted': value['deleted'],
126
+ 'amount_formatted': value['amount_formatted'],
127
+ 'amount_currency': value['amount_currency'],
124
128
  'type': value['type'],
125
129
  'parent_transaction_id': value['parent_transaction_id'],
126
130
  'account_name': value['account_name'],
@@ -21,49 +21,61 @@ export interface MoneyMovement {
21
21
  * @type {string}
22
22
  * @memberof MoneyMovement
23
23
  */
24
- month?: string | null;
24
+ month?: string;
25
25
  /**
26
26
  * The date/time the money movement was processed on the server in ISO format (e.g. 2024-01-01T12:00:00Z)
27
27
  * @type {string}
28
28
  * @memberof MoneyMovement
29
29
  */
30
- moved_at?: string | null;
30
+ moved_at?: string;
31
31
  /**
32
32
  *
33
33
  * @type {string}
34
34
  * @memberof MoneyMovement
35
35
  */
36
- note?: string | null;
36
+ note?: string;
37
37
  /**
38
38
  * The id of the money movement group this movement belongs to
39
39
  * @type {string}
40
40
  * @memberof MoneyMovement
41
41
  */
42
- money_movement_group_id?: string | null;
42
+ money_movement_group_id?: string;
43
43
  /**
44
44
  * The id of the user who performed the money movement
45
45
  * @type {string}
46
46
  * @memberof MoneyMovement
47
47
  */
48
- performed_by_user_id?: string | null;
48
+ performed_by_user_id?: string;
49
49
  /**
50
50
  * The id of the category the money was moved from
51
51
  * @type {string}
52
52
  * @memberof MoneyMovement
53
53
  */
54
- from_category_id?: string | null;
54
+ from_category_id?: string;
55
55
  /**
56
56
  * The id of the category the money was moved to
57
57
  * @type {string}
58
58
  * @memberof MoneyMovement
59
59
  */
60
- to_category_id?: string | null;
60
+ to_category_id?: string;
61
61
  /**
62
62
  * The amount of the money movement in milliunits format
63
63
  * @type {number}
64
64
  * @memberof MoneyMovement
65
65
  */
66
66
  amount: number;
67
+ /**
68
+ * The money movement amount formatted in the plan's currency format
69
+ * @type {string}
70
+ * @memberof MoneyMovement
71
+ */
72
+ amount_formatted?: string;
73
+ /**
74
+ * The money movement amount as a decimal currency amount
75
+ * @type {number}
76
+ * @memberof MoneyMovement
77
+ */
78
+ amount_currency?: number;
67
79
  }
68
80
  /**
69
81
  * Check if a given object implements the MoneyMovement interface.
@@ -40,6 +40,8 @@ function MoneyMovementFromJSONTyped(json, ignoreDiscriminator) {
40
40
  'from_category_id': json['from_category_id'] == null ? undefined : json['from_category_id'],
41
41
  'to_category_id': json['to_category_id'] == null ? undefined : json['to_category_id'],
42
42
  'amount': json['amount'],
43
+ 'amount_formatted': json['amount_formatted'] == null ? undefined : json['amount_formatted'],
44
+ 'amount_currency': json['amount_currency'] == null ? undefined : json['amount_currency'],
43
45
  };
44
46
  }
45
47
  function MoneyMovementToJSON(json) {
@@ -59,5 +61,7 @@ function MoneyMovementToJSONTyped(value, ignoreDiscriminator = false) {
59
61
  'from_category_id': value['from_category_id'],
60
62
  'to_category_id': value['to_category_id'],
61
63
  'amount': value['amount'],
64
+ 'amount_formatted': value['amount_formatted'],
65
+ 'amount_currency': value['amount_currency'],
62
66
  };
63
67
  }
@@ -0,0 +1,75 @@
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
+ /**
8
+ *
9
+ * @export
10
+ * @interface MoneyMovementBase
11
+ */
12
+ export interface MoneyMovementBase {
13
+ /**
14
+ *
15
+ * @type {string}
16
+ * @memberof MoneyMovementBase
17
+ */
18
+ id: string;
19
+ /**
20
+ * The month of the money movement in ISO format (e.g. 2024-01-01)
21
+ * @type {string}
22
+ * @memberof MoneyMovementBase
23
+ */
24
+ month?: string | null;
25
+ /**
26
+ * The date/time the money movement was processed on the server in ISO format (e.g. 2024-01-01T12:00:00Z)
27
+ * @type {string}
28
+ * @memberof MoneyMovementBase
29
+ */
30
+ moved_at?: string | null;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof MoneyMovementBase
35
+ */
36
+ note?: string | null;
37
+ /**
38
+ * The id of the money movement group this movement belongs to
39
+ * @type {string}
40
+ * @memberof MoneyMovementBase
41
+ */
42
+ money_movement_group_id?: string | null;
43
+ /**
44
+ * The id of the user who performed the money movement
45
+ * @type {string}
46
+ * @memberof MoneyMovementBase
47
+ */
48
+ performed_by_user_id?: string | null;
49
+ /**
50
+ * The id of the category the money was moved from
51
+ * @type {string}
52
+ * @memberof MoneyMovementBase
53
+ */
54
+ from_category_id?: string | null;
55
+ /**
56
+ * The id of the category the money was moved to
57
+ * @type {string}
58
+ * @memberof MoneyMovementBase
59
+ */
60
+ to_category_id?: string | null;
61
+ /**
62
+ * The amount of the money movement in milliunits format
63
+ * @type {number}
64
+ * @memberof MoneyMovementBase
65
+ */
66
+ amount: number;
67
+ }
68
+ /**
69
+ * Check if a given object implements the MoneyMovementBase interface.
70
+ */
71
+ export declare function instanceOfMoneyMovementBase(value: object): value is MoneyMovementBase;
72
+ export declare function MoneyMovementBaseFromJSON(json: any): MoneyMovementBase;
73
+ export declare function MoneyMovementBaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MoneyMovementBase;
74
+ export declare function MoneyMovementBaseToJSON(json: any): MoneyMovementBase;
75
+ export declare function MoneyMovementBaseToJSONTyped(value?: MoneyMovementBase | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,63 @@
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.instanceOfMoneyMovementBase = instanceOfMoneyMovementBase;
12
+ exports.MoneyMovementBaseFromJSON = MoneyMovementBaseFromJSON;
13
+ exports.MoneyMovementBaseFromJSONTyped = MoneyMovementBaseFromJSONTyped;
14
+ exports.MoneyMovementBaseToJSON = MoneyMovementBaseToJSON;
15
+ exports.MoneyMovementBaseToJSONTyped = MoneyMovementBaseToJSONTyped;
16
+ /**
17
+ * Check if a given object implements the MoneyMovementBase interface.
18
+ */
19
+ function instanceOfMoneyMovementBase(value) {
20
+ if (!('id' in value) || value['id'] === undefined)
21
+ return false;
22
+ if (!('amount' in value) || value['amount'] === undefined)
23
+ return false;
24
+ return true;
25
+ }
26
+ function MoneyMovementBaseFromJSON(json) {
27
+ return MoneyMovementBaseFromJSONTyped(json, false);
28
+ }
29
+ function MoneyMovementBaseFromJSONTyped(json, ignoreDiscriminator) {
30
+ if (json == null) {
31
+ return json;
32
+ }
33
+ return {
34
+ 'id': json['id'],
35
+ 'month': json['month'] == null ? undefined : json['month'],
36
+ 'moved_at': json['moved_at'] == null ? undefined : json['moved_at'],
37
+ 'note': json['note'] == null ? undefined : json['note'],
38
+ 'money_movement_group_id': json['money_movement_group_id'] == null ? undefined : json['money_movement_group_id'],
39
+ 'performed_by_user_id': json['performed_by_user_id'] == null ? undefined : json['performed_by_user_id'],
40
+ 'from_category_id': json['from_category_id'] == null ? undefined : json['from_category_id'],
41
+ 'to_category_id': json['to_category_id'] == null ? undefined : json['to_category_id'],
42
+ 'amount': json['amount'],
43
+ };
44
+ }
45
+ function MoneyMovementBaseToJSON(json) {
46
+ return MoneyMovementBaseToJSONTyped(json, false);
47
+ }
48
+ function MoneyMovementBaseToJSONTyped(value, ignoreDiscriminator = false) {
49
+ if (value == null) {
50
+ return value;
51
+ }
52
+ return {
53
+ 'id': value['id'],
54
+ 'month': value['month'],
55
+ 'moved_at': value['moved_at'],
56
+ 'note': value['note'],
57
+ 'money_movement_group_id': value['money_movement_group_id'],
58
+ 'performed_by_user_id': value['performed_by_user_id'],
59
+ 'from_category_id': value['from_category_id'],
60
+ 'to_category_id': value['to_category_id'],
61
+ 'amount': value['amount'],
62
+ };
63
+ }
@@ -59,6 +59,54 @@ export interface MonthDetail {
59
59
  * @memberof MonthDetail
60
60
  */
61
61
  deleted: boolean;
62
+ /**
63
+ * The total income formatted in the plan's currency format
64
+ * @type {string}
65
+ * @memberof MonthDetail
66
+ */
67
+ income_formatted?: string;
68
+ /**
69
+ * The total income as a decimal currency amount
70
+ * @type {number}
71
+ * @memberof MonthDetail
72
+ */
73
+ income_currency?: number;
74
+ /**
75
+ * The total amount assigned formatted in the plan's currency format
76
+ * @type {string}
77
+ * @memberof MonthDetail
78
+ */
79
+ budgeted_formatted?: string;
80
+ /**
81
+ * The total amount assigned as a decimal currency amount
82
+ * @type {number}
83
+ * @memberof MonthDetail
84
+ */
85
+ budgeted_currency?: number;
86
+ /**
87
+ * The total activity amount formatted in the plan's currency format
88
+ * @type {string}
89
+ * @memberof MonthDetail
90
+ */
91
+ activity_formatted?: string;
92
+ /**
93
+ * The total activity amount as a decimal currency amount
94
+ * @type {number}
95
+ * @memberof MonthDetail
96
+ */
97
+ activity_currency?: number;
98
+ /**
99
+ * The available amount for 'Ready to Assign' formatted in the plan's currency format
100
+ * @type {string}
101
+ * @memberof MonthDetail
102
+ */
103
+ to_be_budgeted_formatted?: string;
104
+ /**
105
+ * The available amount for 'Ready to Assign' as a decimal currency amount
106
+ * @type {number}
107
+ * @memberof MonthDetail
108
+ */
109
+ to_be_budgeted_currency?: number;
62
110
  /**
63
111
  * The plan month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified.
64
112
  * @type {Array<Category>}
@@ -50,6 +50,14 @@ function MonthDetailFromJSONTyped(json, ignoreDiscriminator) {
50
50
  'to_be_budgeted': json['to_be_budgeted'],
51
51
  'age_of_money': json['age_of_money'] == null ? undefined : json['age_of_money'],
52
52
  'deleted': json['deleted'],
53
+ 'income_formatted': json['income_formatted'] == null ? undefined : json['income_formatted'],
54
+ 'income_currency': json['income_currency'] == null ? undefined : json['income_currency'],
55
+ 'budgeted_formatted': json['budgeted_formatted'] == null ? undefined : json['budgeted_formatted'],
56
+ 'budgeted_currency': json['budgeted_currency'] == null ? undefined : json['budgeted_currency'],
57
+ 'activity_formatted': json['activity_formatted'] == null ? undefined : json['activity_formatted'],
58
+ 'activity_currency': json['activity_currency'] == null ? undefined : json['activity_currency'],
59
+ 'to_be_budgeted_formatted': json['to_be_budgeted_formatted'] == null ? undefined : json['to_be_budgeted_formatted'],
60
+ 'to_be_budgeted_currency': json['to_be_budgeted_currency'] == null ? undefined : json['to_be_budgeted_currency'],
53
61
  'categories': (json['categories'].map(Category_1.CategoryFromJSON)),
54
62
  };
55
63
  }
@@ -69,6 +77,14 @@ function MonthDetailToJSONTyped(value, ignoreDiscriminator = false) {
69
77
  'to_be_budgeted': value['to_be_budgeted'],
70
78
  'age_of_money': value['age_of_money'],
71
79
  'deleted': value['deleted'],
80
+ 'income_formatted': value['income_formatted'],
81
+ 'income_currency': value['income_currency'],
82
+ 'budgeted_formatted': value['budgeted_formatted'],
83
+ 'budgeted_currency': value['budgeted_currency'],
84
+ 'activity_formatted': value['activity_formatted'],
85
+ 'activity_currency': value['activity_currency'],
86
+ 'to_be_budgeted_formatted': value['to_be_budgeted_formatted'],
87
+ 'to_be_budgeted_currency': value['to_be_budgeted_currency'],
72
88
  'categories': (value['categories'].map(Category_1.CategoryToJSON)),
73
89
  };
74
90
  }
@@ -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 { CategoryBase } from './CategoryBase';
8
+ /**
9
+ *
10
+ * @export
11
+ * @interface MonthDetailBase
12
+ */
13
+ export interface MonthDetailBase {
14
+ /**
15
+ *
16
+ * @type {string}
17
+ * @memberof MonthDetailBase
18
+ */
19
+ month: string;
20
+ /**
21
+ *
22
+ * @type {string}
23
+ * @memberof MonthDetailBase
24
+ */
25
+ note?: string;
26
+ /**
27
+ * The total amount of transactions categorized to 'Inflow: Ready to Assign' in the month
28
+ * @type {number}
29
+ * @memberof MonthDetailBase
30
+ */
31
+ income: number;
32
+ /**
33
+ * The total amount assigned (budgeted) in the month
34
+ * @type {number}
35
+ * @memberof MonthDetailBase
36
+ */
37
+ budgeted: number;
38
+ /**
39
+ * The total amount of transactions in the month, excluding those categorized to 'Inflow: Ready to Assign'
40
+ * @type {number}
41
+ * @memberof MonthDetailBase
42
+ */
43
+ activity: number;
44
+ /**
45
+ * The available amount for 'Ready to Assign'
46
+ * @type {number}
47
+ * @memberof MonthDetailBase
48
+ */
49
+ to_be_budgeted: number;
50
+ /**
51
+ * The Age of Money as of the month
52
+ * @type {number}
53
+ * @memberof MonthDetailBase
54
+ */
55
+ age_of_money?: number;
56
+ /**
57
+ * Whether or not the month has been deleted. Deleted months will only be included in delta requests.
58
+ * @type {boolean}
59
+ * @memberof MonthDetailBase
60
+ */
61
+ deleted: boolean;
62
+ /**
63
+ * The plan month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified.
64
+ * @type {Array<CategoryBase>}
65
+ * @memberof MonthDetailBase
66
+ */
67
+ categories: Array<CategoryBase>;
68
+ }
69
+ /**
70
+ * Check if a given object implements the MonthDetailBase interface.
71
+ */
72
+ export declare function instanceOfMonthDetailBase(value: object): value is MonthDetailBase;
73
+ export declare function MonthDetailBaseFromJSON(json: any): MonthDetailBase;
74
+ export declare function MonthDetailBaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MonthDetailBase;
75
+ export declare function MonthDetailBaseToJSON(json: any): MonthDetailBase;
76
+ export declare function MonthDetailBaseToJSONTyped(value?: MonthDetailBase | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,74 @@
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.instanceOfMonthDetailBase = instanceOfMonthDetailBase;
12
+ exports.MonthDetailBaseFromJSON = MonthDetailBaseFromJSON;
13
+ exports.MonthDetailBaseFromJSONTyped = MonthDetailBaseFromJSONTyped;
14
+ exports.MonthDetailBaseToJSON = MonthDetailBaseToJSON;
15
+ exports.MonthDetailBaseToJSONTyped = MonthDetailBaseToJSONTyped;
16
+ const CategoryBase_1 = require("./CategoryBase");
17
+ /**
18
+ * Check if a given object implements the MonthDetailBase interface.
19
+ */
20
+ function instanceOfMonthDetailBase(value) {
21
+ if (!('month' in value) || value['month'] === undefined)
22
+ return false;
23
+ if (!('income' in value) || value['income'] === undefined)
24
+ return false;
25
+ if (!('budgeted' in value) || value['budgeted'] === undefined)
26
+ return false;
27
+ if (!('activity' in value) || value['activity'] === undefined)
28
+ return false;
29
+ if (!('to_be_budgeted' in value) || value['to_be_budgeted'] === undefined)
30
+ return false;
31
+ if (!('deleted' in value) || value['deleted'] === undefined)
32
+ return false;
33
+ if (!('categories' in value) || value['categories'] === undefined)
34
+ return false;
35
+ return true;
36
+ }
37
+ function MonthDetailBaseFromJSON(json) {
38
+ return MonthDetailBaseFromJSONTyped(json, false);
39
+ }
40
+ function MonthDetailBaseFromJSONTyped(json, ignoreDiscriminator) {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+ 'month': json['month'],
46
+ 'note': json['note'] == null ? undefined : json['note'],
47
+ 'income': json['income'],
48
+ 'budgeted': json['budgeted'],
49
+ 'activity': json['activity'],
50
+ 'to_be_budgeted': json['to_be_budgeted'],
51
+ 'age_of_money': json['age_of_money'] == null ? undefined : json['age_of_money'],
52
+ 'deleted': json['deleted'],
53
+ 'categories': (json['categories'].map(CategoryBase_1.CategoryBaseFromJSON)),
54
+ };
55
+ }
56
+ function MonthDetailBaseToJSON(json) {
57
+ return MonthDetailBaseToJSONTyped(json, false);
58
+ }
59
+ function MonthDetailBaseToJSONTyped(value, ignoreDiscriminator = false) {
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ return {
64
+ 'month': value['month'],
65
+ 'note': value['note'],
66
+ 'income': value['income'],
67
+ 'budgeted': value['budgeted'],
68
+ 'activity': value['activity'],
69
+ 'to_be_budgeted': value['to_be_budgeted'],
70
+ 'age_of_money': value['age_of_money'],
71
+ 'deleted': value['deleted'],
72
+ 'categories': (value['categories'].map(CategoryBase_1.CategoryBaseToJSON)),
73
+ };
74
+ }
@@ -21,7 +21,7 @@ export interface MonthSummary {
21
21
  * @type {string}
22
22
  * @memberof MonthSummary
23
23
  */
24
- note?: string | null;
24
+ note?: string;
25
25
  /**
26
26
  * The total amount of transactions categorized to 'Inflow: Ready to Assign' in the month
27
27
  * @type {number}
@@ -51,13 +51,61 @@ export interface MonthSummary {
51
51
  * @type {number}
52
52
  * @memberof MonthSummary
53
53
  */
54
- age_of_money?: number | null;
54
+ age_of_money?: number;
55
55
  /**
56
56
  * Whether or not the month has been deleted. Deleted months will only be included in delta requests.
57
57
  * @type {boolean}
58
58
  * @memberof MonthSummary
59
59
  */
60
60
  deleted: boolean;
61
+ /**
62
+ * The total income formatted in the plan's currency format
63
+ * @type {string}
64
+ * @memberof MonthSummary
65
+ */
66
+ income_formatted?: string;
67
+ /**
68
+ * The total income as a decimal currency amount
69
+ * @type {number}
70
+ * @memberof MonthSummary
71
+ */
72
+ income_currency?: number;
73
+ /**
74
+ * The total amount assigned formatted in the plan's currency format
75
+ * @type {string}
76
+ * @memberof MonthSummary
77
+ */
78
+ budgeted_formatted?: string;
79
+ /**
80
+ * The total amount assigned as a decimal currency amount
81
+ * @type {number}
82
+ * @memberof MonthSummary
83
+ */
84
+ budgeted_currency?: number;
85
+ /**
86
+ * The total activity amount formatted in the plan's currency format
87
+ * @type {string}
88
+ * @memberof MonthSummary
89
+ */
90
+ activity_formatted?: string;
91
+ /**
92
+ * The total activity amount as a decimal currency amount
93
+ * @type {number}
94
+ * @memberof MonthSummary
95
+ */
96
+ activity_currency?: number;
97
+ /**
98
+ * The available amount for 'Ready to Assign' formatted in the plan's currency format
99
+ * @type {string}
100
+ * @memberof MonthSummary
101
+ */
102
+ to_be_budgeted_formatted?: string;
103
+ /**
104
+ * The available amount for 'Ready to Assign' as a decimal currency amount
105
+ * @type {number}
106
+ * @memberof MonthSummary
107
+ */
108
+ to_be_budgeted_currency?: number;
61
109
  }
62
110
  /**
63
111
  * Check if a given object implements the MonthSummary interface.
@@ -47,6 +47,14 @@ function MonthSummaryFromJSONTyped(json, ignoreDiscriminator) {
47
47
  'to_be_budgeted': json['to_be_budgeted'],
48
48
  'age_of_money': json['age_of_money'] == null ? undefined : json['age_of_money'],
49
49
  'deleted': json['deleted'],
50
+ 'income_formatted': json['income_formatted'] == null ? undefined : json['income_formatted'],
51
+ 'income_currency': json['income_currency'] == null ? undefined : json['income_currency'],
52
+ 'budgeted_formatted': json['budgeted_formatted'] == null ? undefined : json['budgeted_formatted'],
53
+ 'budgeted_currency': json['budgeted_currency'] == null ? undefined : json['budgeted_currency'],
54
+ 'activity_formatted': json['activity_formatted'] == null ? undefined : json['activity_formatted'],
55
+ 'activity_currency': json['activity_currency'] == null ? undefined : json['activity_currency'],
56
+ 'to_be_budgeted_formatted': json['to_be_budgeted_formatted'] == null ? undefined : json['to_be_budgeted_formatted'],
57
+ 'to_be_budgeted_currency': json['to_be_budgeted_currency'] == null ? undefined : json['to_be_budgeted_currency'],
50
58
  };
51
59
  }
52
60
  function MonthSummaryToJSON(json) {
@@ -65,5 +73,13 @@ function MonthSummaryToJSONTyped(value, ignoreDiscriminator = false) {
65
73
  'to_be_budgeted': value['to_be_budgeted'],
66
74
  'age_of_money': value['age_of_money'],
67
75
  'deleted': value['deleted'],
76
+ 'income_formatted': value['income_formatted'],
77
+ 'income_currency': value['income_currency'],
78
+ 'budgeted_formatted': value['budgeted_formatted'],
79
+ 'budgeted_currency': value['budgeted_currency'],
80
+ 'activity_formatted': value['activity_formatted'],
81
+ 'activity_currency': value['activity_currency'],
82
+ 'to_be_budgeted_formatted': value['to_be_budgeted_formatted'],
83
+ 'to_be_budgeted_currency': value['to_be_budgeted_currency'],
68
84
  };
69
85
  }