Skip to content

Commit

Permalink
remove private constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloud11PL committed Sep 4, 2024
1 parent f54576b commit fa121df
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions playwright/api/shippingMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,11 @@ type Warehouse = {
class ShippingMethodsService extends BaseAuthApiService {
readonly shippingZoneId: string;

private constructor(request: APIRequestContext, shippingZoneId: string) {
constructor(request: APIRequestContext, shippingZoneId: string) {
super(request);
this.shippingZoneId = shippingZoneId;
}

static create(request: APIRequestContext, shippingZoneId: string): ShippingMethodsService {
return new ShippingMethodsService(request, shippingZoneId);
}

async cleanupAfterSALEOR_37(): Promise<void> {
const DEFAULT_CHANNELS = [CHANNELS.channelUSD.id];
const DEFAULT_WAREHOUSES = [WAREHOUSES.warehouseOceania.id, WAREHOUSES.warehouseAfrica.id];
Expand Down Expand Up @@ -102,7 +98,7 @@ export const channelsAndWarehousesForUpdateCleanup = async (
token: string,
request: APIRequestContext,
) => {
const service = ShippingMethodsService.create(
const service = new ShippingMethodsService(
request,
SHIPPING_METHODS.shippingMethodToBeUpdated.id,
);
Expand Down

0 comments on commit fa121df

Please sign in to comment.