Product Catalog Management¶
This project is an implementation of the TMF620 - Product Catalog Management API. It provides a service for managing product offering prices.
Features¶
- Create a new product offering price
- Delete an existing product offering price
- List all product offering prices
- Update a product offering price partially
- Retrieve a product offering price by ID
Installation¶
This project is built with Angular. Make sure you have Node.js and Angular CLI installed. Then run:
Exported APIs¶
The api.ts file exports the following services:
CatalogService¶
This service provides methods for managing catalogs.
CategoryService¶
This service provides methods for managing categories.
ExportJobService¶
This service provides methods for managing export jobs.
ImportJobService¶
This service provides methods for managing import jobs.
ProductOfferingService¶
This service provides methods for managing product offerings.
ProductOfferingPriceService¶
This service provides methods for managing product offering prices.
ProductSpecificationService¶
This service provides methods for managing product specifications.
All these services are also included in the APIS array for easy injection into Angular's dependency injection system.
Usage¶
import { Component, OnInit } from '@angular/core';
import { ProductOfferingPriceService } from './productOfferingPrice.service';
import { ProductOfferingPriceCreate } from '../model/productOfferingPriceCreate';
@Component({
selector: 'app-product-offering-price',
templateUrl: './product-offering-price.component.html',
styleUrls: ['./product-offering-price.component.css']
})
export class ProductOfferingPriceComponent implements OnInit {
constructor(private productOfferingPriceService: ProductOfferingPriceService) { }
ngOnInit(): void {
this.createProductOfferingPrice();
}
createProductOfferingPrice(): void {
const newProductOfferingPrice: ProductOfferingPriceCreate = {
// fill in the required fields
};
this.productOfferingPriceService.create(newProductOfferingPrice).subscribe(
data => console.log('Product Offering Price created successfully: ', data),
error => console.error('Error creating Product Offering Price: ', error)
);
}
}
API¶
The ProductOfferingPriceService provides the following methods:
create(productOfferingPrice: ProductOfferingPriceCreate): Observable<ProductOfferingPrice>¶
Creates a new product offering price.
Parameters:
productOfferingPrice: ProductOfferingPriceCreate- The product offering price to create.
Returns:
An Observable that emits the created product offering price.
delete(id: string): Observable<void>¶
Deletes an existing product offering price.
Parameters:
id: string- The ID of the product offering price to delete.
Returns:
An Observable that completes when the product offering price is deleted.
list(): Observable<ProductOfferingPrice[]>¶
Lists all product offering prices.
Returns:
An Observable that emits an array of product offering prices.
update(id: string, productOfferingPrice: ProductOfferingPriceUpdate): Observable<ProductOfferingPrice>¶
Updates a product offering price partially.
Parameters:
id: string- The ID of the product offering price to update.productOfferingPrice: ProductOfferingPriceUpdate- The partial update for the product offering price.
Returns:
An Observable that emits the updated product offering price.
retrieve(id: string): Observable<ProductOfferingPrice>¶
Retrieves a product offering price by ID.
Parameters:
id: string- The ID of the product offering price to retrieve.
Returns:
An Observable that emits the retrieved product offering price.