All URIs are relative to https://localhost:8080/RestAPI
| Method | HTTP request | Description |
|---|---|---|
| create_product | POST /products | Create a product. |
| delete_metadata_for_product | DELETE /products/{product-ID}/metadata | Remove any associated metadata. |
| get_all_products | GET /products | Returns a collection of products. By default 10 values are returned. Records are returned in natural order. |
| get_metadata_for_product | GET /products/{product-ID}/metadata | Retrieve any associated metadata. |
| get_product_by_id | GET /products/{product-ID} | Returns a single product, specified by the product-ID parameter. |
| retire_product | DELETE /products/{product-ID} | Deletes the product specified by the product-ID parameter. Any existing subscriptions will continue; it is a soft delete. |
| set_metadata_for_product | POST /products/{product-ID}/metadata | Remove any existing metadata keys and create the provided data. |
| update_product | PUT /products | Update a product. |
| upsert_metadata_for_product | PUT /products/{product-ID}/metadata | Update any existing metadata key-values and insert any new key-values, no keys will be removed. |
ProductPagedMetadata create_product(product)
Create a product.
{"nickname":"Create a new product","request":"createProductRequest.html","response":"createProductResponse.html"}
import time
import billforward
from billforward.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = billforward.ProductsApi()
product = billforward.Product() # Product | The product object to be updated.
try:
# Create a product.
api_response = api_instance.create_product(product)
pprint(api_response)
except ApiException as e:
print "Exception when calling ProductsApi->create_product: %s\n" % e| Name | Type | Description | Notes |
|---|---|---|---|
| product | Product | The product object to be updated. |
No authorization required
- Content-Type: application/json
- Accept: text/xml, application/xml, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DynamicMetadata delete_metadata_for_product(product_id, organizations=organizations)
Remove any associated metadata.
{"nickname":"Clear metadata from product","request" :"deleteProductMetadataRequest.html","response":"deleteProductMetadataResponse.html"}
import time
import billforward
from billforward.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = billforward.ProductsApi()
product_id = 'product_id_example' # str |
organizations = ['organizations_example'] # list[str] | A list of organization-IDs used to restrict the scope of API calls. (optional)
try:
# Remove any associated metadata.
api_response = api_instance.delete_metadata_for_product(product_id, organizations=organizations)
pprint(api_response)
except ApiException as e:
print "Exception when calling ProductsApi->delete_metadata_for_product: %s\n" % e| Name | Type | Description | Notes |
|---|---|---|---|
| product_id | str | ||
| organizations | list[str] | A list of organization-IDs used to restrict the scope of API calls. | [optional] |
No authorization required
- Content-Type: text/plain, application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ProductPagedMetadata get_all_products(organizations=organizations, offset=offset, records=records, order_by=order_by, order=order, include_retired=include_retired, metadata=metadata)
Returns a collection of products. By default 10 values are returned. Records are returned in natural order.
{"nickname":"Get all products","response":"getProductAll.html"}
import time
import billforward
from billforward.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = billforward.ProductsApi()
organizations = ['organizations_example'] # list[str] | A list of organization-IDs used to restrict the scope of API calls. (optional)
offset = 0 # int | The offset from the first product to return. (optional) (default to 0)
records = 10 # int | The maximum number of products to return. (optional) (default to 10)
order_by = 'created' # str | Specify a field used to order the result set. (optional) (default to created)
order = 'DESC' # str | Ihe direction of any ordering, either ASC or DESC. (optional) (default to DESC)
include_retired = true # bool | Whether retired products should be returned. (optional) (default to true)
metadata = 'metadata_example' # str | (optional)
try:
# Returns a collection of products. By default 10 values are returned. Records are returned in natural order.
api_response = api_instance.get_all_products(organizations=organizations, offset=offset, records=records, order_by=order_by, order=order, include_retired=include_retired, metadata=metadata)
pprint(api_response)
except ApiException as e:
print "Exception when calling ProductsApi->get_all_products: %s\n" % e| Name | Type | Description | Notes |
|---|---|---|---|
| organizations | list[str] | A list of organization-IDs used to restrict the scope of API calls. | [optional] |
| offset | int | The offset from the first product to return. | [optional] [default to 0] |
| records | int | The maximum number of products to return. | [optional] [default to 10] |
| order_by | str | Specify a field used to order the result set. | [optional] [default to created] |
| order | str | Ihe direction of any ordering, either ASC or DESC. | [optional] [default to DESC] |
| include_retired | bool | Whether retired products should be returned. | [optional] [default to true] |
| metadata | str | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json, text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DynamicMetadata get_metadata_for_product(product_id, organizations=organizations)
Retrieve any associated metadata.
{"nickname":"Retrieve metadata on product","request":"getProductMetadataRequest.html","response":"getProductMetadataResponse.html"}
import time
import billforward
from billforward.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = billforward.ProductsApi()
product_id = 'product_id_example' # str |
organizations = ['organizations_example'] # list[str] | A list of organization-IDs used to restrict the scope of API calls. (optional)
try:
# Retrieve any associated metadata.
api_response = api_instance.get_metadata_for_product(product_id, organizations=organizations)
pprint(api_response)
except ApiException as e:
print "Exception when calling ProductsApi->get_metadata_for_product: %s\n" % e| Name | Type | Description | Notes |
|---|---|---|---|
| product_id | str | ||
| organizations | list[str] | A list of organization-IDs used to restrict the scope of API calls. | [optional] |
No authorization required
- Content-Type: application/json, text/plain
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ProductPagedMetadata get_product_by_id(product_id, organizations=organizations, offset=offset, records=records, order_by=order_by, order=order, include_retired=include_retired)
Returns a single product, specified by the product-ID parameter.
{"nickname":"Retrieve an existing product","response":"getProductByID.html"}
import time
import billforward
from billforward.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = billforward.ProductsApi()
product_id = 'product_id_example' # str | ID or name of the product.
organizations = ['organizations_example'] # list[str] | A list of organization-IDs used to restrict the scope of API calls. (optional)
offset = 0 # int | The offset from the first product-rate-plan to return. (optional) (default to 0)
records = 10 # int | The maximum number of product-rate-plans to return. (optional) (default to 10)
order_by = 'created' # str | Specify a field used to order the result set. (optional) (default to created)
order = 'DESC' # str | Ihe direction of any ordering, either ASC or DESC. (optional) (default to DESC)
include_retired = true # bool | Whether retired products should be returned. (optional) (default to true)
try:
# Returns a single product, specified by the product-ID parameter.
api_response = api_instance.get_product_by_id(product_id, organizations=organizations, offset=offset, records=records, order_by=order_by, order=order, include_retired=include_retired)
pprint(api_response)
except ApiException as e:
print "Exception when calling ProductsApi->get_product_by_id: %s\n" % e| Name | Type | Description | Notes |
|---|---|---|---|
| product_id | str | ID or name of the product. | |
| organizations | list[str] | A list of organization-IDs used to restrict the scope of API calls. | [optional] |
| offset | int | The offset from the first product-rate-plan to return. | [optional] [default to 0] |
| records | int | The maximum number of product-rate-plans to return. | [optional] [default to 10] |
| order_by | str | Specify a field used to order the result set. | [optional] [default to created] |
| order | str | Ihe direction of any ordering, either ASC or DESC. | [optional] [default to DESC] |
| include_retired | bool | Whether retired products should be returned. | [optional] [default to true] |
No authorization required
- Content-Type: text/plain, application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ProductPagedMetadata retire_product(product_id, organizations=organizations)
Deletes the product specified by the product-ID parameter. Any existing subscriptions will continue; it is a soft delete.
{"nickname":"Delete a product","response":"deleteProduct.html"}
import time
import billforward
from billforward.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = billforward.ProductsApi()
product_id = 'product_id_example' # str | ID of the Product.
organizations = ['organizations_example'] # list[str] | A list of organization-IDs used to restrict the scope of API calls. (optional)
try:
# Deletes the product specified by the product-ID parameter. Any existing subscriptions will continue; it is a soft delete.
api_response = api_instance.retire_product(product_id, organizations=organizations)
pprint(api_response)
except ApiException as e:
print "Exception when calling ProductsApi->retire_product: %s\n" % e| Name | Type | Description | Notes |
|---|---|---|---|
| product_id | str | ID of the Product. | |
| organizations | list[str] | A list of organization-IDs used to restrict the scope of API calls. | [optional] |
No authorization required
- Content-Type: text/plain, application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DynamicMetadata set_metadata_for_product(metadata, product_id, organizations=organizations)
Remove any existing metadata keys and create the provided data.
{"nickname":"Set metadata on product","request":"setProductMetadataRequest.html","response":"setProductMetadataResponse.html"}
import time
import billforward
from billforward.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = billforward.ProductsApi()
metadata = billforward.DynamicMetadata() # DynamicMetadata |
product_id = 'product_id_example' # str |
organizations = ['organizations_example'] # list[str] | A list of organization-IDs used to restrict the scope of API calls. (optional)
try:
# Remove any existing metadata keys and create the provided data.
api_response = api_instance.set_metadata_for_product(metadata, product_id, organizations=organizations)
pprint(api_response)
except ApiException as e:
print "Exception when calling ProductsApi->set_metadata_for_product: %s\n" % e| Name | Type | Description | Notes |
|---|---|---|---|
| metadata | DynamicMetadata | ||
| product_id | str | ||
| organizations | list[str] | A list of organization-IDs used to restrict the scope of API calls. | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ProductPagedMetadata update_product(product)
Update a product.
{"nickname":"Update a product","request":"updateProductRequest.html","response":"updateProductResponse.html"}
import time
import billforward
from billforward.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = billforward.ProductsApi()
product = billforward.Product() # Product | The product object to be updated.
try:
# Update a product.
api_response = api_instance.update_product(product)
pprint(api_response)
except ApiException as e:
print "Exception when calling ProductsApi->update_product: %s\n" % e| Name | Type | Description | Notes |
|---|---|---|---|
| product | Product | The product object to be updated. |
No authorization required
- Content-Type: application/json
- Accept: text/xml, application/xml, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DynamicMetadata upsert_metadata_for_product(metadata, product_id, organizations=organizations)
Update any existing metadata key-values and insert any new key-values, no keys will be removed.
{"nickname":"Upsert metadata on product","request":"upsertProductMetadataRequest.html","response":"upsertProductMetadataResponse.html"}
import time
import billforward
from billforward.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = billforward.ProductsApi()
metadata = billforward.DynamicMetadata() # DynamicMetadata |
product_id = 'product_id_example' # str |
organizations = ['organizations_example'] # list[str] | A list of organization-IDs used to restrict the scope of API calls. (optional)
try:
# Update any existing metadata key-values and insert any new key-values, no keys will be removed.
api_response = api_instance.upsert_metadata_for_product(metadata, product_id, organizations=organizations)
pprint(api_response)
except ApiException as e:
print "Exception when calling ProductsApi->upsert_metadata_for_product: %s\n" % e| Name | Type | Description | Notes |
|---|---|---|---|
| metadata | DynamicMetadata | ||
| product_id | str | ||
| organizations | list[str] | A list of organization-IDs used to restrict the scope of API calls. | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]