ProductEndpoints

Defines the API endpoints available for product operations.

Each case maps to a specific URL, HTTP method, and optional query parameters used by the networking layer to build requests.

Inheritors

Types

Link copied to clipboard

Endpoint for creating a new product (POST /v1/products).

Link copied to clipboard
data class DeleteProduct(val productId: String) : ProductEndpoints

Endpoint for deleting a product (DELETE /v1/products/{productId}).

Link copied to clipboard
data class GetProducts(val perPage: Int? = null, val page: Int? = null) : ProductEndpoints

Endpoint for retrieving a paginated list of products (GET /v1/products).

Link copied to clipboard
data class GetProductWith(val productId: String) : ProductEndpoints

Endpoint for retrieving a single product by identifier (GET /v1/products/{productId}).

Link copied to clipboard
data class SearchProducts(val name: String? = null, val active: Boolean? = null, val shippable: Boolean? = null) : ProductEndpoints

Endpoint for searching products by filter criteria (GET /v1/products/search).

Link copied to clipboard
data class UpdateProduct(val productId: String) : ProductEndpoints

Endpoint for updating an existing product (PATCH /v1/products/{productId}).

Properties

Link copied to clipboard
open override val endpointURL: String

The fully qualified URL string for this endpoint.

Link copied to clipboard
open override val httpMethod: String

HTTP method, e.g. "GET", "POST", "DELETE".

Link copied to clipboard
open override val queryItems: List<QueryItem>?

Optional query-string parameters appended to endpointURL.