Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
- added property `minCartQuantity` to type `InventoryEntryDraft`
- added property `maxCartQuantity` to type `InventoryEntryDraft`
- added property `recurrenceInfo` to type `MyLineItemDraft`
- added property `interfaceId` to type `MyTransactionDraft`
- added property `recurrenceInfo` to type `MyCartAddLineItemAction`
- added property `value` to type `CustomerEmailTokenCreatedMessage`
- added property `invalidateOlderTokens` to type `CustomerEmailTokenCreatedMessage`
Expand All @@ -122,6 +123,8 @@
- added property `token` to type `PaymentMethodInfo`
- added property `interfaceAccount` to type `PaymentMethodInfo`
- added property `custom` to type `PaymentMethodInfo`
- added property `interfaceId` to type `Transaction`
- added property `interfaceId` to type `TransactionDraft`
- added property `priceCustomerGroupAssignments` to type `ProductSearchProjectionParams`
- added property `attributes` to type `ProductTailoringData`
- added property `attributes` to type `ProductTailoringDraft`
Expand Down Expand Up @@ -422,6 +425,7 @@
- added type `PaymentMethodNameSetMessage`
- added type `PaymentMethodPaymentInterfaceSetMessage`
- added type `PaymentMethodPaymentMethodStatusSetMessage`
- added type `PaymentTransactionInterfaceIdSetMessage`
- added type `RecurringOrderCreatedMessage`
- added type `RecurringOrderCustomFieldAddedMessage`
- added type `RecurringOrderCustomFieldChangedMessage`
Expand Down Expand Up @@ -476,6 +480,7 @@
- added type `PaymentMethodNameSetMessagePayload`
- added type `PaymentMethodPaymentInterfaceSetMessagePayload`
- added type `PaymentMethodPaymentMethodStatusSetMessagePayload`
- added type `PaymentTransactionInterfaceIdSetMessagePayload`
- added type `RecurringOrderCreatedMessagePayload`
- added type `RecurringOrderCustomFieldAddedMessagePayload`
- added type `RecurringOrderCustomFieldChangedMessagePayload`
Expand Down Expand Up @@ -515,6 +520,7 @@
- added type `PaymentSetMethodInfoCustomTypeAction`
- added type `PaymentSetMethodInfoInterfaceAccountAction`
- added type `PaymentSetMethodInfoTokenAction`
- added type `PaymentSetTransactionInterfaceIdAction`
- added type `ProductSearchFacetResultStats`
- added type `ProductSearchFacetStatsExpression`
- added type `ProductSearchFacetStatsValue`
Expand Down
1 change: 1 addition & 0 deletions lib/commercetools-api/src/Models/Common/BaseResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
use Commercetools\Api\Models\Message\PaymentStatusInterfaceCodeSetMessage;
use Commercetools\Api\Models\Message\PaymentStatusStateTransitionMessage;
use Commercetools\Api\Models\Message\PaymentTransactionAddedMessage;
use Commercetools\Api\Models\Message\PaymentTransactionInterfaceIdSetMessage;
use Commercetools\Api\Models\Message\PaymentTransactionStateChangedMessage;
use Commercetools\Api\Models\Message\ProductAddedToCategoryMessage;
use Commercetools\Api\Models\Message\ProductCreatedMessage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@
use Commercetools\Api\Models\Message\PaymentStatusStateTransitionMessageBuilder;
use Commercetools\Api\Models\Message\PaymentTransactionAddedMessage;
use Commercetools\Api\Models\Message\PaymentTransactionAddedMessageBuilder;
use Commercetools\Api\Models\Message\PaymentTransactionInterfaceIdSetMessage;
use Commercetools\Api\Models\Message\PaymentTransactionInterfaceIdSetMessageBuilder;
use Commercetools\Api\Models\Message\PaymentTransactionStateChangedMessage;
use Commercetools\Api\Models\Message\PaymentTransactionStateChangedMessageBuilder;
use Commercetools\Api\Models\Message\ProductAddedToCategoryMessage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@
use Commercetools\Api\Models\Message\PaymentStatusStateTransitionMessageModel;
use Commercetools\Api\Models\Message\PaymentTransactionAddedMessage;
use Commercetools\Api\Models\Message\PaymentTransactionAddedMessageModel;
use Commercetools\Api\Models\Message\PaymentTransactionInterfaceIdSetMessage;
use Commercetools\Api\Models\Message\PaymentTransactionInterfaceIdSetMessageModel;
use Commercetools\Api\Models\Message\PaymentTransactionStateChangedMessage;
use Commercetools\Api\Models\Message\PaymentTransactionStateChangedMessageModel;
use Commercetools\Api\Models\Message\ProductAddedToCategoryMessage;
Expand Down
14 changes: 14 additions & 0 deletions lib/commercetools-api/src/Models/Me/MyTransactionDraft.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ interface MyTransactionDraft extends JsonObject
public const FIELD_AMOUNT = 'amount';
public const FIELD_INTERACTION_ID = 'interactionId';
public const FIELD_CUSTOM = 'custom';
public const FIELD_INTERFACE_ID = 'interfaceId';

