ynab 4.0.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 (128) hide show
  1. package/dist/apis/PayeesApi.d.ts +15 -1
  2. package/dist/apis/PayeesApi.js +39 -0
  3. package/dist/browser/ynab.js +1 -1
  4. package/dist/esm/apis/PayeesApi.d.ts +15 -1
  5. package/dist/esm/apis/PayeesApi.js +62 -1
  6. package/dist/esm/models/Account.d.ts +40 -4
  7. package/dist/esm/models/Account.js +12 -0
  8. package/dist/esm/models/AccountBase.d.ts +136 -0
  9. package/dist/esm/models/AccountBase.js +92 -0
  10. package/dist/esm/models/Category.d.ts +100 -16
  11. package/dist/esm/models/Category.js +28 -0
  12. package/dist/esm/models/CategoryBase.d.ts +188 -0
  13. package/dist/esm/models/CategoryBase.js +113 -0
  14. package/dist/esm/models/ExistingCategory.d.ts +7 -1
  15. package/dist/esm/models/ExistingCategory.js +2 -0
  16. package/dist/esm/models/HybridTransaction.d.ts +12 -0
  17. package/dist/esm/models/HybridTransaction.js +4 -0
  18. package/dist/esm/models/MoneyMovement.d.ts +19 -7
  19. package/dist/esm/models/MoneyMovement.js +4 -0
  20. package/dist/esm/models/MoneyMovementBase.d.ts +75 -0
  21. package/dist/esm/models/MoneyMovementBase.js +57 -0
  22. package/dist/esm/models/MonthDetail.d.ts +48 -0
  23. package/dist/esm/models/MonthDetail.js +16 -0
  24. package/dist/esm/models/MonthDetailBase.d.ts +76 -0
  25. package/dist/esm/models/MonthDetailBase.js +68 -0
  26. package/dist/esm/models/MonthSummary.d.ts +50 -2
  27. package/dist/esm/models/MonthSummary.js +16 -0
  28. package/dist/esm/models/MonthSummaryBase.d.ts +69 -0
  29. package/dist/esm/models/MonthSummaryBase.js +63 -0
  30. package/dist/esm/models/NewCategory.d.ts +7 -1
  31. package/dist/esm/models/NewCategory.js +2 -0
  32. package/dist/esm/models/PlanDetail.d.ts +21 -21
  33. package/dist/esm/models/PlanDetail.js +21 -21
  34. package/dist/esm/models/PostPayee.d.ts +27 -0
  35. package/dist/esm/models/PostPayee.js +39 -0
  36. package/dist/esm/models/PostPayeeWrapper.d.ts +28 -0
  37. package/dist/esm/models/PostPayeeWrapper.js +40 -0
  38. package/dist/esm/models/SaveAccount.d.ts +3 -3
  39. package/dist/esm/models/SaveAccount.js +3 -3
  40. package/dist/esm/models/SaveAccountType.d.ts +24 -0
  41. package/dist/esm/models/SaveAccountType.js +42 -0
  42. package/dist/esm/models/SaveCategory.d.ts +7 -1
  43. package/dist/esm/models/SaveCategory.js +2 -0
  44. package/dist/esm/models/SavePayee.d.ts +1 -1
  45. package/dist/esm/models/ScheduledSubTransaction.d.ts +18 -6
  46. package/dist/esm/models/ScheduledSubTransaction.js +4 -0
  47. package/dist/esm/models/ScheduledSubTransactionBase.d.ts +81 -0
  48. package/dist/esm/models/ScheduledSubTransactionBase.js +63 -0
  49. package/dist/esm/models/ScheduledTransactionDetail.d.ts +12 -0
  50. package/dist/esm/models/ScheduledTransactionDetail.js +4 -0
  51. package/dist/esm/models/ScheduledTransactionSummary.d.ts +17 -5
  52. package/dist/esm/models/ScheduledTransactionSummary.js +4 -0
  53. package/dist/esm/models/ScheduledTransactionSummaryBase.d.ts +119 -0
  54. package/dist/esm/models/ScheduledTransactionSummaryBase.js +94 -0
  55. package/dist/esm/models/SubTransaction.d.ts +19 -7
  56. package/dist/esm/models/SubTransaction.js +4 -0
  57. package/dist/esm/models/SubTransactionBase.d.ts +87 -0
  58. package/dist/esm/models/SubTransactionBase.js +65 -0
  59. package/dist/esm/models/TransactionDetail.d.ts +12 -0
  60. package/dist/esm/models/TransactionDetail.js +4 -0
  61. package/dist/esm/models/TransactionSummary.d.ts +22 -10
  62. package/dist/esm/models/TransactionSummary.js +4 -0
  63. package/dist/esm/models/TransactionSummaryBase.d.ts +151 -0
  64. package/dist/esm/models/TransactionSummaryBase.js +102 -0
  65. package/dist/esm/models/index.d.ts +12 -0
  66. package/dist/esm/models/index.js +12 -0
  67. package/dist/models/Account.d.ts +40 -4
  68. package/dist/models/Account.js +12 -0
  69. package/dist/models/AccountBase.d.ts +136 -0
  70. package/dist/models/AccountBase.js +98 -0
  71. package/dist/models/Category.d.ts +100 -16
  72. package/dist/models/Category.js +28 -0
  73. package/dist/models/CategoryBase.d.ts +188 -0
  74. package/dist/models/CategoryBase.js +120 -0
  75. package/dist/models/ExistingCategory.d.ts +7 -1
  76. package/dist/models/ExistingCategory.js +2 -0
  77. package/dist/models/HybridTransaction.d.ts +12 -0
  78. package/dist/models/HybridTransaction.js +4 -0
  79. package/dist/models/MoneyMovement.d.ts +19 -7
  80. package/dist/models/MoneyMovement.js +4 -0
  81. package/dist/models/MoneyMovementBase.d.ts +75 -0
  82. package/dist/models/MoneyMovementBase.js +63 -0
  83. package/dist/models/MonthDetail.d.ts +48 -0
  84. package/dist/models/MonthDetail.js +16 -0
  85. package/dist/models/MonthDetailBase.d.ts +76 -0
  86. package/dist/models/MonthDetailBase.js +74 -0
  87. package/dist/models/MonthSummary.d.ts +50 -2
  88. package/dist/models/MonthSummary.js +16 -0
  89. package/dist/models/MonthSummaryBase.d.ts +69 -0
  90. package/dist/models/MonthSummaryBase.js +69 -0
  91. package/dist/models/NewCategory.d.ts +7 -1
  92. package/dist/models/NewCategory.js +2 -0
  93. package/dist/models/PlanDetail.d.ts +21 -21
  94. package/dist/models/PlanDetail.js +21 -21
  95. package/dist/models/PostPayee.d.ts +27 -0
  96. package/dist/models/PostPayee.js +45 -0
  97. package/dist/models/PostPayeeWrapper.d.ts +28 -0
  98. package/dist/models/PostPayeeWrapper.js +46 -0
  99. package/dist/models/SaveAccount.d.ts +3 -3
  100. package/dist/models/SaveAccount.js +3 -3
  101. package/dist/models/SaveAccountType.d.ts +24 -0
  102. package/dist/models/SaveAccountType.js +50 -0
  103. package/dist/models/SaveCategory.d.ts +7 -1
  104. package/dist/models/SaveCategory.js +2 -0
  105. package/dist/models/SavePayee.d.ts +1 -1
  106. package/dist/models/ScheduledSubTransaction.d.ts +18 -6
  107. package/dist/models/ScheduledSubTransaction.js +4 -0
  108. package/dist/models/ScheduledSubTransactionBase.d.ts +81 -0
  109. package/dist/models/ScheduledSubTransactionBase.js +69 -0
  110. package/dist/models/ScheduledTransactionDetail.d.ts +12 -0
  111. package/dist/models/ScheduledTransactionDetail.js +4 -0
  112. package/dist/models/ScheduledTransactionSummary.d.ts +17 -5
  113. package/dist/models/ScheduledTransactionSummary.js +4 -0
  114. package/dist/models/ScheduledTransactionSummaryBase.d.ts +119 -0
  115. package/dist/models/ScheduledTransactionSummaryBase.js +101 -0
  116. package/dist/models/SubTransaction.d.ts +19 -7
  117. package/dist/models/SubTransaction.js +4 -0
  118. package/dist/models/SubTransactionBase.d.ts +87 -0
  119. package/dist/models/SubTransactionBase.js +71 -0
  120. package/dist/models/TransactionDetail.d.ts +12 -0
  121. package/dist/models/TransactionDetail.js +4 -0
  122. package/dist/models/TransactionSummary.d.ts +22 -10
  123. package/dist/models/TransactionSummary.js +4 -0
  124. package/dist/models/TransactionSummaryBase.d.ts +151 -0
  125. package/dist/models/TransactionSummaryBase.js +109 -0
  126. package/dist/models/index.d.ts +12 -0
  127. package/dist/models/index.js +12 -0
  128. package/package.json +2 -2
