UpdateRequest
extends DomainValue
in package
Typed fields accepted by the payment-method update endpoint.
Table of Contents
Properties
- $active : bool|null
- Whether the method is active. Optional request field. PHP type: `bool|null`; wire field: `active` (`boolean`).
- $archived : bool|null
- Whether the method is archived. Optional request field. PHP type: `bool|null`; wire field: `archived` (`boolean`).
- $customData : CustomDataPatch|null
- Custom-data patch to apply. Optional request field. PHP type: `CustomDataPatch|null`; wire field: `custom_data` (`object`).
- $owner : UpdateRequestOwner|null
- Owner fields to patch. Optional request field. PHP type: `UpdateRequestOwner|null`; wire field: `owner` (`object`).
- $paymentMethodId : string
- Payment method to update. Required request field. PHP type: `string`; wire field: `payment_method_id` (`string`).
Methods
- __construct() : mixed
- Builds a typed payment-method update request.
- fromArray() : static
- Builds a typed request from API wire field names.
- 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>
- Returns only request fields explicitly supplied by the caller.
Properties
$active read-only
Whether the method is active. Optional request field. PHP type: `bool|null`; wire field: `active` (`boolean`).
public
bool|null
$active
$archived read-only
Whether the method is archived. Optional request field. PHP type: `bool|null`; wire field: `archived` (`boolean`).
public
bool|null
$archived
$customData read-only
Custom-data patch to apply. Optional request field. PHP type: `CustomDataPatch|null`; wire field: `custom_data` (`object`).
public
CustomDataPatch|null
$customData
$owner read-only
Owner fields to patch. Optional request field. PHP type: `UpdateRequestOwner|null`; wire field: `owner` (`object`).
public
UpdateRequestOwner|null
$owner
$paymentMethodId read-only
Payment method to update. Required request field. PHP type: `string`; wire field: `payment_method_id` (`string`).
public
string
$paymentMethodId
Methods
__construct()
Builds a typed payment-method update request.
public
__construct(string $paymentMethodId[, CustomDataPatch|null $customData = null ][, bool|null $active = null ][, bool|null $archived = null ][, UpdateRequestOwner|null $owner = null ]) : mixed
Parameters
- $paymentMethodId : string
- $customData : CustomDataPatch|null = null
- $active : bool|null = null
- $archived : bool|null = null
- $owner : UpdateRequestOwner|null = null
fromArray()
Builds a typed request from API wire field names.
public
static fromArray(array<string|int, mixed> $data) : static
@param array<string, mixed> $data
Parameters
- $data : array<string|int, mixed>
-
Wire object keyed by
snake_caseAPI field names.
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
camelCaseor wiresnake_casefield name.
Return values
booloffsetGet()
Reads a typed property through PHP `ArrayAccess`.
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
-
PHP
camelCaseor wiresnake_casefield 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
offsetUnset()
Rejects unsetting because domain values are immutable.
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
-
Ignored field name.
Tags
toArray()
Returns only request fields explicitly supplied by the caller.
public
toArray() : array<string, mixed>
@return array<string, mixed>
Return values
array<string, mixed> —The recursively normalized API object.