/**
* <p>Date and time (UTC) the Transaction took place.</p>
Expand Down Expand Up @@ -64,6 +65,14 @@ public function getInteractionId();
*/
public function getCustom();

/**
* <p>Identifier used by the payment service that processes the Payment (for example, a PSP) in the current transaction.</p>
*

* @return null|string
*/
public function getInterfaceId();

/**
* @param ?DateTimeImmutable $timestamp
*/
Expand All @@ -88,4 +97,9 @@ public function setInteractionId(?string $interactionId): void;
* @param ?CustomFieldsDraft $custom
*/
public function setCustom(?CustomFieldsDraft $custom): void;

/**
* @param ?string $interfaceId
*/
public function setInterfaceId(?string $interfaceId): void;
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ final class MyTransactionDraftBuilder implements Builder
*/
private $custom;

/**

* @var ?string
*/
private $interfaceId;

/**
* <p>Date and time (UTC) the Transaction took place.</p>
*
Expand Down Expand Up @@ -112,6 +118,17 @@ public function getCustom()
return $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom;
}

/**
* <p>Identifier used by the payment service that processes the Payment (for example, a PSP) in the current transaction.</p>
*

* @return null|string
*/
public function getInterfaceId()
{
return $this->interfaceId;
}

/**
* @param ?DateTimeImmutable $timestamp
* @return $this
Expand Down Expand Up @@ -167,6 +184,17 @@ public function withCustom(?CustomFieldsDraft $custom)
return $this;
}

/**
* @param ?string $interfaceId
* @return $this
*/
public function withInterfaceId(?string $interfaceId)
{
$this->interfaceId = $interfaceId;

return $this;
}

/**
* @deprecated use withAmount() instead
* @return $this
Expand Down Expand Up @@ -196,7 +224,8 @@ public function build(): MyTransactionDraft
$this->type,
$this->amount instanceof MoneyBuilder ? $this->amount->build() : $this->amount,
$this->interactionId,
$this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom
$this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom,
$this->interfaceId
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ final class MyTransactionDraftModel extends JsonObjectModel implements MyTransac
*/
protected $custom;

/**
*
* @var ?string
*/
protected $interfaceId;


/**
* @psalm-suppress MissingParamType
Expand All @@ -63,13 +69,15 @@ public function __construct(
?string $type = null,
?Money $amount = null,
?string $interactionId = null,
?CustomFieldsDraft $custom = null
?CustomFieldsDraft $custom = null,
?string $interfaceId = null
) {
$this->timestamp = $timestamp;
$this->type = $type;
$this->amount = $amount;
$this->interactionId = $interactionId;
$this->custom = $custom;
$this->interfaceId = $interfaceId;
}

/**
Expand Down Expand Up @@ -180,6 +188,26 @@ public function getCustom()
return $this->custom;
}

/**
* <p>Identifier used by the payment service that processes the Payment (for example, a PSP) in the current transaction.</p>
*
*
* @return null|string
*/
public function getInterfaceId()
{
if (is_null($this->interfaceId)) {
/** @psalm-var ?string $data */
$data = $this->raw(self::FIELD_INTERFACE_ID);
if (is_null($data)) {
return null;
}
$this->interfaceId = (string) $data;
}

return $this->interfaceId;
}


