Skip to content

Commit c2aa1fe

Browse files
committed
Generate against v1.83.0
1 parent 72b8ff1 commit c2aa1fe

193 files changed

Lines changed: 8738 additions & 397 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dist/apis/PayeesApi.d.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
66
*/
77
import * as runtime from '../runtime';
8-
import type { PatchPayeeWrapper, PayeeResponse, PayeesResponse, SavePayeeResponse } from '../models/index';
8+
import type { PatchPayeeWrapper, PayeeResponse, PayeesResponse, PostPayeeWrapper, SavePayeeResponse } from '../models/index';
9+
export interface CreatePayeeRequest {
10+
planId: string;
11+
data: PostPayeeWrapper;
12+
}
913
export interface GetPayeeByIdRequest {
1014
planId: string;
1115
payeeId: string;
@@ -23,6 +27,16 @@ export interface UpdatePayeeRequest {
2327
*
2428
*/
2529
export declare class PayeesApi extends runtime.BaseAPI {
30+
/**
31+
* Creates a new payee
32+
* Create a payee
33+
*/
34+
createPayeeRaw(requestParameters: CreatePayeeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SavePayeeResponse>>;
35+
/**
36+
* Creates a new payee
37+
* Create a payee
38+
*/
39+
createPayee(planId: string, data: PostPayeeWrapper, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SavePayeeResponse>;
2640
/**
2741
* Returns a single payee
2842
* Get a payee

dist/apis/PayeesApi.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,45 @@ const index_1 = require("../models/index");
4848
*
4949
*/
5050
class PayeesApi extends runtime.BaseAPI {
51+
/**
52+
* Creates a new payee
53+
* Create a payee
54+
*/
55+
async createPayeeRaw(requestParameters, initOverrides) {
56+
if (requestParameters.planId === null || requestParameters.planId === undefined) {
57+
throw new runtime.RequiredError('planId', 'Required parameter requestParameters.planId was null or undefined when calling createPayee.');
58+
}
59+
if (requestParameters.data === null || requestParameters.data === undefined) {
60+
throw new runtime.RequiredError('data', 'Required parameter requestParameters.data was null or undefined when calling createPayee.');
61+
}
62+
const queryParameters = {};
63+
const headerParameters = {};
64+
headerParameters['Accept'] = 'application/json';
65+
headerParameters['Content-Type'] = 'application/json';
66+
if (this.configuration && this.configuration.accessToken) {
67+
const token = this.configuration.accessToken;
68+
const tokenString = await token("bearer", []);
69+
if (tokenString) {
70+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
71+
}
72+
}
73+
const response = await this.request({
74+
path: `/plans/{plan_id}/payees`.replace(`{${"plan_id"}}`, encodeURIComponent(String(requestParameters.planId))),
75+
method: 'POST',
76+
headers: headerParameters,
77+
query: queryParameters,
78+
body: (0, index_1.PostPayeeWrapperToJSON)(requestParameters.data),
79+
}, initOverrides);
80+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SavePayeeResponseFromJSON)(jsonValue));
81+
}
82+
/**
83+
* Creates a new payee
84+
* Create a payee
85+
*/
86+
async createPayee(planId, data, initOverrides) {
87+
const response = await this.createPayeeRaw({ planId: planId, data: data }, initOverrides);
88+
return await response.value();
89+
}
5190
/**
5291
* Returns a single payee
5392
* Get a payee

dist/browser/ynab.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/esm/apis/PayeesApi.d.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
66
*/
77
import * as runtime from '../runtime';
8-
import type { PatchPayeeWrapper, PayeeResponse, PayeesResponse, SavePayeeResponse } from '../models/index';
8+
import type { PatchPayeeWrapper, PayeeResponse, PayeesResponse, PostPayeeWrapper, SavePayeeResponse } from '../models/index';
9+
export interface CreatePayeeRequest {
10+
planId: string;
11+
data: PostPayeeWrapper;
12+
}
913
export interface GetPayeeByIdRequest {
1014
planId: string;
1115
payeeId: string;
@@ -23,6 +27,16 @@ export interface UpdatePayeeRequest {
2327
*
2428
*/
2529
export declare class PayeesApi extends runtime.BaseAPI {
30+
/**
31+
* Creates a new payee
32+
* Create a payee
33+
*/
34+
createPayeeRaw(requestParameters: CreatePayeeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SavePayeeResponse>>;
35+
/**
36+
* Creates a new payee
37+
* Create a payee
38+
*/
39+
createPayee(planId: string, data: PostPayeeWrapper, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SavePayeeResponse>;
2640
/**
2741
* Returns a single payee
2842
* Get a payee

dist/esm/apis/PayeesApi.js

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
5858
}
5959
};
6060
import * as runtime from '../runtime';
61-
import { PatchPayeeWrapperToJSON, PayeeResponseFromJSON, PayeesResponseFromJSON, SavePayeeResponseFromJSON, } from '../models/index';
61+
import { PatchPayeeWrapperToJSON, PayeeResponseFromJSON, PayeesResponseFromJSON, PostPayeeWrapperToJSON, SavePayeeResponseFromJSON, } from '../models/index';
6262
/**
6363
*
6464
*/
@@ -67,6 +67,67 @@ var PayeesApi = /** @class */ (function (_super) {
6767
function PayeesApi() {
6868
return _super !== null && _super.apply(this, arguments) || this;
6969
}
70+
/**
71+
* Creates a new payee
72+
* Create a payee
73+
*/
74+
PayeesApi.prototype.createPayeeRaw = function (requestParameters, initOverrides) {
75+
return __awaiter(this, void 0, void 0, function () {
76+
var queryParameters, headerParameters, token, tokenString, response;
77+
return __generator(this, function (_a) {
78+
switch (_a.label) {
79+
case 0:
80+
if (requestParameters.planId === null || requestParameters.planId === undefined) {
81+
throw new runtime.RequiredError('planId', 'Required parameter requestParameters.planId was null or undefined when calling createPayee.');
82+
}
83+
if (requestParameters.data === null || requestParameters.data === undefined) {
84+
throw new runtime.RequiredError('data', 'Required parameter requestParameters.data was null or undefined when calling createPayee.');
85+
}
86+
queryParameters = {};
87+
headerParameters = {};
88+
headerParameters['Accept'] = 'application/json';
89+
headerParameters['Content-Type'] = 'application/json';
90+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
91+
token = this.configuration.accessToken;
92+
return [4 /*yield*/, token("bearer", [])];
93+
case 1:
94+
tokenString = _a.sent();
95+
if (tokenString) {
96+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
97+
}
98+
_a.label = 2;
99+
case 2: return [4 /*yield*/, this.request({
100+
path: "/plans/{plan_id}/payees".replace("{".concat("plan_id", "}"), encodeURIComponent(String(requestParameters.planId))),
101+
method: 'POST',
102+
headers: headerParameters,
103+
query: queryParameters,
104+
body: PostPayeeWrapperToJSON(requestParameters.data),
105+
}, initOverrides)];
106+
case 3:
107+
response = _a.sent();
108+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return SavePayeeResponseFromJSON(jsonValue); })];
109+
}
110+
});
111+
});
112+
};
113+
/**
114+
* Creates a new payee
115+
* Create a payee
116+
*/
117+
PayeesApi.prototype.createPayee = function (planId, data, initOverrides) {
118+
return __awaiter(this, void 0, void 0, function () {
119+
var response;
120+
return __generator(this, function (_a) {
121+
switch (_a.label) {
122+
case 0: return [4 /*yield*/, this.createPayeeRaw({ planId: planId, data: data }, initOverrides)];
123+
case 1:
124+
response = _a.sent();
125+
return [4 /*yield*/, response.value()];
126+
case 2: return [2 /*return*/, _a.sent()];
127+
}
128+
});
129+
});
130+
};
70131
/**
71132
* Returns a single payee
72133
* Get a payee

dist/esm/models/Account.d.ts

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export interface Account {
4646
* @type {string}
4747
* @memberof Account
4848
*/
49-
note?: string | null;
49+
note?: string;
5050
/**
5151
* The current available balance of the account in milliunits format
5252
* @type {number}
@@ -70,7 +70,7 @@ export interface Account {
7070
* @type {string}
7171
* @memberof Account
7272
*/
73-
transfer_payee_id: string | null;
73+
transfer_payee_id: string;
7474
/**
7575
* Whether or not the account is linked to a financial institution for automatic transaction import.
7676
* @type {boolean}
@@ -88,13 +88,13 @@ export interface Account {
8888
* @type {string}
8989
* @memberof Account
9090
*/
91-
last_reconciled_at?: string | null;
91+
last_reconciled_at?: string;
9292
/**
9393
* This field is deprecated and will always be null.
9494
* @type {number}
9595
* @memberof Account
9696
*/
97-
debt_original_balance?: number | null;
97+
debt_original_balance?: number;
9898
/**
9999
*
100100
* @type {{ [key: string]: number; }}
@@ -125,6 +125,42 @@ export interface Account {
125125
* @memberof Account
126126
*/
127127
deleted: boolean;
128+
/**
129+
* The current available balance of the account formatted in the plan's currency format
130+
* @type {string}
131+
* @memberof Account
132+
*/
133+
balance_formatted?: string;
134+
/**
135+
* The current available balance of the account as a decimal currency amount
136+
* @type {number}
137+
* @memberof Account
138+
*/
139+
balance_currency?: number;
140+
/**
141+
* The current cleared balance of the account formatted in the plan's currency format
142+
* @type {string}
143+
* @memberof Account
144+
*/
145+
cleared_balance_formatted?: string;
146+
/**
147+
* The current cleared balance of the account as a decimal currency amount
148+
* @type {number}
149+
* @memberof Account
150+
*/
151+
cleared_balance_currency?: number;
152+
/**
153+
* The current uncleared balance of the account formatted in the plan's currency format
154+
* @type {string}
155+
* @memberof Account
156+
*/
157+
uncleared_balance_formatted?: string;
158+
/**
159+
* The current uncleared balance of the account as a decimal currency amount
160+
* @type {number}
161+
* @memberof Account
162+
*/
163+
uncleared_balance_currency?: number;
128164
}
129165
/**
130166
* Check if a given object implements the Account interface.

dist/esm/models/Account.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ export function AccountFromJSONTyped(json, ignoreDiscriminator) {
5959
'debt_minimum_payments': json['debt_minimum_payments'] == null ? undefined : json['debt_minimum_payments'],
6060
'debt_escrow_amounts': json['debt_escrow_amounts'] == null ? undefined : json['debt_escrow_amounts'],
6161
'deleted': json['deleted'],
62+
'balance_formatted': json['balance_formatted'] == null ? undefined : json['balance_formatted'],
63+
'balance_currency': json['balance_currency'] == null ? undefined : json['balance_currency'],
64+
'cleared_balance_formatted': json['cleared_balance_formatted'] == null ? undefined : json['cleared_balance_formatted'],
65+
'cleared_balance_currency': json['cleared_balance_currency'] == null ? undefined : json['cleared_balance_currency'],
66+
'uncleared_balance_formatted': json['uncleared_balance_formatted'] == null ? undefined : json['uncleared_balance_formatted'],
67+
'uncleared_balance_currency': json['uncleared_balance_currency'] == null ? undefined : json['uncleared_balance_currency'],
6268
};
6369
}
6470
export function AccountToJSON(json) {
@@ -88,5 +94,11 @@ export function AccountToJSONTyped(value, ignoreDiscriminator) {
8894
'debt_minimum_payments': value['debt_minimum_payments'],
8995
'debt_escrow_amounts': value['debt_escrow_amounts'],
9096
'deleted': value['deleted'],
97+
'balance_formatted': value['balance_formatted'],
98+
'balance_currency': value['balance_currency'],
99+
'cleared_balance_formatted': value['cleared_balance_formatted'],
100+
'cleared_balance_currency': value['cleared_balance_currency'],
101+
'uncleared_balance_formatted': value['uncleared_balance_formatted'],
102+
'uncleared_balance_currency': value['uncleared_balance_currency'],
91103
};
92104
}

0 commit comments

Comments
 (0)