File

projects/congarevenuecloud/ecommerce/src/lib/modules/pricing/services/price-list-item.service.ts

Description

The price list items map a product to a specific price list. They provide the base price for any product in your catalog

Usage

Example :
import { PriceListItemService, AObjectService} from '@congarevenuecloud/ecommerce';

export class MyComponent implements OnInit{
constructor( private priceListItemService: PriceListItemService)
}
// or
export class MyService extends AObjectService {
private priceListItemService: PriceListItemService = this.injector.get(PriceListItemService);
}

Extends

AObjectService

Index

Properties
Methods

Methods

getPriceListItemByCode
Method gets a single price list item record for a given product code.
getPriceListItemByCode(productCodeList: Array)

Method gets a single price list item record for a given product code.

Parameters :
Name Type Optional Description
productCodeList Array<string> No

string list representing the product codes to return the price list item for.

Returns : Observable<Array<PriceListItem>>

A hot observable containing the price list item for requested product(s).

Static getPriceListItemForProduct
getPriceListItemForProduct(product: Product, chargeType?: ChargeType)

Method gets price list for a given product.

Example:

Example :
import { PriceListItemService, PriceListItem, Product} from '@congarevenuecloud/ecommerce';
import { Observable } from 'rxjs/Observable';

export class MyComponent implements OnInit{
priceListItem: PriceListItem;

constructor(private priceListItemService: PriceListItemService){}

getPriceListItem(product: Product){
PriceListItemService.getPriceListItemForProduct(product);
}
}
Parameters :
Name Type Optional Description
product Product No

the instance of the product to return the price list item for.

chargeType ChargeType Yes

an optional parameter representing the charge type to return the price list item for.

Returns : PriceListItem

price list item object.

Properties

type
Default value : PriceListItem

results matching ""

    No results matching ""