/**
* @param ?DateTimeImmutable $timestamp
Expand Down Expand Up @@ -221,6 +249,14 @@ public function setCustom(?CustomFieldsDraft $custom): void
$this->custom = $custom;
}

/**
* @param ?string $interfaceId
*/
public function setInterfaceId(?string $interfaceId): void
{
$this->interfaceId = $interfaceId;
}


#[\ReturnTypeWillChange]
public function jsonSerialize()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ final class MessageModel extends JsonObjectModel implements Message
'PaymentStatusInterfaceCodeSet' => PaymentStatusInterfaceCodeSetMessageModel::class,
'PaymentStatusStateTransition' => PaymentStatusStateTransitionMessageModel::class,
'PaymentTransactionAdded' => PaymentTransactionAddedMessageModel::class,
'PaymentTransactionInterfaceIdSet' => PaymentTransactionInterfaceIdSetMessageModel::class,
'PaymentTransactionStateChanged' => PaymentTransactionStateChangedMessageModel::class,
'ProductAddedToCategory' => ProductAddedToCategoryMessageModel::class,
'ProductCreated' => ProductCreatedMessageModel::class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ final class MessagePayloadModel extends JsonObjectModel implements MessagePayloa
'PaymentStatusInterfaceCodeSet' => PaymentStatusInterfaceCodeSetMessagePayloadModel::class,
'PaymentStatusStateTransition' => PaymentStatusStateTransitionMessagePayloadModel::class,
'PaymentTransactionAdded' => PaymentTransactionAddedMessagePayloadModel::class,
'PaymentTransactionInterfaceIdSet' => PaymentTransactionInterfaceIdSetMessagePayloadModel::class,
'PaymentTransactionStateChanged' => PaymentTransactionStateChangedMessagePayloadModel::class,
'ProductAddedToCategory' => ProductAddedToCategoryMessagePayloadModel::class,
'ProductCreated' => ProductCreatedMessagePayloadModel::class,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?php

declare(strict_types=1);
/**
* This file has been auto generated
* Do not change it.
*/

namespace Commercetools\Api\Models\Message;

use Commercetools\Base\DateTimeImmutableCollection;
use Commercetools\Base\JsonObject;

interface PaymentTransactionInterfaceIdSetMessage extends Message
{
public const FIELD_TRANSACTION_ID = 'transactionId';
public const FIELD_NEW_INTERFACE_ID = 'newInterfaceId';
public const FIELD_OLD_INTERFACE_ID = 'oldInterfaceId';

/**
* <p>Unique identifier of the <a href="ctp:api:type:Transaction">Transaction</a>.</p>
*

* @return null|string
*/
public function getTransactionId();

/**
* <p>Identifier used by the payment service that processes the Payment (for example, a PSP) after <a href="ctp:api:type:PaymentSetTransactionInterfaceIdAction">Set Transaction InterfaceId</a> update action.</p>
*

* @return null|string
*/
public function getNewInterfaceId();

/**
* <p>Identifier used by the payment service that processes the Payment (for example, a PSP) before the <a href="ctp:api:type:PaymentSetTransactionInterfaceIdAction">Set Transaction InterfaceId</a> update action.</p>
*

* @return null|string
*/
public function getOldInterfaceId();

/**
* @param ?string $transactionId
*/
public function setTransactionId(?string $transactionId): void;

/**
* @param ?string $newInterfaceId
*/
public function setNewInterfaceId(?string $newInterfaceId): void;

/**
* @param ?string $oldInterfaceId
*/
public function setOldInterfaceId(?string $oldInterfaceId): void;
}
Loading