Inttegro PHP SDK

Prices
in package

* Prices resource for managing catalog prices.

Request arrays use the API's documented snake_case field names. Successful responses are returned as immutable values from the corresponding singular resource namespace.

Table of Contents

Methods

__construct()  : mixed
Creates the prices resource client.
activate()  : Price
Activate a price (POST /prices/activate).
archive()  : Price
Archive a price and mark it inactive (POST /prices/archive).
create()  : Price
Create a price (POST /prices/create).
deactivate()  : Price
Deactivate a price (POST /prices/deactivate).
lookup()  : Price
Lookup a price by ID (POST /prices/lookup).
page()  : Page
Page through prices (POST /prices/page).
update()  : Price
Update a price (POST /prices/update).

Methods

__construct()

Creates the prices resource client.

public __construct(HttpClient $http) : mixed
Parameters
$http : HttpClient

Shared authenticated HTTP transport used by this resource client.

activate()

Activate a price (POST /prices/activate).

public activate(string $priceId) : Price

Sends the documented request through the shared authenticated transport and hydrates the successful response into the declared return type.

Parameters
$priceId : string

Unique identifier of the price.

Return values
Price —

The activated price.

archive()

Archive a price and mark it inactive (POST /prices/archive).

public archive(string $priceId[, string|null $idempotencyKey = null ]) : Price

Sends the documented request through the shared authenticated transport and hydrates the successful response into the declared return type.

Parameters
$priceId : string

Unique identifier of the price.

$idempotencyKey : string|null = null

Optional idempotency key for safely retrying the same logical write.

Return values
Price —

The archived price.

create()

Create a price (POST /prices/create).

public create(array<string, mixed>|Params $payload) : Price

Sends the documented request through the shared authenticated transport and hydrates the successful response into the declared return type.

Parameters
$payload : array<string, mixed>|Params

Request fields keyed by the documented snake_case API names.

Return values
Price —

The created price.

deactivate()

Deactivate a price (POST /prices/deactivate).

public deactivate(string $priceId) : Price

Sends the documented request through the shared authenticated transport and hydrates the successful response into the declared return type.

Parameters
$priceId : string

Unique identifier of the price.

Return values
Price —

The deactivated price.

lookup()

Lookup a price by ID (POST /prices/lookup).

public lookup(string $priceId) : Price

Sends the documented request through the shared authenticated transport and hydrates the successful response into the declared return type.

Parameters
$priceId : string

Unique identifier of the price.

Return values
Price —

The requested price.

page()

Page through prices (POST /prices/page).

public page([array<string, mixed> $payload = [] ]) : Page

Sends the documented request through the shared authenticated transport and hydrates the successful response into the declared return type.

Parameters
$payload : array<string, mixed> = []

Request fields keyed by the documented snake_case API names.

Return values
Page —

A typed page of matching prices.

update()

Update a price (POST /prices/update).

public update(array<string, mixed> $payload) : Price

Sends the documented request through the shared authenticated transport and hydrates the successful response into the declared return type.

Parameters
$payload : array<string, mixed>

Request fields keyed by the documented snake_case API names.

Return values
Price —

The updated price.

On this page

Search results