Module ocs_rest_res_product

This library module implements resource handling functions for a REST server in the ocs application.

Copyright © 2016 - 2026 SigScale Global Inc.

Description

This library module implements resource handling functions for a REST server in the ocs application.

Data Types

offer_status()

offer_status() = in_study | in_design | in_test | active | rejected | launched | retired | obsolete

pla_ref()

pla_ref() = #pla_ref{id = string() | undefined | '_', href = string() | undefined | '_', name = string() | undefined | '_', class_type = string() | undefined | '_', base_type = string() | undefined | '_', schema = string() | undefined | '_', ref_type = string() | undefined | '_'}

product_price_type()

product_price_type() = recurring | one_time | usage | tariff | pla_ref()

product_status()

product_status() = created | pending_active | aborted | cancelled | active | suspended | pending_terminate | terminated

quantity()

quantity() = #quantity{amount = integer(), units = atom() | string()}

range()

range() = #range{lower = quantity(), upper = quantity()}

rate()

rate() = #rate{numerator = quantity(), denominator = quantity()}

recur_period()

recur_period() = hourly | daily | weekly | monthly | yearly

Function Index

content_types_accepted/0Provides list of resource representations accepted.
content_types_provided/0Provides list of resource representations available.
add_offer/1Respond to POST /productCatalogManagement/v2/productOffering.
add_product/1Respond to POST /productInventoryManagement/v2/product.
get_offer/1Respond to GET /productCatalogManagement/v2/productOffering/{id}.
get_product/1Respond to GET /productInventoryManagement/v2/product/{id}.
get_offers/2Respond to GET /productCatalogManagement/v2/productOffering/.
get_products/2Respond to GET /productInventoryManagement/v2/product/.
get_catalog/2Respond to GET /catalogManagement/v2/catalog/{id}.
get_catalogs/1Respond to GET /productCatalogManagement/v2/catalog/.
get_category/2Respond to GET /productCatalogManagement/v2/category/{id}.
get_categories/1Respond to GET /productCatalogManagement/v2/category/.
get_product_spec/2Respond to GET /productCatalogManagement/v2/productSpecification/{id}.
get_product_specs/1Respond to GET /productCatalogManagement/v2/productSpecification/.
patch_offer/3Respond to PATCH /productCatalogManagement/v2/productOffering/{id}.
get_pla_spec/2Respond to GET /catalogManegment/v2/plaSpecification/{id}.
patch_product/3Respond to PATCH /productInventoryManagement/v2/product/{id}.
delete_offer/1Respond to DELETE /productCatalogManagement/v2/productOffering/{id} request to remove a Product Offering.
delete_product/1Respond to DELETE /productInventoryManagement/v2/product/{id} request to remove a Product Invenotry.
sync_offer/1Respond to POST /productCatalogManagement/v2/syncOffer.
product_status/1CODEC for life cycle status of Product Offering.
product_spec/1*Get Product Specification by ID.
pla_spec/1*Get PLA specification by ID.
offer_status/1*CODEC for life cycle status of Product instance.
price_type/1*CODEC for Price Type.
price_period/1*CODEC for Recurring Charge Period.
offer/1CODEC for Product Offering.
bundled_po/1*
price/1*CODEC for Product Offering Price.
alteration/1*CODEC for Product Offering Price Alteration.
char_value_uses/1*CODEC for ProductSpecCharValueUses.
char_value_use/1*CODEC for ProductSpecCharValueUse.
char_values/1*CODEC for ProductSpecCharacteristicValues.
char_value/1*CODEC for ProductSpecCharacteristicValue.
product/1CODEC for Product Inventory.
instance_chars/1*CODEC for Product Inventory characteristics.
pla_ref/1*CODEC for Product Offering Pricing Logic Algorithm.

Function Details

content_types_accepted/0

content_types_accepted() -> ContentTypes

Provides list of resource representations accepted.

content_types_provided/0

content_types_provided() -> ContentTypes

Provides list of resource representations available.

add_offer/1

add_offer(RequestBody) -> Result

Respond to POST /productCatalogManagement/v2/productOffering. Add a new Product Offering.

add_product/1

add_product(RequestBody) -> Result

Respond to POST /productInventoryManagement/v2/product. Add a new instance of a Product Offering subscription.

get_offer/1

