Copied!

PaymentUpdateStruct

PaymentUpdateStruct.php : 29
Extends ValueObject

Structure containing data used to update a payment.

The following example updates a payment status to "canceled":

$updateStruct = new PaymentUpdateStruct();
$updateStruct->setTransition('cancel');

$payment = $paymentService->updatePayment($payment, $updateStruct);
Tags
See
PaymentServiceInterface::updatePayment()

Methods

public__construct()

PaymentUpdateStruct.php : 43

Construct object optionally with a set of properties.

public __construct([string|null $transition = null ][, string|null $identifier = null ][, UserReference|null $owner = null ][, MapInterface<string, mixed>|null $context = null ])

Parameters

Name Type Default value Description
$transition string|null null -
$identifier string|null null -
$owner UserReference|null null -
$context MapInterface<string, mixed>|null null -

publicgetContext()

PaymentUpdateStruct.php : 117

Returns a new context for a payment. If not set, the context will not be updated.

public getContext() : MapInterface<string, mixed>|null

The context is a set of key-value pairs that can be used to store additional information about the payment.

Return values

MapInterface<string, mixed>|null

publicgetIdentifier()

PaymentUpdateStruct.php : 78

Returns the payment identifier. If not set, the identifier will not be updated.

public getIdentifier() : string|null

Return values

string|null

publicgetOwner()

PaymentUpdateStruct.php : 97

Returns the user who owns the payment. If not set, the owner will not be updated.

public getOwner() : UserReference|null

Return values

UserReference|null

publicgetTransition()

PaymentUpdateStruct.php : 60

Returns the transition to be applied to the payment (if not set, the transition will not be updated).

public getTransition() : string|null

Return values

string|null

publicsetContext()

PaymentUpdateStruct.php : 129

Sets new context for a payment. If not set, the context will not be updated.

public setContext(MapInterface<string, mixed>|null $context) : void

The context is a set of key-value pairs that can be used to store additional information about the payment.

Parameters

Name Type Default value Description
$context MapInterface<string, mixed>|null - -

publicsetIdentifier()

PaymentUpdateStruct.php : 89

Sets the payment identifier. If not set, the identifier will not be updated.

public setIdentifier(string|null $identifier) : void

Identifier must be unique and contain only alphanumeric characters, hyphen, dashes, and underscores. Maximum allowed identifier length is 64 characters.

Parameters

Name Type Default value Description
$identifier string|null - -

publicsetOwner()

PaymentUpdateStruct.php : 105

Sets the user who owns the payment. If not set, the owner will not be updated.

public setOwner(UserReference|null $owner) : void

Parameters

Name Type Default value Description
$owner UserReference|null - -

publicsetTransition()

PaymentUpdateStruct.php : 70

Sets the transition to be applied to the payment (if not set, the transition will not be updated).

public setTransition(string|null $transition) : void

The transition must be valid transition identifier according to workflow definition associated with payment.

Parameters

Name Type Default value Description
$transition string|null - -

protectedgetProperties()

ValueObject.php : 50

Function where list of properties are returned.

protected getProperties([array<string|int, mixed> $dynamicProperties = [] ]) : array<string|int, mixed>

Used by attributes(), override to add dynamic properties

Parameters

Name Type Default value Description
$dynamicProperties array<string|int, mixed> []

Additional dynamic properties exposed on the object

Return values

array<string|int, mixed>