Skip to content

Commit 93d36af

Browse files
committed
chore: implement pr feedback
1 parent 3b4cf53 commit 93d36af

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

src/PrintOne.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,11 @@ export class PrintOne {
311311
/**
312312
* Get an order by its id.
313313
* @param { string } id The id of the order.
314-
* @param url The url to use for this request
314+
* @param basePath The basePath to use for this request
315315
* @throws { PrintOneError } If the order could not be found.
316316
*/
317-
public async getOrder(id: string, url = "orders"): Promise<Order> {
318-
const data = await this.client.GET<IOrder>(`${url}/${id}`);
317+
public async getOrder(id: string, basePath = "orders"): Promise<Order> {
318+
const data = await this.client.GET<IOrder>(`${basePath}/${id}`);
319319

320320
return new Order(this.protected, data);
321321
}
@@ -327,12 +327,12 @@ export class PrintOne {
327327
* @param options.page The page to return.
328328
* @param options.sortBy The fields to sort by, can be "createdAt", "anonymizedAt", "updatedAt", "friendlyStatus", "sendDate".
329329
* @param options.filter The filters to apply.
330-
* @param url The url to use for this request
330+
* @param basePath The basePath to use for this request
331331
* @throws { PrintOneError } If the order could not be found.
332332
*/
333333
public async getOrders(
334334
options: OrderPaginatedQuery = {},
335-
url = "orders",
335+
basePath = "orders",
336336
): Promise<PaginatedResponse<Order>> {
337337
let params = {
338338
...sortToQuery(options),
@@ -369,7 +369,7 @@ export class PrintOne {
369369
};
370370
}
371371

372-
const data = await this.client.GET<IPaginatedResponse<IOrder>>(url, {
372+
const data = await this.client.GET<IPaginatedResponse<IOrder>>(basePath, {
373373
params,
374374
});
375375

src/models/Batch.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,7 @@ export class Batch {
7777
failed: number;
7878
cancelled: number;
7979
} {
80-
return {
81-
processing: this._data.orders.processing,
82-
success: this._data.orders.success,
83-
failed: this._data.orders.failed,
84-
cancelled: this._data.orders.cancelled,
85-
};
80+
return this._data.orders;
8681
}
8782

8883
public get createdAt(): Date {

0 commit comments

Comments
 (0)