Inttegro PHP SDK

AddressInput extends DomainValue
in package

FinalYes

Typed postal address accepted by customer create and update requests.

Table of Contents

Properties

$city  : string|null
Optional city. PHP type: `string|null`; wire field: `city` (`string`).
$country  : string
Required ISO 3166-1 alpha-2 country code. PHP type: `string`; wire field: `country` (`string`).
$line1  : string|null
Optional first address line. PHP type: `string|null`; wire field: `line1` (`string`).
$line2  : string|null
Optional second address line. PHP type: `string|null`; wire field: `line2` (`string`).
$name  : string|null
Optional recipient name. PHP type: `string|null`; wire field: `name` (`string`).
$phoneNumber  : string|null
Optional recipient phone number. PHP type: `string|null`; wire field: `phone_number` (`string`).
$postCode  : string|null
Optional postal code. PHP type: `string|null`; wire field: `post_code` (`string`).
$region  : string|null
Optional state, province, or region. PHP type: `string|null`; wire field: `region` (`string`).

Methods

__construct()  : mixed
fromArray()  : static
Creates a typed value from a decoded API object.
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.
toArray()  : array<string, mixed>
Converts typed properties back to the API's wire representation.

Properties

$city read-only

Optional city. PHP type: `string|null`; wire field: `city` (`string`).

public string|null $city

$country read-only

Required ISO 3166-1 alpha-2 country code. PHP type: `string`; wire field: `country` (`string`).

public string $country

$line1 read-only

Optional first address line. PHP type: `string|null`; wire field: `line1` (`string`).

public string|null $line1

$line2 read-only

Optional second address line. PHP type: `string|null`; wire field: `line2` (`string`).

public string|null $line2

$name read-only

Optional recipient name. PHP type: `string|null`; wire field: `name` (`string`).

public string|null $name

$phoneNumber read-only

Optional recipient phone number. PHP type: `string|null`; wire field: `phone_number` (`string`).

public string|null $phoneNumber

$postCode read-only

Optional postal code. PHP type: `string|null`; wire field: `post_code` (`string`).

public string|null $postCode

$region read-only

Optional state, province, or region. PHP type: `string|null`; wire field: `region` (`string`).

public string|null $region

Methods

__construct()

public __construct(array{country: string, city?: string|null, line1?: string|null, line2?: string|null, name?: string|null, phone_number?: string|null, post_code?: string|null, region?: string|null} $data) : mixed
Parameters
$data : array{country: string, city?: string|null, line1?: string|null, line2?: string|null, name?: string|null, phone_number?: string|null, post_code?: string|null, region?: string|null}

fromArray()

Creates a typed value from a decoded API object.

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

A typed, immutable domain value.

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.

toArray()

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

public toArray() : array<string, mixed>
Return values
array<string, mixed>
On this page

Search results