get_offer(ID) -> Result

Respond to GET /productCatalogManagement/v2/productOffering/{id}. Retrieve a Product Offering.

get_product/1

get_product(ID) -> Result

Respond to GET /productInventoryManagement/v2/product/{id}. Retrieve a Product Inventory.

get_offers/2

get_offers(Query, RequestHeaders) -> Result

Respond to GET /productCatalogManagement/v2/productOffering/. Retrieve all Product Offerings.

To do

get_products/2

get_products(Query, RequestHeaders) -> Result

Respond to GET /productInventoryManagement/v2/product/. Retrieve all Product Inventories.

get_catalog/2

get_catalog(Id, Query) -> Result

Respond to GET /catalogManagement/v2/catalog/{id}. Retrieve a catalog .

get_catalogs/1

get_catalogs(Query) -> Result

Respond to GET /productCatalogManagement/v2/catalog/. Retrieve all catalogs .

get_category/2

get_category(Id, Query) -> Result

Respond to GET /productCatalogManagement/v2/category/{id}. Retrieve a category.

get_categories/1

get_categories(Query) -> Result

Respond to GET /productCatalogManagement/v2/category/. Retrieve all catalogs .

get_product_spec/2

get_product_spec(Id, Query) -> Result

Respond to GET /productCatalogManagement/v2/productSpecification/{id}. Retrieve a product specification.

get_product_specs/1

get_product_specs(Query) -> Result

Respond to GET /productCatalogManagement/v2/productSpecification/. Retrieve all product specifications.

patch_offer/3

patch_offer(OfferId, Etag, RequestBody) -> Result

Respond to PATCH /productCatalogManagement/v2/productOffering/{id}. Update a Product Offering using JSON patch method RFC6902.

get_pla_spec/2

get_pla_spec(Id, Query) -> Result

Respond to GET /catalogManegment/v2/plaSpecification/{id}. Retrieve a pricing logic algorithm specification.

patch_product/3

patch_product(ProdId, Etag, RequestBody) -> Result

Respond to PATCH /productInventoryManagement/v2/product/{id}. Update a Product Offering using JSON patch method RFC6902.

delete_offer/1

delete_offer(Id) -> Result

Respond to DELETE /productCatalogManagement/v2/productOffering/{id} request to remove a Product Offering.

delete_product/1

delete_product(Id) -> Result

Respond to DELETE /productInventoryManagement/v2/product/{id} request to remove a Product Invenotry.

sync_offer/1

sync_offer(RequestBody) -> Result

Respond to POST /productCatalogManagement/v2/syncOffer. Sync a Product Offering.

product_status/1

product_status(Status) -> Status

CODEC for life cycle status of Product Offering.

product_spec/1 *

product_spec(ID) -> Result

Get Product Specification by ID.

pla_spec/1 *

pla_spec(ID) -> Result

Get PLA specification by ID.

offer_status/1 *

offer_status(Status) -> Status

CODEC for life cycle status of Product instance.

price_type/1 *

price_type(Type) -> Type

CODEC for Price Type.

price_period/1 *

price_period(Period) -> Period

CODEC for Recurring Charge Period.

offer/1

offer(Product) -> Product

CODEC for Product Offering.

bundled_po/1 *

bundled_po(Bundled) -> Bundled

price/1 *

price(Price) -> Price

CODEC for Product Offering Price.

alteration/1 *

alteration(Alteration) -> Alteration

CODEC for Product Offering Price Alteration.

char_value_uses/1 *

char_value_uses(CharValueUses) -> CharValueUses

CODEC for ProductSpecCharValueUses.

char_value_use/1 *

char_value_use(CharValueUse) -> CharValueUse

CODEC for ProductSpecCharValueUse.

char_values/1 *

char_values(CharValues) -> CharValues

CODEC for ProductSpecCharacteristicValues.

char_value/1 *

char_value(CharValue) -> CharValue

CODEC for ProductSpecCharacteristicValue.

product/1

product(Instance) -> Instance

CODEC for Product Inventory.

instance_chars/1 *

instance_chars(Characteristics) -> Characteristics

CODEC for Product Inventory characteristics.

pla_ref/1 *

pla_ref(Pla) -> Pla

CODEC for Product Offering Pricing Logic Algorithm.


Generated by EDoc