File

feature-libs/order/core/connectors/replenishment-order.adapter.ts

Index

Methods

Methods

Abstract cancelReplenishmentOrder
cancelReplenishmentOrder(userId: string, replenishmentOrderCode: string)

Abstract method used to cancel a replenishment order.

Parameters :
Name Type Optional Description
userId string No

The userId for given user

replenishmentOrderCode string No

The replenishmentOrderCode for a given scheduled replenishment

Returns : Observable<ReplenishmentOrder>
Abstract load
load(userId: string, replenishmentOrderCode: string)

Abstract method used to load replenishment order details.

Parameters :
Name Type Optional Description
userId string No

The userId for given user

replenishmentOrderCode string No

The replenishmentOrderCode for a given scheduled replenishment

Returns : Observable<ReplenishmentOrder>
Abstract loadHistory
loadHistory(userId: string, pageSize?: number, currentPage?: number, sort?: string)

Abstract method used to load replenishment order history for an user.

Parameters :
Name Type Optional Description
userId string No

The userId for given user

pageSize number Yes
currentPage number Yes
sort string Yes

Sorting method

Returns : Observable<ReplenishmentOrderList>
Abstract loadReplenishmentDetailsHistory
loadReplenishmentDetailsHistory(userId: string, replenishmentOrderCode: string, pageSize?: number, currentPage?: number, sort?: string)

Abstract method used to load order history from a replenishment order.

Parameters :
Name Type Optional Description
userId string No

The userId for given user

replenishmentOrderCode string No

The replenishmentOrderCode for a given scheduled replenishment

pageSize number Yes

The pageSize to display number of data as order history

currentPage number Yes

The currentPage of the order history list

sort string Yes

The sort for a sorting method

Returns : Observable<OrderHistoryList>
import {
  OrderHistoryList,
  ReplenishmentOrder,
  ReplenishmentOrderList,
} from '@spartacus/core';
import { Observable } from 'rxjs';

export abstract class ReplenishmentOrderAdapter {
  /**
   * Abstract method used to load replenishment order details.
   *
   * @param userId The `userId` for given user
   * @param replenishmentOrderCode The `replenishmentOrderCode` for a given scheduled replenishment
   */
  abstract load(
    userId: string,
    replenishmentOrderCode: string
  ): Observable<ReplenishmentOrder>;

  /**
   * Abstract method used to load order history from a replenishment order.
   *
   * @param userId The `userId` for given user
   * @param replenishmentOrderCode The `replenishmentOrderCode` for a given scheduled replenishment
   * @param pageSize The `pageSize` to display number of data as order history
   * @param currentPage The `currentPage` of the order history list
   * @param sort The `sort` for a sorting method
   */
  abstract loadReplenishmentDetailsHistory(
    userId: string,
    replenishmentOrderCode: string,
    pageSize?: number,
    currentPage?: number,
    sort?: string
  ): Observable<OrderHistoryList>;

  /**
   * Abstract method used to cancel a replenishment order.
   *
   * @param userId The `userId` for given user
   * @param replenishmentOrderCode The `replenishmentOrderCode` for a given scheduled replenishment
   */
  abstract cancelReplenishmentOrder(
    userId: string,
    replenishmentOrderCode: string
  ): Observable<ReplenishmentOrder>;

  /**
   * Abstract method used to load replenishment order history for an user.
   *
   * @param userId The `userId` for given user
   * @param pageSize
   * @param currentPage
   * @param sort Sorting method
   */
  abstract loadHistory(
    userId: string,
    pageSize?: number,
    currentPage?: number,
    sort?: string
  ): Observable<ReplenishmentOrderList>;
}

result-matching ""

    No results matching ""