projects/congarevenuecloud/ecommerce/src/lib/modules/abo/services/asset.service.ts
This service is a work in progress.
Assets are the products own by customer and a user may wish to renew/terminate/update existing assets.
import { AssetService, AObjectService} from '@congarevenuecloud/ecommerce';
export class MyComponent implements OnInit{
constructor( private assetService: AssetService)
}
// or
export class MyService extends AObjectService {
private assetService: AssetService = this.injector.get(AssetService);
}
AObjectService
Properties |
|
Methods |
|
Public cancelAssets | ||||||||||||
cancelAssets(assetIds: Array
|
||||||||||||
The primary method to terminate the existing assets. Example:Example :
Parameters :
Returns :
Observable<Array<CartItem>>
Observable<Array |
getAssetAggregates | ||||||||||||||||||||||||||||||
getAssetAggregates(account?: Account, aggregateFields?: Array<AggregateFields>, queryFields: Array
|
||||||||||||||||||||||||||||||
This method returns an aggregate result based on asset aggregate criteria.
Parameters :
Returns :
Observable<AggregateResultSet>
observable containing aggregate response. |
Public getAssetLineItemsforProducts | |||||||||||||||
getAssetLineItemsforProducts(productList: Array<Product> | Array<string>, memoizeOptions: MemoizeOptions)
|
|||||||||||||||
Decorators :
@MemoizeWithHash()
|
|||||||||||||||
This method can be used to get the asset line items for given set of products. ABO must be enabled in the storefront to get asset line item records. Example:Example :
Parameters :
Returns :
Observable<Array<AssetLineItemExtended>>
returns an observable list of asset line item records. |
Public incrementAssets | ||||||||
incrementAssets(incrementAssetDOs: Array
|
||||||||
The primary method to increment the existing assets. Example:Example :
Parameters :
Returns :
Observable<Array<CartItem>>
an observable list of cart line items records. |
Public renewAssets | ||||||||||||||||||||
renewAssets(assetIds: Array
|
||||||||||||||||||||
The primary method to renew the existing assets. Example:Example :
Parameters :
Returns :
Observable<Array<CartItem>>
Observable<Array |
Protected accountService |
Default value : this.injector.get(AccountService)
|
apiService |
Type : ApiService
|
Default value : this.injector.get(ApiService)
|
storefrontService |
Type : StorefrontService
|
Default value : this.injector.get(StorefrontService)
|
type |
Default value : AssetLineItemExtended
|