create Product
suspend fun createProduct(request: ProductsRequests.CreateProductRequest): Pair<Product?, NetworkingError?>
Creates a new product.
Return
A Pair containing the created Product on success, or a NetworkingError on failure.
Parameters
request
The product attributes to create.
fun createProduct(request: ProductsRequests.CreateProductRequest, completionHandler: (Product?, NetworkingError?) -> Unit)
Creates a new product and delivers the result via a callback.
Parameters
request
The product attributes to create.
completion Handler
Invoked with the created Product on success, or a NetworkingError on failure.