@@ -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
@@ -66,6 +66,8 @@ export function ScheduledTransactionSummaryFromJSONTyped(json, ignoreDiscriminat
66
66
  'category_id': json['category_id'] == null ? undefined : json['category_id'],
67
67
  'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
68
68
  'deleted': json['deleted'],
69
+ 'amount_formatted': json['amount_formatted'] == null ? undefined : json['amount_formatted'],
70
+ 'amount_currency': json['amount_currency'] == null ? undefined : json['amount_currency'],
69
71
  };
70
72
  }
71
73
  export function ScheduledTransactionSummaryToJSON(json) {
@@ -90,5 +92,7 @@ export function ScheduledTransactionSummaryToJSONTyped(value, ignoreDiscriminato
90
92
  'category_id': value['category_id'],
91
93
  'transfer_account_id': value['transfer_account_id'],
92
94
  'deleted': value['deleted'],
95
+ 'amount_formatted': value['amount_formatted'],
96
+ 'amount_currency': value['amount_currency'],
93
97
  };
94
98
  }
@@ -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,94 @@
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
+ /**
11
+ * @export
12
+ */
13
+ export var ScheduledTransactionSummaryBaseFrequencyEnum = {
14
+ Never: 'never',
15
+ Daily: 'daily',
16
+ Weekly: 'weekly',
17
+ EveryOtherWeek: 'everyOtherWeek',
18
+ TwiceAMonth: 'twiceAMonth',
19
+ Every4Weeks: 'every4Weeks',
20
+ Monthly: 'monthly',
21
+ EveryOtherMonth: 'everyOtherMonth',
22
+ Every3Months: 'every3Months',
23
+ Every4Months: 'every4Months',
24
+ TwiceAYear: 'twiceAYear',
25
+ Yearly: 'yearly',
26
+ EveryOtherYear: 'everyOtherYear'
27
+ };
28
+ /**
29
+ * Check if a given object implements the ScheduledTransactionSummaryBase interface.
30
+ */
31
+ export function instanceOfScheduledTransactionSummaryBase(value) {
32
+ if (!('id' in value) || value['id'] === undefined)
33
+ return false;
34
+ if (!('date_first' in value) || value['date_first'] === undefined)
35
+ return false;
36
+ if (!('date_next' in value) || value['date_next'] === undefined)
37
+ return false;
38
+ if (!('frequency' in value) || value['frequency'] === undefined)
39
+ return false;
40
+ if (!('amount' in value) || value['amount'] === undefined)
41
+ return false;
42
+ if (!('account_id' in value) || value['account_id'] === undefined)
43
+ return false;
44
+ if (!('deleted' in value) || value['deleted'] === undefined)
45
+ return false;
46
+ return true;
47
+ }
48
+ export function ScheduledTransactionSummaryBaseFromJSON(json) {
49
+ return ScheduledTransactionSummaryBaseFromJSONTyped(json, false);
50
+ }
51
+ export function ScheduledTransactionSummaryBaseFromJSONTyped(json, ignoreDiscriminator) {
52
+ if (json == null) {
53
+ return json;
54
+ }
55
+ return {
56
+ 'id': json['id'],
57
+ 'date_first': json['date_first'],
58
+ 'date_next': json['date_next'],
59
+ 'frequency': json['frequency'],
60
+ 'amount': json['amount'],
61
+ 'memo': json['memo'] == null ? undefined : json['memo'],
62
+ 'flag_color': json['flag_color'] == null ? undefined : TransactionFlagColorFromJSON(json['flag_color']),
63
+ 'flag_name': json['flag_name'] == null ? undefined : json['flag_name'],
64
+ 'account_id': json['account_id'],
65
+ 'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
66
+ 'category_id': json['category_id'] == null ? undefined : json['category_id'],
67
+ 'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
68
+ 'deleted': json['deleted'],
69
+ };
70
+ }
71
+ export function ScheduledTransactionSummaryBaseToJSON(json) {
72
+ return ScheduledTransactionSummaryBaseToJSONTyped(json, false);
73
+ }
74
+ export function ScheduledTransactionSummaryBaseToJSONTyped(value, ignoreDiscriminator) {
75
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
76
+ if (value == null) {
77
+ return value;
78
+ }
79
+ return {
80
+ 'id': value['id'],
81
+ 'date_first': value['date_first'],
82
+ 'date_next': value['date_next'],
83
+ 'frequency': value['frequency'],
84
+ 'amount': value['amount'],
85
+ 'memo': value['memo'],
86
+ 'flag_color': TransactionFlagColorToJSON(value['flag_color']),
87
+ 'flag_name': value['flag_name'],
88
+ 'account_id': value['account_id'],
89
+ 'payee_id': value['payee_id'],
90
+ 'category_id': value['category_id'],
91
+ 'transfer_account_id': value['transfer_account_id'],
92
+ 'deleted': value['deleted'],
93
+ };
94
+ }
@@ -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.
@@ -39,6 +39,8 @@ export function SubTransactionFromJSONTyped(json, ignoreDiscriminator) {
39
39
  'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
40
40
  'transfer_transaction_id': json['transfer_transaction_id'] == null ? undefined : json['transfer_transaction_id'],
41
41
  'deleted': json['deleted'],
42
+ 'amount_formatted': json['amount_formatted'] == null ? undefined : json['amount_formatted'],
43
+ 'amount_currency': json['amount_currency'] == null ? undefined : json['amount_currency'],
42
44
  };
