Inttegro PHP SDK

PurchaseIntents
in package

Client operations for Inttegro purchase intents.

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

Table of Contents

Methods

__construct()  : mixed
Creates the purchase intents resource client.
cancel()  : PurchaseIntent
Cancels the purchase intent.
create()  : PurchaseIntent
Creates a new purchase intent.
lookup()  : PurchaseIntent
Retrieves the requested purchase intent.
page()  : Page
Retrieves a paginated collection of purchase intents.
update()  : PurchaseIntent
Updates the supplied fields on the purchase intent.

Methods

__construct()

Creates the purchase intents resource client.

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

Shared authenticated HTTP transport used by this resource client.

cancel()

Cancels the purchase intent.

public cancel(string $id) : PurchaseIntent

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

Parameters
$id : string

ID value.

Return values
PurchaseIntent —

The canceled purchase intent.

create()

Creates a new purchase intent.

public create(array{product?: array, product_id?: string, price?: array, price_id?: string, quantity: array{min: int, max?: int}, usage?: array, expires_at?: string, presentation?: array{buy_page: array{text: array{checkout_section_title?: string, amount_field_label?: string, primary_action_label?: string}}}} $payload) : PurchaseIntent

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

Parameters
$payload : array{product?: array, product_id?: string, price?: array, price_id?: string, quantity: array{min: int, max?: int}, usage?: array, expires_at?: string, presentation?: array{buy_page: array{text: array{checkout_section_title?: string, amount_field_label?: string, primary_action_label?: string}}}}
Return values
PurchaseIntent —

The created purchase intent.

lookup()

Retrieves the requested purchase intent.

public lookup(string $id) : PurchaseIntent

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

Parameters
$id : string

ID value.

Return values
PurchaseIntent —

The requested purchase intent.

page()

Retrieves a paginated collection of purchase intents.

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 purchase intents.

update()

Updates the supplied fields on the purchase intent.

public update(array{id?: string, purchase_intent_id?: string, quantity?: array{min: int, max?: int}, expires_at?: string|null, reactivate?: bool, presentation?: array{buy_page: array{text: array{checkout_section_title?: string|null, amount_field_label?: string|null, primary_action_label?: string|null}}}} $payload) : PurchaseIntent

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

Parameters
$payload : array{id?: string, purchase_intent_id?: string, quantity?: array{min: int, max?: int}, expires_at?: string|null, reactivate?: bool, presentation?: array{buy_page: array{text: array{checkout_section_title?: string|null, amount_field_label?: string|null, primary_action_label?: string|null}}}}
Return values
PurchaseIntent —

The updated purchase intent.

On this page

Search results