getProductWith

suspend fun getProductWith(productId: String): Pair<Product?, NetworkingError?>

Retrieves a single product by its identifier.

Return

A Pair containing the matching Product on success, or a NetworkingError on failure.

Parameters

productId

The unique identifier of the product to retrieve.


fun getProductWith(productId: String, completionHandler: (Product?, NetworkingError?) -> Unit)

Retrieves a single product by its identifier and delivers the result via a callback.

Parameters

productId

The unique identifier of the product to retrieve.

completionHandler

Invoked with the matching Product on success, or a NetworkingError on failure.