PaymentMethodService

PaymentMethodService

Contains methods relating to PaymentMethod entities.

Signature

class PaymentMethodService {
  constructor(connection: TransactionalConnection, configService: ConfigService, listQueryBuilder: ListQueryBuilder, eventBus: EventBus, configArgService: ConfigArgService, channelService: ChannelService)
  findAll(ctx: RequestContext, options?: ListQueryOptions<PaymentMethod>) => Promise<PaginatedList<PaymentMethod>>;
  findOne(ctx: RequestContext, paymentMethodId: ID) => Promise<PaymentMethod | undefined>;
  async create(ctx: RequestContext, input: CreatePaymentMethodInput) => Promise<PaymentMethod>;
  async update(ctx: RequestContext, input: UpdatePaymentMethodInput) => Promise<PaymentMethod>;
  async delete(ctx: RequestContext, paymentMethodId: ID, force: boolean = false) => Promise<DeletionResponse>;
  getPaymentMethodEligibilityCheckers(ctx: RequestContext) => ConfigurableOperationDefinition[];
  getPaymentMethodHandlers(ctx: RequestContext) => ConfigurableOperationDefinition[];
  async getEligiblePaymentMethods(ctx: RequestContext, order: Order) => Promise<PaymentMethodQuote[]>;
  async getMethodAndOperations(ctx: RequestContext, method: string) => Promise<{
        paymentMethod: PaymentMethod;
        handler: PaymentMethodHandler;
        checker: PaymentMethodEligibilityChecker | null;
    }>;
}

Members

constructor

method
type:
(connection: TransactionalConnection, configService: ConfigService, listQueryBuilder: ListQueryBuilder, eventBus: EventBus, configArgService: ConfigArgService, channelService: ChannelService) => PaymentMethodService

findAll

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

findOne

method
type:
(ctx: RequestContext, paymentMethodId: ID) => Promise<PaymentMethod | undefined>

create

async method
type:
(ctx: RequestContext, input: CreatePaymentMethodInput) => Promise<PaymentMethod>

update

async method
type:
(ctx: RequestContext, input: UpdatePaymentMethodInput) => Promise<PaymentMethod>

delete

async method
type:
(ctx: RequestContext, paymentMethodId: ID, force: boolean = false) => Promise<DeletionResponse>

getPaymentMethodEligibilityCheckers

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

getPaymentMethodHandlers

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

getEligiblePaymentMethods

async method
type:
(ctx: RequestContext, order: Order) => Promise<PaymentMethodQuote[]>

getMethodAndOperations

async method
type:
(ctx: RequestContext, method: string) => Promise<{ paymentMethod: PaymentMethod; handler: PaymentMethodHandler; checker: PaymentMethodEligibilityChecker | null; }>