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
@@ -11,7 +11,7 @@
11
11
  */
12
12
  export interface SavePayee {
13
13
  /**
14
- * The name of the payee. The name must be a maximum of 500 characters.
14
+ * The name of the payee.
15
15
  * @type {string}
16
16
  * @memberof SavePayee
17
17
  */
@@ -33,43 +33,55 @@ export interface ScheduledSubTransaction {
33
33
  * @type {string}
34
34
  * @memberof ScheduledSubTransaction
35
35
  */
36
- memo?: string | null;
36
+ memo?: string;
37
37
  /**
38
38
  *
39
39
  * @type {string}
40
40
  * @memberof ScheduledSubTransaction
41
41
  */
42
- payee_id?: string | null;
42
+ payee_id?: string;
43
43
  /**
44
44
  *
45
45
  * @type {string}
46
46
  * @memberof ScheduledSubTransaction
47
47
  */
48
- payee_name?: string | null;
48
+ payee_name?: string;
49
49
  /**
50
50
  *
51
51
  * @type {string}
52
52
  * @memberof ScheduledSubTransaction
53
53
  */
54
- category_id?: string | null;
54
+ category_id?: string;
55
55
  /**
56
56
  *
57
57
  * @type {string}
58
58
  * @memberof ScheduledSubTransaction
59
59
  */
60
- category_name?: string | null;
60
+ category_name?: string;
61
61
  /**
62
62
  * If a transfer, the account_id which the scheduled subtransaction transfers to
63
63
  * @type {string}
64
64
  * @memberof ScheduledSubTransaction
65
65
  */
66
- transfer_account_id?: string | null;
66
+ transfer_account_id?: string;
67
67
  /**
68
68
  * Whether or not the scheduled subtransaction has been deleted. Deleted scheduled subtransactions will only be included in delta requests.
69
69
  * @type {boolean}
70
70
  * @memberof ScheduledSubTransaction
71
71
  */
72
72
  deleted: boolean;
73
+ /**
74
+ * The scheduled subtransaction amount formatted in the plan's currency format
75
+ * @type {string}
76
+ * @memberof ScheduledSubTransaction
77
+ */
78
+ amount_formatted?: string;
79
+ /**
80
+ * The scheduled subtransaction amount as a decimal currency amount
81
+ * @type {number}
82
+ * @memberof ScheduledSubTransaction
83
+ */
84
+ amount_currency?: number;
73
85
  }
74
86
  /**
75
87
  * Check if a given object implements the ScheduledSubTransaction interface.
@@ -45,6 +45,8 @@ function ScheduledSubTransactionFromJSONTyped(json, ignoreDiscriminator) {
45
45
  'category_name': json['category_name'] == null ? undefined : json['category_name'],
46
46
  'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
47
47
  'deleted': json['deleted'],
48
+ 'amount_formatted': json['amount_formatted'] == null ? undefined : json['amount_formatted'],
49
+ 'amount_currency': json['amount_currency'] == null ? undefined : json['amount_currency'],
48
50
  };
49
51
  }
50
52
  function ScheduledSubTransactionToJSON(json) {
@@ -65,5 +67,7 @@ function ScheduledSubTransactionToJSONTyped(value, ignoreDiscriminator = false)
65
67
  'category_name': value['category_name'],
66
68
  'transfer_account_id': value['transfer_account_id'],
67
69
  'deleted': value['deleted'],
70
+ 'amount_formatted': value['amount_formatted'],
71
+ 'amount_currency': value['amount_currency'],
68
72
  };
69
73
  }
@@ -0,0 +1,81 @@
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 ScheduledSubTransactionBase
11
+ */
12
+ export interface ScheduledSubTransactionBase {
13
+ /**
14
+ *
15
+ * @type {string}
16
+ * @memberof ScheduledSubTransactionBase
17
+ */
18
+ id: string;
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof ScheduledSubTransactionBase
23
+ */
24
+ scheduled_transaction_id: string;
25
+ /**
26
+ * The scheduled subtransaction amount in milliunits format
27
+ * @type {number}
28
+ * @memberof ScheduledSubTransactionBase
29
+ */
30
+ amount: number;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof ScheduledSubTransactionBase
35
+ */
36
+ memo?: string | null;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof ScheduledSubTransactionBase
41
+ */
42
+ payee_id?: string | null;
43
+ /**
44
+ *
45
+ * @type {string}
46
+ * @memberof ScheduledSubTransactionBase
47
+ */
48
+ payee_name?: string | null;
49
+ /**
50
+ *
51
+ * @type {string}
52
+ * @memberof ScheduledSubTransactionBase
53
+ */
54
+ category_id?: string | null;
55
+ /**
56
+ *
57
+ * @type {string}
58
+ * @memberof ScheduledSubTransactionBase
59
+ */
60
+ category_name?: string | null;
61
+ /**
62
+ * If a transfer, the account_id which the scheduled subtransaction transfers to
63
+ * @type {string}
64
+ * @memberof ScheduledSubTransactionBase
65
+ */
66
+ transfer_account_id?: string | null;
67
+ /**
68
+ * Whether or not the scheduled subtransaction has been deleted. Deleted scheduled subtransactions will only be included in delta requests.
69
+ * @type {boolean}
70
+ * @memberof ScheduledSubTransactionBase
71
+ */
72
+ deleted: boolean;
73
+ }
74
+ /**
75
+ * Check if a given object implements the ScheduledSubTransactionBase interface.
76
+ */
77
+ export declare function instanceOfScheduledSubTransactionBase(value: object): value is ScheduledSubTransactionBase;
78
+ export declare function ScheduledSubTransactionBaseFromJSON(json: any): ScheduledSubTransactionBase;
79
+ export declare function ScheduledSubTransactionBaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScheduledSubTransactionBase;
80
+ export declare function ScheduledSubTransactionBaseToJSON(json: any): ScheduledSubTransactionBase;
81
+ export declare function ScheduledSubTransactionBaseToJSONTyped(value?: ScheduledSubTransactionBase | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,69 @@
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.instanceOfScheduledSubTransactionBase = instanceOfScheduledSubTransactionBase;
12
+ exports.ScheduledSubTransactionBaseFromJSON = ScheduledSubTransactionBaseFromJSON;
13
+ exports.ScheduledSubTransactionBaseFromJSONTyped = ScheduledSubTransactionBaseFromJSONTyped;
14
+ exports.ScheduledSubTransactionBaseToJSON = ScheduledSubTransactionBaseToJSON;
15
+ exports.ScheduledSubTransactionBaseToJSONTyped = ScheduledSubTransactionBaseToJSONTyped;
16
+ /**
17
+ * Check if a given object implements the ScheduledSubTransactionBase interface.
18
+ */
19
+ function instanceOfScheduledSubTransactionBase(value) {
20
+ if (!('id' in value) || value['id'] === undefined)
21
+ return false;
22
+ if (!('scheduled_transaction_id' in value) || value['scheduled_transaction_id'] === undefined)
23
+ return false;
24
+ if (!('amount' in value) || value['amount'] === undefined)
25
+ return false;
26
+ if (!('deleted' in value) || value['deleted'] === undefined)
27
+ return false;
28
+ return true;
29
+ }
30
+ function ScheduledSubTransactionBaseFromJSON(json) {
31
+ return ScheduledSubTransactionBaseFromJSONTyped(json, false);
32
+ }
33
+ function ScheduledSubTransactionBaseFromJSONTyped(json, ignoreDiscriminator) {
34
+ if (json == null) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'id': json['id'],
39
+ 'scheduled_transaction_id': json['scheduled_transaction_id'],
40
+ 'amount': json['amount'],
41
+ 'memo': json['memo'] == null ? undefined : json['memo'],
42
+ 'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
43
+ 'payee_name': json['payee_name'] == null ? undefined : json['payee_name'],
44
+ 'category_id': json['category_id'] == null ? undefined : json['category_id'],
45
+ 'category_name': json['category_name'] == null ? undefined : json['category_name'],
46
+ 'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
47
+ 'deleted': json['deleted'],
48
+ };
49
+ }
50
+ function ScheduledSubTransactionBaseToJSON(json) {
51
+ return ScheduledSubTransactionBaseToJSONTyped(json, false);
52
+ }
53
+ function ScheduledSubTransactionBaseToJSONTyped(value, ignoreDiscriminator = false) {
54
+ if (value == null) {
55
+ return value;
56
+ }
57
+ return {
58
+ 'id': value['id'],
59
+ 'scheduled_transaction_id': value['scheduled_transaction_id'],
60
+ 'amount': value['amount'],
61
+ 'memo': value['memo'],
62
+ 'payee_id': value['payee_id'],
63
+ 'payee_name': value['payee_name'],
64
+ 'category_id': value['category_id'],
65
+ 'category_name': value['category_name'],
66
+ 'transfer_account_id': value['transfer_account_id'],
67
+ 'deleted': value['deleted'],
68
+ };
69
+ }
@@ -90,6 +90,18 @@ export interface ScheduledTransactionDetail {
90
90
  * @memberof ScheduledTransactionDetail
91
91
  */
92
92
  deleted: boolean;
93
+ /**
94
+ * The scheduled transaction amount formatted in the plan's currency format
95
+ * @type {string}
96
+ * @memberof ScheduledTransactionDetail
97
+ */
98
+ amount_formatted?: string;
99
+ /**
100
+ * The scheduled transaction amount as a decimal currency amount
101
+ * @type {number}
102
+ * @memberof ScheduledTransactionDetail
103
+ */
104
+ amount_currency?: number;
93
105
  /**
94
106
  *
95
107
  * @type {string}
@@ -79,6 +79,8 @@ function ScheduledTransactionDetailFromJSONTyped(json, ignoreDiscriminator) {
79
79
  'category_id': json['category_id'] == null ? undefined : json['category_id'],
80
80
  'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
81
81
  'deleted': json['deleted'],
82
+ 'amount_formatted': json['amount_formatted'] == null ? undefined : json['amount_formatted'],
83
+ 'amount_currency': json['amount_currency'] == null ? undefined : json['amount_currency'],
82
84
  'account_name': json['account_name'],
83
85
  'payee_name': json['payee_name'] == null ? undefined : json['payee_name'],
84
86
  'category_name': json['category_name'] == null ? undefined : json['category_name'],
@@ -106,6 +108,8 @@ function ScheduledTransactionDetailToJSONTyped(value, ignoreDiscriminator = fals
106
108
  'category_id': value['category_id'],
107
109
  'transfer_account_id': value['transfer_account_id'],
108
110
  'deleted': value['deleted'],
111
+ 'amount_formatted': value['amount_formatted'],
112
+ 'amount_currency': value['amount_currency'],
109
113
  'account_name': value['account_name'],
110
114
  'payee_name': value['payee_name'],
111
115
  'category_name': value['category_name'],
@@ -46,7 +46,7 @@ export interface ScheduledTransactionSummary {
46
46
  * @type {string}
47
47
  * @memberof ScheduledTransactionSummary
48
48
  */
49
- memo?: string | null;
49
+ memo?: string;
50
50
  /**
51
51
  *
52
52
  * @type {TransactionFlagColor}
@@ -58,7 +58,7 @@ export interface ScheduledTransactionSummary {
58
58
  * @type {string}
59
59
  * @memberof ScheduledTransactionSummary
60
60
  */
61
- flag_name?: string | null;
61
+ flag_name?: string;
62
62
  /**
63
63
  *
64
64
  * @type {string}
@@ -70,25 +70,37 @@ export interface ScheduledTransactionSummary {
70
70
  * @type {string}
71
71
  * @memberof ScheduledTransactionSummary
72
72
  */
73
- payee_id?: string | null;
73
+ payee_id?: string;
74
74
  /**
75
75
  *
76
76
  * @type {string}
77
77
  * @memberof ScheduledTransactionSummary
78
78
  */
79
- category_id?: string | null;
79
+ category_id?: string;
80
80
  /**
81
81
  * If a transfer, the account_id which the scheduled transaction transfers to
82
82
  * @type {string}
83
83
  * @memberof ScheduledTransactionSummary
84
84
  */
85
- transfer_account_id?: string | null;
85
+ transfer_account_id?: string;
86
86
  /**
87
87
  * Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests.
88
88
  * @type {boolean}
89
89
  * @memberof ScheduledTransactionSummary
90
90
  */
91
91
  deleted: boolean;
92
+ /**
93
+ * The scheduled transaction amount formatted in the plan's currency format
94
+ * @type {string}
95
+ * @memberof ScheduledTransactionSummary
96
+ */
97
+ amount_formatted?: string;
98
+ /**
99
+ * The scheduled transaction amount as a decimal currency amount
100
+ * @type {number}
101
+ * @memberof ScheduledTransactionSummary
102
+ */
103
+ amount_currency?: number;
92
104
  }
93
105
  /**
94
106
  * @export
@@ -74,6 +74,8 @@ function ScheduledTransactionSummaryFromJSONTyped(json, ignoreDiscriminator) {
74
74
  'category_id': json['category_id'] == null ? undefined : json['category_id'],
75
75
  'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
76
76
  'deleted': json['deleted'],
77
+ 'amount_formatted': json['amount_formatted'] == null ? undefined : json['amount_formatted'],
78
+ 'amount_currency': json['amount_currency'] == null ? undefined : json['amount_currency'],
77
79
  };
78
80
  }
79
81
  function ScheduledTransactionSummaryToJSON(json) {
@@ -97,5 +99,7 @@ function ScheduledTransactionSummaryToJSONTyped(value, ignoreDiscriminator = fal
97
99
  'category_id': value['category_id'],
98
100
  'transfer_account_id': value['transfer_account_id'],
99
101
  'deleted': value['deleted'],
102
+ 'amount_formatted': value['amount_formatted'],
103
+ 'amount_currency': value['amount_currency'],
100
104
  };
101
105
  }
@@ -0,0 +1,119 @@
1
+ /**
2
+ * YNAB API Endpoints
3
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
4
+ *
5
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
6
+ */
7
+ import type { TransactionFlagColor } from './TransactionFlagColor';
8
+ /**
9
+ *
10
+ * @export
11
+ * @interface ScheduledTransactionSummaryBase
12
+ */
13
+ export interface ScheduledTransactionSummaryBase {
14
+ /**
15
+ *
16
+ * @type {string}
17
+ * @memberof ScheduledTransactionSummaryBase
18
+ */
19
+ id: string;
20
+ /**
21
+ * The first date for which the Scheduled Transaction was scheduled.
22
+ * @type {string}
23
+ * @memberof ScheduledTransactionSummaryBase
24
+ */
25
+ date_first: string;
26
+ /**
27
+ * The next date for which the Scheduled Transaction is scheduled.
28
+ * @type {string}
29
+ * @memberof ScheduledTransactionSummaryBase
30
+ */
31
+ date_next: string;
32
+ /**
33
+ *
34
+ * @type {ScheduledTransactionSummaryBaseFrequencyEnum}
35
+ * @memberof ScheduledTransactionSummaryBase
36
+ */
37
+ frequency: ScheduledTransactionSummaryBaseFrequencyEnum;
38
+ /**
39
+ * The scheduled transaction amount in milliunits format
40
+ * @type {number}
41
+ * @memberof ScheduledTransactionSummaryBase
42
+ */
43
+ amount: number;
44
+ /**
45
+ *
46
+ * @type {string}
47
+ * @memberof ScheduledTransactionSummaryBase
48
+ */
49
+ memo?: string | null;
50
+ /**
51
+ *
52
+ * @type {TransactionFlagColor}
53
+ * @memberof ScheduledTransactionSummaryBase
54
+ */
55
+ flag_color?: TransactionFlagColor | null;
56
+ /**
57
+ * The customized name of a transaction flag
58
+ * @type {string}
59
+ * @memberof ScheduledTransactionSummaryBase
60
+ */
61
+ flag_name?: string | null;
62
+ /**
63
+ *
64
+ * @type {string}
65
+ * @memberof ScheduledTransactionSummaryBase
66
+ */
67
+ account_id: string;
68
+ /**
69
+ *
70
+ * @type {string}
71
+ * @memberof ScheduledTransactionSummaryBase
72
+ */
73
+ payee_id?: string | null;
74
+ /**
75
+ *
76
+ * @type {string}
77
+ * @memberof ScheduledTransactionSummaryBase
78
+ */
79
+ category_id?: string | null;
80
+ /**
81
+ * If a transfer, the account_id which the scheduled transaction transfers to
82
+ * @type {string}
83
+ * @memberof ScheduledTransactionSummaryBase
84
+ */
85
+ transfer_account_id?: string | null;
86
+ /**
87
+ * Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests.
88
+ * @type {boolean}
89
+ * @memberof ScheduledTransactionSummaryBase
90
+ */
91
+ deleted: boolean;
92
+ }
93
+ /**
94
+ * @export
95
+ */
96
+ export declare const ScheduledTransactionSummaryBaseFrequencyEnum: {
97
+ readonly Never: "never";
98
+ readonly Daily: "daily";
99
+ readonly Weekly: "weekly";
100
+ readonly EveryOtherWeek: "everyOtherWeek";
101
+ readonly TwiceAMonth: "twiceAMonth";
102
+ readonly Every4Weeks: "every4Weeks";
103
+ readonly Monthly: "monthly";
104
+ readonly EveryOtherMonth: "everyOtherMonth";
105
+ readonly Every3Months: "every3Months";
106
+ readonly Every4Months: "every4Months";
107
+ readonly TwiceAYear: "twiceAYear";
108
+ readonly Yearly: "yearly";
109
+ readonly EveryOtherYear: "everyOtherYear";
110
+ };
111
+ export type ScheduledTransactionSummaryBaseFrequencyEnum = typeof ScheduledTransactionSummaryBaseFrequencyEnum[keyof typeof ScheduledTransactionSummaryBaseFrequencyEnum];
112
+ /**
113
+ * Check if a given object implements the ScheduledTransactionSummaryBase interface.
114
+ */
115
+ export declare function instanceOfScheduledTransactionSummaryBase(value: object): value is ScheduledTransactionSummaryBase;
116
+ export declare function ScheduledTransactionSummaryBaseFromJSON(json: any): ScheduledTransactionSummaryBase;
117
+ export declare function ScheduledTransactionSummaryBaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScheduledTransactionSummaryBase;
118
+ export declare function ScheduledTransactionSummaryBaseToJSON(json: any): ScheduledTransactionSummaryBase;
119
+ export declare function ScheduledTransactionSummaryBaseToJSONTyped(value?: ScheduledTransactionSummaryBase | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,101 @@
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.ScheduledTransactionSummaryBaseFrequencyEnum = void 0;
12
+ exports.instanceOfScheduledTransactionSummaryBase = instanceOfScheduledTransactionSummaryBase;
13
+ exports.ScheduledTransactionSummaryBaseFromJSON = ScheduledTransactionSummaryBaseFromJSON;
14
+ exports.ScheduledTransactionSummaryBaseFromJSONTyped = ScheduledTransactionSummaryBaseFromJSONTyped;
15
+ exports.ScheduledTransactionSummaryBaseToJSON = ScheduledTransactionSummaryBaseToJSON;
16
+ exports.ScheduledTransactionSummaryBaseToJSONTyped = ScheduledTransactionSummaryBaseToJSONTyped;
17
+ const TransactionFlagColor_1 = require("./TransactionFlagColor");
18
+ /**
19
+ * @export
20
+ */
21
+ exports.ScheduledTransactionSummaryBaseFrequencyEnum = {
22
+ Never: 'never',
23
+ Daily: 'daily',
24
+ Weekly: 'weekly',
25
+ EveryOtherWeek: 'everyOtherWeek',
26
+ TwiceAMonth: 'twiceAMonth',
27
+ Every4Weeks: 'every4Weeks',
28
+ Monthly: 'monthly',
29
+ EveryOtherMonth: 'everyOtherMonth',
30
+ Every3Months: 'every3Months',
31
+ Every4Months: 'every4Months',
32
+ TwiceAYear: 'twiceAYear',
33
+ Yearly: 'yearly',
34
+ EveryOtherYear: 'everyOtherYear'
35
+ };
36
+ /**
37
+ * Check if a given object implements the ScheduledTransactionSummaryBase interface.
38
+ */
39
+ function instanceOfScheduledTransactionSummaryBase(value) {
40
+ if (!('id' in value) || value['id'] === undefined)
41
+ return false;
42
+ if (!('date_first' in value) || value['date_first'] === undefined)
43
+ return false;
44
+ if (!('date_next' in value) || value['date_next'] === undefined)
45
+ return false;
46
+ if (!('frequency' in value) || value['frequency'] === undefined)
47
+ return false;
48
+ if (!('amount' in value) || value['amount'] === undefined)
49
+ return false;
50
+ if (!('account_id' in value) || value['account_id'] === undefined)
51
+ return false;
52
+ if (!('deleted' in value) || value['deleted'] === undefined)
53
+ return false;
54
+ return true;
55
+ }
56
+ function ScheduledTransactionSummaryBaseFromJSON(json) {
57
+ return ScheduledTransactionSummaryBaseFromJSONTyped(json, false);
58
+ }
59
+ function ScheduledTransactionSummaryBaseFromJSONTyped(json, ignoreDiscriminator) {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+ 'id': json['id'],
65
+ 'date_first': json['date_first'],
66
+ 'date_next': json['date_next'],
67
+ 'frequency': json['frequency'],
68
+ 'amount': json['amount'],
69
+ 'memo': json['memo'] == null ? undefined : json['memo'],
70
+ 'flag_color': json['flag_color'] == null ? undefined : (0, TransactionFlagColor_1.TransactionFlagColorFromJSON)(json['flag_color']),
71
+ 'flag_name': json['flag_name'] == null ? undefined : json['flag_name'],
72
+ 'account_id': json['account_id'],
73
+ 'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
74
+ 'category_id': json['category_id'] == null ? undefined : json['category_id'],
75
+ 'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
76
+ 'deleted': json['deleted'],
77
+ };
78
+ }
79
+ function ScheduledTransactionSummaryBaseToJSON(json) {
80
+ return ScheduledTransactionSummaryBaseToJSONTyped(json, false);
81
+ }
82
+ function ScheduledTransactionSummaryBaseToJSONTyped(value, ignoreDiscriminator = false) {
83
+ if (value == null) {
84
+ return value;
85
+ }
86
+ return {
87
+ 'id': value['id'],
88
+ 'date_first': value['date_first'],
89
+ 'date_next': value['date_next'],
90
+ 'frequency': value['frequency'],
91
+ 'amount': value['amount'],
92
+ 'memo': value['memo'],
93
+ 'flag_color': (0, TransactionFlagColor_1.TransactionFlagColorToJSON)(value['flag_color']),
94
+ 'flag_name': value['flag_name'],
95
+ 'account_id': value['account_id'],
96
+ 'payee_id': value['payee_id'],
97
+ 'category_id': value['category_id'],
98
+ 'transfer_account_id': value['transfer_account_id'],
99
+ 'deleted': value['deleted'],
100
+ };
101
+ }
@@ -33,49 +33,61 @@ export interface SubTransaction {
33
33
  * @type {string}
34
34
  * @memberof SubTransaction
35
35
  */
36
- memo?: string | null;
36
+ memo?: string;
37
37
  /**
38
38
  *
39
39
  * @type {string}
40
40
  * @memberof SubTransaction
41
41
  */
42
- payee_id?: string | null;
42
+ payee_id?: string;
43
43
  /**
44
44
  *
45
45
  * @type {string}
46
46
  * @memberof SubTransaction
47
47
  */
48
- payee_name?: string | null;
48
+ payee_name?: string;
49
49
  /**
50
50
  *
51
51
  * @type {string}
52
52
  * @memberof SubTransaction
53
53
  */
54
- category_id?: string | null;
54
+ category_id?: string;
55
55
  /**
56
56
  *
57
57
  * @type {string}
58
58
  * @memberof SubTransaction
59
59
  */
60
- category_name?: string | null;
60
+ category_name?: string;
61
61
  /**
62
62
  * If a transfer, the account_id which the subtransaction transfers to
63
63
  * @type {string}
64
64
  * @memberof SubTransaction
65
65
  */
66
- transfer_account_id?: string | null;
66
+ transfer_account_id?: string;
67
67
  /**
68
68
  * If a transfer, the id of transaction on the other side of the transfer
69
69
  * @type {string}
70
70
  * @memberof SubTransaction
71
71
  */
72
- transfer_transaction_id?: string | null;
72
+ transfer_transaction_id?: string;
73
73
  /**
74
74
  * Whether or not the subtransaction has been deleted. Deleted subtransactions will only be included in delta requests.
75
75
  * @type {boolean}
76
76
  * @memberof SubTransaction
77
77
  */
78
78
  deleted: boolean;
79
+ /**
80
+ * The subtransaction amount formatted in the plan's currency format
81
+ * @type {string}
82
+ * @memberof SubTransaction
83
+ */
84
+ amount_formatted?: string;
85
+ /**
86
+ * The subtransaction amount as a decimal currency amount
87
+ * @type {number}
88
+ * @memberof SubTransaction
89
+ */
90
+ amount_currency?: number;
79
91
  }
80
92
  /**
81
93
  * Check if a given object implements the SubTransaction interface.
@@ -46,6 +46,8 @@ function SubTransactionFromJSONTyped(json, ignoreDiscriminator) {
46
46
  'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
47
47
  'transfer_transaction_id': json['transfer_transaction_id'] == null ? undefined : json['transfer_transaction_id'],
48
48
  'deleted': json['deleted'],
49
+ 'amount_formatted': json['amount_formatted'] == null ? undefined : json['amount_formatted'],
50
+ 'amount_currency': json['amount_currency'] == null ? undefined : json['amount_currency'],
49
51
  };
50
52
  }
51
53
  function SubTransactionToJSON(json) {
@@ -67,5 +69,7 @@ function SubTransactionToJSONTyped(value, ignoreDiscriminator = false) {
67
69
  'transfer_account_id': value['transfer_account_id'],
68
70
  'transfer_transaction_id': value['transfer_transaction_id'],
69
71
  'deleted': value['deleted'],
72
+ 'amount_formatted': value['amount_formatted'],
73
+ 'amount_currency': value['amount_currency'],
70
74
  };
71
75
  }