File

feature-libs/checkout/core/connectors/payment-type/payment-type.adapter.ts

Index

Methods

Methods

Abstract loadPaymentTypes
loadPaymentTypes()

Abstract method used to get available payment types

Abstract setPaymentType
setPaymentType(userId: string, cartId: string, typeCode: string, poNumber?: string)

Abstract method used to set payment type to cart

Parameters :
Name Type Optional Description
userId string No
cartId string No
typeCode string No
poNumber string Yes

: purchase order number

Returns : Observable<any>
import { PaymentType } from '@spartacus/core';
import { Observable } from 'rxjs';

export abstract class PaymentTypeAdapter {
  /**
   * Abstract method used to get available payment types
   */
  abstract loadPaymentTypes(): Observable<PaymentType[]>;

  /**
   * Abstract method used to set payment type to cart
   *
   * @param userId
   * @param cartId
   * @param typeCode
   * @param poNumber: purchase order number
   */
  abstract setPaymentType(
    userId: string,
    cartId: string,
    typeCode: string,
    poNumber?: string
  ): Observable<any>;
}

result-matching ""

    No results matching ""