🚨 Announcing Vendure v2 Beta

PaymentMethodService

PaymentMethodService

Contains methods relating to PaymentMethod entities.

Signature

class PaymentMethodService {
  constructor(connection: TransactionalConnection, configService: ConfigService, listQueryBuilder: ListQueryBuilder, eventBus: EventBus, configArgService: ConfigArgService, channelService: ChannelService, customFieldRelationService: CustomFieldRelationService)
  findAll(ctx: RequestContext, options?: ListQueryOptions<PaymentMethod>, relations: RelationPaths<PaymentMethod> = []) => Promise<PaginatedList<PaymentMethod>>;
  findOne(ctx: RequestContext, paymentMethodId: ID, relations: RelationPaths<PaymentMethod> = []) => 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, customFieldRelationService: CustomFieldRelationService) => PaymentMethodService

findAll

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

findOne

method
type:
(ctx: RequestContext, paymentMethodId: ID, relations: RelationPaths<PaymentMethod> = []) => 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; }>