feature-libs/checkout/core/connectors/delivery/checkout-delivery.adapter.ts
Methods |
|
| Abstract createAddress |
createAddress(userId: string, cartId: string, address: Address)
|
|
Abstract method used to create address in cart
Returns :
Observable<Address>
|
| Abstract getMode |
getMode(userId: string, cartId: string)
|
|
Abstract method used to get current delivery mode from cart
Returns :
Observable<DeliveryMode>
|
| Abstract getSupportedModes |
getSupportedModes(userId: string, cartId: string)
|
|
Abstract method used to get supported delivery modes for cart
Returns :
Observable<DeliveryMode[]>
|
| Abstract setAddress |
setAddress(userId: string, cartId: string, addressId: string)
|
|
Abstract method used to set adress for delivery
Returns :
Observable<any>
|
| Abstract setMode |
setMode(userId: string, cartId: string, deliveryModeId: string)
|
|
Abstract method used to set delivery mode on cart
Returns :
Observable<any>
|
import { Address, DeliveryMode } from '@spartacus/core';
import { Observable } from 'rxjs';
export abstract class CheckoutDeliveryAdapter {
/**
* Abstract method used to create address in cart
*
* @param userId
* @param cartId
* @param address
*/
abstract createAddress(
userId: string,
cartId: string,
address: Address
): Observable<Address>;
/**
* Abstract method used to set adress for delivery
*
* @param userId
* @param cartId
* @param addressId
*/
abstract setAddress(
userId: string,
cartId: string,
addressId: string
): Observable<any>;
/**
* Abstract method used to set delivery mode on cart
*
* @param userId
* @param cartId
* @param deliveryModeId
*/
abstract setMode(
userId: string,
cartId: string,
deliveryModeId: string
): Observable<any>;
/**
* Abstract method used to get current delivery mode from cart
*
* @param userId
* @param cartId
*/
abstract getMode(userId: string, cartId: string): Observable<DeliveryMode>;
/**
* Abstract method used to get supported delivery modes for cart
*
* @param userId
* @param cartId
*/
abstract getSupportedModes(
userId: string,
cartId: string
): Observable<DeliveryMode[]>;
}