Inttegro PHP SDK

Order extends DomainValue
in package

FinalYes

A complete commerce order containing line items, customer details, payment state, documents, and fulfillment information.

This immutable value hydrates decoded API snake_case data into typed camelCase properties. Use fromArray() for wire data; toArray(), array access, and JSON serialization expose the API wire representation. Nullable properties correspond to optional API fields.

Tags
see
DomainValue

Table of Contents

Properties

$canceledAt  : DateTimeImmutable|null
When the order was canceled. Omitted otherwise.
$checkoutSettings  : CheckoutSettings|null
Checkout and payment flow configuration for this order.
$completedAt  : DateTimeImmutable|null
When the order was completed. Omitted otherwise.
$createdFrom  : CreatedFrom|null
Attribution for the public resource that created this order, when available.
$customData  : CustomData|null
Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map.
$customer  : Customer
Customer value for this order.
$expiresAt  : DateTimeImmutable|null
When the order expires. Omitted when no expiry is set.
$id  : string
Unique identifier for this order.
$initiatedAt  : DateTimeImmutable
When order processing began.
$invoice  : Invoice|null
Invoice value for this order.
$invoiceSettings  : InvoiceSettings|null
Order-level invoice rendering data. Pages uses this data when rendering invoice web and download views.
$lineItemGroup  : LineItemGroup|null
Cart contents and totals.
$number  : string|null
Human-readable order number.
$paidAt  : DateTimeImmutable|null
When the order became paid.
$payment  : Payment|null
Payment intent tied to this order.
$paymentDueAt  : DateTimeImmutable|null
When the order payment becomes overdue.
$receiptNumber  : string|null
Merchant-provided receipt number, when set.
$reference  : string|null
External order reference when present.
$refunds  : array<int, Refund>|null
All refunds issued for this order, newest first. Omitted when no refunds exist.
$sealedAt  : DateTimeImmutable|null
When the order was finalized and became immutable—ready for payment or fulfillment.
$status  : string
Current lifecycle state of the order.

Methods

__construct()  : mixed
Hydrates an Order from decoded Inttegro API data.
fromArray()  : static
Creates an Order from its decoded API wire representation.
isPaid()  : bool
Reports whether the resource's payment has completed successfully.
isTerminal()  : bool
Reports whether the resource has reached a terminal lifecycle state.
jsonSerialize()  : array<string, mixed>
Returns the same API wire object as `toArray()` for `json_encode()`.
offsetExists()  : bool
Reports whether a non-null property exists for a PHP or API field name.
offsetGet()  : mixed
Reads a typed property through PHP `ArrayAccess`.
offsetSet()  : void
Rejects mutation because domain values are immutable.
offsetUnset()  : void
Rejects unsetting because domain values are immutable.
requiredPaymentAction()  : NextAction|null
Returns the payment action that must be completed, or null when the order does not require one.
requiresPayment()  : bool
Reports whether the order still requires payment.
toArray()  : array<string, mixed>
Converts typed properties back to the API's wire representation.

Properties

$canceledAt read-only

When the order was canceled. Omitted otherwise.

public DateTimeImmutable|null $canceledAt

Optional response field. PHP type: DateTimeImmutable|null; wire field: canceled_at (ISO-8601 string with UTC offset). The SDK parses the offset-bearing timestamp into an immutable PHP date-time value.

$checkoutSettings read-only

Checkout and payment flow configuration for this order.

public CheckoutSettings|null $checkoutSettings

Optional response field. PHP type: \Inttegro\Order\CheckoutSettings|null; wire field: checkout_settings (object).

$completedAt read-only

When the order was completed. Omitted otherwise.

public DateTimeImmutable|null $completedAt

Optional response field. PHP type: DateTimeImmutable|null; wire field: completed_at (ISO-8601 string with UTC offset). The SDK parses the offset-bearing timestamp into an immutable PHP date-time value.

$createdFrom read-only

Attribution for the public resource that created this order, when available.

public CreatedFrom|null $createdFrom

Optional response field. PHP type: \Inttegro\Order\CreatedFrom|null; wire field: created_from (object).

$customData read-only

Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map.

public CustomData|null $customData

Optional response field. PHP type: \Inttegro\CustomData|null; wire field: custom_data (object).

$customer read-only

Customer value for this order.

public Customer $customer

Required response field. PHP type: \Inttegro\Order\Customer; wire field: customer (object).

$expiresAt read-only

When the order expires. Omitted when no expiry is set.

public DateTimeImmutable|null $expiresAt

Optional response field. PHP type: DateTimeImmutable|null; wire field: expires_at (ISO-8601 string with UTC offset). The SDK parses the offset-bearing timestamp into an immutable PHP date-time value.

$id read-only

Unique identifier for this order.

public string $id

Required response field. PHP type: string; wire field: id (string).

$initiatedAt read-only

When order processing began.

public DateTimeImmutable $initiatedAt

