ShippingMethodService

ShippingMethodService

Contains methods relating to ShippingMethod entities.

Signature

class ShippingMethodService {
  constructor(connection: TransactionalConnection, configService: ConfigService, listQueryBuilder: ListQueryBuilder, channelService: ChannelService, configArgService: ConfigArgService, translatableSaver: TranslatableSaver, customFieldRelationService: CustomFieldRelationService)
  findAll(ctx: RequestContext, options?: ListQueryOptions<ShippingMethod>) => Promise<PaginatedList<ShippingMethod>>;
  async findOne(ctx: RequestContext, shippingMethodId: ID, includeDeleted:  = false) => Promise<ShippingMethod | undefined>;
  async create(ctx: RequestContext, input: CreateShippingMethodInput) => Promise<ShippingMethod>;
  async update(ctx: RequestContext, input: UpdateShippingMethodInput) => Promise<ShippingMethod>;
  async softDelete(ctx: RequestContext, id: ID) => Promise<DeletionResponse>;
  getShippingEligibilityCheckers(ctx: RequestContext) => ConfigurableOperationDefinition[];
  getShippingCalculators(ctx: RequestContext) => ConfigurableOperationDefinition[];
  getFulfillmentHandlers(ctx: RequestContext) => ConfigurableOperationDefinition[];
  async getActiveShippingMethods(ctx: RequestContext) => Promise<ShippingMethod[]>;
}

Members

constructor

method
type:
(connection: TransactionalConnection, configService: ConfigService, listQueryBuilder: ListQueryBuilder, channelService: ChannelService, configArgService: ConfigArgService, translatableSaver: TranslatableSaver, customFieldRelationService: CustomFieldRelationService) => ShippingMethodService

findAll

method
type:
(ctx: RequestContext, options?: ListQueryOptions<ShippingMethod>) => Promise<PaginatedList<ShippingMethod>>

findOne

async method
type:
(ctx: RequestContext, shippingMethodId: ID, includeDeleted: = false) => Promise<ShippingMethod | undefined>

create

async method
type:
(ctx: RequestContext, input: CreateShippingMethodInput) => Promise<ShippingMethod>

update

async method
type:
(ctx: RequestContext, input: UpdateShippingMethodInput) => Promise<ShippingMethod>

softDelete

async method
type:
(ctx: RequestContext, id: ID) => Promise<DeletionResponse>

getShippingEligibilityCheckers

method
type:
(ctx: RequestContext) => ConfigurableOperationDefinition[]

getShippingCalculators

method
type:
(ctx: RequestContext) => ConfigurableOperationDefinition[]

getFulfillmentHandlers

method
type:
(ctx: RequestContext) => ConfigurableOperationDefinition[]

getActiveShippingMethods

async method
type:
(ctx: RequestContext) => Promise<ShippingMethod[]>