@cosmosapp/pay_sdkDéfinitionsServeur
ProductManager
Manages products / prices — client.products. Reference for the ProductManager class of @cosmosapp/pay_sdk: its members and their signatures.
Manages products / prices — client.products.
Methods
create()
Create a product.
create(options: CreateProductOptions): Promise<Product>Parameters
options:CreateProductOptions
Returns Promise<Product>
list()
List the consumer's products.
list(): Promise<Product[]>Returns Promise<Product[]>
fetch()
Get a product by id.
fetch(id: string): Promise<Product>Parameters
id:string
Returns Promise<Product>
update()
Update a product.
update(id: string, options: UpdateProductOptions): Promise<Product>Parameters
id:stringoptions:UpdateProductOptions
Returns Promise<Product>
delete()
Delete a product.
delete(id: string): Promise<ProductDeletedData>Parameters
id:string
Returns Promise<ProductDeletedData>