Required response field. PHP type: DateTimeImmutable; wire field: initiated_at (ISO-8601 string with UTC offset). The SDK parses the offset-bearing timestamp into an immutable PHP date-time value.

$invoice read-only

Invoice value for this order.

public Invoice|null $invoice

Optional response field. PHP type: \Inttegro\Order\Invoice|null; wire field: invoice (object).

$invoiceSettings read-only

Order-level invoice rendering data. Pages uses this data when rendering invoice web and download views.

public InvoiceSettings|null $invoiceSettings

Optional response field. PHP type: \Inttegro\Order\InvoiceSettings|null; wire field: invoice_settings (object).

$lineItemGroup read-only

Cart contents and totals.

public LineItemGroup|null $lineItemGroup

Optional response field. PHP type: \Inttegro\Order\LineItemGroup|null; wire field: line_item_group (object).

$number read-only

Human-readable order number.

public string|null $number

Optional response field. PHP type: string|null; wire field: number (string).

$paidAt read-only

When the order became paid.

public DateTimeImmutable|null $paidAt

Optional response field. PHP type: DateTimeImmutable|null; wire field: paid_at (ISO-8601 string with UTC offset). The SDK parses the offset-bearing timestamp into an immutable PHP date-time value.

$payment read-only

Payment intent tied to this order.

public Payment|null $payment

Optional response field. PHP type: \Inttegro\Payment\Payment|null; wire field: payment (object).

$paymentDueAt read-only

When the order payment becomes overdue.

public DateTimeImmutable|null $paymentDueAt

Optional response field. PHP type: DateTimeImmutable|null; wire field: payment_due_at (ISO-8601 string with UTC offset). The SDK parses the offset-bearing timestamp into an immutable PHP date-time value.

$receiptNumber read-only

Merchant-provided receipt number, when set.

public string|null $receiptNumber

Optional response field. PHP type: string|null; wire field: receipt_number (string).

$reference read-only

External order reference when present.

public string|null $reference

Optional response field. PHP type: string|null; wire field: reference (string).

$refunds read-only

All refunds issued for this order, newest first. Omitted when no refunds exist.

public array<int, Refund>|null $refunds

Optional response field. PHP type: list<\Inttegro\Refund\Refund>|null; wire field: refunds (array<object>). When the field is absent, the SDK exposes an empty collection.

$sealedAt read-only

When the order was finalized and became immutable—ready for payment or fulfillment.

public DateTimeImmutable|null $sealedAt

Optional response field. PHP type: DateTimeImmutable|null; wire field: sealed_at (ISO-8601 string with UTC offset). The SDK parses the offset-bearing timestamp into an immutable PHP date-time value.

$status read-only

Current lifecycle state of the order.

public string $status

Required response field. PHP type: string; wire field: status (string). Compare against Status cases by using their ->value strings.

Methods

__construct()

Hydrates an Order from decoded Inttegro API data.

public __construct(array<string, mixed> $data) : mixed
Parameters
$data : array<string, mixed>

Wire object keyed by snake_case API field names.

fromArray()

Creates an Order from its decoded API wire representation.

public static fromArray(array<string, mixed> $data) : static
Parameters
$data : array<string, mixed>

Wire object keyed by snake_case API field names.

Return values
static —

A typed, immutable Order value.

isPaid()

Reports whether the resource's payment has completed successfully.

public isPaid() : bool
Return values
bool

isTerminal()

Reports whether the resource has reached a terminal lifecycle state.

public isTerminal() : bool
Return values
bool

jsonSerialize()

Returns the same API wire object as `toArray()` for `json_encode()`.

public jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>

offsetExists()

Reports whether a non-null property exists for a PHP or API field name.

public offsetExists(mixed $offset) : bool

Both paymentId and payment_id address the same typed property.

Parameters
$offset : mixed

PHP camelCase or wire snake_case field name.

Return values
bool

offsetGet()

Reads a typed property through PHP `ArrayAccess`.

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed

PHP camelCase or wire snake_case field name.

Return values
mixed —

The PHP-native property value.

offsetSet()

Rejects mutation because domain values are immutable.

public offsetSet(mixed $offset, mixed $value) : void
Parameters
$offset : mixed

Ignored field name.

$value : mixed

Ignored replacement value.

Tags
throws
LogicException

Always.

offsetUnset()

Rejects unsetting because domain values are immutable.

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed

Ignored field name.

Tags
throws
LogicException

Always.

requiredPaymentAction()

Returns the payment action that must be completed, or null when the order does not require one.

public requiredPaymentAction() : NextAction|null
Return values
NextAction|null

requiresPayment()

Reports whether the order still requires payment.

public requiresPayment() : bool
Return values
bool

toArray()

Converts typed properties back to the API's wire representation.

public toArray() : array<string, mixed>

Property names become snake_case. Nested values, arrays, backed enums, and timestamps are normalized recursively so the result is safe to pass to json_encode().

Return values
array<string, mixed> —

The recursively normalized API object.

On this page

Search results