PaymentMethodService

PaymentMethodService

Contains methods relating to PaymentMethod entities.

Signature

class PaymentMethodService {
  constructor(connection: TransactionalConnection, configService: ConfigService, roleService: RoleService, listQueryBuilder: ListQueryBuilder, eventBus: EventBus, configArgService: ConfigArgService, channelService: ChannelService, customFieldRelationService: CustomFieldRelationService, translatableSaver: TranslatableSaver, translator: TranslatorService)
  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>;
  async assignPaymentMethodsToChannel(ctx: RequestContext, input: AssignPaymentMethodsToChannelInput) => Promise<Array<Translated<PaymentMethod>>>;
  async removePaymentMethodsFromChannel(ctx: RequestContext, input: RemovePaymentMethodsFromChannelInput) => Promise<Array<Translated<PaymentMethod>>>;
  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, roleService: RoleService, listQueryBuilder: ListQueryBuilder, eventBus: EventBus, configArgService: ConfigArgService, channelService: ChannelService, customFieldRelationService: CustomFieldRelationService, translatableSaver: TranslatableSaver, translator: TranslatorService) => 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

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

update

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

delete

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

assignPaymentMethodsToChannel

method
type:
(ctx: RequestContext, input: AssignPaymentMethodsToChannelInput) => Promise<Array<Translated<PaymentMethod>>>

removePaymentMethodsFromChannel

method
type:
(ctx: RequestContext, input: RemovePaymentMethodsFromChannelInput) => Promise<Array<Translated<PaymentMethod>>>

getPaymentMethodEligibilityCheckers

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

getPaymentMethodHandlers

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

getEligiblePaymentMethods

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

getMethodAndOperations

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