43
45
  }
44
46
  export function SubTransactionToJSON(json) {
@@ -61,5 +63,7 @@ export function SubTransactionToJSONTyped(value, ignoreDiscriminator) {
61
63
  'transfer_account_id': value['transfer_account_id'],
62
64
  'transfer_transaction_id': value['transfer_transaction_id'],
63
65
  'deleted': value['deleted'],
66
+ 'amount_formatted': value['amount_formatted'],
67
+ 'amount_currency': value['amount_currency'],
64
68
  };
65
69
  }
@@ -0,0 +1,87 @@
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 SubTransactionBase
11
+ */
12
+ export interface SubTransactionBase {
13
+ /**
14
+ *
15
+ * @type {string}
16
+ * @memberof SubTransactionBase
17
+ */
18
+ id: string;
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof SubTransactionBase
23
+ */
24
+ transaction_id: string;
25
+ /**
26
+ * The subtransaction amount in milliunits format
27
+ * @type {number}
28
+ * @memberof SubTransactionBase
29
+ */
30
+ amount: number;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof SubTransactionBase
35
+ */
36
+ memo?: string | null;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof SubTransactionBase
41
+ */
42
+ payee_id?: string | null;
43
+ /**
44
+ *
45
+ * @type {string}
46
+ * @memberof SubTransactionBase
47
+ */
48
+ payee_name?: string | null;
49
+ /**
50
+ *
51
+ * @type {string}
52
+ * @memberof SubTransactionBase
53
+ */
54
+ category_id?: string | null;
55
+ /**
56
+ *
57
+ * @type {string}
58
+ * @memberof SubTransactionBase
59
+ */
60
+ category_name?: string | null;
61
+ /**
62
+ * If a transfer, the account_id which the subtransaction transfers to
63
+ * @type {string}
64
+ * @memberof SubTransactionBase
65
+ */
66
+ transfer_account_id?: string | null;
67
+ /**
68
+ * If a transfer, the id of transaction on the other side of the transfer
69
+ * @type {string}
70
+ * @memberof SubTransactionBase
71
+ */
72
+ transfer_transaction_id?: string | null;
73
+ /**
74
+ * Whether or not the subtransaction has been deleted. Deleted subtransactions will only be included in delta requests.
75
+ * @type {boolean}
76
+ * @memberof SubTransactionBase
77
+ */
78
+ deleted: boolean;
79
+ }
80
+ /**
81
+ * Check if a given object implements the SubTransactionBase interface.
82
+ */
83
+ export declare function instanceOfSubTransactionBase(value: object): value is SubTransactionBase;
84
+ export declare function SubTransactionBaseFromJSON(json: any): SubTransactionBase;
85
+ export declare function SubTransactionBaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubTransactionBase;
86
+ export declare function SubTransactionBaseToJSON(json: any): SubTransactionBase;
87
+ export declare function SubTransactionBaseToJSONTyped(value?: SubTransactionBase | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,65 @@
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
+ /**
10
+ * Check if a given object implements the SubTransactionBase interface.
11
+ */
12
+ export function instanceOfSubTransactionBase(value) {
13
+ if (!('id' in value) || value['id'] === undefined)
14
+ return false;
15
+ if (!('transaction_id' in value) || value['transaction_id'] === undefined)
16
+ return false;
17
+ if (!('amount' in value) || value['amount'] === undefined)
18
+ return false;
19
+ if (!('deleted' in value) || value['deleted'] === undefined)
20
+ return false;
21
+ return true;
22
+ }
23
+ export function SubTransactionBaseFromJSON(json) {
24
+ return SubTransactionBaseFromJSONTyped(json, false);
25
+ }
26
+ export function SubTransactionBaseFromJSONTyped(json, ignoreDiscriminator) {
27
+ if (json == null) {
28
+ return json;
29
+ }
30
+ return {
31
+ 'id': json['id'],
32
+ 'transaction_id': json['transaction_id'],
33
+ 'amount': json['amount'],
34
+ 'memo': json['memo'] == null ? undefined : json['memo'],
35
+ 'payee_id': json['payee_id'] == null ? undefined : json['payee_id'],
36
+ 'payee_name': json['payee_name'] == null ? undefined : json['payee_name'],
37
+ 'category_id': json['category_id'] == null ? undefined : json['category_id'],
38
+ 'category_name': json['category_name'] == null ? undefined : json['category_name'],
39
+ 'transfer_account_id': json['transfer_account_id'] == null ? undefined : json['transfer_account_id'],
40
+ 'transfer_transaction_id': json['transfer_transaction_id'] == null ? undefined : json['transfer_transaction_id'],
41
+ 'deleted': json['deleted'],
42
+ };
43
+ }
44
+ export function SubTransactionBaseToJSON(json) {
45
+ return SubTransactionBaseToJSONTyped(json, false);
46
+ }
47
+ export function SubTransactionBaseToJSONTyped(value, ignoreDiscriminator) {
48
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
49
+ if (value == null) {
50
+ return value;
51
+ }
52
+ return {
53
+ 'id': value['id'],
54
+ 'transaction_id': value['transaction_id'],
55
+ 'amount': value['amount'],
56
+ 'memo': value['memo'],
57
+ 'payee_id': value['payee_id'],
58
+ 'payee_name': value['payee_name'],
59
+ 'category_id': value['category_id'],
60
+ 'category_name': value['category_name'],
61
+ 'transfer_account_id': value['transfer_account_id'],
62
+ 'transfer_transaction_id': value['transfer_transaction_id'],
63
+ 'deleted': value['deleted'],
64
+ };
65
+ }
@@ -127,6 +127,18 @@ export interface TransactionDetail {
127
127
  * @memberof TransactionDetail
128
128
  */
129
129
  deleted: boolean;
130
+ /**
131
+ * The transaction amount formatted in the plan's currency format
132
+ * @type {string}
133
+ * @memberof TransactionDetail
134
+ */
135
+ amount_formatted?: string;
136
+ /**
137
+ * The transaction amount as a decimal currency amount
138
+ * @type {number}
139
+ * @memberof TransactionDetail
140
+ */
141
+ amount_currency?: number;
130
142
  /**
131
143
  *
132
144
  * @type {string}
@@ -73,6 +73,8 @@ export function TransactionDetailFromJSONTyped(json, ignoreDiscriminator) {
73
73
  'import_payee_name_original': json['import_payee_name_original'] == null ? undefined : json['import_payee_name_original'],
74
74
  'debt_transaction_type': json['debt_transaction_type'] == null ? undefined : json['debt_transaction_type'],
75
75
  'deleted': json['deleted'],
76
+ 'amount_formatted': json['amount_formatted'] == null ? undefined : json['amount_formatted'],
77
+ 'amount_currency': json['amount_currency'] == null ? undefined : json['amount_currency'],
76
78
  'account_name': json['account_name'],
77
79
  'payee_name': json['payee_name'] == null ? undefined : json['payee_name'],
78
80
  'category_name': json['category_name'] == null ? undefined : json['category_name'],
@@ -107,6 +109,8 @@ export function TransactionDetailToJSONTyped(value, ignoreDiscriminator) {
107
109
  'import_payee_name_original': value['import_payee_name_original'],
108
110
  'debt_transaction_type': value['debt_transaction_type'],
109
111
  'deleted': value['deleted'],
112
+ 'amount_formatted': value['amount_formatted'],
113
+ 'amount_currency': value['amount_currency'],
110
114
  'account_name': value['account_name'],
111
115
  'payee_name': value['payee_name'],
112
116
  'category_name': value['category_name'],
@@ -35,7 +35,7 @@ export interface TransactionSummary {
35
35
  * @type {string}
36
36
  * @memberof TransactionSummary
37
37
  */
38
- memo?: string | null;
38
+ memo?: string;
39
39
  /**
40
40
  *
41
41
  * @type {TransactionClearedStatus}
@@ -59,7 +59,7 @@ export interface TransactionSummary {
59
59
  * @type {string}
60
60
  * @memberof TransactionSummary
61
61
  */
62
- flag_name?: string | null;
62
+ flag_name?: string;
63
63
  /**
64
64
  *
65
65
  * @type {string}
@@ -71,49 +71,49 @@ export interface TransactionSummary {
71
71
  * @type {string}
72
72
  * @memberof TransactionSummary
73
73
  */
74
- payee_id?: string | null;
74
+ payee_id?: string;
75
75
  /**
76
76
  *
77
77
  * @type {string}
78
78
  * @memberof TransactionSummary
79
79
  */
80
- category_id?: string | null;
80
+ category_id?: string;
81
81
  /**
82
82
  * If a transfer transaction, the account to which it transfers
83
83
  * @type {string}
84
84
  * @memberof TransactionSummary
85
85
  */
86
- transfer_account_id?: string | null;
86
+ transfer_account_id?: string;
87
87
  /**
88
88
  * If a transfer transaction, the id of transaction on the other side of the transfer
89
89
  * @type {string}
90
90
  * @memberof TransactionSummary
91
91
  */
92
- transfer_transaction_id?: string | null;
92
+ transfer_transaction_id?: string;
93
93
  /**
94
94
  * If transaction is matched, the id of the matched transaction
95
95
  * @type {string}
96
96
  * @memberof TransactionSummary
97
97
  */
98
- matched_transaction_id?: string | null;
98
+ matched_transaction_id?: string;
99
99
  /**
100
100
  * If the transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'.
101
101
  * @type {string}
102
102
  * @memberof TransactionSummary
103
103
  */
104
- import_id?: string | null;
104
+ import_id?: string;
105
105
  /**
106
106
  * If the transaction was imported, the payee name that was used when importing and before applying any payee rename rules
107
107
  * @type {string}
108
108
  * @memberof TransactionSummary
109
109
  */
110
- import_payee_name?: string | null;
110
+ import_payee_name?: string;
111
111
  /**
112
112
  * If the transaction was imported, the original payee name as it appeared on the statement
113
113
  * @type {string}
114
114
  * @memberof TransactionSummary
115
115
  */
116
- import_payee_name_original?: string | null;
116
+ import_payee_name_original?: string;
117
117
  /**
118
118
  * If the transaction is a debt/loan account transaction, the type of transaction
119
119
  * @type {TransactionSummaryDebtTransactionTypeEnum}
@@ -126,6 +126,18 @@ export interface TransactionSummary {
126
126
  * @memberof TransactionSummary
127
127
  */
128
128
  deleted: boolean;
129
+ /**
130
+ * The transaction amount formatted in the plan's currency format
131
+ * @type {string}
132
+ * @memberof TransactionSummary
133
+ */
134
+ amount_formatted?: string;
135
+ /**
136
+ * The transaction amount as a decimal currency amount
137
+ * @type {number}
138
+ * @memberof TransactionSummary
139
+ */
140
+ amount_currency?: number;
129
141
  }
130
142
  /**
131
143
  * @export
@@ -68,6 +68,8 @@ export function TransactionSummaryFromJSONTyped(json, ignoreDiscriminator) {
68
68
  'import_payee_name_original': json['import_payee_name_original'] == null ? undefined : json['import_payee_name_original'],
69
69
  'debt_transaction_type': json['debt_transaction_type'] == null ? undefined : json['debt_transaction_type'],
70
70
  'deleted': json['deleted'],
71
+ 'amount_formatted': json['amount_formatted'] == null ? undefined : json['amount_formatted'],
72
+ 'amount_currency': json['amount_currency'] == null ? undefined : json['amount_currency'],
71
73
  };
72
74
  }
73
75
  export function TransactionSummaryToJSON(json) {
@@ -98,5 +100,7 @@ export function TransactionSummaryToJSONTyped(value, ignoreDiscriminator) {
98
100
  'import_payee_name_original': value['import_payee_name_original'],
99
101
  'debt_transaction_type': value['debt_transaction_type'],
100
102
  'deleted': value['deleted'],
103
+ 'amount_formatted': value['amount_formatted'],
104
+ 'amount_currency': value['amount_currency'],
101
105
  };
102
106
  }