From c3c3ac549ab7482678f3c875e9f3c5d12e3df935 Mon Sep 17 00:00:00 2001
From: Auto Mation User-defined unique identifier of the Custom Line Item. Number of Custom Line Items to add to the Cart. User-defined unique identifier of the Custom Line Item. Number of Custom Line Items to add to the Cart. User-defined unique identifier of the Custom Line Item. Number of Custom Line Items to add to the Cart. User-defined unique identifier of the Custom Line Item. Name of the Custom Line Item. User-defined unique identifier of the Custom Line Item. Name of the Custom Line Item. User-defined unique identifier of the Custom Line Item. Number of Custom Line Items to add to the Cart. User-defined unique identifier of the Custom Line Item. Number of Custom Line Items to add to the Cart. User-defined unique identifier of the Custom Line Item. Number of Custom Line Items to add to the Cart. User-defined unique identifier of the Custom Line Item. Name of the Custom Line Item. Indicates if the CartDiscount is active and can be applied to the Cart.Added Property(s)
-
-- added property `perMethodTaxRate` to type `CustomLineItem`
-- added property `key` to type `LineItem`
-- added property `key` to type `LineItemDraft`
-- added property `key` to type `CartAddLineItemAction`
-- added property `lineItemKey` to type `CartApplyDeltaToLineItemShippingDetailsTargetsAction`
-- added property `lineItemKey` to type `CartChangeLineItemQuantityAction`
-- added property `lineItemKey` to type `CartRemoveLineItemAction`
-- added property `lineItemKey` to type `CartSetLineItemCustomFieldAction`
-- added property `lineItemKey` to type `CartSetLineItemCustomTypeAction`
-- added property `lineItemKey` to type `CartSetLineItemDistributionChannelAction`
-- added property `lineItemKey` to type `CartSetLineItemInventoryModeAction`
-- added property `lineItemKey` to type `CartSetLineItemPriceAction`
-- added property `lineItemKey` to type `CartSetLineItemShippingDetailsAction`
-- added property `lineItemKey` to type `CartSetLineItemSupplyChannelAction`
-- added property `lineItemKey` to type `CartSetLineItemTaxAmountAction`
-- added property `lineItemKey` to type `CartSetLineItemTaxRateAction`
-- added property `lineItemKey` to type `CartSetLineItemTotalPriceAction`
-- added property `key` to type `MyLineItemDraft`
-- added property `key` to type `MyCartAddLineItemAction`
-- added property `lineItemKey` to type `MyCartApplyDeltaToLineItemShippingDetailsTargetsAction`
-- added property `lineItemKey` to type `MyCartChangeLineItemQuantityAction`
-- added property `lineItemKey` to type `MyCartRemoveLineItemAction`
-- added property `lineItemKey` to type `MyCartSetLineItemCustomFieldAction`
-- added property `lineItemKey` to type `MyCartSetLineItemCustomTypeAction`
-- added property `lineItemKey` to type `MyCartSetLineItemDistributionChannelAction`
-- added property `lineItemKey` to type `MyCartSetLineItemShippingDetailsAction`
-- added property `lineItemKey` to type `MyCartSetLineItemSupplyChannelAction`
-- added property `lineItemKey` to type `MyShoppingListChangeLineItemQuantityAction`
-- added property `sku` to type `StandalonePriceDeletedMessage`
-- added property `sku` to type `StandalonePriceDeletedMessagePayload`
-- added property `key` to type `StagedOrderAddLineItemAction`
-- added property `parcelKey` to type `StagedOrderAddParcelToDeliveryAction`
-- added property `lineItemKey` to type `StagedOrderChangeLineItemQuantityAction`
-- added property `lineItemKey` to type `StagedOrderRemoveLineItemAction`
-- added property `parcelKey` to type `StagedOrderRemoveParcelFromDeliveryAction`
-- added property `lineItemKey` to type `StagedOrderSetLineItemCustomFieldAction`
-- added property `lineItemKey` to type `StagedOrderSetLineItemCustomTypeAction`
-- added property `lineItemKey` to type `StagedOrderSetLineItemDistributionChannelAction`
-- added property `lineItemKey` to type `StagedOrderSetLineItemPriceAction`
-- added property `lineItemKey` to type `StagedOrderSetLineItemShippingDetailsAction`
-- added property `lineItemKey` to type `StagedOrderSetLineItemTaxAmountAction`
-- added property `lineItemKey` to type `StagedOrderSetLineItemTaxRateAction`
-- added property `lineItemKey` to type `StagedOrderSetLineItemTotalPriceAction`
-- added property `parcelKey` to type `StagedOrderSetParcelCustomFieldAction`
-- added property `parcelKey` to type `StagedOrderSetParcelCustomTypeAction`
-- added property `parcelKey` to type `StagedOrderSetParcelItemsAction`
-- added property `parcelKey` to type `StagedOrderSetParcelMeasurementsAction`
-- added property `parcelKey` to type `StagedOrderSetParcelTrackingDataAction`
-- added property `key` to type `Parcel`
-- added property `key` to type `ParcelDraft`
-- added property `parcelKey` to type `OrderAddParcelToDeliveryAction`
-- added property `parcelKey` to type `OrderRemoveParcelFromDeliveryAction`
-- added property `lineItemKey` to type `OrderSetLineItemCustomFieldAction`
-- added property `lineItemKey` to type `OrderSetLineItemCustomTypeAction`
-- added property `lineItemKey` to type `OrderSetLineItemShippingDetailsAction`
-- added property `parcelKey` to type `OrderSetParcelCustomFieldAction`
-- added property `parcelKey` to type `OrderSetParcelCustomTypeAction`
-- added property `parcelKey` to type `OrderSetParcelItemsAction`
-- added property `parcelKey` to type `OrderSetParcelMeasurementsAction`
-- added property `parcelKey` to type `OrderSetParcelTrackingDataAction`
-Required Property(s)
-
-- changed property `lineItemId` of type `CartApplyDeltaToLineItemShippingDetailsTargetsAction` to be optional
-- changed property `lineItemId` of type `CartChangeLineItemQuantityAction` to be optional
-- changed property `lineItemId` of type `CartRemoveLineItemAction` to be optional
-- changed property `lineItemId` of type `CartSetLineItemCustomFieldAction` to be optional
-- changed property `lineItemId` of type `CartSetLineItemCustomTypeAction` to be optional
-- changed property `lineItemId` of type `CartSetLineItemDistributionChannelAction` to be optional
-- changed property `lineItemId` of type `CartSetLineItemInventoryModeAction` to be optional
-- changed property `lineItemId` of type `CartSetLineItemPriceAction` to be optional
-- changed property `lineItemId` of type `CartSetLineItemShippingDetailsAction` to be optional
-- changed property `lineItemId` of type `CartSetLineItemSupplyChannelAction` to be optional
-- changed property `lineItemId` of type `CartSetLineItemTaxAmountAction` to be optional
-- changed property `lineItemId` of type `CartSetLineItemTaxRateAction` to be optional
-- changed property `lineItemId` of type `CartSetLineItemTotalPriceAction` to be optional
-- changed property `lineItemId` of type `MyCartApplyDeltaToLineItemShippingDetailsTargetsAction` to be optional
-- changed property `lineItemId` of type `MyCartChangeLineItemQuantityAction` to be optional
-- changed property `lineItemId` of type `MyCartRemoveLineItemAction` to be optional
-- changed property `lineItemId` of type `MyCartSetLineItemCustomFieldAction` to be optional
-- changed property `lineItemId` of type `MyCartSetLineItemCustomTypeAction` to be optional
-- changed property `lineItemId` of type `MyCartSetLineItemDistributionChannelAction` to be optional
-- changed property `lineItemId` of type `MyCartSetLineItemShippingDetailsAction` to be optional
-- changed property `lineItemId` of type `MyCartSetLineItemSupplyChannelAction` to be optional
-- changed property `lineItemId` of type `MyShoppingListChangeLineItemQuantityAction` to be optional
-- changed property `lineItemId` of type `StagedOrderChangeLineItemQuantityAction` to be optional
-- changed property `lineItemId` of type `StagedOrderRemoveLineItemAction` to be optional
-- changed property `parcelId` of type `StagedOrderRemoveParcelFromDeliveryAction` to be optional
-- changed property `lineItemId` of type `StagedOrderSetLineItemCustomFieldAction` to be optional
-- changed property `lineItemId` of type `StagedOrderSetLineItemCustomTypeAction` to be optional
-- changed property `lineItemId` of type `StagedOrderSetLineItemDistributionChannelAction` to be optional
-- changed property `lineItemId` of type `StagedOrderSetLineItemPriceAction` to be optional
-- changed property `lineItemId` of type `StagedOrderSetLineItemShippingDetailsAction` to be optional
-- changed property `lineItemId` of type `StagedOrderSetLineItemTaxAmountAction` to be optional
-- changed property `lineItemId` of type `StagedOrderSetLineItemTaxRateAction` to be optional
-- changed property `lineItemId` of type `StagedOrderSetLineItemTotalPriceAction` to be optional
-- changed property `parcelId` of type `StagedOrderSetParcelCustomFieldAction` to be optional
-- changed property `parcelId` of type `StagedOrderSetParcelCustomTypeAction` to be optional
-- changed property `parcelId` of type `StagedOrderSetParcelItemsAction` to be optional
-- changed property `parcelId` of type `StagedOrderSetParcelMeasurementsAction` to be optional
-- changed property `parcelId` of type `StagedOrderSetParcelTrackingDataAction` to be optional
-- changed property `parcelId` of type `OrderRemoveParcelFromDeliveryAction` to be optional
-- changed property `lineItemId` of type `OrderSetLineItemCustomFieldAction` to be optional
-- changed property `lineItemId` of type `OrderSetLineItemCustomTypeAction` to be optional
-- changed property `lineItemId` of type `OrderSetLineItemShippingDetailsAction` to be optional
-- changed property `parcelId` of type `OrderSetParcelCustomFieldAction` to be optional
-- changed property `parcelId` of type `OrderSetParcelCustomTypeAction` to be optional
-- changed property `parcelId` of type `OrderSetParcelItemsAction` to be optional
-- changed property `parcelId` of type `OrderSetParcelMeasurementsAction` to be optional
-- changed property `parcelId` of type `OrderSetParcelTrackingDataAction` to be optional
-Deprecated Property(s)
-
-- property `MyCartChangeLineItemQuantityAction::externalPrice` is removed
-- property `MyCartChangeLineItemQuantityAction::externalTotalPrice` is removed
-Deprecated Type(s)
-
-- type `ProductVariantSelectionExclusion` is removed
-- type `ProductVariantSelectionInclusion` is removed
-Removed Type(s)
-
-- :warning: removed type `MyCartSetDirectDiscountsAction`
-Added Type(s)
+Added Resource(s)
-- added type `StandalonePriceTierAddedMessage`
-- added type `StandalonePriceTierRemovedMessage`
-- added type `StandalonePriceTiersSetMessage`
-- added type `StandalonePriceValidFromAndUntilSetMessage`
-- added type `StandalonePriceValidFromSetMessage`
-- added type `StandalonePriceValidUntilSetMessage`
-- added type `StandalonePriceTierAddedMessagePayload`
-- added type `StandalonePriceTierRemovedMessagePayload`
-- added type `StandalonePriceTiersSetMessagePayload`
-- added type `StandalonePriceValidFromAndUntilSetMessagePayload`
-- added type `StandalonePriceValidFromSetMessagePayload`
-- added type `StandalonePriceValidUntilSetMessagePayload`
-- added type `StandalonePriceAddPriceTierAction`
-- added type `StandalonePriceRemovePriceTierAction`
-- added type `StandalonePriceSetPriceTiersAction`
-- added type `StandalonePriceSetValidFromAction`
-- added type `StandalonePriceSetValidFromAndUntilAction`
-- added type `StandalonePriceSetValidUntilAction`
-- added type `ConfluentCloudDestination`
+- added resource `/{projectKey}/in-store/key={storeKey}/cart-discounts`
+- added resource `/{projectKey}/in-store/key={storeKey}/cart-discounts/key={key}`
+- added resource `/{projectKey}/in-store/key={storeKey}/cart-discounts/{ID}`
Added Enum(s)
-
-- added enum `associate-role` to type `CustomFieldReferenceValue`
-- added enum `business-unit` to type `CustomFieldReferenceValue`
-Added Enum(s)
-
-- added enum `associate-role` to type `CustomFieldReferenceValue`
-- added enum `business-unit` to type `CustomFieldReferenceValue`
-Added Property(s)
-- added property `variantSelection` to type `AddProductChange`
-Changed Property(s)
-
-- :warning: changed property `resource` of type `Record` from type `Reference` to `ResourceIdentifier`
-Added QueryParameter(s)
-
-- added query parameter `resourceKey` to method `get /{projectKey}`
-- added query parameter `resourceKey` to method `get /{projectKey}/{resourceType}`
-Removed QueryParameter(s)
-
-- :warning: removed query parameter `resourceId` from method `get /{projectKey}/{resourceType}`
+- added property `stores` to type `CartDiscount`
+- added property `stores` to type `CartDiscountDraft`
Added Type(s)
-- added type `AddAssociateChange`
-- added type `AddProductSelectionChange`
-- added type `Associate`
-- added type `AssociateRoleAssignment`
-- added type `AssociateRoleInheritanceMode`
-- added type `BusinessUnitAssociateMode`
-- added type `BusinessUnitLabel`
-- added type `BusinessUnitStatus`
-- added type `BusinessUnitStoreMode`
-- added type `ChangeAssociateChange`
-- added type `ChangeAssociateModeChange`
-- added type `ChangeParentUnitChange`
-- added type `ChangeProductSelectionActiveChange`
-- added type `ChangeStatusChange`
-- added type `ProductVariantSelection`
-- added type `ProductVariantSelectionTypeEnum`
-- added type `RemoveAssociateChange`
-- added type `RemoveProductSelectionChange`
-- added type `RequestQuoteRenegotiationChange`
-- added type `ResourceIdentifier`
-- added type `SetAddressCustomFieldChange`
-- added type `SetAddressCustomTypeChange`
-- added type `SetContactEmailChange`
-- added type `SetStoreModeChange`
-- added type `SetVariantSelectionChange`
+- added type `CartDiscountAddStoreAction`
+- added type `CartDiscountRemoveStoreAction`
+- added type `CartDiscountSetStoresAction`
+- added type `MaxCartDiscountsReachedError`
+- added type `MaxStoreReferencesReachedError`
+- added type `StoreCartDiscountsLimitReachedError`
+- added type `GraphQLMaxCartDiscountsReachedError`
+- added type `GraphQLMaxStoreReferencesReachedError`
+- added type `GraphQLStoreCartDiscountsLimitReachedError`
Added Enum(s)
+Added Method(s)
-- added enum `business-unit` to type `ChangeHistoryResourceType`
-- added enum `addAssociate` to type `UpdateType`
-- added enum `addCustomLineItem` to type `UpdateType`
-- added enum `addDiscountCode` to type `UpdateType`
-- added enum `addProduct` to type `UpdateType`
-- added enum `addProductSelection` to type `UpdateType`
-- added enum `addProperty` to type `UpdateType`
-- added enum `changeAmountAuthorized` to type `UpdateType`
-- added enum `changeAssociate` to type `UpdateType`
-- added enum `changeAssociateMode` to type `UpdateType`
-- added enum `changeCustomLineItemQuantity` to type `UpdateType`
-- added enum `changeLineItemName` to type `UpdateType`
-- added enum `changeParentUnit` to type `UpdateType`
-- added enum `changeProductSelectionActive` to type `UpdateType`
-- added enum `changeQuoteRequestState` to type `UpdateType`
-- added enum `changeQuoteState` to type `UpdateType`
-- added enum `changeStagedQuoteState` to type `UpdateType`
-- added enum `changeStatus` to type `UpdateType`
-- added enum `changeTaxCalculationMode` to type `UpdateType`
-- added enum `changeTaxMode` to type `UpdateType`
-- added enum `changeTaxRoundingMode` to type `UpdateType`
-- added enum `moveImageToPosition` to type `UpdateType`
-- added enum `removeAssociate` to type `UpdateType`
-- added enum `removeCustomLineItem` to type `UpdateType`
-- added enum `removeDiscountCode` to type `UpdateType`
-- added enum `removeProduct` to type `UpdateType`
-- added enum `removeProductSelection` to type `UpdateType`
-- added enum `removeProperty` to type `UpdateType`
-- added enum `requestQuoteRenegotiation` to type `UpdateType`
-- added enum `setAddressCustomField` to type `UpdateType`
-- added enum `setAddressCustomType` to type `UpdateType`
-- added enum `setApplicationVersion` to type `UpdateType`
-- added enum `setAuthenticationMode` to type `UpdateType`
-- added enum `setContactEmail` to type `UpdateType`
-- added enum `setCountries` to type `UpdateType`
-- added enum `setCountry` to type `UpdateType`
-- added enum `setCustomLineItemMoney` to type `UpdateType`
-- added enum `setCustomLineItemTaxAmount` to type `UpdateType`
-- added enum `setCustomLineItemTaxCategory` to type `UpdateType`
-- added enum `setCustomLineItemTaxRate` to type `UpdateType`
-- added enum `setCustomLineItemTaxedPrice` to type `UpdateType`
-- added enum `setCustomLineItemTotalPrice` to type `UpdateType`
-- added enum `setCustomShippingMethod` to type `UpdateType`
-- added enum `setIsValid` to type `UpdateType`
-- added enum `setLineItemDeactivatedAt` to type `UpdateType`
-- added enum `setLineItemDiscountedPrice` to type `UpdateType`
-- added enum `setLineItemDiscountedPricePerQuantity` to type `UpdateType`
-- added enum `setLineItemDistributionChannel` to type `UpdateType`
-- added enum `setLineItemPrice` to type `UpdateType`
-- added enum `setLineItemProductKey` to type `UpdateType`
-- added enum `setLineItemProductSlug` to type `UpdateType`
-- added enum `setLineItemTaxAmount` to type `UpdateType`
-- added enum `setLineItemTaxRate` to type `UpdateType`
-- added enum `setLineItemTaxedPrice` to type `UpdateType`
-- added enum `setLineItemTotalPrice` to type `UpdateType`
-- added enum `setOrderTaxedPrice` to type `UpdateType`
-- added enum `setOrderTotalPrice` to type `UpdateType`
-- added enum `setOrderTotalTax` to type `UpdateType`
-- added enum `setPrices` to type `UpdateType`
-- added enum `setProductCount` to type `UpdateType`
-- added enum `setProductSelections` to type `UpdateType`
-- added enum `setProperty` to type `UpdateType`
-- added enum `setPurchaseOrderNumber` to type `UpdateType`
-- added enum `setReservations` to type `UpdateType`
-- added enum `setSellerComment` to type `UpdateType`
-- added enum `setShippingInfoPrice` to type `UpdateType`
-- added enum `setShippingInfoTaxedPrice` to type `UpdateType`
-- added enum `setShippingMethod` to type `UpdateType`
-- added enum `setShippingMethodTaxAmount` to type `UpdateType`
-- added enum `setShippingMethodTaxRate` to type `UpdateType`
-- added enum `setShippingRate` to type `UpdateType`
-- added enum `setShippingRateInput` to type `UpdateType`
-- added enum `setStoreMode` to type `UpdateType`
-- added enum `setSupplyChannels` to type `UpdateType`
-- added enum `setValidTo` to type `UpdateType`
-- added enum `setValue` to type `UpdateType`
-- added enum `setVariantSelection` to type `UpdateType`
-- added enum `DeclinedForRenegotiation` to type `QuoteState`
-- added enum `associate-role` to type `ReferenceTypeId`
-- added enum `business-unit` to type `ReferenceTypeId`
+- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->cartDiscounts()->get()`
+- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->cartDiscounts()->post()`
+- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->cartDiscounts()->withKey()->get()`
+- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->cartDiscounts()->withKey()->post()`
+- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->cartDiscounts()->withKey()->delete()`
+- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->cartDiscounts()->withId()->get()`
+- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->cartDiscounts()->withId()->post()`
+- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->cartDiscounts()->withId()->delete()`
+ *
+ *
+
+ * @return null|StoreKeyReferenceCollection
+ */
+ public function getStores();
+
/**
*
A failed update can return the following errors:
+ *Store to add.
+ *A failed update can return the following errors:
+ *Store to add.
+ *A failed update can return the following errors:
+ *Indicates if the CartDiscount is active and can be applied to the Cart.
* @@ -519,6 +540,17 @@ public function withSortOrder(?string $sortOrder) return $this; } + /** + * @param ?StoreKeyReferenceCollection $stores + * @return $this + */ + public function withStores(?StoreKeyReferenceCollection $stores) + { + $this->stores = $stores; + + return $this; + } + /** * @param ?bool $isActive * @return $this @@ -689,6 +721,7 @@ public function build(): CartDiscount $this->cartPredicate, $this->target instanceof CartDiscountTargetBuilder ? $this->target->build() : $this->target, $this->sortOrder, + $this->stores, $this->isActive, $this->validFrom, $this->validUntil, diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeIsActiveAction.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeIsActiveAction.php index f6323511454..49cf97ea0af 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeIsActiveAction.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeIsActiveAction.php @@ -18,6 +18,7 @@ interface CartDiscountChangeIsActiveAction extends CartDiscountUpdateAction /** *New value to set.
* If set to true
, the Discount will be applied to the Cart.
If the limit for active Cart Discounts is reached, a MaxCartDiscountsReached error is returned.
* * @return null|bool diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeIsActiveActionBuilder.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeIsActiveActionBuilder.php index cc2c50d7c02..003c77cbf67 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeIsActiveActionBuilder.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeIsActiveActionBuilder.php @@ -29,6 +29,7 @@ final class CartDiscountChangeIsActiveActionBuilder implements Builder /** *New value to set.
* If set to true
, the Discount will be applied to the Cart.
If the limit for active Cart Discounts is reached, a MaxCartDiscountsReached error is returned.
* * @return null|bool diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeIsActiveActionModel.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeIsActiveActionModel.php index 1dc3c3dd1c6..a9ba8dbfc64 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeIsActiveActionModel.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeIsActiveActionModel.php @@ -65,6 +65,7 @@ public function getAction() /** *New value to set.
* If set to true
, the Discount will be applied to the Cart.
If the limit for active Cart Discounts is reached, a MaxCartDiscountsReached error is returned.
* * * @return null|bool diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountDraft.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountDraft.php index bd4960464c1..3b10675fc5f 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountDraft.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountDraft.php @@ -9,6 +9,7 @@ namespace Commercetools\Api\Models\CartDiscount; use Commercetools\Api\Models\Common\LocalizedString; +use Commercetools\Api\Models\Store\StoreResourceIdentifierCollection; use Commercetools\Api\Models\Type\CustomFieldsDraft; use Commercetools\Base\DateTimeImmutableCollection; use Commercetools\Base\JsonObject; @@ -23,6 +24,7 @@ interface CartDiscountDraft extends JsonObject public const FIELD_CART_PREDICATE = 'cartPredicate'; public const FIELD_TARGET = 'target'; public const FIELD_SORT_ORDER = 'sortOrder'; + public const FIELD_STORES = 'stores'; public const FIELD_IS_ACTIVE = 'isActive'; public const FIELD_VALID_FROM = 'validFrom'; public const FIELD_VALID_UNTIL = 'validUntil'; @@ -90,7 +92,21 @@ public function getTarget(); public function getSortOrder(); /** - *Only active Discounts can be applied to the Cart.
+ *If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
+ *If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
+ * + + * @return null|StoreResourceIdentifierCollection + */ + public function getStores(); + + /** + *Only active Discounts can be applied to the Cart. + * If the limit for active Cart Discounts is reached, a MaxCartDiscountsReached error is returned.
* * @return null|bool @@ -172,6 +188,11 @@ public function setTarget(?CartDiscountTarget $target): void; */ public function setSortOrder(?string $sortOrder): void; + /** + * @param ?StoreResourceIdentifierCollection $stores + */ + public function setStores(?StoreResourceIdentifierCollection $stores): void; + /** * @param ?bool $isActive */ diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountDraftBuilder.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountDraftBuilder.php index 98154c23c44..427555390a3 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountDraftBuilder.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountDraftBuilder.php @@ -10,6 +10,7 @@ use Commercetools\Api\Models\Common\LocalizedString; use Commercetools\Api\Models\Common\LocalizedStringBuilder; +use Commercetools\Api\Models\Store\StoreResourceIdentifierCollection; use Commercetools\Api\Models\Type\CustomFieldsDraft; use Commercetools\Api\Models\Type\CustomFieldsDraftBuilder; use Commercetools\Base\Builder; @@ -67,6 +68,12 @@ final class CartDiscountDraftBuilder implements Builder */ private $sortOrder; + /** + + * @var ?StoreResourceIdentifierCollection + */ + private $stores; + /** * @var ?bool @@ -184,7 +191,24 @@ public function getSortOrder() } /** - *Only active Discounts can be applied to the Cart.
+ *If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
+ *If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
+ * + + * @return null|StoreResourceIdentifierCollection + */ + public function getStores() + { + return $this->stores; + } + + /** + *Only active Discounts can be applied to the Cart. + * If the limit for active Cart Discounts is reached, a MaxCartDiscountsReached error is returned.
* * @return null|bool @@ -326,6 +350,17 @@ public function withSortOrder(?string $sortOrder) return $this; } + /** + * @param ?StoreResourceIdentifierCollection $stores + * @return $this + */ + public function withStores(?StoreResourceIdentifierCollection $stores) + { + $this->stores = $stores; + + return $this; + } + /** * @param ?bool $isActive * @return $this @@ -457,6 +492,7 @@ public function build(): CartDiscountDraft $this->cartPredicate, $this->target instanceof CartDiscountTargetBuilder ? $this->target->build() : $this->target, $this->sortOrder, + $this->stores, $this->isActive, $this->validFrom, $this->validUntil, diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountDraftModel.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountDraftModel.php index 96a7edaa86e..69c5d18fa1a 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountDraftModel.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountDraftModel.php @@ -10,6 +10,7 @@ use Commercetools\Api\Models\Common\LocalizedString; use Commercetools\Api\Models\Common\LocalizedStringModel; +use Commercetools\Api\Models\Store\StoreResourceIdentifierCollection; use Commercetools\Api\Models\Type\CustomFieldsDraft; use Commercetools\Api\Models\Type\CustomFieldsDraftModel; use Commercetools\Base\DateTimeImmutableCollection; @@ -66,6 +67,12 @@ final class CartDiscountDraftModel extends JsonObjectModel implements CartDiscou */ protected $sortOrder; + /** + * + * @var ?StoreResourceIdentifierCollection + */ + protected $stores; + /** * * @var ?bool @@ -114,6 +121,7 @@ public function __construct( ?string $cartPredicate = null, ?CartDiscountTarget $target = null, ?string $sortOrder = null, + ?StoreResourceIdentifierCollection $stores = null, ?bool $isActive = null, ?DateTimeImmutable $validFrom = null, ?DateTimeImmutable $validUntil = null, @@ -128,6 +136,7 @@ public function __construct( $this->cartPredicate = $cartPredicate; $this->target = $target; $this->sortOrder = $sortOrder; + $this->stores = $stores; $this->isActive = $isActive; $this->validFrom = $validFrom; $this->validUntil = $validUntil; @@ -284,7 +293,33 @@ public function getSortOrder() } /** - *Only active Discounts can be applied to the Cart.
+ *If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
+ *If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
+ * + * + * @return null|StoreResourceIdentifierCollection + */ + public function getStores() + { + if (is_null($this->stores)) { + /** @psalm-var ?listOnly active Discounts can be applied to the Cart. + * If the limit for active Cart Discounts is reached, a MaxCartDiscountsReached error is returned.
* * * @return null|bool @@ -469,6 +504,14 @@ public function setSortOrder(?string $sortOrder): void $this->sortOrder = $sortOrder; } + /** + * @param ?StoreResourceIdentifierCollection $stores + */ + public function setStores(?StoreResourceIdentifierCollection $stores): void + { + $this->stores = $stores; + } + /** * @param ?bool $isActive */ diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountModel.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountModel.php index c856e302bb0..78112057e65 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountModel.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountModel.php @@ -17,6 +17,7 @@ use Commercetools\Api\Models\Common\LocalizedString; use Commercetools\Api\Models\Common\LocalizedStringModel; use Commercetools\Api\Models\Common\ReferenceCollection; +use Commercetools\Api\Models\Store\StoreKeyReferenceCollection; use Commercetools\Api\Models\Type\CustomFields; use Commercetools\Api\Models\Type\CustomFieldsModel; use Commercetools\Base\DateTimeImmutableCollection; @@ -109,6 +110,12 @@ final class CartDiscountModel extends JsonObjectModel implements CartDiscount */ protected $sortOrder; + /** + * + * @var ?StoreKeyReferenceCollection + */ + protected $stores; + /** * * @var ?bool @@ -169,6 +176,7 @@ public function __construct( ?string $cartPredicate = null, ?CartDiscountTarget $target = null, ?string $sortOrder = null, + ?StoreKeyReferenceCollection $stores = null, ?bool $isActive = null, ?DateTimeImmutable $validFrom = null, ?DateTimeImmutable $validUntil = null, @@ -190,6 +198,7 @@ public function __construct( $this->cartPredicate = $cartPredicate; $this->target = $target; $this->sortOrder = $sortOrder; + $this->stores = $stores; $this->isActive = $isActive; $this->validFrom = $validFrom; $this->validUntil = $validUntil; @@ -476,6 +485,29 @@ public function getSortOrder() return $this->sortOrder; } + /** + *Indicates if the CartDiscount is active and can be applied to the Cart.
* @@ -731,6 +763,14 @@ public function setSortOrder(?string $sortOrder): void $this->sortOrder = $sortOrder; } + /** + * @param ?StoreKeyReferenceCollection $stores + */ + public function setStores(?StoreKeyReferenceCollection $stores): void + { + $this->stores = $stores; + } + /** * @param ?bool $isActive */ diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountRemoveStoreAction.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountRemoveStoreAction.php new file mode 100644 index 00000000000..5926c6df5ae --- /dev/null +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountRemoveStoreAction.php @@ -0,0 +1,31 @@ +Store to remove. + * + + * @return null|StoreResourceIdentifier + */ + public function getStore(); + + /** + * @param ?StoreResourceIdentifier $store + */ + public function setStore(?StoreResourceIdentifier $store): void; +} diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountRemoveStoreActionBuilder.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountRemoveStoreActionBuilder.php new file mode 100644 index 00000000000..a3261b53490 --- /dev/null +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountRemoveStoreActionBuilder.php @@ -0,0 +1,75 @@ + + */ +final class CartDiscountRemoveStoreActionBuilder implements Builder +{ + /** + + * @var null|StoreResourceIdentifier|StoreResourceIdentifierBuilder + */ + private $store; + + /** + *Store to remove.
+ * + + * @return null|StoreResourceIdentifier + */ + public function getStore() + { + return $this->store instanceof StoreResourceIdentifierBuilder ? $this->store->build() : $this->store; + } + + /** + * @param ?StoreResourceIdentifier $store + * @return $this + */ + public function withStore(?StoreResourceIdentifier $store) + { + $this->store = $store; + + return $this; + } + + /** + * @deprecated use withStore() instead + * @return $this + */ + public function withStoreBuilder(?StoreResourceIdentifierBuilder $store) + { + $this->store = $store; + + return $this; + } + + public function build(): CartDiscountRemoveStoreAction + { + return new CartDiscountRemoveStoreActionModel( + $this->store instanceof StoreResourceIdentifierBuilder ? $this->store->build() : $this->store + ); + } + + public static function of(): CartDiscountRemoveStoreActionBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountRemoveStoreActionCollection.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountRemoveStoreActionCollection.php new file mode 100644 index 00000000000..f06166db4d5 --- /dev/null +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountRemoveStoreActionCollection.php @@ -0,0 +1,56 @@ + + * @method CartDiscountRemoveStoreAction current() + * @method CartDiscountRemoveStoreAction end() + * @method CartDiscountRemoveStoreAction at($offset) + */ +class CartDiscountRemoveStoreActionCollection extends CartDiscountUpdateActionCollection +{ + /** + * @psalm-assert CartDiscountRemoveStoreAction $value + * @psalm-param CartDiscountRemoveStoreAction|stdClass $value + * @throws InvalidArgumentException + * + * @return CartDiscountRemoveStoreActionCollection + */ + public function add($value) + { + if (!$value instanceof CartDiscountRemoveStoreAction) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?CartDiscountRemoveStoreAction + */ + protected function mapper() + { + return function (?int $index): ?CartDiscountRemoveStoreAction { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var CartDiscountRemoveStoreAction $data */ + $data = CartDiscountRemoveStoreActionModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountRemoveStoreActionModel.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountRemoveStoreActionModel.php new file mode 100644 index 00000000000..56a45816dd9 --- /dev/null +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountRemoveStoreActionModel.php @@ -0,0 +1,96 @@ +store = $store; + $this->action = $action ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getAction() + { + if (is_null($this->action)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ACTION); + if (is_null($data)) { + return null; + } + $this->action = (string) $data; + } + + return $this->action; + } + + /** + *Store to remove.
+ * + * + * @return null|StoreResourceIdentifier + */ + public function getStore() + { + if (is_null($this->store)) { + /** @psalm-var stdClass|arrayA failed update can return the following errors:
+ *Stores to set. + * Overrides the current list of Stores. + * If empty, any existing values will be removed.
+ *A failed update can return the following errors:
+ *Stores to set. + * Overrides the current list of Stores. + * If empty, any existing values will be removed.
+ *A failed update can return the following errors:
+ *Stores for which the limit for active Cart Discounts that can exist has been reached.
+ * + + * @return null|StoreKeyReferenceCollection + */ + public function getStores() + { + return $this->stores; + } + + /** + * @param ?StoreKeyReferenceCollection $stores + * @return $this + */ + public function withStores(?StoreKeyReferenceCollection $stores) + { + $this->stores = $stores; + + return $this; + } + + + public function build(): GraphQLStoreCartDiscountsLimitReachedError + { + return new GraphQLStoreCartDiscountsLimitReachedErrorModel( + $this->stores + ); + } + + public static function of(): GraphQLStoreCartDiscountsLimitReachedErrorBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Error/GraphQLStoreCartDiscountsLimitReachedErrorCollection.php b/lib/commercetools-api/src/Models/Error/GraphQLStoreCartDiscountsLimitReachedErrorCollection.php new file mode 100644 index 00000000000..d4581710b83 --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/GraphQLStoreCartDiscountsLimitReachedErrorCollection.php @@ -0,0 +1,56 @@ + + * @method GraphQLStoreCartDiscountsLimitReachedError current() + * @method GraphQLStoreCartDiscountsLimitReachedError end() + * @method GraphQLStoreCartDiscountsLimitReachedError at($offset) + */ +class GraphQLStoreCartDiscountsLimitReachedErrorCollection extends GraphQLErrorObjectCollection +{ + /** + * @psalm-assert GraphQLStoreCartDiscountsLimitReachedError $value + * @psalm-param GraphQLStoreCartDiscountsLimitReachedError|stdClass $value + * @throws InvalidArgumentException + * + * @return GraphQLStoreCartDiscountsLimitReachedErrorCollection + */ + public function add($value) + { + if (!$value instanceof GraphQLStoreCartDiscountsLimitReachedError) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?GraphQLStoreCartDiscountsLimitReachedError + */ + protected function mapper() + { + return function (?int $index): ?GraphQLStoreCartDiscountsLimitReachedError { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var GraphQLStoreCartDiscountsLimitReachedError $data */ + $data = GraphQLStoreCartDiscountsLimitReachedErrorModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Error/GraphQLStoreCartDiscountsLimitReachedErrorModel.php b/lib/commercetools-api/src/Models/Error/GraphQLStoreCartDiscountsLimitReachedErrorModel.php new file mode 100644 index 00000000000..6a34782a400 --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/GraphQLStoreCartDiscountsLimitReachedErrorModel.php @@ -0,0 +1,107 @@ +stores = $stores; + $this->code = $code ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getCode() + { + if (is_null($this->code)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CODE); + if (is_null($data)) { + return null; + } + $this->code = (string) $data; + } + + return $this->code; + } + + /** + *Stores for which the limit for active Cart Discounts that can exist has been reached.
+ * + * + * @return null|StoreKeyReferenceCollection + */ + public function getStores() + { + if (is_null($this->stores)) { + /** @psalm-var ?list"Maximum number of active cart discounts reached ($max)."
+ *
+
+ * @return null|string
+ */
+ public function getMessage();
+
+ /**
+ * @param ?string $message
+ */
+ public function setMessage(?string $message): void;
+}
diff --git a/lib/commercetools-api/src/Models/Error/MaxCartDiscountsReachedErrorBuilder.php b/lib/commercetools-api/src/Models/Error/MaxCartDiscountsReachedErrorBuilder.php
new file mode 100644
index 00000000000..5d142a0c794
--- /dev/null
+++ b/lib/commercetools-api/src/Models/Error/MaxCartDiscountsReachedErrorBuilder.php
@@ -0,0 +1,63 @@
+
+ */
+final class MaxCartDiscountsReachedErrorBuilder implements Builder
+{
+ /**
+
+ * @var ?string
+ */
+ private $message;
+
+ /**
+ * "Maximum number of active cart discounts reached ($max)."
"Maximum number of active cart discounts reached ($max)."
"Maximum number of store discounts on a single cart discount reached $max".
+ *
+
+ * @return null|string
+ */
+ public function getMessage();
+
+ /**
+ * @param ?string $message
+ */
+ public function setMessage(?string $message): void;
+}
diff --git a/lib/commercetools-api/src/Models/Error/MaxStoreReferencesReachedErrorBuilder.php b/lib/commercetools-api/src/Models/Error/MaxStoreReferencesReachedErrorBuilder.php
new file mode 100644
index 00000000000..79acb337a7d
--- /dev/null
+++ b/lib/commercetools-api/src/Models/Error/MaxStoreReferencesReachedErrorBuilder.php
@@ -0,0 +1,63 @@
+
+ */
+final class MaxStoreReferencesReachedErrorBuilder implements Builder
+{
+ /**
+
+ * @var ?string
+ */
+ private $message;
+
+ /**
+ * "Maximum number of store discounts on a single cart discount reached $max".
"Maximum number of store discounts on a single cart discount reached $max".
"Maximum number of active cart discounts reached for $stores."
+ *
+
+ * @return null|string
+ */
+ public function getMessage();
+
+ /**
+ * Stores for which the limit for active Cart Discounts that can exist has been reached.
+ * + + * @return null|StoreKeyReferenceCollection + */ + public function getStores(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + + /** + * @param ?StoreKeyReferenceCollection $stores + */ + public function setStores(?StoreKeyReferenceCollection $stores): void; +} diff --git a/lib/commercetools-api/src/Models/Error/StoreCartDiscountsLimitReachedErrorBuilder.php b/lib/commercetools-api/src/Models/Error/StoreCartDiscountsLimitReachedErrorBuilder.php new file mode 100644 index 00000000000..36af3969d55 --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/StoreCartDiscountsLimitReachedErrorBuilder.php @@ -0,0 +1,93 @@ + + */ +final class StoreCartDiscountsLimitReachedErrorBuilder implements Builder +{ + /** + + * @var ?string + */ + private $message; + + /** + + * @var ?StoreKeyReferenceCollection + */ + private $stores; + + /** + *"Maximum number of active cart discounts reached for $stores."
Stores for which the limit for active Cart Discounts that can exist has been reached.
+ * + + * @return null|StoreKeyReferenceCollection + */ + public function getStores() + { + return $this->stores; + } + + /** + * @param ?string $message + * @return $this + */ + public function withMessage(?string $message) + { + $this->message = $message; + + return $this; + } + + /** + * @param ?StoreKeyReferenceCollection $stores + * @return $this + */ + public function withStores(?StoreKeyReferenceCollection $stores) + { + $this->stores = $stores; + + return $this; + } + + + public function build(): StoreCartDiscountsLimitReachedError + { + return new StoreCartDiscountsLimitReachedErrorModel( + $this->message, + $this->stores + ); + } + + public static function of(): StoreCartDiscountsLimitReachedErrorBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Error/StoreCartDiscountsLimitReachedErrorCollection.php b/lib/commercetools-api/src/Models/Error/StoreCartDiscountsLimitReachedErrorCollection.php new file mode 100644 index 00000000000..7b1cc5a83ba --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/StoreCartDiscountsLimitReachedErrorCollection.php @@ -0,0 +1,56 @@ + + * @method StoreCartDiscountsLimitReachedError current() + * @method StoreCartDiscountsLimitReachedError end() + * @method StoreCartDiscountsLimitReachedError at($offset) + */ +class StoreCartDiscountsLimitReachedErrorCollection extends ErrorObjectCollection +{ + /** + * @psalm-assert StoreCartDiscountsLimitReachedError $value + * @psalm-param StoreCartDiscountsLimitReachedError|stdClass $value + * @throws InvalidArgumentException + * + * @return StoreCartDiscountsLimitReachedErrorCollection + */ + public function add($value) + { + if (!$value instanceof StoreCartDiscountsLimitReachedError) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?StoreCartDiscountsLimitReachedError + */ + protected function mapper() + { + return function (?int $index): ?StoreCartDiscountsLimitReachedError { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var StoreCartDiscountsLimitReachedError $data */ + $data = StoreCartDiscountsLimitReachedErrorModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Error/StoreCartDiscountsLimitReachedErrorModel.php b/lib/commercetools-api/src/Models/Error/StoreCartDiscountsLimitReachedErrorModel.php new file mode 100644 index 00000000000..3f6b06c54ce --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/StoreCartDiscountsLimitReachedErrorModel.php @@ -0,0 +1,143 @@ +message = $message; + $this->stores = $stores; + $this->code = $code ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getCode() + { + if (is_null($this->code)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CODE); + if (is_null($data)) { + return null; + } + $this->code = (string) $data; + } + + return $this->code; + } + + /** + *"Maximum number of active cart discounts reached for $stores."
Stores for which the limit for active Cart Discounts that can exist has been reached.
+ * + * + * @return null|StoreKeyReferenceCollection + */ + public function getStores() + { + if (is_null($this->stores)) { + /** @psalm-var ?listUser-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getKey(); + /** * @return null|int @@ -102,6 +111,11 @@ public function setMoney(?Money $money): void; */ public function setName(?LocalizedString $name): void; + /** + * @param ?string $key + */ + public function setKey(?string $key): void; + /** * @param ?int $quantity */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemActionBuilder.php index 8af724867df..e661f2fecf6 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemActionBuilder.php @@ -44,6 +44,12 @@ final class StagedOrderAddCustomLineItemActionBuilder implements Builder */ private $name; + /** + + * @var ?string + */ + private $key; + /** * @var ?int @@ -102,6 +108,17 @@ public function getName() return $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name; } + /** + *User-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getKey() + { + return $this->key; + } + /** * @return null|int @@ -190,6 +207,17 @@ public function withName(?LocalizedString $name) return $this; } + /** + * @param ?string $key + * @return $this + */ + public function withKey(?string $key) + { + $this->key = $key; + + return $this; + } + /** * @param ?int $quantity * @return $this @@ -316,6 +344,7 @@ public function build(): StagedOrderAddCustomLineItemAction return new StagedOrderAddCustomLineItemActionModel( $this->money instanceof MoneyBuilder ? $this->money->build() : $this->money, $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name, + $this->key, $this->quantity, $this->slug, $this->taxCategory instanceof TaxCategoryResourceIdentifierBuilder ? $this->taxCategory->build() : $this->taxCategory, diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemActionModel.php index fb37436b511..fb016514ff5 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemActionModel.php @@ -50,6 +50,12 @@ final class StagedOrderAddCustomLineItemActionModel extends JsonObjectModel impl */ protected $name; + /** + * + * @var ?string + */ + protected $key; + /** * * @var ?int @@ -93,6 +99,7 @@ final class StagedOrderAddCustomLineItemActionModel extends JsonObjectModel impl public function __construct( ?Money $money = null, ?LocalizedString $name = null, + ?string $key = null, ?int $quantity = null, ?string $slug = null, ?TaxCategoryResourceIdentifier $taxCategory = null, @@ -103,6 +110,7 @@ public function __construct( ) { $this->money = $money; $this->name = $name; + $this->key = $key; $this->quantity = $quantity; $this->slug = $slug; $this->taxCategory = $taxCategory; @@ -172,6 +180,26 @@ public function getName() return $this->name; } + /** + *User-defined unique identifier of the Custom Line Item.
+ * + * + * @return null|string + */ + public function getKey() + { + if (is_null($this->key)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_KEY); + if (is_null($data)) { + return null; + } + $this->key = (string) $data; + } + + return $this->key; + } + /** * * @return null|int @@ -312,6 +340,14 @@ public function setName(?LocalizedString $name): void $this->name = $name; } + /** + * @param ?string $key + */ + public function setKey(?string $key): void + { + $this->key = $key; + } + /** * @param ?int $quantity */ diff --git a/reference.txt b/reference.txt new file mode 100644 index 00000000000..75750bb2f47 --- /dev/null +++ b/reference.txt @@ -0,0 +1 @@ +5236e2e59da78d272ca45725e5423318d5e0175b diff --git a/references.txt b/references.txt index db0d703fe11..9bc2da37af2 100644 --- a/references.txt +++ b/references.txt @@ -62,3 +62,4 @@ cca2a403a6ab01eb9e0bd2487c0d8f4a97b521bc 1ce375bcc89b580bc63fe029066812b511e42dfb 469db24ebd23ce69a05ad4208ed3a69f97a012f8 b8643304f30b6ab91906dd29ad787d9b2064d738 +e7b3eac188a2a18e9a68ef54a58476e76b005774 From 040ab186b61649a7c6afc07f49052b76b09db383 Mon Sep 17 00:00:00 2001 From: Auto MationUser-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
New value to set.
+ *New value to set. + * When trying to set a CartDiscountValueGiftLineItemDraft an InvalidInput error is returned.
* * @return null|CartDiscountValueDraft diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueActionBuilder.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueActionBuilder.php index 12d702bc6e1..15941610eac 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueActionBuilder.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueActionBuilder.php @@ -27,7 +27,8 @@ final class CartDiscountChangeValueActionBuilder implements Builder private $value; /** - *New value to set.
+ *New value to set. + * When trying to set a CartDiscountValueGiftLineItemDraft an InvalidInput error is returned.
* * @return null|CartDiscountValueDraft diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueActionModel.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueActionModel.php index e7378b89dca..112664e4802 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueActionModel.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueActionModel.php @@ -63,7 +63,8 @@ public function getAction() } /** - *New value to set.
+ *New value to set. + * When trying to set a CartDiscountValueGiftLineItemDraft an InvalidInput error is returned.
* * * @return null|CartDiscountValueDraft diff --git a/references.txt b/references.txt index 7ba78e7767b..b396f8161e8 100644 --- a/references.txt +++ b/references.txt @@ -64,3 +64,4 @@ cca2a403a6ab01eb9e0bd2487c0d8f4a97b521bc b8643304f30b6ab91906dd29ad787d9b2064d738 e7b3eac188a2a18e9a68ef54a58476e76b005774 1ceef2dd3899ca1e1d39ceee0dbbc5b3ea99cdfd +43841c37c1701f6fbc97ecc822ac0a281d74c38c From ecae5479990e57f6fbc136d8e869a2504c79ed60 Mon Sep 17 00:00:00 2001 From: Auto Mationid
of the Delivery.
- *
-
- * @return null|string
- */
- public function getDeliveryId();
-
- /**
- * Name of the Custom Field.
- * - - * @return null|string - */ - public function getName(); - - /** - *If value
is absent or null
, this field will be removed if it exists.
- * Removing a field that does not exist returns an InvalidOperation error.
- * If value
is provided, it is set for the field defined by name
.
id
of the Delivery.
Name of the Custom Field.
- * - - * @return null|string - */ - public function getName() - { - return $this->name; - } - - /** - *If value
is absent or null
, this field will be removed if it exists.
- * Removing a field that does not exist returns an InvalidOperation error.
- * If value
is provided, it is set for the field defined by name
.
id
of the Delivery.
Name of the Custom Field.
- * - * - * @return null|string - */ - public function getName() - { - if (is_null($this->name)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_NAME); - if (is_null($data)) { - return null; - } - $this->name = (string) $data; - } - - return $this->name; - } - - /** - *If value
is absent or null
, this field will be removed if it exists.
- * Removing a field that does not exist returns an InvalidOperation error.
- * If value
is provided, it is set for the field defined by name
.
id
of the Delivery.
- *
-
- * @return null|string
- */
- public function getDeliveryId();
-
- /**
- * Defines the Type that extends the Delivery address
with Custom Fields.
- * If absent, any existing Type and Custom Fields are removed from the Delivery address
.
Sets the Custom Fields fields for the Delivery address
.
id
of the Delivery.
Defines the Type that extends the Delivery address
with Custom Fields.
- * If absent, any existing Type and Custom Fields are removed from the Delivery address
.
Sets the Custom Fields fields for the Delivery address
.
id
of the Delivery.
Defines the Type that extends the Delivery address
with Custom Fields.
- * If absent, any existing Type and Custom Fields are removed from the Delivery address
.
Sets the Custom Fields fields for the Delivery address
.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
Taxed price of the Shipping Methods in a Cart with Multi
ShippingMode.
Taxed price of the Shipping Methods in a Cart with Multiple
ShippingMode.
Taxed price of the Shipping Methods in a Cart with Multi
ShippingMode.
Taxed price of the Shipping Methods in a Cart with Multiple
ShippingMode.
Taxed price of the Shipping Methods in a Cart with Multi
ShippingMode.
Taxed price of the Shipping Methods in a Cart with Multiple
ShippingMode.
Taxed price of the Shipping Methods in a Cart with Multi
ShippingMode.
Taxed price of the Shipping Methods in a Cart with Multiple
ShippingMode.
Taxed price of the Shipping Methods in a Cart with Multi
ShippingMode.
Taxed price of the Shipping Methods in a Cart with Multiple
ShippingMode.
Taxed price of the Shipping Methods in a Cart with Multi
ShippingMode.
Taxed price of the Shipping Methods in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
Holds all shipping-related information per Shipping Method.
- *For Multi
ShippingMode, it is updated automatically after the Shipping Methods are added.
For Multiple
ShippingMode, it is updated automatically after the Shipping Methods are added.
User-defined unique identifier of the Shipping Method with Single
ShippingMode.
key
of the ShippingMethod for Single
ShippingMode.
Holds all shipping-related information per Shipping Method for Multi
ShippingMode.
Holds all shipping-related information per Shipping Method for Multiple
ShippingMode.
It is updated automatically after the Shipping Method is added.
* diff --git a/lib/commercetools-api/src/Models/Order/OrderAddDeliveryAction.php b/lib/commercetools-api/src/Models/Order/OrderAddDeliveryAction.php index 47187c23d6c..e738da8777b 100644 --- a/lib/commercetools-api/src/Models/Order/OrderAddDeliveryAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderAddDeliveryAction.php @@ -37,7 +37,7 @@ public function getDeliveryKey(); public function getItems(); /** - *User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
key
of the ShippingMethod, required for Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
key
of the ShippingMethod, required for Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
key
of the ShippingMethod, required for Multiple
ShippingMode.
Holds all shipping-related information per Shipping Method.
- *For Multi
ShippingMode, it is updated automatically after the Shipping Methods are added.
For Multiple
ShippingMode, it is updated automatically after the Shipping Methods are added.
User-defined unique identifier of the Shipping Method with Single
ShippingMode.
key
of the ShippingMethod for Single
ShippingMode.
Holds all shipping-related information per Shipping Method for Multi
ShippingMode.
Holds all shipping-related information per Shipping Method for Multiple
ShippingMode.
It is updated automatically after the Shipping Method is added.
* diff --git a/lib/commercetools-api/src/Models/Order/OrderModel.php b/lib/commercetools-api/src/Models/Order/OrderModel.php index d84c53de0e9..d7d89dabbbf 100644 --- a/lib/commercetools-api/src/Models/Order/OrderModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderModel.php @@ -827,7 +827,7 @@ public function getTaxedShippingPrice() /** *Holds all shipping-related information per Shipping Method.
- *For Multi
ShippingMode, it is updated automatically after the Shipping Methods are added.
For Multiple
ShippingMode, it is updated automatically after the Shipping Methods are added.
User-defined unique identifier of the Shipping Method with Single
ShippingMode.
key
of the ShippingMethod for Single
ShippingMode.
Holds all shipping-related information per Shipping Method for Multi
ShippingMode.
Holds all shipping-related information per Shipping Method for Multiple
ShippingMode.
It is updated automatically after the Shipping Method is added.
* * diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddDeliveryAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddDeliveryAction.php index e65f6ed80f9..e55e1f21e42 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddDeliveryAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddDeliveryAction.php @@ -34,7 +34,7 @@ interface StagedOrderAddDeliveryAction extends StagedOrderUpdateAction public function getDeliveryKey(); /** - *User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
key
of the ShippingMethod,required for Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
key
of the ShippingMethod,required for Multiple
ShippingMode.
User-defined unique identifier of the Shipping Method in a Cart with Multi
ShippingMode.
key
of the ShippingMethod,required for Multiple
ShippingMode.
Holds all shipping-related information per Shipping Method.
- *For Multi
ShippingMode, it is updated automatically after the Shipping Methods are added.
For Multiple
ShippingMode, it is updated automatically after the Shipping Methods are added.
User-defined unique identifier of the Shipping Method with Single
ShippingMode.
key
of the ShippingMethod for Single
ShippingMode.
Holds all shipping-related information per Shipping Method for Multi
ShippingMode.
Holds all shipping-related information per Shipping Method for Multiple
ShippingMode.
It is updated automatically after the Shipping Method is added.
* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderModel.php index 9d883a600c0..30374bf9976 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderModel.php @@ -829,7 +829,7 @@ public function getTaxedShippingPrice() /** *Holds all shipping-related information per Shipping Method.
- *For Multi
ShippingMode, it is updated automatically after the Shipping Methods are added.
For Multiple
ShippingMode, it is updated automatically after the Shipping Methods are added.
User-defined unique identifier of the Shipping Method with Single
ShippingMode.
key
of the ShippingMethod for Single
ShippingMode.
Holds all shipping-related information per Shipping Method for Multi
ShippingMode.
Holds all shipping-related information per Shipping Method for Multiple
ShippingMode.
It is updated automatically after the Shipping Method is added.
* * diff --git a/references.txt b/references.txt index 4e5e875a60c..7f8ab7506bd 100644 --- a/references.txt +++ b/references.txt @@ -69,3 +69,4 @@ d94fc7474c8ac7870fd980d59c0e5991b3a045ef cf1efa8eee337b806a5a943b0e44af7d890e4802 cc581bbaa4c907418e64d72d70a1b17ef1297638 e40afdfd0ae914b593926d478cb307e9a3b7328b +da31e9917b314501c2a67a8e3bc2e6dfe9c228ca From 0150539b8e716d99e07e350b6f1e0ca20ced85c2 Mon Sep 17 00:00:00 2001 From: Auto MationAddress to append to itemShippingAddresses
.
The new Address must have a key
that is unique accross this Cart.
The new Address must have a key
that is unique across this Cart.
Address to append to itemShippingAddresses
.
The new Address must have a key
that is unique accross this Cart.
The new Address must have a key
that is unique across this Cart.
Address to append to itemShippingAddresses
.
The new Address must have a key
that is unique accross this Cart.
The new Address must have a key
that is unique across this Cart.
Number of Custom Line Items in the Cart.
+ *Number of Custom Line Items in the Cart or Order.
* * @return null|int @@ -105,7 +105,7 @@ public function getSlug(); public function getQuantity(); /** - *State of the Custom Line Item in the Cart.
+ *State of the Custom Line Item in the Cart or Order.
* * @return null|ItemStateCollection diff --git a/lib/commercetools-api/src/Models/Cart/CustomLineItemBuilder.php b/lib/commercetools-api/src/Models/Cart/CustomLineItemBuilder.php index 335fbc35706..613aa609761 100644 --- a/lib/commercetools-api/src/Models/Cart/CustomLineItemBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/CustomLineItemBuilder.php @@ -210,7 +210,7 @@ public function getSlug() } /** - *Number of Custom Line Items in the Cart.
+ *Number of Custom Line Items in the Cart or Order.
* * @return null|int @@ -221,7 +221,7 @@ public function getQuantity() } /** - *State of the Custom Line Item in the Cart.
+ *State of the Custom Line Item in the Cart or Order.
* * @return null|ItemStateCollection diff --git a/lib/commercetools-api/src/Models/Cart/CustomLineItemModel.php b/lib/commercetools-api/src/Models/Cart/CustomLineItemModel.php index fb2b48b4f2b..73b22020d7d 100644 --- a/lib/commercetools-api/src/Models/Cart/CustomLineItemModel.php +++ b/lib/commercetools-api/src/Models/Cart/CustomLineItemModel.php @@ -316,7 +316,7 @@ public function getSlug() } /** - *Number of Custom Line Items in the Cart.
+ *Number of Custom Line Items in the Cart or Order.
* * * @return null|int @@ -336,7 +336,7 @@ public function getQuantity() } /** - *State of the Custom Line Item in the Cart.
+ *State of the Custom Line Item in the Cart or Order.
* * * @return null|ItemStateCollection diff --git a/lib/commercetools-api/src/Models/Cart/LineItem.php b/lib/commercetools-api/src/Models/Cart/LineItem.php index 3900e764f8c..1f67a29789e 100644 --- a/lib/commercetools-api/src/Models/Cart/LineItem.php +++ b/lib/commercetools-api/src/Models/Cart/LineItem.php @@ -78,8 +78,8 @@ public function getProductId(); *key
of the Product.
This field is only present on:
*key
is available on that specific Product at the time the Line Item was created or updated on the Cart.key
is available on the specific Product at the time the Order was created from the Cart.key
is available on that specific Product at the time the LineItem was created or updated on the Cart.key
is available on the specific Product at the time the Order was created from the Cart.Present on resources created or updated after 3 December 2021.
* @@ -132,7 +132,7 @@ public function getVariant(); public function getPrice(); /** - *Number of Line Items of the given Product Variant present in the Cart.
+ *Number of Line Items of the given Product Variant present in the Cart or Order.
* * @return null|int @@ -173,7 +173,7 @@ public function getTaxedPrice(); public function getTaxedPricePortions(); /** - *State of the Line Item in the Cart.
+ *State of the Line Item in the Cart or the Order.
* * @return null|ItemStateCollection diff --git a/lib/commercetools-api/src/Models/Cart/LineItemBuilder.php b/lib/commercetools-api/src/Models/Cart/LineItemBuilder.php index 698e8963bb6..feeef90016b 100644 --- a/lib/commercetools-api/src/Models/Cart/LineItemBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/LineItemBuilder.php @@ -231,8 +231,8 @@ public function getProductId() *key
of the Product.
This field is only present on:
*key
is available on that specific Product at the time the Line Item was created or updated on the Cart.key
is available on the specific Product at the time the Order was created from the Cart.key
is available on that specific Product at the time the LineItem was created or updated on the Cart.key
is available on the specific Product at the time the Order was created from the Cart.Present on resources created or updated after 3 December 2021.
* @@ -303,7 +303,7 @@ public function getPrice() } /** - *Number of Line Items of the given Product Variant present in the Cart.
+ *Number of Line Items of the given Product Variant present in the Cart or Order.
* * @return null|int @@ -359,7 +359,7 @@ public function getTaxedPricePortions() } /** - *State of the Line Item in the Cart.
+ *State of the Line Item in the Cart or the Order.
* * @return null|ItemStateCollection diff --git a/lib/commercetools-api/src/Models/Cart/LineItemModel.php b/lib/commercetools-api/src/Models/Cart/LineItemModel.php index 9d137216b0e..10cb9a11638 100644 --- a/lib/commercetools-api/src/Models/Cart/LineItemModel.php +++ b/lib/commercetools-api/src/Models/Cart/LineItemModel.php @@ -317,8 +317,8 @@ public function getProductId() *key
of the Product.
This field is only present on:
*key
is available on that specific Product at the time the Line Item was created or updated on the Cart.key
is available on the specific Product at the time the Order was created from the Cart.key
is available on that specific Product at the time the LineItem was created or updated on the Cart.key
is available on the specific Product at the time the Order was created from the Cart.Present on resources created or updated after 3 December 2021.
* @@ -448,7 +448,7 @@ public function getPrice() } /** - *Number of Line Items of the given Product Variant present in the Cart.
+ *Number of Line Items of the given Product Variant present in the Cart or Order.
* * * @return null|int @@ -551,7 +551,7 @@ public function getTaxedPricePortions() } /** - *State of the Line Item in the Cart.
+ *State of the Line Item in the Cart or the Order.
* * * @return null|ItemStateCollection diff --git a/lib/commercetools-api/src/Models/Me/MyOrderFromCartDraft.php b/lib/commercetools-api/src/Models/Me/MyOrderFromCartDraft.php index 6e9eefa552c..c16f9194339 100644 --- a/lib/commercetools-api/src/Models/Me/MyOrderFromCartDraft.php +++ b/lib/commercetools-api/src/Models/Me/MyOrderFromCartDraft.php @@ -17,7 +17,7 @@ interface MyOrderFromCartDraft extends JsonObject public const FIELD_VERSION = 'version'; /** - *Unique identifier of the Cart that initiates an Order creation.
+ *id
of the Cart from which the Order is created.
Current version
of the Cart from which the Order is created.
Unique identifier of the Cart that initiates an Order creation.
+ *id
of the Cart from which the Order is created.
Current version
of the Cart from which the Order is created.
Unique identifier of the Cart that initiates an Order creation.
+ *id
of the Cart from which the Order is created.
Current version
of the Cart from which the Order is created.
Unique identifier of the Quote from which the Order is created.
+ *id
of the Quote from which the Order is created.
version
of the Quote from which the Order is created.
Current version
of the Quote from which the Order is created.
Set to true
, if the quoteState
of the referenced Quote should be set to Accepted
.
Set to true
, if the quoteState
of the referenced Quote should be set to Accepted
.
Unique identifier of the Quote from which the Order is created.
+ *id
of the Quote from which the Order is created.
version
of the Quote from which the Order is created.
Current version
of the Quote from which the Order is created.
Set to true
, if the quoteState
of the referenced Quote should be set to Accepted
.
Set to true
, if the quoteState
of the referenced Quote should be set to Accepted
.
Unique identifier of the Quote from which the Order is created.
+ *id
of the Quote from which the Order is created.
version
of the Quote from which the Order is created.
Current version
of the Quote from which the Order is created.
Set to true
, if the quoteState
of the referenced Quote should be set to Accepted
.
Set to true
, if the quoteState
of the referenced Quote should be set to Accepted
.
Delivery that was added to the Order. The Delivery in the Message body does not contain Parcels if those were part of the initial Add Delivery update action. In that case, the update action produces an additional ParcelAddedToDelivery Message containing information about the Parcels.
+ *Delivery that was added to the Order. The Delivery in the Message body does not contain Parcels if those were part of the initial Add Delivery update action. In that case, the update action produces an additional Parcel Added To Delivery Message containing information about the Parcels.
* * @return null|Delivery diff --git a/lib/commercetools-api/src/Models/Message/DeliveryAddedMessageBuilder.php b/lib/commercetools-api/src/Models/Message/DeliveryAddedMessageBuilder.php index de488e5d054..4865de7a628 100644 --- a/lib/commercetools-api/src/Models/Message/DeliveryAddedMessageBuilder.php +++ b/lib/commercetools-api/src/Models/Message/DeliveryAddedMessageBuilder.php @@ -213,7 +213,7 @@ public function getResourceUserProvidedIdentifiers() } /** - *Delivery that was added to the Order. The Delivery in the Message body does not contain Parcels if those were part of the initial Add Delivery update action. In that case, the update action produces an additional ParcelAddedToDelivery Message containing information about the Parcels.
+ *Delivery that was added to the Order. The Delivery in the Message body does not contain Parcels if those were part of the initial Add Delivery update action. In that case, the update action produces an additional Parcel Added To Delivery Message containing information about the Parcels.
* * @return null|Delivery diff --git a/lib/commercetools-api/src/Models/Message/DeliveryAddedMessageModel.php b/lib/commercetools-api/src/Models/Message/DeliveryAddedMessageModel.php index 08f0b78625f..e4f93618625 100644 --- a/lib/commercetools-api/src/Models/Message/DeliveryAddedMessageModel.php +++ b/lib/commercetools-api/src/Models/Message/DeliveryAddedMessageModel.php @@ -375,7 +375,7 @@ public function getResourceUserProvidedIdentifiers() } /** - *Delivery that was added to the Order. The Delivery in the Message body does not contain Parcels if those were part of the initial Add Delivery update action. In that case, the update action produces an additional ParcelAddedToDelivery Message containing information about the Parcels.
+ *Delivery that was added to the Order. The Delivery in the Message body does not contain Parcels if those were part of the initial Add Delivery update action. In that case, the update action produces an additional Parcel Added To Delivery Message containing information about the Parcels.
* * * @return null|Delivery diff --git a/lib/commercetools-api/src/Models/Message/DeliveryAddedMessagePayload.php b/lib/commercetools-api/src/Models/Message/DeliveryAddedMessagePayload.php index 876b6aaae6e..fc178dc82d9 100644 --- a/lib/commercetools-api/src/Models/Message/DeliveryAddedMessagePayload.php +++ b/lib/commercetools-api/src/Models/Message/DeliveryAddedMessagePayload.php @@ -18,7 +18,7 @@ interface DeliveryAddedMessagePayload extends OrderMessagePayload public const FIELD_SHIPPING_KEY = 'shippingKey'; /** - *Delivery that was added to the Order. The Delivery in the Message body does not contain Parcels if those were part of the initial Add Delivery update action. In that case, the update action produces an additional ParcelAddedToDelivery Message containing information about the Parcels.
+ *Delivery that was added to the Order. The Delivery in the Message body does not contain Parcels if those were part of the initial Add Delivery update action. In that case, the update action produces an additional Parcel Added To Delivery Message containing information about the Parcels.
* * @return null|Delivery diff --git a/lib/commercetools-api/src/Models/Message/DeliveryAddedMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/DeliveryAddedMessagePayloadBuilder.php index c849b0eeb3f..44b2ded14d7 100644 --- a/lib/commercetools-api/src/Models/Message/DeliveryAddedMessagePayloadBuilder.php +++ b/lib/commercetools-api/src/Models/Message/DeliveryAddedMessagePayloadBuilder.php @@ -35,7 +35,7 @@ final class DeliveryAddedMessagePayloadBuilder implements Builder private $shippingKey; /** - *Delivery that was added to the Order. The Delivery in the Message body does not contain Parcels if those were part of the initial Add Delivery update action. In that case, the update action produces an additional ParcelAddedToDelivery Message containing information about the Parcels.
+ *Delivery that was added to the Order. The Delivery in the Message body does not contain Parcels if those were part of the initial Add Delivery update action. In that case, the update action produces an additional Parcel Added To Delivery Message containing information about the Parcels.
* * @return null|Delivery diff --git a/lib/commercetools-api/src/Models/Message/DeliveryAddedMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/DeliveryAddedMessagePayloadModel.php index 974f20783d5..2dbfababb1e 100644 --- a/lib/commercetools-api/src/Models/Message/DeliveryAddedMessagePayloadModel.php +++ b/lib/commercetools-api/src/Models/Message/DeliveryAddedMessagePayloadModel.php @@ -73,7 +73,7 @@ public function getType() } /** - *Delivery that was added to the Order. The Delivery in the Message body does not contain Parcels if those were part of the initial Add Delivery update action. In that case, the update action produces an additional ParcelAddedToDelivery Message containing information about the Parcels.
+ *Delivery that was added to the Order. The Delivery in the Message body does not contain Parcels if those were part of the initial Add Delivery update action. In that case, the update action produces an additional Parcel Added To Delivery Message containing information about the Parcels.
* * * @return null|Delivery diff --git a/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessage.php b/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessage.php index ceabc85c91c..63b2048873f 100644 --- a/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessage.php +++ b/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessage.php @@ -17,7 +17,7 @@ interface OrderPurchaseOrderNumberSetMessage extends OrderMessage public const FIELD_OLD_PURCHASE_ORDER_NUMBER = 'oldPurchaseOrderNumber'; /** - *Purchase order number on the Order after the Set PurchaseOrderNumber update action.
+ *Purchase order number on the Order after the Set Purchase Order Number update action.
* * @return null|string @@ -25,7 +25,7 @@ interface OrderPurchaseOrderNumberSetMessage extends OrderMessage public function getPurchaseOrderNumber(); /** - *Purchase order number on the Order before the Set PurchaseOrderNumber update action.
+ *Purchase order number on the Order before the Set Purchase Order Number update action.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessageBuilder.php b/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessageBuilder.php index d083cd24483..e0643d20916 100644 --- a/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessageBuilder.php +++ b/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessageBuilder.php @@ -211,7 +211,7 @@ public function getResourceUserProvidedIdentifiers() } /** - *Purchase order number on the Order after the Set PurchaseOrderNumber update action.
+ *Purchase order number on the Order after the Set Purchase Order Number update action.
* * @return null|string @@ -222,7 +222,7 @@ public function getPurchaseOrderNumber() } /** - *Purchase order number on the Order before the Set PurchaseOrderNumber update action.
+ *Purchase order number on the Order before the Set Purchase Order Number update action.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessageModel.php b/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessageModel.php index ab1138e5825..5afe07adf3d 100644 --- a/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessageModel.php +++ b/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessageModel.php @@ -373,7 +373,7 @@ public function getResourceUserProvidedIdentifiers() } /** - *Purchase order number on the Order after the Set PurchaseOrderNumber update action.
+ *Purchase order number on the Order after the Set Purchase Order Number update action.
* * * @return null|string @@ -393,7 +393,7 @@ public function getPurchaseOrderNumber() } /** - *Purchase order number on the Order before the Set PurchaseOrderNumber update action.
+ *Purchase order number on the Order before the Set Purchase Order Number update action.
* * * @return null|string diff --git a/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessagePayload.php b/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessagePayload.php index 6aa70a72bb6..85414ae14d0 100644 --- a/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessagePayload.php +++ b/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessagePayload.php @@ -17,7 +17,7 @@ interface OrderPurchaseOrderNumberSetMessagePayload extends OrderMessagePayload public const FIELD_OLD_PURCHASE_ORDER_NUMBER = 'oldPurchaseOrderNumber'; /** - *Purchase order number on the Order after the Set PurchaseOrderNumber update action.
+ *Purchase order number on the Order after the Set Purchase Order Number update action.
* * @return null|string @@ -25,7 +25,7 @@ interface OrderPurchaseOrderNumberSetMessagePayload extends OrderMessagePayload public function getPurchaseOrderNumber(); /** - *Purchase order number on the Order before the Set PurchaseOrderNumber update action.
+ *Purchase order number on the Order before the Set Purchase Order Number update action.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessagePayloadBuilder.php index 3ca4994db45..fa70e43141d 100644 --- a/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessagePayloadBuilder.php +++ b/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessagePayloadBuilder.php @@ -33,7 +33,7 @@ final class OrderPurchaseOrderNumberSetMessagePayloadBuilder implements Builder private $oldPurchaseOrderNumber; /** - *Purchase order number on the Order after the Set PurchaseOrderNumber update action.
+ *Purchase order number on the Order after the Set Purchase Order Number update action.
* * @return null|string @@ -44,7 +44,7 @@ public function getPurchaseOrderNumber() } /** - *Purchase order number on the Order before the Set PurchaseOrderNumber update action.
+ *Purchase order number on the Order before the Set Purchase Order Number update action.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessagePayloadModel.php index c105d9dea36..59d094f84e6 100644 --- a/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessagePayloadModel.php +++ b/lib/commercetools-api/src/Models/Message/OrderPurchaseOrderNumberSetMessagePayloadModel.php @@ -71,7 +71,7 @@ public function getType() } /** - *Purchase order number on the Order after the Set PurchaseOrderNumber update action.
+ *Purchase order number on the Order after the Set Purchase Order Number update action.
* * * @return null|string @@ -91,7 +91,7 @@ public function getPurchaseOrderNumber() } /** - *Purchase order number on the Order before the Set PurchaseOrderNumber update action.
+ *Purchase order number on the Order before the Set Purchase Order Number update action.
* * * @return null|string diff --git a/lib/commercetools-api/src/Models/Order/CustomLineItemReturnItem.php b/lib/commercetools-api/src/Models/Order/CustomLineItemReturnItem.php index bae6094349c..d5698c68fc4 100644 --- a/lib/commercetools-api/src/Models/Order/CustomLineItemReturnItem.php +++ b/lib/commercetools-api/src/Models/Order/CustomLineItemReturnItem.php @@ -16,13 +16,28 @@ interface CustomLineItemReturnItem extends ReturnItem public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; /** + *id
of the returned CustomLineItem.
Number of Custom Line Items returned.
+ * + + * @return null|int + */ + public function getQuantity(); + /** * @param ?string $customLineItemId */ public function setCustomLineItemId(?string $customLineItemId): void; + + /** + * @param ?int $quantity + */ + public function setQuantity(?int $quantity): void; } diff --git a/lib/commercetools-api/src/Models/Order/CustomLineItemReturnItemBuilder.php b/lib/commercetools-api/src/Models/Order/CustomLineItemReturnItemBuilder.php index 7a33f9223d4..5b1425034f4 100644 --- a/lib/commercetools-api/src/Models/Order/CustomLineItemReturnItemBuilder.php +++ b/lib/commercetools-api/src/Models/Order/CustomLineItemReturnItemBuilder.php @@ -78,7 +78,7 @@ final class CustomLineItemReturnItemBuilder implements Builder private $customLineItemId; /** - *Unique identifier of the ReturnItem.
+ *Unique identifier of the Return Item.
* * @return null|string @@ -89,6 +89,8 @@ public function getId() } /** + *Number of Custom Line Items returned.
+ * * @return null|int */ @@ -98,6 +100,8 @@ public function getQuantity() } /** + *User-defined description for the return.
+ * * @return null|string */ @@ -107,6 +111,8 @@ public function getComment() } /** + *Shipment status of the Return Item.
+ * * @return null|string */ @@ -116,6 +122,12 @@ public function getShipmentState() } /** + *Payment status of the Return Item:
+ *NonRefundable
, for items in the Advised
ReturnShipmentStateInitial
, for items in the Returned
ReturnShipmentStateCustom Fields of this return item.
+ *Custom Fields of the Return Item.
* * @return null|CustomFields @@ -136,6 +148,8 @@ public function getCustom() } /** + *Date and time (UTC) the Return Item was last updated.
+ * * @return null|DateTimeImmutable */ @@ -145,6 +159,8 @@ public function getLastModifiedAt() } /** + *Date and time (UTC) the Return Item was intitially created.
+ * * @return null|DateTimeImmutable */ @@ -154,6 +170,8 @@ public function getCreatedAt() } /** + *id
of the returned CustomLineItem.
Unique identifier of the ReturnItem.
+ *Unique identifier of the Return Item.
* * * @return null|string @@ -132,6 +132,8 @@ public function getId() } /** + *Number of Custom Line Items returned.
+ * * * @return null|int */ @@ -168,6 +170,8 @@ public function getType() } /** + *User-defined description for the return.
+ * * * @return null|string */ @@ -186,6 +190,8 @@ public function getComment() } /** + *Shipment status of the Return Item.
+ * * * @return null|string */ @@ -204,6 +210,12 @@ public function getShipmentState() } /** + *Payment status of the Return Item:
+ *NonRefundable
, for items in the Advised
ReturnShipmentStateInitial
, for items in the Returned
ReturnShipmentStateCustom Fields of this return item.
+ *Custom Fields of the Return Item.
* * * @return null|CustomFields @@ -243,6 +255,8 @@ public function getCustom() } /** + *Date and time (UTC) the Return Item was last updated.
+ * * * @return null|DateTimeImmutable */ @@ -265,6 +279,8 @@ public function getLastModifiedAt() } /** + *Date and time (UTC) the Return Item was intitially created.
+ * * * @return null|DateTimeImmutable */ @@ -287,6 +303,8 @@ public function getCreatedAt() } /** + *id
of the returned CustomLineItem.
Date and time (UTC) the Delivery was created.
+ * * @return null|DateTimeImmutable */ public function getCreatedAt(); /** - *Items which are shipped in this delivery regardless their distribution over several parcels. - * Can also be specified individually for each Parcel.
+ *Line Items or Custom Line Items that are delivered.
* * @return null|DeliveryItemCollection @@ -56,19 +57,23 @@ public function getCreatedAt(); public function getItems(); /** + *Information regarding the appearance, content, and shipment of a Parcel.
+ * * @return null|ParcelCollection */ public function getParcels(); /** + *Address to which Parcels are delivered.
+ * * @return null|Address */ public function getAddress(); /** - *Custom Fields for the Transaction.
+ *Custom Fields of the Delivery.
* * @return null|CustomFields diff --git a/lib/commercetools-api/src/Models/Order/DeliveryBuilder.php b/lib/commercetools-api/src/Models/Order/DeliveryBuilder.php index f825a5a7e23..239e728bc36 100644 --- a/lib/commercetools-api/src/Models/Order/DeliveryBuilder.php +++ b/lib/commercetools-api/src/Models/Order/DeliveryBuilder.php @@ -90,6 +90,8 @@ public function getKey() } /** + *Date and time (UTC) the Delivery was created.
+ * * @return null|DateTimeImmutable */ @@ -99,8 +101,7 @@ public function getCreatedAt() } /** - *Items which are shipped in this delivery regardless their distribution over several parcels. - * Can also be specified individually for each Parcel.
+ *Line Items or Custom Line Items that are delivered.
* * @return null|DeliveryItemCollection @@ -111,6 +112,8 @@ public function getItems() } /** + *Information regarding the appearance, content, and shipment of a Parcel.
+ * * @return null|ParcelCollection */ @@ -120,6 +123,8 @@ public function getParcels() } /** + *Address to which Parcels are delivered.
+ * * @return null|Address */ @@ -129,7 +134,7 @@ public function getAddress() } /** - *Custom Fields for the Transaction.
+ *Custom Fields of the Delivery.
* * @return null|CustomFields diff --git a/lib/commercetools-api/src/Models/Order/DeliveryDraft.php b/lib/commercetools-api/src/Models/Order/DeliveryDraft.php index b1eb02f7cc1..91d12c26e22 100644 --- a/lib/commercetools-api/src/Models/Order/DeliveryDraft.php +++ b/lib/commercetools-api/src/Models/Order/DeliveryDraft.php @@ -30,8 +30,8 @@ interface DeliveryDraft extends JsonObject public function getKey(); /** - *Items which are shipped in this delivery regardless their distribution over several parcels. - * Can also be specified individually for each Parcel.
+ *Line Items or Custom Line Items to deliver. + * It can also be specified individually for each Parcel.
* * @return null|DeliveryItemCollection @@ -39,19 +39,23 @@ public function getKey(); public function getItems(); /** + *Information regarding the appearance, content, and shipment of a parcel.
+ * * @return null|ParcelDraftCollection */ public function getParcels(); /** + *Address to which the Parcels are delivered.
+ * * @return null|AddressDraft */ public function getAddress(); /** - *Custom Fields for the Transaction.
+ *Custom Fields for the Delivery.
* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Order/DeliveryDraftBuilder.php b/lib/commercetools-api/src/Models/Order/DeliveryDraftBuilder.php index 9e0920b84c5..82e317a6568 100644 --- a/lib/commercetools-api/src/Models/Order/DeliveryDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Order/DeliveryDraftBuilder.php @@ -66,8 +66,8 @@ public function getKey() } /** - *Items which are shipped in this delivery regardless their distribution over several parcels. - * Can also be specified individually for each Parcel.
+ *Line Items or Custom Line Items to deliver. + * It can also be specified individually for each Parcel.
* * @return null|DeliveryItemCollection @@ -78,6 +78,8 @@ public function getItems() } /** + *Information regarding the appearance, content, and shipment of a parcel.
+ * * @return null|ParcelDraftCollection */ @@ -87,6 +89,8 @@ public function getParcels() } /** + *Address to which the Parcels are delivered.
+ * * @return null|AddressDraft */ @@ -96,7 +100,7 @@ public function getAddress() } /** - *Custom Fields for the Transaction.
+ *Custom Fields for the Delivery.
* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Order/DeliveryDraftModel.php b/lib/commercetools-api/src/Models/Order/DeliveryDraftModel.php index d80ae8fe1cf..058194c4d91 100644 --- a/lib/commercetools-api/src/Models/Order/DeliveryDraftModel.php +++ b/lib/commercetools-api/src/Models/Order/DeliveryDraftModel.php @@ -92,8 +92,8 @@ public function getKey() } /** - *Items which are shipped in this delivery regardless their distribution over several parcels. - * Can also be specified individually for each Parcel.
+ *Line Items or Custom Line Items to deliver. + * It can also be specified individually for each Parcel.
* * * @return null|DeliveryItemCollection @@ -113,6 +113,8 @@ public function getItems() } /** + *Information regarding the appearance, content, and shipment of a parcel.
+ * * * @return null|ParcelDraftCollection */ @@ -131,6 +133,8 @@ public function getParcels() } /** + *Address to which the Parcels are delivered.
+ * * * @return null|AddressDraft */ @@ -150,7 +154,7 @@ public function getAddress() } /** - *Custom Fields for the Transaction.
+ *Custom Fields for the Delivery.
* * * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Order/DeliveryItem.php b/lib/commercetools-api/src/Models/Order/DeliveryItem.php index fe83e620b1e..1a20b89cc40 100644 --- a/lib/commercetools-api/src/Models/Order/DeliveryItem.php +++ b/lib/commercetools-api/src/Models/Order/DeliveryItem.php @@ -17,7 +17,7 @@ interface DeliveryItem extends JsonObject public const FIELD_QUANTITY = 'quantity'; /** - *Unique identifier of the DeliveryItem.
+ *id
of the LineItem or CustomLineItem delivered.
Number of Line Items or Custom Line Items delivered.
+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Order/DeliveryItemBuilder.php b/lib/commercetools-api/src/Models/Order/DeliveryItemBuilder.php index 3dbc7f4be75..4f0312e6a1d 100644 --- a/lib/commercetools-api/src/Models/Order/DeliveryItemBuilder.php +++ b/lib/commercetools-api/src/Models/Order/DeliveryItemBuilder.php @@ -33,7 +33,7 @@ final class DeliveryItemBuilder implements Builder private $quantity; /** - *Unique identifier of the DeliveryItem.
+ *id
of the LineItem or CustomLineItem delivered.
Number of Line Items or Custom Line Items delivered.
+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Order/DeliveryItemModel.php b/lib/commercetools-api/src/Models/Order/DeliveryItemModel.php index 3af065f3238..1ef11e08b2e 100644 --- a/lib/commercetools-api/src/Models/Order/DeliveryItemModel.php +++ b/lib/commercetools-api/src/Models/Order/DeliveryItemModel.php @@ -44,7 +44,7 @@ public function __construct( } /** - *Unique identifier of the DeliveryItem.
+ *id
of the LineItem or CustomLineItem delivered.
Number of Line Items or Custom Line Items delivered.
+ * * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Order/DeliveryModel.php b/lib/commercetools-api/src/Models/Order/DeliveryModel.php index 4a4265cb417..cb41cffe397 100644 --- a/lib/commercetools-api/src/Models/Order/DeliveryModel.php +++ b/lib/commercetools-api/src/Models/Order/DeliveryModel.php @@ -129,6 +129,8 @@ public function getKey() } /** + *Date and time (UTC) the Delivery was created.
+ * * * @return null|DateTimeImmutable */ @@ -151,8 +153,7 @@ public function getCreatedAt() } /** - *Items which are shipped in this delivery regardless their distribution over several parcels. - * Can also be specified individually for each Parcel.
+ *Line Items or Custom Line Items that are delivered.
* * * @return null|DeliveryItemCollection @@ -172,6 +173,8 @@ public function getItems() } /** + *Information regarding the appearance, content, and shipment of a Parcel.
+ * * * @return null|ParcelCollection */ @@ -190,6 +193,8 @@ public function getParcels() } /** + *Address to which Parcels are delivered.
+ * * * @return null|Address */ @@ -209,7 +214,7 @@ public function getAddress() } /** - *Custom Fields for the Transaction.
+ *Custom Fields of the Delivery.
* * * @return null|CustomFields diff --git a/lib/commercetools-api/src/Models/Order/ItemState.php b/lib/commercetools-api/src/Models/Order/ItemState.php index 67679ac8791..c698dd48b71 100644 --- a/lib/commercetools-api/src/Models/Order/ItemState.php +++ b/lib/commercetools-api/src/Models/Order/ItemState.php @@ -18,12 +18,16 @@ interface ItemState extends JsonObject public const FIELD_STATE = 'state'; /** + *Number of Line Items or Custom Line Items in this State.
+ * * @return null|int */ public function getQuantity(); /** + *State of the Line Items or Custom Line Items in a custom workflow.
+ * * @return null|StateReference */ diff --git a/lib/commercetools-api/src/Models/Order/ItemStateBuilder.php b/lib/commercetools-api/src/Models/Order/ItemStateBuilder.php index 4d815a386ec..6a93807ea1e 100644 --- a/lib/commercetools-api/src/Models/Order/ItemStateBuilder.php +++ b/lib/commercetools-api/src/Models/Order/ItemStateBuilder.php @@ -35,6 +35,8 @@ final class ItemStateBuilder implements Builder private $state; /** + *Number of Line Items or Custom Line Items in this State.
+ * * @return null|int */ @@ -44,6 +46,8 @@ public function getQuantity() } /** + *State of the Line Items or Custom Line Items in a custom workflow.
+ * * @return null|StateReference */ diff --git a/lib/commercetools-api/src/Models/Order/ItemStateModel.php b/lib/commercetools-api/src/Models/Order/ItemStateModel.php index 136c7ac8daf..6b3bd8e6f6a 100644 --- a/lib/commercetools-api/src/Models/Order/ItemStateModel.php +++ b/lib/commercetools-api/src/Models/Order/ItemStateModel.php @@ -46,6 +46,8 @@ public function __construct( } /** + *Number of Line Items or Custom Line Items in this State.
+ * * * @return null|int */ @@ -64,6 +66,8 @@ public function getQuantity() } /** + *State of the Line Items or Custom Line Items in a custom workflow.
+ * * * @return null|StateReference */ diff --git a/lib/commercetools-api/src/Models/Order/LineItemReturnItem.php b/lib/commercetools-api/src/Models/Order/LineItemReturnItem.php index f518b92d60e..15885ab9042 100644 --- a/lib/commercetools-api/src/Models/Order/LineItemReturnItem.php +++ b/lib/commercetools-api/src/Models/Order/LineItemReturnItem.php @@ -16,13 +16,28 @@ interface LineItemReturnItem extends ReturnItem public const FIELD_LINE_ITEM_ID = 'lineItemId'; /** + *id
of the returned LineItem.
Number of Line Items returned.
+ * + + * @return null|int + */ + public function getQuantity(); + /** * @param ?string $lineItemId */ public function setLineItemId(?string $lineItemId): void; + + /** + * @param ?int $quantity + */ + public function setQuantity(?int $quantity): void; } diff --git a/lib/commercetools-api/src/Models/Order/LineItemReturnItemBuilder.php b/lib/commercetools-api/src/Models/Order/LineItemReturnItemBuilder.php index ab4d19437b6..2afdad95ba2 100644 --- a/lib/commercetools-api/src/Models/Order/LineItemReturnItemBuilder.php +++ b/lib/commercetools-api/src/Models/Order/LineItemReturnItemBuilder.php @@ -78,7 +78,7 @@ final class LineItemReturnItemBuilder implements Builder private $lineItemId; /** - *Unique identifier of the ReturnItem.
+ *Unique identifier of the Return Item.
* * @return null|string @@ -89,6 +89,8 @@ public function getId() } /** + *Number of Line Items returned.
+ * * @return null|int */ @@ -98,6 +100,8 @@ public function getQuantity() } /** + *User-defined description for the return.
+ * * @return null|string */ @@ -107,6 +111,8 @@ public function getComment() } /** + *Shipment status of the Return Item.
+ * * @return null|string */ @@ -116,6 +122,12 @@ public function getShipmentState() } /** + *Payment status of the Return Item:
+ *NonRefundable
, for items in the Advised
ReturnShipmentStateInitial
, for items in the Returned
ReturnShipmentStateCustom Fields of this return item.
+ *Custom Fields of the Return Item.
* * @return null|CustomFields @@ -136,6 +148,8 @@ public function getCustom() } /** + *Date and time (UTC) the Return Item was last updated.
+ * * @return null|DateTimeImmutable */ @@ -145,6 +159,8 @@ public function getLastModifiedAt() } /** + *Date and time (UTC) the Return Item was intitially created.
+ * * @return null|DateTimeImmutable */ @@ -154,6 +170,8 @@ public function getCreatedAt() } /** + *id
of the returned LineItem.
Unique identifier of the ReturnItem.
+ *Unique identifier of the Return Item.
* * * @return null|string @@ -132,6 +132,8 @@ public function getId() } /** + *Number of Line Items returned.
+ * * * @return null|int */ @@ -168,6 +170,8 @@ public function getType() } /** + *User-defined description for the return.
+ * * * @return null|string */ @@ -186,6 +190,8 @@ public function getComment() } /** + *Shipment status of the Return Item.
+ * * * @return null|string */ @@ -204,6 +210,12 @@ public function getShipmentState() } /** + *Payment status of the Return Item:
+ *NonRefundable
, for items in the Advised
ReturnShipmentStateInitial
, for items in the Returned
ReturnShipmentStateCustom Fields of this return item.
+ *Custom Fields of the Return Item.
* * * @return null|CustomFields @@ -243,6 +255,8 @@ public function getCustom() } /** + *Date and time (UTC) the Return Item was last updated.
+ * * * @return null|DateTimeImmutable */ @@ -265,6 +279,8 @@ public function getLastModifiedAt() } /** + *Date and time (UTC) the Return Item was intitially created.
+ * * * @return null|DateTimeImmutable */ @@ -287,6 +303,8 @@ public function getCreatedAt() } /** + *id
of the returned LineItem.
Unique identifier of the Order.
@@ -91,7 +93,7 @@ interface Order extends BaseResource public function getId(); /** - *The current version of the order.
+ *Current version of the Order.
* * @return null|int @@ -99,66 +101,49 @@ public function getId(); public function getVersion(); /** - - * @return null|DateTimeImmutable - */ - public function getCreatedAt(); - - /** - - * @return null|DateTimeImmutable - */ - public function getLastModifiedAt(); - - /** - *Present on resources created after 1 February 2019 except for events not tracked.
+ *User-defined identifier of the Order that is unique across a Project.
* - * @return null|LastModifiedBy - */ - public function getLastModifiedBy(); - - /** - *Present on resources created after 1 February 2019 except for events not tracked.
- * - - * @return null|CreatedBy + * @return null|string */ - public function getCreatedBy(); + public function getOrderNumber(); /** - *This field will only be present if it was set for Order Import
+ *User-defined identifier of a purchase Order.
+ *It is typically set by the Buyer and can be used with Quotes to track the purchase Order during the quote and order flow.
* - * @return null|DateTimeImmutable + * @return null|string */ - public function getCompletedAt(); + public function getPurchaseOrderNumber(); /** - *String that uniquely identifies an order. - * It can be used to create more human-readable (in contrast to ID) identifier for the order. - * It should be unique across a project. - * Once it's set it cannot be changed.
+ *id
of the Customer that the Order belongs to.
Email address of the Customer that the Order belongs to.
+ * * @return null|string */ - public function getCustomerId(); + public function getCustomerEmail(); /** + *Reference to the Customer Group of the Customer that the Order belongs to. + * Used for LineItem Price selection.
+ * - * @return null|string + * @return null|CustomerGroupReference */ - public function getCustomerEmail(); + public function getCustomerGroup(); /** - *Identifies carts and orders belonging to an anonymous session (the customer has not signed up/in yet).
+ *Anonymous session associated with the Order.
* * @return null|string @@ -166,7 +151,7 @@ public function getCustomerEmail(); public function getAnonymousId(); /** - *The Business Unit the Order belongs to.
+ *Reference to a Business Unit the Order belongs to.
* * @return null|BusinessUnitKeyReference @@ -174,31 +159,43 @@ public function getAnonymousId(); public function getBusinessUnit(); /** + *Reference to a Store the Order belongs to.
+ * * @return null|StoreKeyReference */ public function getStore(); /** + *Line Items that are part of the Order.
+ * * @return null|LineItemCollection */ public function getLineItems(); /** + *Custom Line Items that are part of the Order.
+ * * @return null|CustomLineItemCollection */ public function getCustomLineItems(); /** + *Sum of the totalPrice
field of all LineItems and CustomLineItems, and if available, the price
field of ShippingInfo.
+ * Taxes are included if TaxRate includedInPrice
is true
for each price.
The taxes are calculated based on the shipping address.
+ *Platform
TaxMode, it is automatically set when a shipping address is set.External
TaxMode, it is automatically set when the external Tax Rate for all Line Items, Custom Line Items, and Shipping Methods in the Cart are set.Sum of taxedPrice
of ShippingInfo across all Shipping Methods.
- * For Platform
TaxMode, it is set automatically only if shipping address is set or Shipping Method is added to the Cart.
Sum of the taxedPrice
field of ShippingInfo across all Shipping Methods.
Holds all shipping-related information per Shipping Method.
- *For Multiple
ShippingMode, it is updated automatically after the Shipping Methods are added.
Indicates how Tax Rates are set.
* - * @return null|Address + * @return null|string */ - public function getShippingAddress(); + public function getTaxMode(); /** + *Indicates how monetary values are rounded when calculating taxes for taxedPrice
.
Indicates whether one or multiple Shipping Methods are added to the Cart.
+ *Indicates how taxes are calculated when calculating taxes for taxedPrice
.
key
of the ShippingMethod for Single
ShippingMode.
Indicates how stock quantities are tracked for Line Items in the Order.
* * @return null|string */ - public function getShippingKey(); + public function getInventoryMode(); /** - *Custom Fields of the Shipping Method for Single
ShippingMode.
Billing address associated with the Order.
* - * @return null|CustomFields + * @return null|Address */ - public function getShippingCustomFields(); + public function getBillingAddress(); /** - *Holds all shipping-related information per Shipping Method for Multiple
ShippingMode.
It is updated automatically after the Shipping Method is added.
+ *Shipping address associated with the Order. + * Determines eligible ShippingMethod rates and Tax Rates of Line Items.
* - * @return null|ShippingCollection + * @return null|Address */ - public function getShipping(); + public function getShippingAddress(); /** + *Indicates whether there can be one or multiple Shipping Methods.
+ * * @return null|string */ - public function getTaxMode(); + public function getShippingMode(); /** - *When calculating taxes for taxedPrice
, the selected mode is used for rouding.
key
of the ShippingMethod for Single
ShippingMode.
Set when the customer is set and the customer is a member of a customer group. - * Used for product variant price selection.
+ *Shipping-related information for Single
ShippingMode.
+ * Automatically set when a Shipping Method is set.
A two-digit country code as per ISO 3166-1 alpha-2. - * Used for product variant price selection.
+ *Input used to select a ShippingRatePriceTier.
+ * The data type of this field depends on the shippingRateInputType.type
configured in the Project:
CartClassification
, it is ClassificationShippingRateInput.CartScore
, it is ScoreShippingRateInput.CartValue
, it cannot be used.One of the four predefined OrderStates.
+ *Custom Fields of the Shipping Method for Single
ShippingMode.
This reference can point to a state in a custom workflow.
+ *Shipping-related information for Multiple
ShippingMode.
+ * Updated automatically each time a new Shipping Method is added.
Additional shipping addresses of the Order as specified by LineItems using the shippingDetails
field.
+ * Eligible Shipping Methods or applicable Tax Rates are determined by the address in shippingAddress
, and not itemShippingAddresses
.
Discount Codes added to the Order.
+ * An Order that has directDiscounts
cannot have discountCodes
.
Set if the ShippingMethod is set.
+ *Direct Discounts added to the Order.
+ * An Order that has discountCodes
cannot have directDiscounts
.
Automatically set when a Line Item with GiftLineItem
LineItemMode is removed from the Order.
Payment information related to the Order.
+ * - * @return null|ReturnInfoCollection + * @return null|PaymentInfo */ - public function getReturnInfo(); + public function getPaymentInfo(); /** - *The Purchase Order Number is typically set by the Buyer on a QuoteRequest to - * track the purchase order during the quote and order flow.
+ *Used for LineItem Price selection.
* * @return null|string */ - public function getPurchaseOrderNumber(); + public function getCountry(); /** + *Languages of the Order. + * Can only contain languages supported by the Project.
+ * - * @return null|DiscountCodeInfoCollection + * @return null|string */ - public function getDiscountCodes(); + public function getLocale(); /** - *Internal-only field.
+ *Indicates the origin of the Cart from which the Order was created.
* - * @deprecated - * @return null|int + + * @return null|string */ - public function getLastMessageSequenceNumber(); + public function getOrigin(); /** - *Set when this order was created from a cart.
- * The cart will have the state Ordered
.
Reference to the Cart for an Order created from Cart.
+ * The referenced Cart will have the Ordered
CartState.
Set when this order was created from a quote.
+ *Reference to the Quote for an Order created from Quote.
* * @return null|QuoteReference @@ -383,113 +401,132 @@ public function getCart(); public function getQuote(); /** + *Current status of the Order.
+ * - * @return null|CustomFields + * @return null|string */ - public function getCustom(); + public function getOrderState(); /** + *Shipment status of the Order.
+ * - * @return null|PaymentInfo + * @return null|string */ - public function getPaymentInfo(); + public function getShipmentState(); /** + *Payment status of the Order.
+ * * @return null|string */ - public function getLocale(); + public function getPaymentState(); /** + *State of the Order. + * This reference can point to a State in a custom workflow.
+ * - * @return null|string + * @return null|StateReference */ - public function getInventoryMode(); + public function getState(); /** + *Contains synchronization activity information of the Order (like export or import). + * Can only be set with Update SyncInfo update action.
+ * - * @return null|string + * @return null|SyncInfoCollection */ - public function getOrigin(); + public function getSyncInfo(); /** - *When calculating taxes for taxedPrice
, the selected mode is used for calculating the price with LineItemLevel (horizontally) or UnitPriceLevel (vertically) calculation mode.
Contains information regarding the returns associated with the Order.
* - * @return null|string + * @return null|ReturnInfoCollection */ - public function getTaxCalculationMode(); + public function getReturnInfo(); /** - *Input used to select a ShippingRatePriceTier.
- * The data type of this field depends on the shippingRateInputType.type
configured in the Project:
CartClassification
, it is ClassificationShippingRateInput.CartScore
, it is ScoreShippingRateInput.CartValue
, it cannot be used.Internal-only field.
* - - * @return null|ShippingRateInput + * @deprecated + * @return null|int */ - public function getShippingRateInput(); + public function getLastMessageSequenceNumber(); /** - *Contains addresses for orders with multiple shipping addresses.
+ *Custom Fields of the Order.
* - * @return null|AddressCollection + * @return null|CustomFields */ - public function getItemShippingAddresses(); + public function getCustom(); /** - *Automatically filled when a line item with LineItemMode GiftLineItem
is removed from this order.
User-defined date and time (UTC) of the Order. + * Present only on an Order created using Order Import.
* - * @return null|CartDiscountReferenceCollection + * @return null|DateTimeImmutable */ - public function getRefusedGifts(); + public function getCompletedAt(); /** - * @param ?string $id - */ - public function setId(?string $id): void; + *Date and time (UTC) the Order was initially created.
+ * - /** - * @param ?int $version + * @return null|DateTimeImmutable */ - public function setVersion(?int $version): void; + public function getCreatedAt(); /** - * @param ?DateTimeImmutable $createdAt + *Date and time (UTC) the Order was last updated.
+ * + + * @return null|DateTimeImmutable */ - public function setCreatedAt(?DateTimeImmutable $createdAt): void; + public function getLastModifiedAt(); /** - * @param ?DateTimeImmutable $lastModifiedAt + *Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|LastModifiedBy */ - public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void; + public function getLastModifiedBy(); /** - * @param ?LastModifiedBy $lastModifiedBy + *Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy */ - public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void; + public function getCreatedBy(); /** - * @param ?CreatedBy $createdBy + * @param ?string $id */ - public function setCreatedBy(?CreatedBy $createdBy): void; + public function setId(?string $id): void; /** - * @param ?DateTimeImmutable $completedAt + * @param ?int $version */ - public function setCompletedAt(?DateTimeImmutable $completedAt): void; + public function setVersion(?int $version): void; /** * @param ?string $orderNumber */ public function setOrderNumber(?string $orderNumber): void; + /** + * @param ?string $purchaseOrderNumber + */ + public function setPurchaseOrderNumber(?string $purchaseOrderNumber): void; + /** * @param ?string $customerId */ @@ -500,6 +537,11 @@ public function setCustomerId(?string $customerId): void; */ public function setCustomerEmail(?string $customerEmail): void; + /** + * @param ?CustomerGroupReference $customerGroup + */ + public function setCustomerGroup(?CustomerGroupReference $customerGroup): void; + /** * @param ?string $anonymousId */ @@ -541,15 +583,35 @@ public function setTaxedPrice(?TaxedPrice $taxedPrice): void; public function setTaxedShippingPrice(?TaxedPrice $taxedShippingPrice): void; /** - * @param ?Address $shippingAddress + * @param ?string $taxMode */ - public function setShippingAddress(?Address $shippingAddress): void; + public function setTaxMode(?string $taxMode): void; + + /** + * @param ?string $taxRoundingMode + */ + public function setTaxRoundingMode(?string $taxRoundingMode): void; + + /** + * @param ?string $taxCalculationMode + */ + public function setTaxCalculationMode(?string $taxCalculationMode): void; + + /** + * @param ?string $inventoryMode + */ + public function setInventoryMode(?string $inventoryMode): void; /** * @param ?Address $billingAddress */ public function setBillingAddress(?Address $billingAddress): void; + /** + * @param ?Address $shippingAddress + */ + public function setShippingAddress(?Address $shippingAddress): void; + /** * @param ?string $shippingMode */ @@ -561,137 +623,137 @@ public function setShippingMode(?string $shippingMode): void; public function setShippingKey(?string $shippingKey): void; /** - * @param ?CustomFields $shippingCustomFields + * @param ?ShippingInfo $shippingInfo */ - public function setShippingCustomFields(?CustomFields $shippingCustomFields): void; + public function setShippingInfo(?ShippingInfo $shippingInfo): void; /** - * @param ?ShippingCollection $shipping + * @param ?ShippingRateInput $shippingRateInput */ - public function setShipping(?ShippingCollection $shipping): void; + public function setShippingRateInput(?ShippingRateInput $shippingRateInput): void; /** - * @param ?string $taxMode + * @param ?CustomFields $shippingCustomFields */ - public function setTaxMode(?string $taxMode): void; + public function setShippingCustomFields(?CustomFields $shippingCustomFields): void; /** - * @param ?string $taxRoundingMode + * @param ?ShippingCollection $shipping */ - public function setTaxRoundingMode(?string $taxRoundingMode): void; + public function setShipping(?ShippingCollection $shipping): void; /** - * @param ?CustomerGroupReference $customerGroup + * @param ?AddressCollection $itemShippingAddresses */ - public function setCustomerGroup(?CustomerGroupReference $customerGroup): void; + public function setItemShippingAddresses(?AddressCollection $itemShippingAddresses): void; /** - * @param ?string $country + * @param ?DiscountCodeInfoCollection $discountCodes */ - public function setCountry(?string $country): void; + public function setDiscountCodes(?DiscountCodeInfoCollection $discountCodes): void; /** - * @param ?string $orderState + * @param ?DirectDiscountCollection $directDiscounts */ - public function setOrderState(?string $orderState): void; + public function setDirectDiscounts(?DirectDiscountCollection $directDiscounts): void; /** - * @param ?StateReference $state + * @param ?CartDiscountReferenceCollection $refusedGifts */ - public function setState(?StateReference $state): void; + public function setRefusedGifts(?CartDiscountReferenceCollection $refusedGifts): void; /** - * @param ?string $shipmentState + * @param ?PaymentInfo $paymentInfo */ - public function setShipmentState(?string $shipmentState): void; + public function setPaymentInfo(?PaymentInfo $paymentInfo): void; /** - * @param ?string $paymentState + * @param ?string $country */ - public function setPaymentState(?string $paymentState): void; + public function setCountry(?string $country): void; /** - * @param ?ShippingInfo $shippingInfo + * @param ?string $locale */ - public function setShippingInfo(?ShippingInfo $shippingInfo): void; + public function setLocale(?string $locale): void; /** - * @param ?SyncInfoCollection $syncInfo + * @param ?string $origin */ - public function setSyncInfo(?SyncInfoCollection $syncInfo): void; + public function setOrigin(?string $origin): void; /** - * @param ?ReturnInfoCollection $returnInfo + * @param ?CartReference $cart */ - public function setReturnInfo(?ReturnInfoCollection $returnInfo): void; + public function setCart(?CartReference $cart): void; /** - * @param ?string $purchaseOrderNumber + * @param ?QuoteReference $quote */ - public function setPurchaseOrderNumber(?string $purchaseOrderNumber): void; + public function setQuote(?QuoteReference $quote): void; /** - * @param ?DiscountCodeInfoCollection $discountCodes + * @param ?string $orderState */ - public function setDiscountCodes(?DiscountCodeInfoCollection $discountCodes): void; + public function setOrderState(?string $orderState): void; /** - * @param ?int $lastMessageSequenceNumber + * @param ?string $shipmentState */ - public function setLastMessageSequenceNumber(?int $lastMessageSequenceNumber): void; + public function setShipmentState(?string $shipmentState): void; /** - * @param ?CartReference $cart + * @param ?string $paymentState */ - public function setCart(?CartReference $cart): void; + public function setPaymentState(?string $paymentState): void; /** - * @param ?QuoteReference $quote + * @param ?StateReference $state */ - public function setQuote(?QuoteReference $quote): void; + public function setState(?StateReference $state): void; /** - * @param ?CustomFields $custom + * @param ?SyncInfoCollection $syncInfo */ - public function setCustom(?CustomFields $custom): void; + public function setSyncInfo(?SyncInfoCollection $syncInfo): void; /** - * @param ?PaymentInfo $paymentInfo + * @param ?ReturnInfoCollection $returnInfo */ - public function setPaymentInfo(?PaymentInfo $paymentInfo): void; + public function setReturnInfo(?ReturnInfoCollection $returnInfo): void; /** - * @param ?string $locale + * @param ?int $lastMessageSequenceNumber */ - public function setLocale(?string $locale): void; + public function setLastMessageSequenceNumber(?int $lastMessageSequenceNumber): void; /** - * @param ?string $inventoryMode + * @param ?CustomFields $custom */ - public function setInventoryMode(?string $inventoryMode): void; + public function setCustom(?CustomFields $custom): void; /** - * @param ?string $origin + * @param ?DateTimeImmutable $completedAt */ - public function setOrigin(?string $origin): void; + public function setCompletedAt(?DateTimeImmutable $completedAt): void; /** - * @param ?string $taxCalculationMode + * @param ?DateTimeImmutable $createdAt */ - public function setTaxCalculationMode(?string $taxCalculationMode): void; + public function setCreatedAt(?DateTimeImmutable $createdAt): void; /** - * @param ?ShippingRateInput $shippingRateInput + * @param ?DateTimeImmutable $lastModifiedAt */ - public function setShippingRateInput(?ShippingRateInput $shippingRateInput): void; + public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void; /** - * @param ?AddressCollection $itemShippingAddresses + * @param ?LastModifiedBy $lastModifiedBy */ - public function setItemShippingAddresses(?AddressCollection $itemShippingAddresses): void; + public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void; /** - * @param ?CartDiscountReferenceCollection $refusedGifts + * @param ?CreatedBy $createdBy */ - public function setRefusedGifts(?CartDiscountReferenceCollection $refusedGifts): void; + public function setCreatedBy(?CreatedBy $createdBy): void; } diff --git a/lib/commercetools-api/src/Models/Order/OrderAddDeliveryAction.php b/lib/commercetools-api/src/Models/Order/OrderAddDeliveryAction.php index e738da8777b..caac18eb16e 100644 --- a/lib/commercetools-api/src/Models/Order/OrderAddDeliveryAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderAddDeliveryAction.php @@ -16,14 +16,14 @@ interface OrderAddDeliveryAction extends OrderUpdateAction { public const FIELD_DELIVERY_KEY = 'deliveryKey'; - public const FIELD_ITEMS = 'items'; public const FIELD_SHIPPING_KEY = 'shippingKey'; + public const FIELD_ITEMS = 'items'; public const FIELD_ADDRESS = 'address'; public const FIELD_PARCELS = 'parcels'; public const FIELD_CUSTOM = 'custom'; /** - *User-defined unique identifier of a Delivery.
+ *key
of an existing Delivery.
key
of the ShippingMethod, required for Multiple
ShippingMode.
key
of the ShippingMethod, required for Multiple
ShippingMode.
Line Items or Custom Line Items to be included in the Delivery.
* - * @return null|string + * @return null|DeliveryItemCollection */ - public function getShippingKey(); + public function getItems(); /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Address the parcels
should be delivered to.
Parcels of the Delivery.
+ *If provided, this update action produces the Parcel Added To Delivery Message.
+ * * @return null|ParcelDraftCollection */ public function getParcels(); /** - *Custom Fields for the Transaction.
+ *Custom Fields for the Delivery.
* * @return null|CustomFieldsDraft @@ -74,14 +77,14 @@ public function getCustom(); public function setDeliveryKey(?string $deliveryKey): void; /** - * @param ?DeliveryItemCollection $items + * @param ?string $shippingKey */ - public function setItems(?DeliveryItemCollection $items): void; + public function setShippingKey(?string $shippingKey): void; /** - * @param ?string $shippingKey + * @param ?DeliveryItemCollection $items */ - public function setShippingKey(?string $shippingKey): void; + public function setItems(?DeliveryItemCollection $items): void; /** * @param ?BaseAddress $address diff --git a/lib/commercetools-api/src/Models/Order/OrderAddDeliveryActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderAddDeliveryActionBuilder.php index fc8b3a85101..7ff6903dfc6 100644 --- a/lib/commercetools-api/src/Models/Order/OrderAddDeliveryActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderAddDeliveryActionBuilder.php @@ -32,15 +32,15 @@ final class OrderAddDeliveryActionBuilder implements Builder /** - * @var ?DeliveryItemCollection + * @var ?string */ - private $items; + private $shippingKey; /** - * @var ?string + * @var ?DeliveryItemCollection */ - private $shippingKey; + private $items; /** @@ -61,7 +61,7 @@ final class OrderAddDeliveryActionBuilder implements Builder private $custom; /** - *User-defined unique identifier of a Delivery.
+ *key
of an existing Delivery.
key
of the ShippingMethod, required for Multiple
ShippingMode.
key
of the ShippingMethod, required for Multiple
ShippingMode.
Line Items or Custom Line Items to be included in the Delivery.
* - * @return null|string + * @return null|DeliveryItemCollection */ - public function getShippingKey() + public function getItems() { - return $this->shippingKey; + return $this->items; } /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Address the parcels
should be delivered to.
Parcels of the Delivery.
+ *If provided, this update action produces the Parcel Added To Delivery Message.
+ * * @return null|ParcelDraftCollection */ @@ -114,7 +117,7 @@ public function getParcels() } /** - *Custom Fields for the Transaction.
+ *Custom Fields for the Delivery.
* * @return null|CustomFieldsDraft @@ -136,23 +139,23 @@ public function withDeliveryKey(?string $deliveryKey) } /** - * @param ?DeliveryItemCollection $items + * @param ?string $shippingKey * @return $this */ - public function withItems(?DeliveryItemCollection $items) + public function withShippingKey(?string $shippingKey) { - $this->items = $items; + $this->shippingKey = $shippingKey; return $this; } /** - * @param ?string $shippingKey + * @param ?DeliveryItemCollection $items * @return $this */ - public function withShippingKey(?string $shippingKey) + public function withItems(?DeliveryItemCollection $items) { - $this->shippingKey = $shippingKey; + $this->items = $items; return $this; } @@ -216,8 +219,8 @@ public function build(): OrderAddDeliveryAction { return new OrderAddDeliveryActionModel( $this->deliveryKey, - $this->items, $this->shippingKey, + $this->items, $this->address instanceof BaseAddressBuilder ? $this->address->build() : $this->address, $this->parcels, $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom diff --git a/lib/commercetools-api/src/Models/Order/OrderAddDeliveryActionModel.php b/lib/commercetools-api/src/Models/Order/OrderAddDeliveryActionModel.php index d5441f4eb33..772cabcb405 100644 --- a/lib/commercetools-api/src/Models/Order/OrderAddDeliveryActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderAddDeliveryActionModel.php @@ -38,15 +38,15 @@ final class OrderAddDeliveryActionModel extends JsonObjectModel implements Order /** * - * @var ?DeliveryItemCollection + * @var ?string */ - protected $items; + protected $shippingKey; /** * - * @var ?string + * @var ?DeliveryItemCollection */ - protected $shippingKey; + protected $items; /** * @@ -72,16 +72,16 @@ final class OrderAddDeliveryActionModel extends JsonObjectModel implements Order */ public function __construct( ?string $deliveryKey = null, - ?DeliveryItemCollection $items = null, ?string $shippingKey = null, + ?DeliveryItemCollection $items = null, ?BaseAddress $address = null, ?ParcelDraftCollection $parcels = null, ?CustomFieldsDraft $custom = null, ?string $action = null ) { $this->deliveryKey = $deliveryKey; - $this->items = $items; $this->shippingKey = $shippingKey; + $this->items = $items; $this->address = $address; $this->parcels = $parcels; $this->custom = $custom; @@ -107,7 +107,7 @@ public function getAction() } /** - *User-defined unique identifier of a Delivery.
+ *key
of an existing Delivery.
key
of the ShippingMethod, required for Multiple
ShippingMode.
key
of the ShippingMethod, required for Multiple
ShippingMode.
Line Items or Custom Line Items to be included in the Delivery.
* * - * @return null|string + * @return null|DeliveryItemCollection */ - public function getShippingKey() + public function getItems() { - if (is_null($this->shippingKey)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_SHIPPING_KEY); + if (is_null($this->items)) { + /** @psalm-var ?listPolymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Address the parcels
should be delivered to.
Parcels of the Delivery.
+ *If provided, this update action produces the Parcel Added To Delivery Message.
+ * * * @return null|ParcelDraftCollection */ @@ -206,7 +209,7 @@ public function getParcels() } /** - *Custom Fields for the Transaction.
+ *Custom Fields for the Delivery.
* * * @return null|CustomFieldsDraft @@ -236,19 +239,19 @@ public function setDeliveryKey(?string $deliveryKey): void } /** - * @param ?DeliveryItemCollection $items + * @param ?string $shippingKey */ - public function setItems(?DeliveryItemCollection $items): void + public function setShippingKey(?string $shippingKey): void { - $this->items = $items; + $this->shippingKey = $shippingKey; } /** - * @param ?string $shippingKey + * @param ?DeliveryItemCollection $items */ - public function setShippingKey(?string $shippingKey): void + public function setItems(?DeliveryItemCollection $items): void { - $this->shippingKey = $shippingKey; + $this->items = $items; } /** diff --git a/lib/commercetools-api/src/Models/Order/OrderAddItemShippingAddressAction.php b/lib/commercetools-api/src/Models/Order/OrderAddItemShippingAddressAction.php index 7f7d67059bd..d2b20eda2be 100644 --- a/lib/commercetools-api/src/Models/Order/OrderAddItemShippingAddressAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderAddItemShippingAddressAction.php @@ -17,9 +17,8 @@ interface OrderAddItemShippingAddressAction extends OrderUpdateAction public const FIELD_ADDRESS = 'address'; /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Address to append to itemShippingAddresses
.
+ * The new Address must have a key
that is unique across this Order.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Address to append to itemShippingAddresses
.
+ * The new Address must have a key
that is unique across this Order.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Address to append to itemShippingAddresses
.
+ * The new Address must have a key
that is unique across this Order.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
key
of an existing Parcel.
Value to set.
+ * * @return null|ParcelMeasurements */ public function getMeasurements(); /** + *Value to set.
+ * * @return null|TrackingData */ public function getTrackingData(); /** + *Value to set.
+ * * @return null|DeliveryItemCollection */ diff --git a/lib/commercetools-api/src/Models/Order/OrderAddParcelToDeliveryActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderAddParcelToDeliveryActionBuilder.php index d977cb46cc9..ad16aac6d01 100644 --- a/lib/commercetools-api/src/Models/Order/OrderAddParcelToDeliveryActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderAddParcelToDeliveryActionBuilder.php @@ -57,7 +57,8 @@ final class OrderAddParcelToDeliveryActionBuilder implements Builder private $items; /** - *Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
key
of an existing Parcel.
Value to set.
+ * * @return null|ParcelMeasurements */ @@ -97,6 +103,8 @@ public function getMeasurements() } /** + *Value to set.
+ * * @return null|TrackingData */ @@ -106,6 +114,8 @@ public function getTrackingData() } /** + *Value to set.
+ * * @return null|DeliveryItemCollection */ diff --git a/lib/commercetools-api/src/Models/Order/OrderAddParcelToDeliveryActionModel.php b/lib/commercetools-api/src/Models/Order/OrderAddParcelToDeliveryActionModel.php index 54a07e2bea3..8414fef9d02 100644 --- a/lib/commercetools-api/src/Models/Order/OrderAddParcelToDeliveryActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderAddParcelToDeliveryActionModel.php @@ -103,7 +103,8 @@ public function getAction() } /** - *Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
key
of an existing Parcel.
Value to set.
+ * * * @return null|ParcelMeasurements */ @@ -180,6 +186,8 @@ public function getMeasurements() } /** + *Value to set.
+ * * * @return null|TrackingData */ @@ -199,6 +207,8 @@ public function getTrackingData() } /** + *Value to set.
+ * * * @return null|DeliveryItemCollection */ diff --git a/lib/commercetools-api/src/Models/Order/OrderAddPaymentAction.php b/lib/commercetools-api/src/Models/Order/OrderAddPaymentAction.php index d56d582e8b5..75d0682c9b6 100644 --- a/lib/commercetools-api/src/Models/Order/OrderAddPaymentAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderAddPaymentAction.php @@ -17,7 +17,8 @@ interface OrderAddPaymentAction extends OrderUpdateAction public const FIELD_PAYMENT = 'payment'; /** - *ResourceIdentifier of a Payment.
+ *Payment to add to the PaymentInfo. + * Must not be assigned to another Order or active Cart already.
* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Order/OrderAddPaymentActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderAddPaymentActionBuilder.php index f5d3e04593b..27ad3d4d934 100644 --- a/lib/commercetools-api/src/Models/Order/OrderAddPaymentActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderAddPaymentActionBuilder.php @@ -29,7 +29,8 @@ final class OrderAddPaymentActionBuilder implements Builder private $payment; /** - *ResourceIdentifier of a Payment.
+ *Payment to add to the PaymentInfo. + * Must not be assigned to another Order or active Cart already.
* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Order/OrderAddPaymentActionModel.php b/lib/commercetools-api/src/Models/Order/OrderAddPaymentActionModel.php index 40576869b06..ad63898b217 100644 --- a/lib/commercetools-api/src/Models/Order/OrderAddPaymentActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderAddPaymentActionModel.php @@ -65,7 +65,8 @@ public function getAction() } /** - *ResourceIdentifier of a Payment.
+ *Payment to add to the PaymentInfo. + * Must not be assigned to another Order or active Cart already.
* * * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Order/OrderAddReturnInfoAction.php b/lib/commercetools-api/src/Models/Order/OrderAddReturnInfoAction.php index 1203124ac83..81be79dffe3 100644 --- a/lib/commercetools-api/src/Models/Order/OrderAddReturnInfoAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderAddReturnInfoAction.php @@ -19,18 +19,26 @@ interface OrderAddReturnInfoAction extends OrderUpdateAction public const FIELD_RETURN_DATE = 'returnDate'; /** + *Value to set.
+ * * @return null|string */ public function getReturnTrackingId(); /** + *Items to be returned. + * Must not be empty.
+ * * @return null|ReturnItemDraftCollection */ public function getItems(); /** + *Value to set. + * If not set, it defaults to the current date and time.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/OrderAddReturnInfoActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderAddReturnInfoActionBuilder.php index b556ce578aa..c757dfb422d 100644 --- a/lib/commercetools-api/src/Models/Order/OrderAddReturnInfoActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderAddReturnInfoActionBuilder.php @@ -40,6 +40,8 @@ final class OrderAddReturnInfoActionBuilder implements Builder private $returnDate; /** + *Value to set.
+ * * @return null|string */ @@ -49,6 +51,9 @@ public function getReturnTrackingId() } /** + *Items to be returned. + * Must not be empty.
+ * * @return null|ReturnItemDraftCollection */ @@ -58,6 +63,9 @@ public function getItems() } /** + *Value to set. + * If not set, it defaults to the current date and time.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/OrderAddReturnInfoActionModel.php b/lib/commercetools-api/src/Models/Order/OrderAddReturnInfoActionModel.php index 493b3083198..a848695a533 100644 --- a/lib/commercetools-api/src/Models/Order/OrderAddReturnInfoActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderAddReturnInfoActionModel.php @@ -80,6 +80,8 @@ public function getAction() } /** + *Value to set.
+ * * * @return null|string */ @@ -98,6 +100,9 @@ public function getReturnTrackingId() } /** + *Items to be returned. + * Must not be empty.
+ * * * @return null|ReturnItemDraftCollection */ @@ -116,6 +121,9 @@ public function getItems() } /** + *Value to set. + * If not set, it defaults to the current date and time.
+ * * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/OrderBuilder.php b/lib/commercetools-api/src/Models/Order/OrderBuilder.php index e5dc86f3a4f..5d48a925831 100644 --- a/lib/commercetools-api/src/Models/Order/OrderBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderBuilder.php @@ -13,6 +13,7 @@ use Commercetools\Api\Models\Cart\CartReference; use Commercetools\Api\Models\Cart\CartReferenceBuilder; use Commercetools\Api\Models\Cart\CustomLineItemCollection; +use Commercetools\Api\Models\Cart\DirectDiscountCollection; use Commercetools\Api\Models\Cart\DiscountCodeInfoCollection; use Commercetools\Api\Models\Cart\LineItemCollection; use Commercetools\Api\Models\Cart\ShippingCollection; @@ -85,39 +86,33 @@ final class OrderBuilder implements Builder /** - * @var null|LastModifiedBy|LastModifiedByBuilder - */ - private $lastModifiedBy; - - /** - - * @var null|CreatedBy|CreatedByBuilder + * @var ?string */ - private $createdBy; + private $orderNumber; /** - * @var ?DateTimeImmutable + * @var ?string */ - private $completedAt; + private $purchaseOrderNumber; /** * @var ?string */ - private $orderNumber; + private $customerId; /** * @var ?string */ - private $customerId; + private $customerEmail; /** - * @var ?string + * @var null|CustomerGroupReference|CustomerGroupReferenceBuilder */ - private $customerEmail; + private $customerGroup; /** @@ -169,123 +164,123 @@ final class OrderBuilder implements Builder /** - * @var null|Address|AddressBuilder + * @var ?string */ - private $shippingAddress; + private $taxMode; /** - * @var null|Address|AddressBuilder + * @var ?string */ - private $billingAddress; + private $taxRoundingMode; /** * @var ?string */ - private $shippingMode; + private $taxCalculationMode; /** * @var ?string */ - private $shippingKey; + private $inventoryMode; /** - * @var null|CustomFields|CustomFieldsBuilder + * @var null|Address|AddressBuilder */ - private $shippingCustomFields; + private $billingAddress; /** - * @var ?ShippingCollection + * @var null|Address|AddressBuilder */ - private $shipping; + private $shippingAddress; /** * @var ?string */ - private $taxMode; + private $shippingMode; /** * @var ?string */ - private $taxRoundingMode; + private $shippingKey; /** - * @var null|CustomerGroupReference|CustomerGroupReferenceBuilder + * @var null|ShippingInfo|ShippingInfoBuilder */ - private $customerGroup; + private $shippingInfo; /** - * @var ?string + * @var null|ShippingRateInput|ShippingRateInputBuilder */ - private $country; + private $shippingRateInput; /** - * @var ?string + * @var null|CustomFields|CustomFieldsBuilder */ - private $orderState; + private $shippingCustomFields; /** - * @var null|StateReference|StateReferenceBuilder + * @var ?ShippingCollection */ - private $state; + private $shipping; /** - * @var ?string + * @var ?AddressCollection */ - private $shipmentState; + private $itemShippingAddresses; /** - * @var ?string + * @var ?DiscountCodeInfoCollection */ - private $paymentState; + private $discountCodes; /** - * @var null|ShippingInfo|ShippingInfoBuilder + * @var ?DirectDiscountCollection */ - private $shippingInfo; + private $directDiscounts; /** - * @var ?SyncInfoCollection + * @var ?CartDiscountReferenceCollection */ - private $syncInfo; + private $refusedGifts; /** - * @var ?ReturnInfoCollection + * @var null|PaymentInfo|PaymentInfoBuilder */ - private $returnInfo; + private $paymentInfo; /** * @var ?string */ - private $purchaseOrderNumber; + private $country; /** - * @var ?DiscountCodeInfoCollection + * @var ?string */ - private $discountCodes; + private $locale; /** - * @deprecated - * @var ?int + + * @var ?string */ - private $lastMessageSequenceNumber; + private $origin; /** @@ -301,57 +296,69 @@ final class OrderBuilder implements Builder /** - * @var null|CustomFields|CustomFieldsBuilder + * @var ?string */ - private $custom; + private $orderState; /** - * @var null|PaymentInfo|PaymentInfoBuilder + * @var ?string */ - private $paymentInfo; + private $shipmentState; /** * @var ?string */ - private $locale; + private $paymentState; /** - * @var ?string + * @var null|StateReference|StateReferenceBuilder */ - private $inventoryMode; + private $state; /** - * @var ?string + * @var ?SyncInfoCollection */ - private $origin; + private $syncInfo; /** - * @var ?string + * @var ?ReturnInfoCollection */ - private $taxCalculationMode; + private $returnInfo; /** + * @deprecated + * @var ?int + */ + private $lastMessageSequenceNumber; - * @var null|ShippingRateInput|ShippingRateInputBuilder + /** + + * @var null|CustomFields|CustomFieldsBuilder */ - private $shippingRateInput; + private $custom; /** - * @var ?AddressCollection + * @var ?DateTimeImmutable */ - private $itemShippingAddresses; + private $completedAt; /** - * @var ?CartDiscountReferenceCollection + * @var null|LastModifiedBy|LastModifiedByBuilder */ - private $refusedGifts; + private $lastModifiedBy; + + /** + + * @var null|CreatedBy|CreatedByBuilder + */ + private $createdBy; /** *Unique identifier of the Order.
@@ -365,7 +372,7 @@ public function getId() } /** - *The current version of the order.
+ *Current version of the Order.
* * @return null|int @@ -376,6 +383,8 @@ public function getVersion() } /** + *Date and time (UTC) the Order was initially created.
+ * * @return null|DateTimeImmutable */ @@ -385,6 +394,8 @@ public function getCreatedAt() } /** + *Date and time (UTC) the Order was last updated.
+ * * @return null|DateTimeImmutable */ @@ -394,72 +405,64 @@ public function getLastModifiedAt() } /** - *Present on resources created after 1 February 2019 except for events not tracked.
- * - - * @return null|LastModifiedBy - */ - public function getLastModifiedBy() - { - return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy; - } - - /** - *Present on resources created after 1 February 2019 except for events not tracked.
+ *User-defined identifier of the Order that is unique across a Project.
* - * @return null|CreatedBy + * @return null|string */ - public function getCreatedBy() + public function getOrderNumber() { - return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + return $this->orderNumber; } /** - *This field will only be present if it was set for Order Import
+ *User-defined identifier of a purchase Order.
+ *It is typically set by the Buyer and can be used with Quotes to track the purchase Order during the quote and order flow.
* - * @return null|DateTimeImmutable + * @return null|string */ - public function getCompletedAt() + public function getPurchaseOrderNumber() { - return $this->completedAt; + return $this->purchaseOrderNumber; } /** - *String that uniquely identifies an order. - * It can be used to create more human-readable (in contrast to ID) identifier for the order. - * It should be unique across a project. - * Once it's set it cannot be changed.
+ *id
of the Customer that the Order belongs to.
Email address of the Customer that the Order belongs to.
+ * * @return null|string */ - public function getCustomerId() + public function getCustomerEmail() { - return $this->customerId; + return $this->customerEmail; } /** + *Reference to the Customer Group of the Customer that the Order belongs to. + * Used for LineItem Price selection.
+ * - * @return null|string + * @return null|CustomerGroupReference */ - public function getCustomerEmail() + public function getCustomerGroup() { - return $this->customerEmail; + return $this->customerGroup instanceof CustomerGroupReferenceBuilder ? $this->customerGroup->build() : $this->customerGroup; } /** - *Identifies carts and orders belonging to an anonymous session (the customer has not signed up/in yet).
+ *Anonymous session associated with the Order.
* * @return null|string @@ -470,7 +473,7 @@ public function getAnonymousId() } /** - *The Business Unit the Order belongs to.
+ *Reference to a Business Unit the Order belongs to.
* * @return null|BusinessUnitKeyReference @@ -481,6 +484,8 @@ public function getBusinessUnit() } /** + *Reference to a Store the Order belongs to.
+ * * @return null|StoreKeyReference */ @@ -490,6 +495,8 @@ public function getStore() } /** + *Line Items that are part of the Order.
+ * * @return null|LineItemCollection */ @@ -499,6 +506,8 @@ public function getLineItems() } /** + *Custom Line Items that are part of the Order.
+ * * @return null|CustomLineItemCollection */ @@ -508,6 +517,9 @@ public function getCustomLineItems() } /** + *Sum of the totalPrice
field of all LineItems and CustomLineItems, and if available, the price
field of ShippingInfo.
+ * Taxes are included if TaxRate includedInPrice
is true
for each price.
The taxes are calculated based on the shipping address.
+ *Platform
TaxMode, it is automatically set when a shipping address is set.External
TaxMode, it is automatically set when the external Tax Rate for all Line Items, Custom Line Items, and Shipping Methods in the Cart are set.Sum of taxedPrice
of ShippingInfo across all Shipping Methods.
- * For Platform
TaxMode, it is set automatically only if shipping address is set or Shipping Method is added to the Cart.
Sum of the taxedPrice
field of ShippingInfo across all Shipping Methods.
Holds all shipping-related information per Shipping Method.
- *For Multiple
ShippingMode, it is updated automatically after the Shipping Methods are added.
Indicates how Tax Rates are set.
* - * @return null|Address + * @return null|string */ - public function getShippingAddress() + public function getTaxMode() { - return $this->shippingAddress instanceof AddressBuilder ? $this->shippingAddress->build() : $this->shippingAddress; + return $this->taxMode; } /** + *Indicates how monetary values are rounded when calculating taxes for taxedPrice
.
Indicates whether one or multiple Shipping Methods are added to the Cart.
+ *Indicates how taxes are calculated when calculating taxes for taxedPrice
.
key
of the ShippingMethod for Single
ShippingMode.
Indicates how stock quantities are tracked for Line Items in the Order.
* * @return null|string */ - public function getShippingKey() + public function getInventoryMode() { - return $this->shippingKey; + return $this->inventoryMode; } /** - *Custom Fields of the Shipping Method for Single
ShippingMode.
Billing address associated with the Order.
* - * @return null|CustomFields + * @return null|Address */ - public function getShippingCustomFields() + public function getBillingAddress() { - return $this->shippingCustomFields instanceof CustomFieldsBuilder ? $this->shippingCustomFields->build() : $this->shippingCustomFields; + return $this->billingAddress instanceof AddressBuilder ? $this->billingAddress->build() : $this->billingAddress; } /** - *Holds all shipping-related information per Shipping Method for Multiple
ShippingMode.
It is updated automatically after the Shipping Method is added.
+ *Shipping address associated with the Order. + * Determines eligible ShippingMethod rates and Tax Rates of Line Items.
* - * @return null|ShippingCollection + * @return null|Address */ - public function getShipping() + public function getShippingAddress() { - return $this->shipping; + return $this->shippingAddress instanceof AddressBuilder ? $this->shippingAddress->build() : $this->shippingAddress; } /** + *Indicates whether there can be one or multiple Shipping Methods.
+ * * @return null|string */ - public function getTaxMode() + public function getShippingMode() { - return $this->taxMode; + return $this->shippingMode; } /** - *When calculating taxes for taxedPrice
, the selected mode is used for rouding.
key
of the ShippingMethod for Single
ShippingMode.
Set when the customer is set and the customer is a member of a customer group. - * Used for product variant price selection.
+ *Shipping-related information for Single
ShippingMode.
+ * Automatically set when a Shipping Method is set.
A two-digit country code as per ISO 3166-1 alpha-2. - * Used for product variant price selection.
+ *Input used to select a ShippingRatePriceTier.
+ * The data type of this field depends on the shippingRateInputType.type
configured in the Project:
CartClassification
, it is ClassificationShippingRateInput.CartScore
, it is ScoreShippingRateInput.CartValue
, it cannot be used.One of the four predefined OrderStates.
+ *Custom Fields of the Shipping Method for Single
ShippingMode.
This reference can point to a state in a custom workflow.
+ *Shipping-related information for Multiple
ShippingMode.
+ * Updated automatically each time a new Shipping Method is added.
Additional shipping addresses of the Order as specified by LineItems using the shippingDetails
field.
+ * Eligible Shipping Methods or applicable Tax Rates are determined by the address in shippingAddress
, and not itemShippingAddresses
.
Discount Codes added to the Order.
+ * An Order that has directDiscounts
cannot have discountCodes
.
Set if the ShippingMethod is set.
+ *Direct Discounts added to the Order.
+ * An Order that has discountCodes
cannot have directDiscounts
.
Automatically set when a Line Item with GiftLineItem
LineItemMode is removed from the Order.
Payment information related to the Order.
+ * - * @return null|ReturnInfoCollection + * @return null|PaymentInfo */ - public function getReturnInfo() + public function getPaymentInfo() { - return $this->returnInfo; + return $this->paymentInfo instanceof PaymentInfoBuilder ? $this->paymentInfo->build() : $this->paymentInfo; } /** - *The Purchase Order Number is typically set by the Buyer on a QuoteRequest to - * track the purchase order during the quote and order flow.
+ *Used for LineItem Price selection.
* * @return null|string */ - public function getPurchaseOrderNumber() + public function getCountry() { - return $this->purchaseOrderNumber; + return $this->country; } /** + *Languages of the Order. + * Can only contain languages supported by the Project.
+ * - * @return null|DiscountCodeInfoCollection + * @return null|string */ - public function getDiscountCodes() + public function getLocale() { - return $this->discountCodes; + return $this->locale; } /** - *Internal-only field.
+ *Indicates the origin of the Cart from which the Order was created.
* - * @deprecated - * @return null|int + + * @return null|string */ - public function getLastMessageSequenceNumber() + public function getOrigin() { - return $this->lastMessageSequenceNumber; + return $this->origin; } /** - *Set when this order was created from a cart.
- * The cart will have the state Ordered
.
Reference to the Cart for an Order created from Cart.
+ * The referenced Cart will have the Ordered
CartState.
Set when this order was created from a quote.
+ *Reference to the Quote for an Order created from Quote.
* * @return null|QuoteReference @@ -774,98 +810,127 @@ public function getQuote() } /** + *Current status of the Order.
+ * - * @return null|CustomFields + * @return null|string */ - public function getCustom() + public function getOrderState() { - return $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom; + return $this->orderState; } /** + *Shipment status of the Order.
+ * - * @return null|PaymentInfo + * @return null|string */ - public function getPaymentInfo() + public function getShipmentState() { - return $this->paymentInfo instanceof PaymentInfoBuilder ? $this->paymentInfo->build() : $this->paymentInfo; + return $this->shipmentState; } /** + *Payment status of the Order.
+ * * @return null|string */ - public function getLocale() + public function getPaymentState() { - return $this->locale; + return $this->paymentState; } /** + *State of the Order. + * This reference can point to a State in a custom workflow.
+ * - * @return null|string + * @return null|StateReference */ - public function getInventoryMode() + public function getState() { - return $this->inventoryMode; + return $this->state instanceof StateReferenceBuilder ? $this->state->build() : $this->state; } /** + *Contains synchronization activity information of the Order (like export or import). + * Can only be set with Update SyncInfo update action.
+ * - * @return null|string + * @return null|SyncInfoCollection */ - public function getOrigin() + public function getSyncInfo() { - return $this->origin; + return $this->syncInfo; } /** - *When calculating taxes for taxedPrice
, the selected mode is used for calculating the price with LineItemLevel (horizontally) or UnitPriceLevel (vertically) calculation mode.
Contains information regarding the returns associated with the Order.
* - * @return null|string + * @return null|ReturnInfoCollection */ - public function getTaxCalculationMode() + public function getReturnInfo() { - return $this->taxCalculationMode; + return $this->returnInfo; } /** - *Input used to select a ShippingRatePriceTier.
- * The data type of this field depends on the shippingRateInputType.type
configured in the Project:
CartClassification
, it is ClassificationShippingRateInput.CartScore
, it is ScoreShippingRateInput.CartValue
, it cannot be used.Internal-only field.
* + * @deprecated + * @return null|int + */ + public function getLastMessageSequenceNumber() + { + return $this->lastMessageSequenceNumber; + } - * @return null|ShippingRateInput + /** + *Custom Fields of the Order.
+ * + + * @return null|CustomFields */ - public function getShippingRateInput() + public function getCustom() { - return $this->shippingRateInput instanceof ShippingRateInputBuilder ? $this->shippingRateInput->build() : $this->shippingRateInput; + return $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom; } /** - *Contains addresses for orders with multiple shipping addresses.
+ *User-defined date and time (UTC) of the Order. + * Present only on an Order created using Order Import.
* - * @return null|AddressCollection + * @return null|DateTimeImmutable */ - public function getItemShippingAddresses() + public function getCompletedAt() { - return $this->itemShippingAddresses; + return $this->completedAt; } /** - *Automatically filled when a line item with LineItemMode GiftLineItem
is removed from this order.
Present on resources created after 1 February 2019 except for events not tracked.
* - * @return null|CartDiscountReferenceCollection + * @return null|LastModifiedBy */ - public function getRefusedGifts() + public function getLastModifiedBy() { - return $this->refusedGifts; + return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy; + } + + /** + *Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; } /** @@ -913,67 +978,56 @@ public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt) } /** - * @param ?LastModifiedBy $lastModifiedBy - * @return $this - */ - public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) - { - $this->lastModifiedBy = $lastModifiedBy; - - return $this; - } - - /** - * @param ?CreatedBy $createdBy + * @param ?string $orderNumber * @return $this */ - public function withCreatedBy(?CreatedBy $createdBy) + public function withOrderNumber(?string $orderNumber) { - $this->createdBy = $createdBy; + $this->orderNumber = $orderNumber; return $this; } /** - * @param ?DateTimeImmutable $completedAt + * @param ?string $purchaseOrderNumber * @return $this */ - public function withCompletedAt(?DateTimeImmutable $completedAt) + public function withPurchaseOrderNumber(?string $purchaseOrderNumber) { - $this->completedAt = $completedAt; + $this->purchaseOrderNumber = $purchaseOrderNumber; return $this; } /** - * @param ?string $orderNumber + * @param ?string $customerId * @return $this */ - public function withOrderNumber(?string $orderNumber) + public function withCustomerId(?string $customerId) { - $this->orderNumber = $orderNumber; + $this->customerId = $customerId; return $this; } /** - * @param ?string $customerId + * @param ?string $customerEmail * @return $this */ - public function withCustomerId(?string $customerId) + public function withCustomerEmail(?string $customerEmail) { - $this->customerId = $customerId; + $this->customerEmail = $customerEmail; return $this; } /** - * @param ?string $customerEmail + * @param ?CustomerGroupReference $customerGroup * @return $this */ - public function withCustomerEmail(?string $customerEmail) + public function withCustomerGroup(?CustomerGroupReference $customerGroup) { - $this->customerEmail = $customerEmail; + $this->customerGroup = $customerGroup; return $this; } @@ -1067,221 +1121,221 @@ public function withTaxedShippingPrice(?TaxedPrice $taxedShippingPrice) } /** - * @param ?Address $shippingAddress + * @param ?string $taxMode * @return $this */ - public function withShippingAddress(?Address $shippingAddress) + public function withTaxMode(?string $taxMode) { - $this->shippingAddress = $shippingAddress; + $this->taxMode = $taxMode; return $this; } /** - * @param ?Address $billingAddress + * @param ?string $taxRoundingMode * @return $this */ - public function withBillingAddress(?Address $billingAddress) + public function withTaxRoundingMode(?string $taxRoundingMode) { - $this->billingAddress = $billingAddress; + $this->taxRoundingMode = $taxRoundingMode; return $this; } /** - * @param ?string $shippingMode + * @param ?string $taxCalculationMode * @return $this */ - public function withShippingMode(?string $shippingMode) + public function withTaxCalculationMode(?string $taxCalculationMode) { - $this->shippingMode = $shippingMode; + $this->taxCalculationMode = $taxCalculationMode; return $this; } /** - * @param ?string $shippingKey + * @param ?string $inventoryMode * @return $this */ - public function withShippingKey(?string $shippingKey) + public function withInventoryMode(?string $inventoryMode) { - $this->shippingKey = $shippingKey; + $this->inventoryMode = $inventoryMode; return $this; } /** - * @param ?CustomFields $shippingCustomFields + * @param ?Address $billingAddress * @return $this */ - public function withShippingCustomFields(?CustomFields $shippingCustomFields) + public function withBillingAddress(?Address $billingAddress) { - $this->shippingCustomFields = $shippingCustomFields; + $this->billingAddress = $billingAddress; return $this; } /** - * @param ?ShippingCollection $shipping + * @param ?Address $shippingAddress * @return $this */ - public function withShipping(?ShippingCollection $shipping) + public function withShippingAddress(?Address $shippingAddress) { - $this->shipping = $shipping; + $this->shippingAddress = $shippingAddress; return $this; } /** - * @param ?string $taxMode + * @param ?string $shippingMode * @return $this */ - public function withTaxMode(?string $taxMode) + public function withShippingMode(?string $shippingMode) { - $this->taxMode = $taxMode; + $this->shippingMode = $shippingMode; return $this; } /** - * @param ?string $taxRoundingMode + * @param ?string $shippingKey * @return $this */ - public function withTaxRoundingMode(?string $taxRoundingMode) + public function withShippingKey(?string $shippingKey) { - $this->taxRoundingMode = $taxRoundingMode; + $this->shippingKey = $shippingKey; return $this; } /** - * @param ?CustomerGroupReference $customerGroup + * @param ?ShippingInfo $shippingInfo * @return $this */ - public function withCustomerGroup(?CustomerGroupReference $customerGroup) + public function withShippingInfo(?ShippingInfo $shippingInfo) { - $this->customerGroup = $customerGroup; + $this->shippingInfo = $shippingInfo; return $this; } /** - * @param ?string $country + * @param ?ShippingRateInput $shippingRateInput * @return $this */ - public function withCountry(?string $country) + public function withShippingRateInput(?ShippingRateInput $shippingRateInput) { - $this->country = $country; + $this->shippingRateInput = $shippingRateInput; return $this; } /** - * @param ?string $orderState + * @param ?CustomFields $shippingCustomFields * @return $this */ - public function withOrderState(?string $orderState) + public function withShippingCustomFields(?CustomFields $shippingCustomFields) { - $this->orderState = $orderState; + $this->shippingCustomFields = $shippingCustomFields; return $this; } /** - * @param ?StateReference $state + * @param ?ShippingCollection $shipping * @return $this */ - public function withState(?StateReference $state) + public function withShipping(?ShippingCollection $shipping) { - $this->state = $state; + $this->shipping = $shipping; return $this; } /** - * @param ?string $shipmentState + * @param ?AddressCollection $itemShippingAddresses * @return $this */ - public function withShipmentState(?string $shipmentState) + public function withItemShippingAddresses(?AddressCollection $itemShippingAddresses) { - $this->shipmentState = $shipmentState; + $this->itemShippingAddresses = $itemShippingAddresses; return $this; } /** - * @param ?string $paymentState + * @param ?DiscountCodeInfoCollection $discountCodes * @return $this */ - public function withPaymentState(?string $paymentState) + public function withDiscountCodes(?DiscountCodeInfoCollection $discountCodes) { - $this->paymentState = $paymentState; + $this->discountCodes = $discountCodes; return $this; } /** - * @param ?ShippingInfo $shippingInfo + * @param ?DirectDiscountCollection $directDiscounts * @return $this */ - public function withShippingInfo(?ShippingInfo $shippingInfo) + public function withDirectDiscounts(?DirectDiscountCollection $directDiscounts) { - $this->shippingInfo = $shippingInfo; + $this->directDiscounts = $directDiscounts; return $this; } /** - * @param ?SyncInfoCollection $syncInfo + * @param ?CartDiscountReferenceCollection $refusedGifts * @return $this */ - public function withSyncInfo(?SyncInfoCollection $syncInfo) + public function withRefusedGifts(?CartDiscountReferenceCollection $refusedGifts) { - $this->syncInfo = $syncInfo; + $this->refusedGifts = $refusedGifts; return $this; } /** - * @param ?ReturnInfoCollection $returnInfo + * @param ?PaymentInfo $paymentInfo * @return $this */ - public function withReturnInfo(?ReturnInfoCollection $returnInfo) + public function withPaymentInfo(?PaymentInfo $paymentInfo) { - $this->returnInfo = $returnInfo; + $this->paymentInfo = $paymentInfo; return $this; } /** - * @param ?string $purchaseOrderNumber + * @param ?string $country * @return $this */ - public function withPurchaseOrderNumber(?string $purchaseOrderNumber) + public function withCountry(?string $country) { - $this->purchaseOrderNumber = $purchaseOrderNumber; + $this->country = $country; return $this; } /** - * @param ?DiscountCodeInfoCollection $discountCodes + * @param ?string $locale * @return $this */ - public function withDiscountCodes(?DiscountCodeInfoCollection $discountCodes) + public function withLocale(?string $locale) { - $this->discountCodes = $discountCodes; + $this->locale = $locale; return $this; } /** - * @param ?int $lastMessageSequenceNumber + * @param ?string $origin * @return $this */ - public function withLastMessageSequenceNumber(?int $lastMessageSequenceNumber) + public function withOrigin(?string $origin) { - $this->lastMessageSequenceNumber = $lastMessageSequenceNumber; + $this->origin = $origin; return $this; } @@ -1309,109 +1363,109 @@ public function withQuote(?QuoteReference $quote) } /** - * @param ?CustomFields $custom + * @param ?string $orderState * @return $this */ - public function withCustom(?CustomFields $custom) + public function withOrderState(?string $orderState) { - $this->custom = $custom; + $this->orderState = $orderState; return $this; } /** - * @param ?PaymentInfo $paymentInfo + * @param ?string $shipmentState * @return $this */ - public function withPaymentInfo(?PaymentInfo $paymentInfo) + public function withShipmentState(?string $shipmentState) { - $this->paymentInfo = $paymentInfo; + $this->shipmentState = $shipmentState; return $this; } /** - * @param ?string $locale + * @param ?string $paymentState * @return $this */ - public function withLocale(?string $locale) + public function withPaymentState(?string $paymentState) { - $this->locale = $locale; + $this->paymentState = $paymentState; return $this; } /** - * @param ?string $inventoryMode + * @param ?StateReference $state * @return $this */ - public function withInventoryMode(?string $inventoryMode) + public function withState(?StateReference $state) { - $this->inventoryMode = $inventoryMode; + $this->state = $state; return $this; } /** - * @param ?string $origin + * @param ?SyncInfoCollection $syncInfo * @return $this */ - public function withOrigin(?string $origin) + public function withSyncInfo(?SyncInfoCollection $syncInfo) { - $this->origin = $origin; + $this->syncInfo = $syncInfo; return $this; } /** - * @param ?string $taxCalculationMode + * @param ?ReturnInfoCollection $returnInfo * @return $this */ - public function withTaxCalculationMode(?string $taxCalculationMode) + public function withReturnInfo(?ReturnInfoCollection $returnInfo) { - $this->taxCalculationMode = $taxCalculationMode; + $this->returnInfo = $returnInfo; return $this; } /** - * @param ?ShippingRateInput $shippingRateInput + * @param ?int $lastMessageSequenceNumber * @return $this */ - public function withShippingRateInput(?ShippingRateInput $shippingRateInput) + public function withLastMessageSequenceNumber(?int $lastMessageSequenceNumber) { - $this->shippingRateInput = $shippingRateInput; + $this->lastMessageSequenceNumber = $lastMessageSequenceNumber; return $this; } /** - * @param ?AddressCollection $itemShippingAddresses + * @param ?CustomFields $custom * @return $this */ - public function withItemShippingAddresses(?AddressCollection $itemShippingAddresses) + public function withCustom(?CustomFields $custom) { - $this->itemShippingAddresses = $itemShippingAddresses; + $this->custom = $custom; return $this; } /** - * @param ?CartDiscountReferenceCollection $refusedGifts + * @param ?DateTimeImmutable $completedAt * @return $this */ - public function withRefusedGifts(?CartDiscountReferenceCollection $refusedGifts) + public function withCompletedAt(?DateTimeImmutable $completedAt) { - $this->refusedGifts = $refusedGifts; + $this->completedAt = $completedAt; return $this; } /** - * @deprecated use withLastModifiedBy() instead + * @param ?LastModifiedBy $lastModifiedBy * @return $this */ - public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) + public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) { $this->lastModifiedBy = $lastModifiedBy; @@ -1419,16 +1473,27 @@ public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy } /** - * @deprecated use withCreatedBy() instead + * @param ?CreatedBy $createdBy * @return $this */ - public function withCreatedByBuilder(?CreatedByBuilder $createdBy) + public function withCreatedBy(?CreatedBy $createdBy) { $this->createdBy = $createdBy; return $this; } + /** + * @deprecated use withCustomerGroup() instead + * @return $this + */ + public function withCustomerGroupBuilder(?CustomerGroupReferenceBuilder $customerGroup) + { + $this->customerGroup = $customerGroup; + + return $this; + } + /** * @deprecated use withBusinessUnit() instead * @return $this @@ -1485,67 +1550,67 @@ public function withTaxedShippingPriceBuilder(?TaxedPriceBuilder $taxedShippingP } /** - * @deprecated use withShippingAddress() instead + * @deprecated use withBillingAddress() instead * @return $this */ - public function withShippingAddressBuilder(?AddressBuilder $shippingAddress) + public function withBillingAddressBuilder(?AddressBuilder $billingAddress) { - $this->shippingAddress = $shippingAddress; + $this->billingAddress = $billingAddress; return $this; } /** - * @deprecated use withBillingAddress() instead + * @deprecated use withShippingAddress() instead * @return $this */ - public function withBillingAddressBuilder(?AddressBuilder $billingAddress) + public function withShippingAddressBuilder(?AddressBuilder $shippingAddress) { - $this->billingAddress = $billingAddress; + $this->shippingAddress = $shippingAddress; return $this; } /** - * @deprecated use withShippingCustomFields() instead + * @deprecated use withShippingInfo() instead * @return $this */ - public function withShippingCustomFieldsBuilder(?CustomFieldsBuilder $shippingCustomFields) + public function withShippingInfoBuilder(?ShippingInfoBuilder $shippingInfo) { - $this->shippingCustomFields = $shippingCustomFields; + $this->shippingInfo = $shippingInfo; return $this; } /** - * @deprecated use withCustomerGroup() instead + * @deprecated use withShippingRateInput() instead * @return $this */ - public function withCustomerGroupBuilder(?CustomerGroupReferenceBuilder $customerGroup) + public function withShippingRateInputBuilder(?ShippingRateInputBuilder $shippingRateInput) { - $this->customerGroup = $customerGroup; + $this->shippingRateInput = $shippingRateInput; return $this; } /** - * @deprecated use withState() instead + * @deprecated use withShippingCustomFields() instead * @return $this */ - public function withStateBuilder(?StateReferenceBuilder $state) + public function withShippingCustomFieldsBuilder(?CustomFieldsBuilder $shippingCustomFields) { - $this->state = $state; + $this->shippingCustomFields = $shippingCustomFields; return $this; } /** - * @deprecated use withShippingInfo() instead + * @deprecated use withPaymentInfo() instead * @return $this */ - public function withShippingInfoBuilder(?ShippingInfoBuilder $shippingInfo) + public function withPaymentInfoBuilder(?PaymentInfoBuilder $paymentInfo) { - $this->shippingInfo = $shippingInfo; + $this->paymentInfo = $paymentInfo; return $this; } @@ -1572,6 +1637,17 @@ public function withQuoteBuilder(?QuoteReferenceBuilder $quote) return $this; } + /** + * @deprecated use withState() instead + * @return $this + */ + public function withStateBuilder(?StateReferenceBuilder $state) + { + $this->state = $state; + + return $this; + } + /** * @deprecated use withCustom() instead * @return $this @@ -1584,23 +1660,23 @@ public function withCustomBuilder(?CustomFieldsBuilder $custom) } /** - * @deprecated use withPaymentInfo() instead + * @deprecated use withLastModifiedBy() instead * @return $this */ - public function withPaymentInfoBuilder(?PaymentInfoBuilder $paymentInfo) + public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) { - $this->paymentInfo = $paymentInfo; + $this->lastModifiedBy = $lastModifiedBy; return $this; } /** - * @deprecated use withShippingRateInput() instead + * @deprecated use withCreatedBy() instead * @return $this */ - public function withShippingRateInputBuilder(?ShippingRateInputBuilder $shippingRateInput) + public function withCreatedByBuilder(?CreatedByBuilder $createdBy) { - $this->shippingRateInput = $shippingRateInput; + $this->createdBy = $createdBy; return $this; } @@ -1612,12 +1688,11 @@ public function build(): Order $this->version, $this->createdAt, $this->lastModifiedAt, - $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, - $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy, - $this->completedAt, $this->orderNumber, + $this->purchaseOrderNumber, $this->customerId, $this->customerEmail, + $this->customerGroup instanceof CustomerGroupReferenceBuilder ? $this->customerGroup->build() : $this->customerGroup, $this->anonymousId, $this->businessUnit instanceof BusinessUnitKeyReferenceBuilder ? $this->businessUnit->build() : $this->businessUnit, $this->store instanceof StoreKeyReferenceBuilder ? $this->store->build() : $this->store, @@ -1626,37 +1701,39 @@ public function build(): Order $this->totalPrice instanceof TypedMoneyBuilder ? $this->totalPrice->build() : $this->totalPrice, $this->taxedPrice instanceof TaxedPriceBuilder ? $this->taxedPrice->build() : $this->taxedPrice, $this->taxedShippingPrice instanceof TaxedPriceBuilder ? $this->taxedShippingPrice->build() : $this->taxedShippingPrice, - $this->shippingAddress instanceof AddressBuilder ? $this->shippingAddress->build() : $this->shippingAddress, + $this->taxMode, + $this->taxRoundingMode, + $this->taxCalculationMode, + $this->inventoryMode, $this->billingAddress instanceof AddressBuilder ? $this->billingAddress->build() : $this->billingAddress, + $this->shippingAddress instanceof AddressBuilder ? $this->shippingAddress->build() : $this->shippingAddress, $this->shippingMode, $this->shippingKey, + $this->shippingInfo instanceof ShippingInfoBuilder ? $this->shippingInfo->build() : $this->shippingInfo, + $this->shippingRateInput instanceof ShippingRateInputBuilder ? $this->shippingRateInput->build() : $this->shippingRateInput, $this->shippingCustomFields instanceof CustomFieldsBuilder ? $this->shippingCustomFields->build() : $this->shippingCustomFields, $this->shipping, - $this->taxMode, - $this->taxRoundingMode, - $this->customerGroup instanceof CustomerGroupReferenceBuilder ? $this->customerGroup->build() : $this->customerGroup, + $this->itemShippingAddresses, + $this->discountCodes, + $this->directDiscounts, + $this->refusedGifts, + $this->paymentInfo instanceof PaymentInfoBuilder ? $this->paymentInfo->build() : $this->paymentInfo, $this->country, + $this->locale, + $this->origin, + $this->cart instanceof CartReferenceBuilder ? $this->cart->build() : $this->cart, + $this->quote instanceof QuoteReferenceBuilder ? $this->quote->build() : $this->quote, $this->orderState, - $this->state instanceof StateReferenceBuilder ? $this->state->build() : $this->state, $this->shipmentState, $this->paymentState, - $this->shippingInfo instanceof ShippingInfoBuilder ? $this->shippingInfo->build() : $this->shippingInfo, + $this->state instanceof StateReferenceBuilder ? $this->state->build() : $this->state, $this->syncInfo, $this->returnInfo, - $this->purchaseOrderNumber, - $this->discountCodes, $this->lastMessageSequenceNumber, - $this->cart instanceof CartReferenceBuilder ? $this->cart->build() : $this->cart, - $this->quote instanceof QuoteReferenceBuilder ? $this->quote->build() : $this->quote, $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom, - $this->paymentInfo instanceof PaymentInfoBuilder ? $this->paymentInfo->build() : $this->paymentInfo, - $this->locale, - $this->inventoryMode, - $this->origin, - $this->taxCalculationMode, - $this->shippingRateInput instanceof ShippingRateInputBuilder ? $this->shippingRateInput->build() : $this->shippingRateInput, - $this->itemShippingAddresses, - $this->refusedGifts + $this->completedAt, + $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, + $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy ); } diff --git a/lib/commercetools-api/src/Models/Order/OrderChangeOrderStateAction.php b/lib/commercetools-api/src/Models/Order/OrderChangeOrderStateAction.php index 9b1e4d1439f..edff5fb9c39 100644 --- a/lib/commercetools-api/src/Models/Order/OrderChangeOrderStateAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderChangeOrderStateAction.php @@ -16,6 +16,8 @@ interface OrderChangeOrderStateAction extends OrderUpdateAction public const FIELD_ORDER_STATE = 'orderState'; /** + *New status of the Order.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderChangeOrderStateActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderChangeOrderStateActionBuilder.php index 28ec7c040fe..3b0f7f62ca7 100644 --- a/lib/commercetools-api/src/Models/Order/OrderChangeOrderStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderChangeOrderStateActionBuilder.php @@ -27,6 +27,8 @@ final class OrderChangeOrderStateActionBuilder implements Builder private $orderState; /** + *New status of the Order.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderChangeOrderStateActionModel.php b/lib/commercetools-api/src/Models/Order/OrderChangeOrderStateActionModel.php index 8977a7325a8..81edf6ef45b 100644 --- a/lib/commercetools-api/src/Models/Order/OrderChangeOrderStateActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderChangeOrderStateActionModel.php @@ -63,6 +63,8 @@ public function getAction() } /** + *New status of the Order.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderChangePaymentStateAction.php b/lib/commercetools-api/src/Models/Order/OrderChangePaymentStateAction.php index db06b37be93..061e37bce1d 100644 --- a/lib/commercetools-api/src/Models/Order/OrderChangePaymentStateAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderChangePaymentStateAction.php @@ -16,6 +16,8 @@ interface OrderChangePaymentStateAction extends OrderUpdateAction public const FIELD_PAYMENT_STATE = 'paymentState'; /** + *New payment status of the Order.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderChangePaymentStateActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderChangePaymentStateActionBuilder.php index f8071ff1161..b76569367df 100644 --- a/lib/commercetools-api/src/Models/Order/OrderChangePaymentStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderChangePaymentStateActionBuilder.php @@ -27,6 +27,8 @@ final class OrderChangePaymentStateActionBuilder implements Builder private $paymentState; /** + *New payment status of the Order.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderChangePaymentStateActionModel.php b/lib/commercetools-api/src/Models/Order/OrderChangePaymentStateActionModel.php index da6aa197fbb..39f90d962b4 100644 --- a/lib/commercetools-api/src/Models/Order/OrderChangePaymentStateActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderChangePaymentStateActionModel.php @@ -63,6 +63,8 @@ public function getAction() } /** + *New payment status of the Order.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderChangeShipmentStateAction.php b/lib/commercetools-api/src/Models/Order/OrderChangeShipmentStateAction.php index 4d8d00f24da..4e5c3bdf401 100644 --- a/lib/commercetools-api/src/Models/Order/OrderChangeShipmentStateAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderChangeShipmentStateAction.php @@ -16,6 +16,8 @@ interface OrderChangeShipmentStateAction extends OrderUpdateAction public const FIELD_SHIPMENT_STATE = 'shipmentState'; /** + *New shipment status of the Order.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderChangeShipmentStateActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderChangeShipmentStateActionBuilder.php index 2b6575692a7..026d786016a 100644 --- a/lib/commercetools-api/src/Models/Order/OrderChangeShipmentStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderChangeShipmentStateActionBuilder.php @@ -27,6 +27,8 @@ final class OrderChangeShipmentStateActionBuilder implements Builder private $shipmentState; /** + *New shipment status of the Order.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderChangeShipmentStateActionModel.php b/lib/commercetools-api/src/Models/Order/OrderChangeShipmentStateActionModel.php index ad00204e01a..f2e2a7f055d 100644 --- a/lib/commercetools-api/src/Models/Order/OrderChangeShipmentStateActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderChangeShipmentStateActionModel.php @@ -63,6 +63,8 @@ public function getAction() } /** + *New shipment status of the Order.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderFromCartDraft.php b/lib/commercetools-api/src/Models/Order/OrderFromCartDraft.php index 8ef0d447d3b..997706a11b0 100644 --- a/lib/commercetools-api/src/Models/Order/OrderFromCartDraft.php +++ b/lib/commercetools-api/src/Models/Order/OrderFromCartDraft.php @@ -28,7 +28,7 @@ interface OrderFromCartDraft extends JsonObject public const FIELD_CUSTOM = 'custom'; /** - *Unique identifier of the Cart from which you can create an Order.
+ *id
of the Cart used to create the Order.
ResourceIdentifier of the Cart from which the Order is created.
+ *ResourceIdentifier to the Cart from which the Order is created.
+ *This field is required, but is marked as optional for backwards compatibility reasons.
* * @return null|CartResourceIdentifier @@ -44,8 +45,7 @@ public function getId(); public function getCart(); /** - *Expected version of the Cart from which the Order is created. - * If the expected version does not match the actual version, a 409 Conflict error will be returned.
+ *version
of the Cart from which the Order is created.
String that uniquely identifies an order.
- * It can be used to create more human-readable (in contrast to ID) identifier for the order.
- * It should be unique across a project.
- * Once it's set it cannot be changed.
- * For easier use on Get, Update and Delete actions we suggest assigning order numbers that match the regular expression [a-z0-9_-]{2,36}
.
User-defined identifier for the Order that is unique across a Project. + * Once set, the value cannot be changed.
* * @return null|string @@ -65,8 +62,8 @@ public function getVersion(); public function getOrderNumber(); /** - *Identifier for a purchase order, usually in a B2B context. - * The Purchase Order Number is typically entered by the Buyer and can also be used with Quotes.
+ *User-defined identifier for a purchase Order.
+ *It is typically set by the Buyer and can be used with Quotes to track the purchase Order during the quote and order flow.
* * @return null|string @@ -74,7 +71,7 @@ public function getOrderNumber(); public function getPurchaseOrderNumber(); /** - *Payment state for the Order.
+ *Payment status for the Order.
* * @return null|string @@ -82,7 +79,7 @@ public function getPurchaseOrderNumber(); public function getPaymentState(); /** - *Shipment state for the Order.
+ *Shipment status for the Order.
* * @return null|string @@ -90,7 +87,7 @@ public function getPaymentState(); public function getShipmentState(); /** - *Order will be created with Open
status by default.
Current status for the Order.
* * @return null|string @@ -98,7 +95,7 @@ public function getShipmentState(); public function getOrderState(); /** - *Reference to a State indicating the Order's state.
+ *State for the Order in a custom workflow.
* * @return null|StateResourceIdentifier @@ -106,9 +103,12 @@ public function getOrderState(); public function getState(); /** - *Custom Fields for the Order. The Custom Field type must match the type of the Custom Fields in the referenced Cart. - * If specified, the Custom Fields are merged with the Custom Fields on the referenced Cart and added to the Order. - * If empty, the Custom Fields on the referenced Cart are added to the Order automatically.
+ *Custom Fields for the Order. + * The Custom Fields' type must match the Custom Fields' type in the referenced Cart.
+ *Unique identifier of the Cart from which you can create an Order.
+ *id
of the Cart used to create the Order.
ResourceIdentifier of the Cart from which the Order is created.
+ *ResourceIdentifier to the Cart from which the Order is created.
+ *This field is required, but is marked as optional for backwards compatibility reasons.
* * @return null|CartResourceIdentifier @@ -109,8 +110,7 @@ public function getCart() } /** - *Expected version of the Cart from which the Order is created. - * If the expected version does not match the actual version, a 409 Conflict error will be returned.
+ *version
of the Cart from which the Order is created.
String that uniquely identifies an order.
- * It can be used to create more human-readable (in contrast to ID) identifier for the order.
- * It should be unique across a project.
- * Once it's set it cannot be changed.
- * For easier use on Get, Update and Delete actions we suggest assigning order numbers that match the regular expression [a-z0-9_-]{2,36}
.
User-defined identifier for the Order that is unique across a Project. + * Once set, the value cannot be changed.
* * @return null|string @@ -136,8 +133,8 @@ public function getOrderNumber() } /** - *Identifier for a purchase order, usually in a B2B context. - * The Purchase Order Number is typically entered by the Buyer and can also be used with Quotes.
+ *User-defined identifier for a purchase Order.
+ *It is typically set by the Buyer and can be used with Quotes to track the purchase Order during the quote and order flow.
* * @return null|string @@ -148,7 +145,7 @@ public function getPurchaseOrderNumber() } /** - *Payment state for the Order.
+ *Payment status for the Order.
* * @return null|string @@ -159,7 +156,7 @@ public function getPaymentState() } /** - *Shipment state for the Order.
+ *Shipment status for the Order.
* * @return null|string @@ -170,7 +167,7 @@ public function getShipmentState() } /** - *Order will be created with Open
status by default.
Current status for the Order.
* * @return null|string @@ -181,7 +178,7 @@ public function getOrderState() } /** - *Reference to a State indicating the Order's state.
+ *State for the Order in a custom workflow.
* * @return null|StateResourceIdentifier @@ -192,9 +189,12 @@ public function getState() } /** - *Custom Fields for the Order. The Custom Field type must match the type of the Custom Fields in the referenced Cart. - * If specified, the Custom Fields are merged with the Custom Fields on the referenced Cart and added to the Order. - * If empty, the Custom Fields on the referenced Cart are added to the Order automatically.
+ *Custom Fields for the Order. + * The Custom Fields' type must match the Custom Fields' type in the referenced Cart.
+ *Unique identifier of the Cart from which you can create an Order.
+ *id
of the Cart used to create the Order.
ResourceIdentifier of the Cart from which the Order is created.
+ *ResourceIdentifier to the Cart from which the Order is created.
+ *This field is required, but is marked as optional for backwards compatibility reasons.
* * * @return null|CartResourceIdentifier @@ -155,8 +156,7 @@ public function getCart() } /** - *Expected version of the Cart from which the Order is created. - * If the expected version does not match the actual version, a 409 Conflict error will be returned.
+ *version
of the Cart from which the Order is created.
String that uniquely identifies an order.
- * It can be used to create more human-readable (in contrast to ID) identifier for the order.
- * It should be unique across a project.
- * Once it's set it cannot be changed.
- * For easier use on Get, Update and Delete actions we suggest assigning order numbers that match the regular expression [a-z0-9_-]{2,36}
.
User-defined identifier for the Order that is unique across a Project. + * Once set, the value cannot be changed.
* * * @return null|string @@ -200,8 +197,8 @@ public function getOrderNumber() } /** - *Identifier for a purchase order, usually in a B2B context. - * The Purchase Order Number is typically entered by the Buyer and can also be used with Quotes.
+ *User-defined identifier for a purchase Order.
+ *It is typically set by the Buyer and can be used with Quotes to track the purchase Order during the quote and order flow.
* * * @return null|string @@ -221,7 +218,7 @@ public function getPurchaseOrderNumber() } /** - *Payment state for the Order.
+ *Payment status for the Order.
* * * @return null|string @@ -241,7 +238,7 @@ public function getPaymentState() } /** - *Shipment state for the Order.
+ *Shipment status for the Order.
* * * @return null|string @@ -261,7 +258,7 @@ public function getShipmentState() } /** - *Order will be created with Open
status by default.
Current status for the Order.
* * * @return null|string @@ -281,7 +278,7 @@ public function getOrderState() } /** - *Reference to a State indicating the Order's state.
+ *State for the Order in a custom workflow.
* * * @return null|StateResourceIdentifier @@ -302,9 +299,12 @@ public function getState() } /** - *Custom Fields for the Order. The Custom Field type must match the type of the Custom Fields in the referenced Cart. - * If specified, the Custom Fields are merged with the Custom Fields on the referenced Cart and added to the Order. - * If empty, the Custom Fields on the referenced Cart are added to the Order automatically.
+ *Custom Fields for the Order. + * The Custom Fields' type must match the Custom Fields' type in the referenced Cart.
+ *ResourceIdentifier of the Quote from which this Order is created. If the Quote has QuoteState
in Accepted
, Declined
or Withdrawn
then the order creation will fail. The creation will also fail if the Quote
has expired (validTo
check).
ResourceIdentifier to the Quote from which the Order is created.
+ * If the referenced Quote has expired (validTo
check) or its quoteState
is Accepted
, Declined
, or Withdrawn
, the Order creation will fail.
version
of the Quote from which an Order is created.
version
of the Quote from which the Order is created.
String that uniquely identifies an order.
- * It can be used to create more human-readable (in contrast to ID) identifier for the order.
- * It should be unique across a project.
- * Once it's set it cannot be changed.
- * For easier use on Get, Update and Delete actions we suggest assigning order numbers that match the regular expression [a-z0-9_-]{2,36}
.
User-defined identifier for the Order that is unique across a Project. + * Once set, the value cannot be changed.
* * @return null|string @@ -61,7 +59,7 @@ public function getQuoteStateToAccepted(); public function getOrderNumber(); /** - *Payment state of the Order.
+ *Payment status for the Order.
* * @return null|string @@ -69,7 +67,7 @@ public function getOrderNumber(); public function getPaymentState(); /** - *Shipment state of the Order.
+ *Shipment status for the Order.
* * @return null|string @@ -77,7 +75,7 @@ public function getPaymentState(); public function getShipmentState(); /** - *Order will be created with Open
status by default.
Current status for the Order.
* * @return null|string @@ -85,7 +83,7 @@ public function getShipmentState(); public function getOrderState(); /** - *Reference to a State indicating the Order's state.
+ *State of the Order in a custom workflow.
* * @return null|StateResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Order/OrderFromQuoteDraftBuilder.php b/lib/commercetools-api/src/Models/Order/OrderFromQuoteDraftBuilder.php index 84065c49241..59204d8df2a 100644 --- a/lib/commercetools-api/src/Models/Order/OrderFromQuoteDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderFromQuoteDraftBuilder.php @@ -73,7 +73,8 @@ final class OrderFromQuoteDraftBuilder implements Builder private $state; /** - *ResourceIdentifier of the Quote from which this Order is created. If the Quote has QuoteState
in Accepted
, Declined
or Withdrawn
then the order creation will fail. The creation will also fail if the Quote
has expired (validTo
check).
ResourceIdentifier to the Quote from which the Order is created.
+ * If the referenced Quote has expired (validTo
check) or its quoteState
is Accepted
, Declined
, or Withdrawn
, the Order creation will fail.
version
of the Quote from which an Order is created.
version
of the Quote from which the Order is created.
String that uniquely identifies an order.
- * It can be used to create more human-readable (in contrast to ID) identifier for the order.
- * It should be unique across a project.
- * Once it's set it cannot be changed.
- * For easier use on Get, Update and Delete actions we suggest assigning order numbers that match the regular expression [a-z0-9_-]{2,36}
.
User-defined identifier for the Order that is unique across a Project. + * Once set, the value cannot be changed.
* * @return null|string @@ -121,7 +119,7 @@ public function getOrderNumber() } /** - *Payment state of the Order.
+ *Payment status for the Order.
* * @return null|string @@ -132,7 +130,7 @@ public function getPaymentState() } /** - *Shipment state of the Order.
+ *Shipment status for the Order.
* * @return null|string @@ -143,7 +141,7 @@ public function getShipmentState() } /** - *Order will be created with Open
status by default.
Current status for the Order.
* * @return null|string @@ -154,7 +152,7 @@ public function getOrderState() } /** - *Reference to a State indicating the Order's state.
+ *State of the Order in a custom workflow.
* * @return null|StateResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Order/OrderFromQuoteDraftModel.php b/lib/commercetools-api/src/Models/Order/OrderFromQuoteDraftModel.php index d13b09a93ca..eb494bfacaa 100644 --- a/lib/commercetools-api/src/Models/Order/OrderFromQuoteDraftModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderFromQuoteDraftModel.php @@ -96,7 +96,8 @@ public function __construct( } /** - *ResourceIdentifier of the Quote from which this Order is created. If the Quote has QuoteState
in Accepted
, Declined
or Withdrawn
then the order creation will fail. The creation will also fail if the Quote
has expired (validTo
check).
ResourceIdentifier to the Quote from which the Order is created.
+ * If the referenced Quote has expired (validTo
check) or its quoteState
is Accepted
, Declined
, or Withdrawn
, the Order creation will fail.
version
of the Quote from which an Order is created.
version
of the Quote from which the Order is created.
String that uniquely identifies an order.
- * It can be used to create more human-readable (in contrast to ID) identifier for the order.
- * It should be unique across a project.
- * Once it's set it cannot be changed.
- * For easier use on Get, Update and Delete actions we suggest assigning order numbers that match the regular expression [a-z0-9_-]{2,36}
.
User-defined identifier for the Order that is unique across a Project. + * Once set, the value cannot be changed.
* * * @return null|string @@ -181,7 +179,7 @@ public function getOrderNumber() } /** - *Payment state of the Order.
+ *Payment status for the Order.
* * * @return null|string @@ -201,7 +199,7 @@ public function getPaymentState() } /** - *Shipment state of the Order.
+ *Shipment status for the Order.
* * * @return null|string @@ -221,7 +219,7 @@ public function getShipmentState() } /** - *Order will be created with Open
status by default.
Current status for the Order.
* * * @return null|string @@ -241,7 +239,7 @@ public function getOrderState() } /** - *Reference to a State indicating the Order's state.
+ *State of the Order in a custom workflow.
* * * @return null|StateResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateAction.php b/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateAction.php index f4fe4b1a667..e0173eec29a 100644 --- a/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateAction.php @@ -17,12 +17,16 @@ interface OrderImportCustomLineItemStateAction extends OrderUpdateAction public const FIELD_STATE = 'state'; /** + *id
of the CustomLineItem to update.
New status of the Custom Line Items.
+ * * @return null|ItemStateCollection */ diff --git a/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateActionBuilder.php index ed4267b834c..f5808b17fa4 100644 --- a/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateActionBuilder.php @@ -33,6 +33,8 @@ final class OrderImportCustomLineItemStateActionBuilder implements Builder private $state; /** + *id
of the CustomLineItem to update.
New status of the Custom Line Items.
+ * * @return null|ItemStateCollection */ diff --git a/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateActionModel.php b/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateActionModel.php index e5192401f93..76fa9b7c174 100644 --- a/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateActionModel.php @@ -71,6 +71,8 @@ public function getAction() } /** + *id
of the CustomLineItem to update.
New status of the Custom Line Items.
+ * * * @return null|ItemStateCollection */ diff --git a/lib/commercetools-api/src/Models/Order/OrderImportDraft.php b/lib/commercetools-api/src/Models/Order/OrderImportDraft.php index 97026b64eb9..d1a10b409ac 100644 --- a/lib/commercetools-api/src/Models/Order/OrderImportDraft.php +++ b/lib/commercetools-api/src/Models/Order/OrderImportDraft.php @@ -138,7 +138,7 @@ public function getCustomerGroup(); public function getCountry(); /** - *If not given the Open
state will be assigned by default.
Current status of the Order.
* * @return null|string @@ -154,6 +154,8 @@ public function getOrderState(); public function getState(); /** + *Shipment status of the Order.
+ * * @return null|string */ @@ -174,6 +176,8 @@ public function getPaymentState(); public function getShippingInfo(); /** + *Payment information associated with the Order.
+ * * @return null|PaymentInfo */ diff --git a/lib/commercetools-api/src/Models/Order/OrderImportDraftBuilder.php b/lib/commercetools-api/src/Models/Order/OrderImportDraftBuilder.php index 69ff7a4d201..9ad95fa59fe 100644 --- a/lib/commercetools-api/src/Models/Order/OrderImportDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderImportDraftBuilder.php @@ -310,7 +310,7 @@ public function getCountry() } /** - *If not given the Open
state will be assigned by default.
Current status of the Order.
* * @return null|string @@ -332,6 +332,8 @@ public function getState() } /** + *Shipment status of the Order.
+ * * @return null|string */ @@ -361,6 +363,8 @@ public function getShippingInfo() } /** + *Payment information associated with the Order.
+ * * @return null|PaymentInfo */ diff --git a/lib/commercetools-api/src/Models/Order/OrderImportDraftModel.php b/lib/commercetools-api/src/Models/Order/OrderImportDraftModel.php index 0123995d63a..663cf832a9b 100644 --- a/lib/commercetools-api/src/Models/Order/OrderImportDraftModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderImportDraftModel.php @@ -471,7 +471,7 @@ public function getCountry() } /** - *If not given the Open
state will be assigned by default.
Current status of the Order.
* * * @return null|string @@ -512,6 +512,8 @@ public function getState() } /** + *Shipment status of the Order.
+ * * * @return null|string */ @@ -569,6 +571,8 @@ public function getShippingInfo() } /** + *Payment information associated with the Order.
+ * * * @return null|PaymentInfo */ diff --git a/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateAction.php b/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateAction.php index e43b5428731..f60fa5ee286 100644 --- a/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateAction.php @@ -17,12 +17,16 @@ interface OrderImportLineItemStateAction extends OrderUpdateAction public const FIELD_STATE = 'state'; /** + *id
of the LineItem to update.
New status of the Line Items.
+ * * @return null|ItemStateCollection */ diff --git a/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateActionBuilder.php index 20e58e8d73f..a2ac96b9092 100644 --- a/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateActionBuilder.php @@ -33,6 +33,8 @@ final class OrderImportLineItemStateActionBuilder implements Builder private $state; /** + *id
of the LineItem to update.
New status of the Line Items.
+ * * @return null|ItemStateCollection */ diff --git a/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateActionModel.php b/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateActionModel.php index a3f60473283..4bef20c7443 100644 --- a/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateActionModel.php @@ -71,6 +71,8 @@ public function getAction() } /** + *id
of the LineItem to update.
New status of the Line Items.
+ * * * @return null|ItemStateCollection */ diff --git a/lib/commercetools-api/src/Models/Order/OrderModel.php b/lib/commercetools-api/src/Models/Order/OrderModel.php index d7d89dabbbf..a63b4583489 100644 --- a/lib/commercetools-api/src/Models/Order/OrderModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderModel.php @@ -13,6 +13,7 @@ use Commercetools\Api\Models\Cart\CartReference; use Commercetools\Api\Models\Cart\CartReferenceModel; use Commercetools\Api\Models\Cart\CustomLineItemCollection; +use Commercetools\Api\Models\Cart\DirectDiscountCollection; use Commercetools\Api\Models\Cart\DiscountCodeInfoCollection; use Commercetools\Api\Models\Cart\LineItemCollection; use Commercetools\Api\Models\Cart\ShippingCollection; @@ -84,39 +85,33 @@ final class OrderModel extends JsonObjectModel implements Order /** * - * @var ?LastModifiedBy - */ - protected $lastModifiedBy; - - /** - * - * @var ?CreatedBy + * @var ?string */ - protected $createdBy; + protected $orderNumber; /** * - * @var ?DateTimeImmutable + * @var ?string */ - protected $completedAt; + protected $purchaseOrderNumber; /** * * @var ?string */ - protected $orderNumber; + protected $customerId; /** * * @var ?string */ - protected $customerId; + protected $customerEmail; /** * - * @var ?string + * @var ?CustomerGroupReference */ - protected $customerEmail; + protected $customerGroup; /** * @@ -168,123 +163,123 @@ final class OrderModel extends JsonObjectModel implements Order /** * - * @var ?Address + * @var ?string */ - protected $shippingAddress; + protected $taxMode; /** * - * @var ?Address + * @var ?string */ - protected $billingAddress; + protected $taxRoundingMode; /** * * @var ?string */ - protected $shippingMode; + protected $taxCalculationMode; /** * * @var ?string */ - protected $shippingKey; + protected $inventoryMode; /** * - * @var ?CustomFields + * @var ?Address */ - protected $shippingCustomFields; + protected $billingAddress; /** * - * @var ?ShippingCollection + * @var ?Address */ - protected $shipping; + protected $shippingAddress; /** * * @var ?string */ - protected $taxMode; + protected $shippingMode; /** * * @var ?string */ - protected $taxRoundingMode; + protected $shippingKey; /** * - * @var ?CustomerGroupReference + * @var ?ShippingInfo */ - protected $customerGroup; + protected $shippingInfo; /** * - * @var ?string + * @var ?ShippingRateInput */ - protected $country; + protected $shippingRateInput; /** * - * @var ?string + * @var ?CustomFields */ - protected $orderState; + protected $shippingCustomFields; /** * - * @var ?StateReference + * @var ?ShippingCollection */ - protected $state; + protected $shipping; /** * - * @var ?string + * @var ?AddressCollection */ - protected $shipmentState; + protected $itemShippingAddresses; /** * - * @var ?string + * @var ?DiscountCodeInfoCollection */ - protected $paymentState; + protected $discountCodes; /** * - * @var ?ShippingInfo + * @var ?DirectDiscountCollection */ - protected $shippingInfo; + protected $directDiscounts; /** * - * @var ?SyncInfoCollection + * @var ?CartDiscountReferenceCollection */ - protected $syncInfo; + protected $refusedGifts; /** * - * @var ?ReturnInfoCollection + * @var ?PaymentInfo */ - protected $returnInfo; + protected $paymentInfo; /** * * @var ?string */ - protected $purchaseOrderNumber; + protected $country; /** * - * @var ?DiscountCodeInfoCollection + * @var ?string */ - protected $discountCodes; + protected $locale; /** - * @deprecated - * @var ?int + * + * @var ?string */ - protected $lastMessageSequenceNumber; + protected $origin; /** * @@ -300,57 +295,69 @@ final class OrderModel extends JsonObjectModel implements Order /** * - * @var ?CustomFields + * @var ?string */ - protected $custom; + protected $orderState; /** * - * @var ?PaymentInfo + * @var ?string */ - protected $paymentInfo; + protected $shipmentState; /** * * @var ?string */ - protected $locale; + protected $paymentState; /** * - * @var ?string + * @var ?StateReference */ - protected $inventoryMode; + protected $state; /** * - * @var ?string + * @var ?SyncInfoCollection */ - protected $origin; + protected $syncInfo; /** * - * @var ?string + * @var ?ReturnInfoCollection */ - protected $taxCalculationMode; + protected $returnInfo; + + /** + * @deprecated + * @var ?int + */ + protected $lastMessageSequenceNumber; /** * - * @var ?ShippingRateInput + * @var ?CustomFields */ - protected $shippingRateInput; + protected $custom; /** * - * @var ?AddressCollection + * @var ?DateTimeImmutable */ - protected $itemShippingAddresses; + protected $completedAt; /** * - * @var ?CartDiscountReferenceCollection + * @var ?LastModifiedBy */ - protected $refusedGifts; + protected $lastModifiedBy; + + /** + * + * @var ?CreatedBy + */ + protected $createdBy; /** @@ -361,12 +368,11 @@ public function __construct( ?int $version = null, ?DateTimeImmutable $createdAt = null, ?DateTimeImmutable $lastModifiedAt = null, - ?LastModifiedBy $lastModifiedBy = null, - ?CreatedBy $createdBy = null, - ?DateTimeImmutable $completedAt = null, ?string $orderNumber = null, + ?string $purchaseOrderNumber = null, ?string $customerId = null, ?string $customerEmail = null, + ?CustomerGroupReference $customerGroup = null, ?string $anonymousId = null, ?BusinessUnitKeyReference $businessUnit = null, ?StoreKeyReference $store = null, @@ -375,48 +381,49 @@ public function __construct( ?TypedMoney $totalPrice = null, ?TaxedPrice $taxedPrice = null, ?TaxedPrice $taxedShippingPrice = null, - ?Address $shippingAddress = null, + ?string $taxMode = null, + ?string $taxRoundingMode = null, + ?string $taxCalculationMode = null, + ?string $inventoryMode = null, ?Address $billingAddress = null, + ?Address $shippingAddress = null, ?string $shippingMode = null, ?string $shippingKey = null, + ?ShippingInfo $shippingInfo = null, + ?ShippingRateInput $shippingRateInput = null, ?CustomFields $shippingCustomFields = null, ?ShippingCollection $shipping = null, - ?string $taxMode = null, - ?string $taxRoundingMode = null, - ?CustomerGroupReference $customerGroup = null, + ?AddressCollection $itemShippingAddresses = null, + ?DiscountCodeInfoCollection $discountCodes = null, + ?DirectDiscountCollection $directDiscounts = null, + ?CartDiscountReferenceCollection $refusedGifts = null, + ?PaymentInfo $paymentInfo = null, ?string $country = null, + ?string $locale = null, + ?string $origin = null, + ?CartReference $cart = null, + ?QuoteReference $quote = null, ?string $orderState = null, - ?StateReference $state = null, ?string $shipmentState = null, ?string $paymentState = null, - ?ShippingInfo $shippingInfo = null, + ?StateReference $state = null, ?SyncInfoCollection $syncInfo = null, ?ReturnInfoCollection $returnInfo = null, - ?string $purchaseOrderNumber = null, - ?DiscountCodeInfoCollection $discountCodes = null, ?int $lastMessageSequenceNumber = null, - ?CartReference $cart = null, - ?QuoteReference $quote = null, ?CustomFields $custom = null, - ?PaymentInfo $paymentInfo = null, - ?string $locale = null, - ?string $inventoryMode = null, - ?string $origin = null, - ?string $taxCalculationMode = null, - ?ShippingRateInput $shippingRateInput = null, - ?AddressCollection $itemShippingAddresses = null, - ?CartDiscountReferenceCollection $refusedGifts = null + ?DateTimeImmutable $completedAt = null, + ?LastModifiedBy $lastModifiedBy = null, + ?CreatedBy $createdBy = null ) { $this->id = $id; $this->version = $version; $this->createdAt = $createdAt; $this->lastModifiedAt = $lastModifiedAt; - $this->lastModifiedBy = $lastModifiedBy; - $this->createdBy = $createdBy; - $this->completedAt = $completedAt; $this->orderNumber = $orderNumber; + $this->purchaseOrderNumber = $purchaseOrderNumber; $this->customerId = $customerId; $this->customerEmail = $customerEmail; + $this->customerGroup = $customerGroup; $this->anonymousId = $anonymousId; $this->businessUnit = $businessUnit; $this->store = $store; @@ -425,37 +432,39 @@ public function __construct( $this->totalPrice = $totalPrice; $this->taxedPrice = $taxedPrice; $this->taxedShippingPrice = $taxedShippingPrice; - $this->shippingAddress = $shippingAddress; + $this->taxMode = $taxMode; + $this->taxRoundingMode = $taxRoundingMode; + $this->taxCalculationMode = $taxCalculationMode; + $this->inventoryMode = $inventoryMode; $this->billingAddress = $billingAddress; + $this->shippingAddress = $shippingAddress; $this->shippingMode = $shippingMode; $this->shippingKey = $shippingKey; + $this->shippingInfo = $shippingInfo; + $this->shippingRateInput = $shippingRateInput; $this->shippingCustomFields = $shippingCustomFields; $this->shipping = $shipping; - $this->taxMode = $taxMode; - $this->taxRoundingMode = $taxRoundingMode; - $this->customerGroup = $customerGroup; + $this->itemShippingAddresses = $itemShippingAddresses; + $this->discountCodes = $discountCodes; + $this->directDiscounts = $directDiscounts; + $this->refusedGifts = $refusedGifts; + $this->paymentInfo = $paymentInfo; $this->country = $country; + $this->locale = $locale; + $this->origin = $origin; + $this->cart = $cart; + $this->quote = $quote; $this->orderState = $orderState; - $this->state = $state; $this->shipmentState = $shipmentState; $this->paymentState = $paymentState; - $this->shippingInfo = $shippingInfo; + $this->state = $state; $this->syncInfo = $syncInfo; $this->returnInfo = $returnInfo; - $this->purchaseOrderNumber = $purchaseOrderNumber; - $this->discountCodes = $discountCodes; $this->lastMessageSequenceNumber = $lastMessageSequenceNumber; - $this->cart = $cart; - $this->quote = $quote; $this->custom = $custom; - $this->paymentInfo = $paymentInfo; - $this->locale = $locale; - $this->inventoryMode = $inventoryMode; - $this->origin = $origin; - $this->taxCalculationMode = $taxCalculationMode; - $this->shippingRateInput = $shippingRateInput; - $this->itemShippingAddresses = $itemShippingAddresses; - $this->refusedGifts = $refusedGifts; + $this->completedAt = $completedAt; + $this->lastModifiedBy = $lastModifiedBy; + $this->createdBy = $createdBy; } /** @@ -479,7 +488,7 @@ public function getId() } /** - *The current version of the order.
+ *Current version of the Order.
* * * @return null|int @@ -499,6 +508,8 @@ public function getVersion() } /** + *Date and time (UTC) the Order was initially created.
+ * * * @return null|DateTimeImmutable */ @@ -521,6 +532,8 @@ public function getCreatedAt() } /** + *Date and time (UTC) the Order was last updated.
+ * * * @return null|DateTimeImmutable */ @@ -543,132 +556,110 @@ public function getLastModifiedAt() } /** - *Present on resources created after 1 February 2019 except for events not tracked.
+ *User-defined identifier of the Order that is unique across a Project.
* * - * @return null|LastModifiedBy + * @return null|string */ - public function getLastModifiedBy() + public function getOrderNumber() { - if (is_null($this->lastModifiedBy)) { - /** @psalm-var stdClass|arrayPresent on resources created after 1 February 2019 except for events not tracked.
+ *User-defined identifier of a purchase Order.
+ *It is typically set by the Buyer and can be used with Quotes to track the purchase Order during the quote and order flow.
* * - * @return null|CreatedBy + * @return null|string */ - public function getCreatedBy() + public function getPurchaseOrderNumber() { - if (is_null($this->createdBy)) { - /** @psalm-var stdClass|arrayThis field will only be present if it was set for Order Import
+ *id
of the Customer that the Order belongs to.
String that uniquely identifies an order. - * It can be used to create more human-readable (in contrast to ID) identifier for the order. - * It should be unique across a project. - * Once it's set it cannot be changed.
+ *Email address of the Customer that the Order belongs to.
* * * @return null|string */ - public function getOrderNumber() + public function getCustomerEmail() { - if (is_null($this->orderNumber)) { + if (is_null($this->customerEmail)) { /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_ORDER_NUMBER); + $data = $this->raw(self::FIELD_CUSTOMER_EMAIL); if (is_null($data)) { return null; } - $this->orderNumber = (string) $data; + $this->customerEmail = (string) $data; } - return $this->orderNumber; + return $this->customerEmail; } /** + *Reference to the Customer Group of the Customer that the Order belongs to. + * Used for LineItem Price selection.
* - * @return null|string - */ - public function getCustomerId() - { - if (is_null($this->customerId)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_CUSTOMER_ID); - if (is_null($data)) { - return null; - } - $this->customerId = (string) $data; - } - - return $this->customerId; - } - - /** * - * @return null|string + * @return null|CustomerGroupReference */ - public function getCustomerEmail() + public function getCustomerGroup() { - if (is_null($this->customerEmail)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_CUSTOMER_EMAIL); + if (is_null($this->customerGroup)) { + /** @psalm-var stdClass|arrayIdentifies carts and orders belonging to an anonymous session (the customer has not signed up/in yet).
+ *Anonymous session associated with the Order.
* * * @return null|string @@ -688,7 +679,7 @@ public function getAnonymousId() } /** - *The Business Unit the Order belongs to.
+ *Reference to a Business Unit the Order belongs to.
* * * @return null|BusinessUnitKeyReference @@ -709,6 +700,8 @@ public function getBusinessUnit() } /** + *Reference to a Store the Order belongs to.
+ * * * @return null|StoreKeyReference */ @@ -728,6 +721,8 @@ public function getStore() } /** + *Line Items that are part of the Order.
+ * * * @return null|LineItemCollection */ @@ -746,6 +741,8 @@ public function getLineItems() } /** + *Custom Line Items that are part of the Order.
+ * * * @return null|CustomLineItemCollection */ @@ -764,6 +761,9 @@ public function getCustomLineItems() } /** + *Sum of the totalPrice
field of all LineItems and CustomLineItems, and if available, the price
field of ShippingInfo.
+ * Taxes are included if TaxRate includedInPrice
is true
for each price.
The taxes are calculated based on the shipping address.
+ *Platform
TaxMode, it is automatically set when a shipping address is set.External
TaxMode, it is automatically set when the external Tax Rate for all Line Items, Custom Line Items, and Shipping Methods in the Cart are set.Sum of taxedPrice
of ShippingInfo across all Shipping Methods.
- * For Platform
TaxMode, it is set automatically only if shipping address is set or Shipping Method is added to the Cart.
Sum of the taxedPrice
field of ShippingInfo across all Shipping Methods.
Holds all shipping-related information per Shipping Method.
- *For Multiple
ShippingMode, it is updated automatically after the Shipping Methods are added.
Indicates how Tax Rates are set.
* * - * @return null|Address + * @return null|string */ - public function getShippingAddress() + public function getTaxMode() { - if (is_null($this->shippingAddress)) { - /** @psalm-var stdClass|arrayIndicates how monetary values are rounded when calculating taxes for taxedPrice
.
Indicates whether one or multiple Shipping Methods are added to the Cart.
+ *Indicates how taxes are calculated when calculating taxes for taxedPrice
.
key
of the ShippingMethod for Single
ShippingMode.
Indicates how stock quantities are tracked for Line Items in the Order.
* * * @return null|string */ - public function getShippingKey() + public function getInventoryMode() { - if (is_null($this->shippingKey)) { + if (is_null($this->inventoryMode)) { /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_SHIPPING_KEY); + $data = $this->raw(self::FIELD_INVENTORY_MODE); if (is_null($data)) { return null; } - $this->shippingKey = (string) $data; + $this->inventoryMode = (string) $data; } - return $this->shippingKey; + return $this->inventoryMode; } /** - *Custom Fields of the Shipping Method for Single
ShippingMode.
Billing address associated with the Order.
* * - * @return null|CustomFields + * @return null|Address */ - public function getShippingCustomFields() + public function getBillingAddress() { - if (is_null($this->shippingCustomFields)) { + if (is_null($this->billingAddress)) { /** @psalm-var stdClass|arrayHolds all shipping-related information per Shipping Method for Multiple
ShippingMode.
It is updated automatically after the Shipping Method is added.
+ *Shipping address associated with the Order. + * Determines eligible ShippingMethod rates and Tax Rates of Line Items.
* * - * @return null|ShippingCollection + * @return null|Address */ - public function getShipping() + public function getShippingAddress() { - if (is_null($this->shipping)) { - /** @psalm-var ?listIndicates whether there can be one or multiple Shipping Methods.
+ * * * @return null|string */ - public function getTaxMode() + public function getShippingMode() { - if (is_null($this->taxMode)) { + if (is_null($this->shippingMode)) { /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_TAX_MODE); + $data = $this->raw(self::FIELD_SHIPPING_MODE); if (is_null($data)) { return null; } - $this->taxMode = (string) $data; + $this->shippingMode = (string) $data; } - return $this->taxMode; + return $this->shippingMode; } /** - *When calculating taxes for taxedPrice
, the selected mode is used for rouding.
key
of the ShippingMethod for Single
ShippingMode.
Set when the customer is set and the customer is a member of a customer group. - * Used for product variant price selection.
+ *Shipping-related information for Single
ShippingMode.
+ * Automatically set when a Shipping Method is set.
A two-digit country code as per ISO 3166-1 alpha-2. - * Used for product variant price selection.
+ *Input used to select a ShippingRatePriceTier.
+ * The data type of this field depends on the shippingRateInputType.type
configured in the Project:
CartClassification
, it is ClassificationShippingRateInput.CartScore
, it is ScoreShippingRateInput.CartValue
, it cannot be used.One of the four predefined OrderStates.
+ *Custom Fields of the Shipping Method for Single
ShippingMode.
This reference can point to a state in a custom workflow.
+ *Shipping-related information for Multiple
ShippingMode.
+ * Updated automatically each time a new Shipping Method is added.
Additional shipping addresses of the Order as specified by LineItems using the shippingDetails
field.
+ * Eligible Shipping Methods or applicable Tax Rates are determined by the address in shippingAddress
, and not itemShippingAddresses
.
Discount Codes added to the Order.
+ * An Order that has directDiscounts
cannot have discountCodes
.
Set if the ShippingMethod is set.
+ *Direct Discounts added to the Order.
+ * An Order that has discountCodes
cannot have directDiscounts
.
Automatically set when a Line Item with GiftLineItem
LineItemMode is removed from the Order.
Payment information related to the Order.
* - * @return null|ReturnInfoCollection + * + * @return null|PaymentInfo */ - public function getReturnInfo() + public function getPaymentInfo() { - if (is_null($this->returnInfo)) { - /** @psalm-var ?listThe Purchase Order Number is typically set by the Buyer on a QuoteRequest to - * track the purchase order during the quote and order flow.
+ *Used for LineItem Price selection.
* * * @return null|string */ - public function getPurchaseOrderNumber() + public function getCountry() { - if (is_null($this->purchaseOrderNumber)) { + if (is_null($this->country)) { /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_PURCHASE_ORDER_NUMBER); + $data = $this->raw(self::FIELD_COUNTRY); if (is_null($data)) { return null; } - $this->purchaseOrderNumber = (string) $data; + $this->country = (string) $data; } - return $this->purchaseOrderNumber; + return $this->country; } /** + *Languages of the Order. + * Can only contain languages supported by the Project.
* - * @return null|DiscountCodeInfoCollection + * + * @return null|string */ - public function getDiscountCodes() + public function getLocale() { - if (is_null($this->discountCodes)) { - /** @psalm-var ?listInternal-only field.
+ *Indicates the origin of the Cart from which the Order was created.
* - * @deprecated - * @return null|int + * + * @return null|string */ - public function getLastMessageSequenceNumber() + public function getOrigin() { - if (is_null($this->lastMessageSequenceNumber)) { - /** @psalm-var ?int $data */ - $data = $this->raw(self::FIELD_LAST_MESSAGE_SEQUENCE_NUMBER); + if (is_null($this->origin)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ORIGIN); if (is_null($data)) { return null; } - $this->lastMessageSequenceNumber = (int) $data; + $this->origin = (string) $data; } - return $this->lastMessageSequenceNumber; + return $this->origin; } /** - *Set when this order was created from a cart.
- * The cart will have the state Ordered
.
Reference to the Cart for an Order created from Cart.
+ * The referenced Cart will have the Ordered
CartState.
Set when this order was created from a quote.
+ *Reference to the Quote for an Order created from Quote.
* * * @return null|QuoteReference @@ -1266,182 +1290,234 @@ public function getQuote() } /** + *Current status of the Order.
* - * @return null|CustomFields + * + * @return null|string */ - public function getCustom() + public function getOrderState() { - if (is_null($this->custom)) { - /** @psalm-var stdClass|arrayShipment status of the Order.
* - * @return null|PaymentInfo + * + * @return null|string */ - public function getPaymentInfo() + public function getShipmentState() { - if (is_null($this->paymentInfo)) { - /** @psalm-var stdClass|arrayPayment status of the Order.
+ * * * @return null|string */ - public function getLocale() + public function getPaymentState() { - if (is_null($this->locale)) { + if (is_null($this->paymentState)) { /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_LOCALE); + $data = $this->raw(self::FIELD_PAYMENT_STATE); if (is_null($data)) { return null; } - $this->locale = (string) $data; + $this->paymentState = (string) $data; } - return $this->locale; + return $this->paymentState; } /** + *State of the Order. + * This reference can point to a State in a custom workflow.
* - * @return null|string + * + * @return null|StateReference */ - public function getInventoryMode() + public function getState() { - if (is_null($this->inventoryMode)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_INVENTORY_MODE); + if (is_null($this->state)) { + /** @psalm-var stdClass|arrayContains synchronization activity information of the Order (like export or import). + * Can only be set with Update SyncInfo update action.
* - * @return null|string + * + * @return null|SyncInfoCollection */ - public function getOrigin() + public function getSyncInfo() { - if (is_null($this->origin)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_ORIGIN); + if (is_null($this->syncInfo)) { + /** @psalm-var ?listWhen calculating taxes for taxedPrice
, the selected mode is used for calculating the price with LineItemLevel (horizontally) or UnitPriceLevel (vertically) calculation mode.
Contains information regarding the returns associated with the Order.
* * - * @return null|string + * @return null|ReturnInfoCollection */ - public function getTaxCalculationMode() + public function getReturnInfo() { - if (is_null($this->taxCalculationMode)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_TAX_CALCULATION_MODE); + if (is_null($this->returnInfo)) { + /** @psalm-var ?listInput used to select a ShippingRatePriceTier.
- * The data type of this field depends on the shippingRateInputType.type
configured in the Project:
CartClassification
, it is ClassificationShippingRateInput.CartScore
, it is ScoreShippingRateInput.CartValue
, it cannot be used.Internal-only field.
* + * @deprecated + * @return null|int + */ + public function getLastMessageSequenceNumber() + { + if (is_null($this->lastMessageSequenceNumber)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_LAST_MESSAGE_SEQUENCE_NUMBER); + if (is_null($data)) { + return null; + } + $this->lastMessageSequenceNumber = (int) $data; + } + + return $this->lastMessageSequenceNumber; + } + + /** + *Custom Fields of the Order.
* - * @return null|ShippingRateInput + * + * @return null|CustomFields */ - public function getShippingRateInput() + public function getCustom() { - if (is_null($this->shippingRateInput)) { + if (is_null($this->custom)) { /** @psalm-var stdClass|arrayContains addresses for orders with multiple shipping addresses.
+ *User-defined date and time (UTC) of the Order. + * Present only on an Order created using Order Import.
* * - * @return null|AddressCollection + * @return null|DateTimeImmutable */ - public function getItemShippingAddresses() + public function getCompletedAt() { - if (is_null($this->itemShippingAddresses)) { - /** @psalm-var ?listAutomatically filled when a line item with LineItemMode GiftLineItem
is removed from this order.
Present on resources created after 1 February 2019 except for events not tracked.
* * - * @return null|CartDiscountReferenceCollection + * @return null|LastModifiedBy */ - public function getRefusedGifts() + public function getLastModifiedBy() { - if (is_null($this->refusedGifts)) { - /** @psalm-var ?listPresent on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayNumber of elements skipped.
+ * * @return null|int */ - public function getCount(); + public function getOffset(); /** + *Actual number of results returned.
+ * * @return null|int */ - public function getTotal(); + public function getCount(); /** - *Number of elements skipped.
+ *Total number of results matching the query.
+ * This number is an estimation that is not strongly consistent.
+ * This field is returned by default.
+ * For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false
.
+ * When the results are filtered with a Query Predicate, total
is subject to a limit.
Orders matching the query.
+ * * @return null|OrderCollection */ @@ -58,6 +68,11 @@ public function getResults(); */ public function setLimit(?int $limit): void; + /** + * @param ?int $offset + */ + public function setOffset(?int $offset): void; + /** * @param ?int $count */ @@ -68,11 +83,6 @@ public function setCount(?int $count): void; */ public function setTotal(?int $total): void; - /** - * @param ?int $offset - */ - public function setOffset(?int $offset): void; - /** * @param ?OrderCollection $results */ diff --git a/lib/commercetools-api/src/Models/Order/OrderPagedQueryResponseBuilder.php b/lib/commercetools-api/src/Models/Order/OrderPagedQueryResponseBuilder.php index fc2a10893ac..eea1efe4c52 100644 --- a/lib/commercetools-api/src/Models/Order/OrderPagedQueryResponseBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderPagedQueryResponseBuilder.php @@ -30,19 +30,19 @@ final class OrderPagedQueryResponseBuilder implements Builder * @var ?int */ - private $count; + private $offset; /** * @var ?int */ - private $total; + private $count; /** * @var ?int */ - private $offset; + private $total; /** @@ -62,35 +62,45 @@ public function getLimit() } /** + *Number of elements skipped.
+ * * @return null|int */ - public function getCount() + public function getOffset() { - return $this->count; + return $this->offset; } /** + *Actual number of results returned.
+ * * @return null|int */ - public function getTotal() + public function getCount() { - return $this->total; + return $this->count; } /** - *Number of elements skipped.
+ *Total number of results matching the query.
+ * This number is an estimation that is not strongly consistent.
+ * This field is returned by default.
+ * For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false
.
+ * When the results are filtered with a Query Predicate, total
is subject to a limit.
Orders matching the query.
+ * * @return null|OrderCollection */ @@ -111,34 +121,34 @@ public function withLimit(?int $limit) } /** - * @param ?int $count + * @param ?int $offset * @return $this */ - public function withCount(?int $count) + public function withOffset(?int $offset) { - $this->count = $count; + $this->offset = $offset; return $this; } /** - * @param ?int $total + * @param ?int $count * @return $this */ - public function withTotal(?int $total) + public function withCount(?int $count) { - $this->total = $total; + $this->count = $count; return $this; } /** - * @param ?int $offset + * @param ?int $total * @return $this */ - public function withOffset(?int $offset) + public function withTotal(?int $total) { - $this->offset = $offset; + $this->total = $total; return $this; } @@ -159,9 +169,9 @@ public function build(): OrderPagedQueryResponse { return new OrderPagedQueryResponseModel( $this->limit, + $this->offset, $this->count, $this->total, - $this->offset, $this->results ); } diff --git a/lib/commercetools-api/src/Models/Order/OrderPagedQueryResponseModel.php b/lib/commercetools-api/src/Models/Order/OrderPagedQueryResponseModel.php index 8d863fd0bc2..7ba942c98d5 100644 --- a/lib/commercetools-api/src/Models/Order/OrderPagedQueryResponseModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderPagedQueryResponseModel.php @@ -29,19 +29,19 @@ final class OrderPagedQueryResponseModel extends JsonObjectModel implements Orde * * @var ?int */ - protected $count; + protected $offset; /** * * @var ?int */ - protected $total; + protected $count; /** * * @var ?int */ - protected $offset; + protected $total; /** * @@ -55,15 +55,15 @@ final class OrderPagedQueryResponseModel extends JsonObjectModel implements Orde */ public function __construct( ?int $limit = null, + ?int $offset = null, ?int $count = null, ?int $total = null, - ?int $offset = null, ?OrderCollection $results = null ) { $this->limit = $limit; + $this->offset = $offset; $this->count = $count; $this->total = $total; - $this->offset = $offset; $this->results = $results; } @@ -88,62 +88,72 @@ public function getLimit() } /** + *Number of elements skipped.
+ * * * @return null|int */ - public function getCount() + public function getOffset() { - if (is_null($this->count)) { + if (is_null($this->offset)) { /** @psalm-var ?int $data */ - $data = $this->raw(self::FIELD_COUNT); + $data = $this->raw(self::FIELD_OFFSET); if (is_null($data)) { return null; } - $this->count = (int) $data; + $this->offset = (int) $data; } - return $this->count; + return $this->offset; } /** + *Actual number of results returned.
+ * * * @return null|int */ - public function getTotal() + public function getCount() { - if (is_null($this->total)) { + if (is_null($this->count)) { /** @psalm-var ?int $data */ - $data = $this->raw(self::FIELD_TOTAL); + $data = $this->raw(self::FIELD_COUNT); if (is_null($data)) { return null; } - $this->total = (int) $data; + $this->count = (int) $data; } - return $this->total; + return $this->count; } /** - *Number of elements skipped.
+ *Total number of results matching the query.
+ * This number is an estimation that is not strongly consistent.
+ * This field is returned by default.
+ * For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false
.
+ * When the results are filtered with a Query Predicate, total
is subject to a limit.
Orders matching the query.
+ * * * @return null|OrderCollection */ @@ -170,6 +180,14 @@ public function setLimit(?int $limit): void $this->limit = $limit; } + /** + * @param ?int $offset + */ + public function setOffset(?int $offset): void + { + $this->offset = $offset; + } + /** * @param ?int $count */ @@ -186,14 +204,6 @@ public function setTotal(?int $total): void $this->total = $total; } - /** - * @param ?int $offset - */ - public function setOffset(?int $offset): void - { - $this->offset = $offset; - } - /** * @param ?OrderCollection $results */ diff --git a/lib/commercetools-api/src/Models/Order/OrderReference.php b/lib/commercetools-api/src/Models/Order/OrderReference.php index 271aa879b0c..1f86e013be6 100644 --- a/lib/commercetools-api/src/Models/Order/OrderReference.php +++ b/lib/commercetools-api/src/Models/Order/OrderReference.php @@ -17,13 +17,28 @@ interface OrderReference extends Reference public const FIELD_OBJ = 'obj'; /** + *Contains the representation of the expanded Order. Only present in responses to requests with Reference Expansion for Orders.
+ * * @return null|Order */ public function getObj(); + /** + *Unique identifier of the referenced Order.
+ * + + * @return null|string + */ + public function getId(); + /** * @param ?Order $obj */ public function setObj(?Order $obj): void; + + /** + * @param ?string $id + */ + public function setId(?string $id): void; } diff --git a/lib/commercetools-api/src/Models/Order/OrderReferenceBuilder.php b/lib/commercetools-api/src/Models/Order/OrderReferenceBuilder.php index dd6cd5fed79..0e166c3b8e6 100644 --- a/lib/commercetools-api/src/Models/Order/OrderReferenceBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderReferenceBuilder.php @@ -35,7 +35,7 @@ final class OrderReferenceBuilder implements Builder private $obj; /** - *Unique ID of the referenced resource.
+ *Unique identifier of the referenced Order.
* * @return null|string @@ -46,6 +46,8 @@ public function getId() } /** + *Contains the representation of the expanded Order. Only present in responses to requests with Reference Expansion for Orders.
+ * * @return null|Order */ diff --git a/lib/commercetools-api/src/Models/Order/OrderReferenceModel.php b/lib/commercetools-api/src/Models/Order/OrderReferenceModel.php index 70a0c625fa9..c785cbfc62d 100644 --- a/lib/commercetools-api/src/Models/Order/OrderReferenceModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderReferenceModel.php @@ -75,7 +75,7 @@ public function getTypeId() } /** - *Unique ID of the referenced resource.
+ *Unique identifier of the referenced Order.
* * * @return null|string @@ -95,6 +95,8 @@ public function getId() } /** + *Contains the representation of the expanded Order. Only present in responses to requests with Reference Expansion for Orders.
+ * * * @return null|Order */ diff --git a/lib/commercetools-api/src/Models/Order/OrderRemoveDeliveryAction.php b/lib/commercetools-api/src/Models/Order/OrderRemoveDeliveryAction.php index 040203598f1..ce448be51b4 100644 --- a/lib/commercetools-api/src/Models/Order/OrderRemoveDeliveryAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderRemoveDeliveryAction.php @@ -17,7 +17,8 @@ interface OrderRemoveDeliveryAction extends OrderUpdateAction public const FIELD_DELIVERY_KEY = 'deliveryKey'; /** - *Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
key
of the Address to remove from itemShippingAddresses
.
key
of the Address to remove from itemShippingAddresses
.
key
of the Address to remove from itemShippingAddresses
.
Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
ResourceIdentifier of a Payment.
+ *Payment to remove from the PaymentInfo.
* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Order/OrderRemovePaymentActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderRemovePaymentActionBuilder.php index 7c7bc5b3472..80b78024edc 100644 --- a/lib/commercetools-api/src/Models/Order/OrderRemovePaymentActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderRemovePaymentActionBuilder.php @@ -29,7 +29,7 @@ final class OrderRemovePaymentActionBuilder implements Builder private $payment; /** - *ResourceIdentifier of a Payment.
+ *Payment to remove from the PaymentInfo.
* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Order/OrderRemovePaymentActionModel.php b/lib/commercetools-api/src/Models/Order/OrderRemovePaymentActionModel.php index 6235283fe8f..fb46d3d9230 100644 --- a/lib/commercetools-api/src/Models/Order/OrderRemovePaymentActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderRemovePaymentActionModel.php @@ -65,7 +65,7 @@ public function getAction() } /** - *ResourceIdentifier of a Payment.
+ *Payment to remove from the PaymentInfo.
* * * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Order/OrderResourceIdentifier.php b/lib/commercetools-api/src/Models/Order/OrderResourceIdentifier.php index 42d2c44eaad..7c4679796ca 100644 --- a/lib/commercetools-api/src/Models/Order/OrderResourceIdentifier.php +++ b/lib/commercetools-api/src/Models/Order/OrderResourceIdentifier.php @@ -14,4 +14,29 @@ interface OrderResourceIdentifier extends ResourceIdentifier { + /** + *Unique identifier of the referenced Order.
+ * + + * @return null|string + */ + public function getId(); + + /** + *User-defined unique identifier of the referenced Order.
+ * + + * @return null|string + */ + public function getKey(); + + /** + * @param ?string $id + */ + public function setId(?string $id): void; + + /** + * @param ?string $key + */ + public function setKey(?string $key): void; } diff --git a/lib/commercetools-api/src/Models/Order/OrderResourceIdentifierBuilder.php b/lib/commercetools-api/src/Models/Order/OrderResourceIdentifierBuilder.php index 7dce089bfad..8bc192164e6 100644 --- a/lib/commercetools-api/src/Models/Order/OrderResourceIdentifierBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderResourceIdentifierBuilder.php @@ -35,7 +35,7 @@ final class OrderResourceIdentifierBuilder implements Builder private $key; /** - *Unique identifier of the referenced resource. Required if key
is absent.
Unique identifier of the referenced Order.
* * @return null|string @@ -46,7 +46,7 @@ public function getId() } /** - *User-defined unique identifier of the referenced resource. Required if id
is absent.
User-defined unique identifier of the referenced Order.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/Order/OrderResourceIdentifierModel.php b/lib/commercetools-api/src/Models/Order/OrderResourceIdentifierModel.php index 7dff591895a..c3eaedf0d78 100644 --- a/lib/commercetools-api/src/Models/Order/OrderResourceIdentifierModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderResourceIdentifierModel.php @@ -75,7 +75,7 @@ public function getTypeId() } /** - *Unique identifier of the referenced resource. Required if key
is absent.
Unique identifier of the referenced Order.
* * * @return null|string @@ -95,7 +95,7 @@ public function getId() } /** - *User-defined unique identifier of the referenced resource. Required if id
is absent.
User-defined unique identifier of the referenced Order.
* * * @return null|string diff --git a/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressAction.php b/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressAction.php index bc94493608a..e6de2794038 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressAction.php @@ -17,9 +17,8 @@ interface OrderSetBillingAddressAction extends OrderUpdateAction public const FIELD_ADDRESS = 'address'; /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set. + * If empty, any existing value is removed.
* * @return null|BaseAddress diff --git a/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressActionBuilder.php index c019967778c..1d0ca9edf76 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressActionBuilder.php @@ -29,9 +29,8 @@ final class OrderSetBillingAddressActionBuilder implements Builder private $address; /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set. + * If empty, any existing value is removed.
* * @return null|BaseAddress diff --git a/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressActionModel.php index 1a5b0b17b06..0d94c77077f 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressActionModel.php @@ -65,9 +65,8 @@ public function getAction() } /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set. + * If empty, any existing value is removed.
* * * @return null|BaseAddress diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldAction.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldAction.php index d374b45a9f3..217bc2dfa67 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldAction.php @@ -18,6 +18,8 @@ interface OrderSetCustomLineItemCustomFieldAction extends OrderUpdateAction public const FIELD_VALUE = 'value'; /** + *id
of the CustomLineItem to update.
id
of the CustomLineItem to update.
id
of the CustomLineItem to update.
id
of the CustomLineItem to update.
Defines the Type that extends the CustomLineItem with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the CustomLineItem.
+ *Defines the Type that extends the Custom Line Item with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Custom Line Item.
* * @return null|TypeResourceIdentifier @@ -35,7 +37,7 @@ public function getCustomLineItemId(); public function getType(); /** - *Sets the Custom Fields fields for the CustomLineItem.
+ *Sets the Custom Fields fields for the Custom Line Item.
* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeActionBuilder.php index 646e5c18b9b..39e6a7ae20a 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeActionBuilder.php @@ -43,6 +43,8 @@ final class OrderSetCustomLineItemCustomTypeActionBuilder implements Builder private $fields; /** + *id
of the CustomLineItem to update.
Defines the Type that extends the CustomLineItem with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the CustomLineItem.
+ *Defines the Type that extends the Custom Line Item with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Custom Line Item.
* * @return null|TypeResourceIdentifier @@ -64,7 +66,7 @@ public function getType() } /** - *Sets the Custom Fields fields for the CustomLineItem.
+ *Sets the Custom Fields fields for the Custom Line Item.
* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeActionModel.php index fd576964670..ebaa6dddeee 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeActionModel.php @@ -83,6 +83,8 @@ public function getAction() } /** + *id
of the CustomLineItem to update.
Defines the Type that extends the CustomLineItem with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the CustomLineItem.
+ *Defines the Type that extends the Custom Line Item with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Custom Line Item.
* * * @return null|TypeResourceIdentifier @@ -123,7 +125,7 @@ public function getType() } /** - *Sets the Custom Fields fields for the CustomLineItem.
+ *Sets the Custom Fields fields for the Custom Line Item.
* * * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsAction.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsAction.php index 3565bb3510a..3277b426414 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsAction.php @@ -18,13 +18,16 @@ interface OrderSetCustomLineItemShippingDetailsAction extends OrderUpdateAction public const FIELD_SHIPPING_DETAILS = 'shippingDetails'; /** + *id
of the CustomLineItem to update.
For order creation and updates, the sum of the targets
must match the quantity of the Line Items or Custom Line Items.
Value to set. + * If empty, any existing value is removed.
* * @return null|ItemShippingDetailsDraft diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsActionBuilder.php index a2b83b26dbe..4bee7247d20 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsActionBuilder.php @@ -35,6 +35,8 @@ final class OrderSetCustomLineItemShippingDetailsActionBuilder implements Builde private $shippingDetails; /** + *id
of the CustomLineItem to update.
For order creation and updates, the sum of the targets
must match the quantity of the Line Items or Custom Line Items.
Value to set. + * If empty, any existing value is removed.
* * @return null|ItemShippingDetailsDraft diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsActionModel.php index bcbf8177ca9..27a86378da5 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsActionModel.php @@ -73,6 +73,8 @@ public function getAction() } /** + *id
of the CustomLineItem to update.
For order creation and updates, the sum of the targets
must match the quantity of the Line Items or Custom Line Items.
Value to set. + * If empty, any existing value is removed.
* * * @return null|ItemShippingDetailsDraft diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomerEmailAction.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomerEmailAction.php index ced6ddf5653..2d67506f7d1 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomerEmailAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomerEmailAction.php @@ -16,6 +16,9 @@ interface OrderSetCustomerEmailAction extends OrderUpdateAction public const FIELD_EMAIL = 'email'; /** + *Value to set. + * If empty, any existing value is removed.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomerEmailActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomerEmailActionBuilder.php index 64a18a75c3d..f337d76576b 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomerEmailActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomerEmailActionBuilder.php @@ -27,6 +27,9 @@ final class OrderSetCustomerEmailActionBuilder implements Builder private $email; /** + *Value to set. + * If empty, any existing value is removed.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomerEmailActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomerEmailActionModel.php index 2067dc6eb61..e1ead9bd3cd 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomerEmailActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomerEmailActionModel.php @@ -63,6 +63,9 @@ public function getAction() } /** + *Value to set. + * If empty, any existing value is removed.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomerIdAction.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomerIdAction.php index 2c71c305a62..15d3cf2ee36 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomerIdAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomerIdAction.php @@ -16,6 +16,9 @@ interface OrderSetCustomerIdAction extends OrderUpdateAction public const FIELD_CUSTOMER_ID = 'customerId'; /** + *id
of an existing Customer.
+ * If empty, any existing value is removed.
id
of an existing Customer.
+ * If empty, any existing value is removed.
id
of an existing Customer.
+ * If empty, any existing value is removed.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set. + * If empty, any existing value is removed.
* * @return null|BaseAddress diff --git a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressActionBuilder.php index fb5350d08fb..750bd2b0ee1 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressActionBuilder.php @@ -41,7 +41,8 @@ final class OrderSetDeliveryAddressActionBuilder implements Builder private $address; /** - *Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set. + * If empty, any existing value is removed.
* * @return null|BaseAddress diff --git a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressActionModel.php index 919bf634f70..83fb00e0291 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressActionModel.php @@ -81,7 +81,8 @@ public function getAction() } /** - *Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set. + * If empty, any existing value is removed.
* * * @return null|BaseAddress diff --git a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressCustomFieldAction.php index a60c12f2baf..a610c185ecc 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressCustomFieldAction.php @@ -19,7 +19,8 @@ interface OrderSetDeliveryAddressCustomFieldAction extends OrderUpdateAction public const FIELD_VALUE = 'value'; /** - *Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Defines the Type that extends the address
in a Delivery with Custom Fields.
- * If absent, any existing Type and Custom Fields are removed from the address
in a Delivery.
Defines the Type that extends the Delivery address
with Custom Fields.
+ * If absent, any existing Type and Custom Fields are removed from the Delivery address
.
Sets the Custom Fields fields for the address
in a Delivery.
Sets the Custom Fields fields for the Delivery address
.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Defines the Type that extends the address
in a Delivery with Custom Fields.
- * If absent, any existing Type and Custom Fields are removed from the address
in a Delivery.
Defines the Type that extends the Delivery address
with Custom Fields.
+ * If absent, any existing Type and Custom Fields are removed from the Delivery address
.
Sets the Custom Fields fields for the address
in a Delivery.
Sets the Custom Fields fields for the Delivery address
.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Defines the Type that extends the address
in a Delivery with Custom Fields.
- * If absent, any existing Type and Custom Fields are removed from the address
in a Delivery.
Defines the Type that extends the Delivery address
with Custom Fields.
+ * If absent, any existing Type and Custom Fields are removed from the Delivery address
.
Sets the Custom Fields fields for the address
in a Delivery.
Sets the Custom Fields fields for the Delivery address
.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Value to set. + * If empty, any existing value is removed.
+ * * @return null|DeliveryItemCollection */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryItemsActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryItemsActionBuilder.php index c21236193d2..491d6be3970 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryItemsActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryItemsActionBuilder.php @@ -39,7 +39,8 @@ final class OrderSetDeliveryItemsActionBuilder implements Builder private $items; /** - *Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Value to set. + * If empty, any existing value is removed.
+ * * @return null|DeliveryItemCollection */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryItemsActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryItemsActionModel.php index 59bad4297d7..fd4203129d6 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryItemsActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryItemsActionModel.php @@ -79,7 +79,8 @@ public function getAction() } /** - *Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Value to set. + * If empty, any existing value is removed.
+ * * * @return null|DeliveryItemCollection */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetItemShippingAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/Order/OrderSetItemShippingAddressCustomFieldAction.php index a827ef13486..3b04e0346c7 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetItemShippingAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetItemShippingAddressCustomFieldAction.php @@ -18,6 +18,8 @@ interface OrderSetItemShippingAddressCustomFieldAction extends OrderUpdateAction public const FIELD_VALUE = 'value'; /** + *key
of the Address in itemShippingAddresses
.
key
of the Address in itemShippingAddresses
.
key
of the Address in itemShippingAddresses
.
key
of the Address in itemShippingAddresses
.
key
of the Address in itemShippingAddresses
.
key
of the Address in itemShippingAddresses
.
Defines the Type that extends the LineItem with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the LineItem.
+ *Defines the Type that extends the Line Item with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Line Item.
* * @return null|TypeResourceIdentifier @@ -46,7 +46,7 @@ public function getLineItemKey(); public function getType(); /** - *Sets the Custom Fields fields for the LineItem.
+ *Sets the Custom Fields fields for the Line Item.
* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomTypeActionBuilder.php index 87dc182e0f2..af536a33d6d 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomTypeActionBuilder.php @@ -71,8 +71,8 @@ public function getLineItemKey() } /** - *Defines the Type that extends the LineItem with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the LineItem.
+ *Defines the Type that extends the Line Item with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Line Item.
* * @return null|TypeResourceIdentifier @@ -83,7 +83,7 @@ public function getType() } /** - *Sets the Custom Fields fields for the LineItem.
+ *Sets the Custom Fields fields for the Line Item.
* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomTypeActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomTypeActionModel.php index 324002a5494..009af51ee8a 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomTypeActionModel.php @@ -131,8 +131,8 @@ public function getLineItemKey() } /** - *Defines the Type that extends the LineItem with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the LineItem.
+ *Defines the Type that extends the Line Item with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Line Item.
* * * @return null|TypeResourceIdentifier @@ -153,7 +153,7 @@ public function getType() } /** - *Sets the Custom Fields fields for the LineItem.
+ *Sets the Custom Fields fields for the Line Item.
* * * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/Order/OrderSetLineItemShippingDetailsAction.php b/lib/commercetools-api/src/Models/Order/OrderSetLineItemShippingDetailsAction.php index bd424a84418..a9543635166 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetLineItemShippingDetailsAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetLineItemShippingDetailsAction.php @@ -35,7 +35,8 @@ public function getLineItemId(); public function getLineItemKey(); /** - *For order creation and updates, the sum of the targets
must match the quantity of the Line Items or Custom Line Items.
Value to set. + * If empty, the existing value is removed.
* * @return null|ItemShippingDetailsDraft diff --git a/lib/commercetools-api/src/Models/Order/OrderSetLineItemShippingDetailsActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetLineItemShippingDetailsActionBuilder.php index 5bc95c528f5..84b60cfb95b 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetLineItemShippingDetailsActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetLineItemShippingDetailsActionBuilder.php @@ -63,7 +63,8 @@ public function getLineItemKey() } /** - *For order creation and updates, the sum of the targets
must match the quantity of the Line Items or Custom Line Items.
Value to set. + * If empty, the existing value is removed.
* * @return null|ItemShippingDetailsDraft diff --git a/lib/commercetools-api/src/Models/Order/OrderSetLineItemShippingDetailsActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetLineItemShippingDetailsActionModel.php index 651faca609c..0b3ec385119 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetLineItemShippingDetailsActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetLineItemShippingDetailsActionModel.php @@ -121,7 +121,8 @@ public function getLineItemKey() } /** - *For order creation and updates, the sum of the targets
must match the quantity of the Line Items or Custom Line Items.
Value to set. + * If empty, the existing value is removed.
* * * @return null|ItemShippingDetailsDraft diff --git a/lib/commercetools-api/src/Models/Order/OrderSetLocaleAction.php b/lib/commercetools-api/src/Models/Order/OrderSetLocaleAction.php index 261dd4c019d..b3e685e1daf 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetLocaleAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetLocaleAction.php @@ -16,6 +16,10 @@ interface OrderSetLocaleAction extends OrderUpdateAction public const FIELD_LOCALE = 'locale'; /** + *Value to set. + * Must be one of the Project's languages. + * If empty, any existing value is removed.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetLocaleActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetLocaleActionBuilder.php index 1a8d60114f9..e095f4ffbe8 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetLocaleActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetLocaleActionBuilder.php @@ -27,6 +27,10 @@ final class OrderSetLocaleActionBuilder implements Builder private $locale; /** + *Value to set. + * Must be one of the Project's languages. + * If empty, any existing value is removed.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetLocaleActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetLocaleActionModel.php index 7c349854896..fa0e7f9125b 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetLocaleActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetLocaleActionModel.php @@ -63,6 +63,10 @@ public function getAction() } /** + *Value to set. + * Must be one of the Project's languages. + * If empty, any existing value is removed.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetOrderNumberAction.php b/lib/commercetools-api/src/Models/Order/OrderSetOrderNumberAction.php index 04e7c464b57..6bc31282f1e 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetOrderNumberAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetOrderNumberAction.php @@ -16,6 +16,10 @@ interface OrderSetOrderNumberAction extends OrderUpdateAction public const FIELD_ORDER_NUMBER = 'orderNumber'; /** + *Value to set. + * Must be unique across a Project. + * Once set, the value cannot be changed.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetOrderNumberActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetOrderNumberActionBuilder.php index 9f194dd7e3f..b21b333de19 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetOrderNumberActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetOrderNumberActionBuilder.php @@ -27,6 +27,10 @@ final class OrderSetOrderNumberActionBuilder implements Builder private $orderNumber; /** + *Value to set. + * Must be unique across a Project. + * Once set, the value cannot be changed.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetOrderNumberActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetOrderNumberActionModel.php index 3453ae61ff3..91a0e765b4c 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetOrderNumberActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetOrderNumberActionModel.php @@ -63,6 +63,10 @@ public function getAction() } /** + *Value to set. + * Must be unique across a Project. + * Once set, the value cannot be changed.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetParcelCustomFieldAction.php b/lib/commercetools-api/src/Models/Order/OrderSetParcelCustomFieldAction.php index 283b4176d02..5ad94657054 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetParcelCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetParcelCustomFieldAction.php @@ -19,7 +19,8 @@ interface OrderSetParcelCustomFieldAction extends OrderUpdateAction public const FIELD_VALUE = 'value'; /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Value to set. + * If empty, any existing value is removed.
+ * * @return null|DeliveryItemCollection */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetParcelItemsActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetParcelItemsActionBuilder.php index 18d90f441a8..6627aa051fb 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetParcelItemsActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetParcelItemsActionBuilder.php @@ -39,7 +39,8 @@ final class OrderSetParcelItemsActionBuilder implements Builder private $items; /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Value to set. + * If empty, any existing value is removed.
+ * * @return null|DeliveryItemCollection */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetParcelItemsActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetParcelItemsActionModel.php index c920d82b2d3..3d35ab1f3fc 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetParcelItemsActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetParcelItemsActionModel.php @@ -79,7 +79,8 @@ public function getAction() } /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Value to set. + * If empty, any existing value is removed.
+ * * * @return null|DeliveryItemCollection */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetParcelMeasurementsAction.php b/lib/commercetools-api/src/Models/Order/OrderSetParcelMeasurementsAction.php index 534d6a902fb..9d437333e01 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetParcelMeasurementsAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetParcelMeasurementsAction.php @@ -18,7 +18,8 @@ interface OrderSetParcelMeasurementsAction extends OrderUpdateAction public const FIELD_MEASUREMENTS = 'measurements'; /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Value to set. + * If empty, any existing value is removed.
+ * * @return null|ParcelMeasurements */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetParcelMeasurementsActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetParcelMeasurementsActionBuilder.php index 45749b63f78..c0000667a9c 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetParcelMeasurementsActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetParcelMeasurementsActionBuilder.php @@ -39,7 +39,8 @@ final class OrderSetParcelMeasurementsActionBuilder implements Builder private $measurements; /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Value to set. + * If empty, any existing value is removed.
+ * * @return null|ParcelMeasurements */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetParcelMeasurementsActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetParcelMeasurementsActionModel.php index 309f164571e..d07366bd93b 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetParcelMeasurementsActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetParcelMeasurementsActionModel.php @@ -79,7 +79,8 @@ public function getAction() } /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Value to set. + * If empty, any existing value is removed.
+ * * * @return null|ParcelMeasurements */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetParcelTrackingDataAction.php b/lib/commercetools-api/src/Models/Order/OrderSetParcelTrackingDataAction.php index 3a90e4dc973..66db8db3ff3 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetParcelTrackingDataAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetParcelTrackingDataAction.php @@ -18,7 +18,8 @@ interface OrderSetParcelTrackingDataAction extends OrderUpdateAction public const FIELD_TRACKING_DATA = 'trackingData'; /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Value to set. + * If empty, any existing value is removed.
+ * * @return null|TrackingData */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetParcelTrackingDataActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetParcelTrackingDataActionBuilder.php index 3843253414c..bde3f9e6f64 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetParcelTrackingDataActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetParcelTrackingDataActionBuilder.php @@ -39,7 +39,8 @@ final class OrderSetParcelTrackingDataActionBuilder implements Builder private $trackingData; /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Value to set. + * If empty, any existing value is removed.
+ * * @return null|TrackingData */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetParcelTrackingDataActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetParcelTrackingDataActionModel.php index 2cfceb87b4e..4d0358b27a7 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetParcelTrackingDataActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetParcelTrackingDataActionModel.php @@ -79,7 +79,8 @@ public function getAction() } /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Value to set. + * If empty, any existing value is removed.
+ * * * @return null|TrackingData */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetPurchaseOrderNumberAction.php b/lib/commercetools-api/src/Models/Order/OrderSetPurchaseOrderNumberAction.php index 89add1abb82..ec28c112a26 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetPurchaseOrderNumberAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetPurchaseOrderNumberAction.php @@ -16,8 +16,8 @@ interface OrderSetPurchaseOrderNumberAction extends OrderUpdateAction public const FIELD_PURCHASE_ORDER_NUMBER = 'purchaseOrderNumber'; /** - *Identifier for a purchase order, usually in a B2B context. - * The Purchase Order Number is typically entered by the Buyer and can also be used with Quotes.
+ *Value to set. + * If empty, any existing value is removed.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/Order/OrderSetPurchaseOrderNumberActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetPurchaseOrderNumberActionBuilder.php index 5221c36f26c..fe5c1098183 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetPurchaseOrderNumberActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetPurchaseOrderNumberActionBuilder.php @@ -27,8 +27,8 @@ final class OrderSetPurchaseOrderNumberActionBuilder implements Builder private $purchaseOrderNumber; /** - *Identifier for a purchase order, usually in a B2B context. - * The Purchase Order Number is typically entered by the Buyer and can also be used with Quotes.
+ *Value to set. + * If empty, any existing value is removed.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/Order/OrderSetPurchaseOrderNumberActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetPurchaseOrderNumberActionModel.php index 8653179dc85..4161a854a08 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetPurchaseOrderNumberActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetPurchaseOrderNumberActionModel.php @@ -63,8 +63,8 @@ public function getAction() } /** - *Identifier for a purchase order, usually in a B2B context. - * The Purchase Order Number is typically entered by the Buyer and can also be used with Quotes.
+ *Value to set. + * If empty, any existing value is removed.
* * * @return null|string diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnInfoAction.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnInfoAction.php index b57500faa85..8312215c88f 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnInfoAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnInfoAction.php @@ -16,6 +16,9 @@ interface OrderSetReturnInfoAction extends OrderUpdateAction public const FIELD_ITEMS = 'items'; /** + *Value to set. + * If empty, any existing value is removed.
+ * * @return null|ReturnInfoDraftCollection */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnInfoActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnInfoActionBuilder.php index 56f3c920ae5..f12d1589897 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnInfoActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnInfoActionBuilder.php @@ -27,6 +27,9 @@ final class OrderSetReturnInfoActionBuilder implements Builder private $items; /** + *Value to set. + * If empty, any existing value is removed.
+ * * @return null|ReturnInfoDraftCollection */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnInfoActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnInfoActionModel.php index 3673b9294b9..798d0137ba9 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnInfoActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnInfoActionModel.php @@ -63,6 +63,9 @@ public function getAction() } /** + *Value to set. + * If empty, any existing value is removed.
+ * * * @return null|ReturnInfoDraftCollection */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldAction.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldAction.php index 5e4dd705794..980ef4a5e2d 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldAction.php @@ -18,6 +18,8 @@ interface OrderSetReturnItemCustomFieldAction extends OrderUpdateAction public const FIELD_VALUE = 'value'; /** + *id
of the ReturnItem to update.
id
of the ReturnItem to update.
id
of the ReturnItem to update.
id
of the ReturnItem to update.
Defines the Type that extends the ReturnItem with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the ReturnItem.
+ *Defines the Type that extends the Return Item with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Return Item.
* * @return null|TypeResourceIdentifier @@ -35,7 +37,7 @@ public function getReturnItemId(); public function getType(); /** - *Sets the Custom Fields fields for the ReturnItem.
+ *Sets the Custom Fields fields for the Return Item.
* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeActionBuilder.php index 2347b564b64..bfeb53ab507 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeActionBuilder.php @@ -43,6 +43,8 @@ final class OrderSetReturnItemCustomTypeActionBuilder implements Builder private $fields; /** + *id
of the ReturnItem to update.
Defines the Type that extends the ReturnItem with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the ReturnItem.
+ *Defines the Type that extends the Return Item with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Return Item.
* * @return null|TypeResourceIdentifier @@ -64,7 +66,7 @@ public function getType() } /** - *Sets the Custom Fields fields for the ReturnItem.
+ *Sets the Custom Fields fields for the Return Item.
* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeActionModel.php index fd044caed9a..ff010648f0a 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeActionModel.php @@ -83,6 +83,8 @@ public function getAction() } /** + *id
of the ReturnItem to update.
Defines the Type that extends the ReturnItem with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the ReturnItem.
+ *Defines the Type that extends the Return Item with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Return Item.
* * * @return null|TypeResourceIdentifier @@ -123,7 +125,7 @@ public function getType() } /** - *Sets the Custom Fields fields for the ReturnItem.
+ *Sets the Custom Fields fields for the Return Item.
* * * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateAction.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateAction.php index 7a57bdb3e5c..6ae54daa461 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateAction.php @@ -17,12 +17,16 @@ interface OrderSetReturnPaymentStateAction extends OrderUpdateAction public const FIELD_PAYMENT_STATE = 'paymentState'; /** + *id
of the ReturnItem to update.
New Payment status of the ReturnItem.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateActionBuilder.php index 6636630d52b..6d127eb73c9 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateActionBuilder.php @@ -33,6 +33,8 @@ final class OrderSetReturnPaymentStateActionBuilder implements Builder private $paymentState; /** + *id
of the ReturnItem to update.
New Payment status of the ReturnItem.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateActionModel.php index bf015e38090..73a13bfe884 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateActionModel.php @@ -71,6 +71,8 @@ public function getAction() } /** + *id
of the ReturnItem to update.
New Payment status of the ReturnItem.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateAction.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateAction.php index 72821bd3416..e912725f511 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateAction.php @@ -17,12 +17,16 @@ interface OrderSetReturnShipmentStateAction extends OrderUpdateAction public const FIELD_SHIPMENT_STATE = 'shipmentState'; /** + *id
of the ReturnItem to update.
New shipment state of the ReturnItem.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateActionBuilder.php index 901056a5373..e3519b76b87 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateActionBuilder.php @@ -33,6 +33,8 @@ final class OrderSetReturnShipmentStateActionBuilder implements Builder private $shipmentState; /** + *id
of the ReturnItem to update.
New shipment state of the ReturnItem.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateActionModel.php index 274be5de398..d30c771c915 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateActionModel.php @@ -71,6 +71,8 @@ public function getAction() } /** + *id
of the ReturnItem to update.
New shipment state of the ReturnItem.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressAction.php b/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressAction.php index 7972cb35a0e..d2109c5efa4 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressAction.php @@ -17,9 +17,8 @@ interface OrderSetShippingAddressAction extends OrderUpdateAction public const FIELD_ADDRESS = 'address'; /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set. + * If empty, any existing value is removed.
* * @return null|BaseAddress diff --git a/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressActionBuilder.php index 10107a9f5b2..24e60ad86d7 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressActionBuilder.php @@ -29,9 +29,8 @@ final class OrderSetShippingAddressActionBuilder implements Builder private $address; /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set. + * If empty, any existing value is removed.
* * @return null|BaseAddress diff --git a/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressActionModel.php index c26bb94ebcb..03c0493a579 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressActionModel.php @@ -65,9 +65,8 @@ public function getAction() } /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set. + * If empty, any existing value is removed.
* * * @return null|BaseAddress diff --git a/lib/commercetools-api/src/Models/Order/OrderSetStoreAction.php b/lib/commercetools-api/src/Models/Order/OrderSetStoreAction.php index 67cb8b71daa..23bfe7f8bd8 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetStoreAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetStoreAction.php @@ -17,7 +17,9 @@ interface OrderSetStoreAction extends OrderUpdateAction public const FIELD_STORE = 'store'; /** - *ResourceIdentifier to a Store.
+ *Value to set. + * If empty, any existing value is removed.
+ *If store
references the same Store the Order is currently assigned to or if you try to remove the value when no Store is currently assigned, a 400
error is returned.
ResourceIdentifier to a Store.
+ *Value to set. + * If empty, any existing value is removed.
+ *If store
references the same Store the Order is currently assigned to or if you try to remove the value when no Store is currently assigned, a 400
error is returned.
ResourceIdentifier to a Store.
+ *Value to set. + * If empty, any existing value is removed.
+ *If store
references the same Store the Order is currently assigned to or if you try to remove the value when no Store is currently assigned, a 400
error is returned.
id
of the CustomLineItem to update.
Number of Custom Line Items that should transition State.
+ * * @return null|int */ public function getQuantity(); /** - *ResourceIdentifier to a State.
+ *State the Custom Line Item should transition from.
* * @return null|StateResourceIdentifier @@ -42,7 +46,7 @@ public function getQuantity(); public function getFromState(); /** - *ResourceIdentifier to a State.
+ *State the Custom Line Item should transition to.
* * @return null|StateResourceIdentifier @@ -50,6 +54,8 @@ public function getFromState(); public function getToState(); /** + *Date and time (UTC) to perform the State transition.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateActionBuilder.php index 9ac69a8405a..cd60789d03d 100644 --- a/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateActionBuilder.php @@ -54,6 +54,8 @@ final class OrderTransitionCustomLineItemStateActionBuilder implements Builder private $actualTransitionDate; /** + *id
of the CustomLineItem to update.
Number of Custom Line Items that should transition State.
+ * * @return null|int */ @@ -72,7 +76,7 @@ public function getQuantity() } /** - *ResourceIdentifier to a State.
+ *State the Custom Line Item should transition from.
* * @return null|StateResourceIdentifier @@ -83,7 +87,7 @@ public function getFromState() } /** - *ResourceIdentifier to a State.
+ *State the Custom Line Item should transition to.
* * @return null|StateResourceIdentifier @@ -94,6 +98,8 @@ public function getToState() } /** + *Date and time (UTC) to perform the State transition.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateActionModel.php b/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateActionModel.php index 37f1a579d0b..0003d2fc9a9 100644 --- a/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateActionModel.php @@ -98,6 +98,8 @@ public function getAction() } /** + *id
of the CustomLineItem to update.
Number of Custom Line Items that should transition State.
+ * * * @return null|int */ @@ -134,7 +138,7 @@ public function getQuantity() } /** - *ResourceIdentifier to a State.
+ *State the Custom Line Item should transition from.
* * * @return null|StateResourceIdentifier @@ -155,7 +159,7 @@ public function getFromState() } /** - *ResourceIdentifier to a State.
+ *State the Custom Line Item should transition to.
* * * @return null|StateResourceIdentifier @@ -176,6 +180,8 @@ public function getToState() } /** + *Date and time (UTC) to perform the State transition.
+ * * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateAction.php b/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateAction.php index e553f8ec86b..ccda9a71903 100644 --- a/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateAction.php @@ -22,19 +22,23 @@ interface OrderTransitionLineItemStateAction extends OrderUpdateAction public const FIELD_ACTUAL_TRANSITION_DATE = 'actualTransitionDate'; /** + *id
of the LineItem to update.
Number of Line Items that should transition State.
+ * * @return null|int */ public function getQuantity(); /** - *ResourceIdentifier to a State.
+ *State the Line Item should transition from.
* * @return null|StateResourceIdentifier @@ -42,7 +46,7 @@ public function getQuantity(); public function getFromState(); /** - *ResourceIdentifier to a State.
+ *State the Line Item should transition to.
* * @return null|StateResourceIdentifier @@ -50,6 +54,8 @@ public function getFromState(); public function getToState(); /** + *Date and time (UTC) to perform the State transition.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateActionBuilder.php index 419cdacfa46..9c4b1769067 100644 --- a/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateActionBuilder.php @@ -54,6 +54,8 @@ final class OrderTransitionLineItemStateActionBuilder implements Builder private $actualTransitionDate; /** + *id
of the LineItem to update.
Number of Line Items that should transition State.
+ * * @return null|int */ @@ -72,7 +76,7 @@ public function getQuantity() } /** - *ResourceIdentifier to a State.
+ *State the Line Item should transition from.
* * @return null|StateResourceIdentifier @@ -83,7 +87,7 @@ public function getFromState() } /** - *ResourceIdentifier to a State.
+ *State the Line Item should transition to.
* * @return null|StateResourceIdentifier @@ -94,6 +98,8 @@ public function getToState() } /** + *Date and time (UTC) to perform the State transition.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateActionModel.php b/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateActionModel.php index e9d0d19a5f2..f817ba21ec4 100644 --- a/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateActionModel.php @@ -98,6 +98,8 @@ public function getAction() } /** + *id
of the LineItem to update.
Number of Line Items that should transition State.
+ * * * @return null|int */ @@ -134,7 +138,7 @@ public function getQuantity() } /** - *ResourceIdentifier to a State.
+ *State the Line Item should transition from.
* * * @return null|StateResourceIdentifier @@ -155,7 +159,7 @@ public function getFromState() } /** - *ResourceIdentifier to a State.
+ *State the Line Item should transition to.
* * * @return null|StateResourceIdentifier @@ -176,6 +180,8 @@ public function getToState() } /** + *Date and time (UTC) to perform the State transition.
+ * * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/OrderTransitionStateAction.php b/lib/commercetools-api/src/Models/Order/OrderTransitionStateAction.php index 7ae0c579dab..89b0af0a714 100644 --- a/lib/commercetools-api/src/Models/Order/OrderTransitionStateAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderTransitionStateAction.php @@ -18,7 +18,8 @@ interface OrderTransitionStateAction extends OrderUpdateAction public const FIELD_FORCE = 'force'; /** - *ResourceIdentifier to a State.
+ *Value to set. + * If there is no State yet, the new State must be an initial State.
* * @return null|StateResourceIdentifier @@ -26,6 +27,8 @@ interface OrderTransitionStateAction extends OrderUpdateAction public function getState(); /** + *Set to true
to turn off validation.
ResourceIdentifier to a State.
+ *Value to set. + * If there is no State yet, the new State must be an initial State.
* * @return null|StateResourceIdentifier @@ -46,6 +47,8 @@ public function getState() } /** + *Set to true
to turn off validation.
ResourceIdentifier to a State.
+ *Value to set. + * If there is no State yet, the new State must be an initial State.
* * * @return null|StateResourceIdentifier @@ -94,6 +95,8 @@ public function getState() } /** + *Set to true
to turn off validation.
Expected version of the Order on which the changes should be applied. - * If the expected version does not match the actual version, a 409 Conflict error will be returned.
+ * If the expected version does not match the actual version, a 409 Conflict will be returned. * * @return null|int diff --git a/lib/commercetools-api/src/Models/Order/OrderUpdateBuilder.php b/lib/commercetools-api/src/Models/Order/OrderUpdateBuilder.php index 9804ec1649b..95a9d1277e6 100644 --- a/lib/commercetools-api/src/Models/Order/OrderUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderUpdateBuilder.php @@ -34,7 +34,7 @@ final class OrderUpdateBuilder implements Builder /** *Expected version of the Order on which the changes should be applied. - * If the expected version does not match the actual version, a 409 Conflict error will be returned.
+ * If the expected version does not match the actual version, a 409 Conflict will be returned. * * @return null|int diff --git a/lib/commercetools-api/src/Models/Order/OrderUpdateItemShippingAddressAction.php b/lib/commercetools-api/src/Models/Order/OrderUpdateItemShippingAddressAction.php index d6f9264a917..89fcb7c2ea1 100644 --- a/lib/commercetools-api/src/Models/Order/OrderUpdateItemShippingAddressAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderUpdateItemShippingAddressAction.php @@ -17,9 +17,7 @@ interface OrderUpdateItemShippingAddressAction extends OrderUpdateAction public const FIELD_ADDRESS = 'address'; /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
The new Address with the same key
as the Address it will replace.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
The new Address with the same key
as the Address it will replace.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
The new Address with the same key
as the Address it will replace.
Expected version of the Order on which the changes should be applied. - * If the expected version does not match the actual version, a 409 Conflict error will be returned.
+ * If the expected version does not match the actual version, a 409 Conflict will be returned. * * * @return null|int diff --git a/lib/commercetools-api/src/Models/Order/OrderUpdateSyncInfoAction.php b/lib/commercetools-api/src/Models/Order/OrderUpdateSyncInfoAction.php index f8315da3376..ddd6d80636a 100644 --- a/lib/commercetools-api/src/Models/Order/OrderUpdateSyncInfoAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderUpdateSyncInfoAction.php @@ -15,39 +15,45 @@ interface OrderUpdateSyncInfoAction extends OrderUpdateAction { - public const FIELD_CHANNEL = 'channel'; public const FIELD_EXTERNAL_ID = 'externalId'; + public const FIELD_CHANNEL = 'channel'; public const FIELD_SYNCED_AT = 'syncedAt'; /** - *ResourceIdentifier to a Channel.
+ *Set this to identify an external order instance, file, or other resource.
* - * @return null|ChannelResourceIdentifier + * @return null|string */ - public function getChannel(); + public function getExternalId(); /** + *The synchronization destination to set. Must not be empty.
+ * The referenced Channel must have the Channel Role OrderExport
or OrderImport
.
+ * Otherwise this update action returns an InvalidInput error.
If not set, it defaults to the current date and time.
+ * * @return null|DateTimeImmutable */ public function getSyncedAt(); /** - * @param ?ChannelResourceIdentifier $channel + * @param ?string $externalId */ - public function setChannel(?ChannelResourceIdentifier $channel): void; + public function setExternalId(?string $externalId): void; /** - * @param ?string $externalId + * @param ?ChannelResourceIdentifier $channel */ - public function setExternalId(?string $externalId): void; + public function setChannel(?ChannelResourceIdentifier $channel): void; /** * @param ?DateTimeImmutable $syncedAt diff --git a/lib/commercetools-api/src/Models/Order/OrderUpdateSyncInfoActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderUpdateSyncInfoActionBuilder.php index 97e5b18c262..0e2e811506a 100644 --- a/lib/commercetools-api/src/Models/Order/OrderUpdateSyncInfoActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderUpdateSyncInfoActionBuilder.php @@ -25,15 +25,15 @@ final class OrderUpdateSyncInfoActionBuilder implements Builder { /** - * @var null|ChannelResourceIdentifier|ChannelResourceIdentifierBuilder + * @var ?string */ - private $channel; + private $externalId; /** - * @var ?string + * @var null|ChannelResourceIdentifier|ChannelResourceIdentifierBuilder */ - private $externalId; + private $channel; /** @@ -42,26 +42,32 @@ final class OrderUpdateSyncInfoActionBuilder implements Builder private $syncedAt; /** - *ResourceIdentifier to a Channel.
+ *Set this to identify an external order instance, file, or other resource.
* - * @return null|ChannelResourceIdentifier + * @return null|string */ - public function getChannel() + public function getExternalId() { - return $this->channel instanceof ChannelResourceIdentifierBuilder ? $this->channel->build() : $this->channel; + return $this->externalId; } /** + *The synchronization destination to set. Must not be empty.
+ * The referenced Channel must have the Channel Role OrderExport
or OrderImport
.
+ * Otherwise this update action returns an InvalidInput error.
If not set, it defaults to the current date and time.
+ * * @return null|DateTimeImmutable */ @@ -71,23 +77,23 @@ public function getSyncedAt() } /** - * @param ?ChannelResourceIdentifier $channel + * @param ?string $externalId * @return $this */ - public function withChannel(?ChannelResourceIdentifier $channel) + public function withExternalId(?string $externalId) { - $this->channel = $channel; + $this->externalId = $externalId; return $this; } /** - * @param ?string $externalId + * @param ?ChannelResourceIdentifier $channel * @return $this */ - public function withExternalId(?string $externalId) + public function withChannel(?ChannelResourceIdentifier $channel) { - $this->externalId = $externalId; + $this->channel = $channel; return $this; } @@ -117,8 +123,8 @@ public function withChannelBuilder(?ChannelResourceIdentifierBuilder $channel) public function build(): OrderUpdateSyncInfoAction { return new OrderUpdateSyncInfoActionModel( - $this->channel instanceof ChannelResourceIdentifierBuilder ? $this->channel->build() : $this->channel, $this->externalId, + $this->channel instanceof ChannelResourceIdentifierBuilder ? $this->channel->build() : $this->channel, $this->syncedAt ); } diff --git a/lib/commercetools-api/src/Models/Order/OrderUpdateSyncInfoActionModel.php b/lib/commercetools-api/src/Models/Order/OrderUpdateSyncInfoActionModel.php index 5f5e3b0f59c..d762b37c731 100644 --- a/lib/commercetools-api/src/Models/Order/OrderUpdateSyncInfoActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderUpdateSyncInfoActionModel.php @@ -31,15 +31,15 @@ final class OrderUpdateSyncInfoActionModel extends JsonObjectModel implements Or /** * - * @var ?ChannelResourceIdentifier + * @var ?string */ - protected $channel; + protected $externalId; /** * - * @var ?string + * @var ?ChannelResourceIdentifier */ - protected $externalId; + protected $channel; /** * @@ -52,13 +52,13 @@ final class OrderUpdateSyncInfoActionModel extends JsonObjectModel implements Or * @psalm-suppress MissingParamType */ public function __construct( - ?ChannelResourceIdentifier $channel = null, ?string $externalId = null, + ?ChannelResourceIdentifier $channel = null, ?DateTimeImmutable $syncedAt = null, ?string $action = null ) { - $this->channel = $channel; $this->externalId = $externalId; + $this->channel = $channel; $this->syncedAt = $syncedAt; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -82,45 +82,51 @@ public function getAction() } /** - *ResourceIdentifier to a Channel.
+ *Set this to identify an external order instance, file, or other resource.
* * - * @return null|ChannelResourceIdentifier + * @return null|string */ - public function getChannel() + public function getExternalId() { - if (is_null($this->channel)) { - /** @psalm-var stdClass|arrayThe synchronization destination to set. Must not be empty.
+ * The referenced Channel must have the Channel Role OrderExport
or OrderImport
.
+ * Otherwise this update action returns an InvalidInput error.
If not set, it defaults to the current date and time.
+ * * * @return null|DateTimeImmutable */ @@ -144,19 +150,19 @@ public function getSyncedAt() /** - * @param ?ChannelResourceIdentifier $channel + * @param ?string $externalId */ - public function setChannel(?ChannelResourceIdentifier $channel): void + public function setExternalId(?string $externalId): void { - $this->channel = $channel; + $this->externalId = $externalId; } /** - * @param ?string $externalId + * @param ?ChannelResourceIdentifier $channel */ - public function setExternalId(?string $externalId): void + public function setChannel(?ChannelResourceIdentifier $channel): void { - $this->externalId = $externalId; + $this->channel = $channel; } /** diff --git a/lib/commercetools-api/src/Models/Order/Parcel.php b/lib/commercetools-api/src/Models/Order/Parcel.php index 8ac65487dca..fd7c4e3c505 100644 --- a/lib/commercetools-api/src/Models/Order/Parcel.php +++ b/lib/commercetools-api/src/Models/Order/Parcel.php @@ -40,25 +40,31 @@ public function getId(); public function getKey(); /** + *Date and time (UTC) the Parcel was created.
+ * * @return null|DateTimeImmutable */ public function getCreatedAt(); /** + *Information about the dimensions of the Parcel.
+ * * @return null|ParcelMeasurements */ public function getMeasurements(); /** + *Shipment tracking information of the Parcel.
+ * * @return null|TrackingData */ public function getTrackingData(); /** - *The delivery items contained in this parcel.
+ *Line Items or Custom Line Items delivered in this Parcel.
* * @return null|DeliveryItemCollection @@ -66,7 +72,7 @@ public function getTrackingData(); public function getItems(); /** - *Custom Fields of this parcel.
+ *Custom Fields of the Parcel.
* * @return null|CustomFields diff --git a/lib/commercetools-api/src/Models/Order/ParcelBuilder.php b/lib/commercetools-api/src/Models/Order/ParcelBuilder.php index c1821f70ce5..e36e1cd6db0 100644 --- a/lib/commercetools-api/src/Models/Order/ParcelBuilder.php +++ b/lib/commercetools-api/src/Models/Order/ParcelBuilder.php @@ -88,6 +88,8 @@ public function getKey() } /** + *Date and time (UTC) the Parcel was created.
+ * * @return null|DateTimeImmutable */ @@ -97,6 +99,8 @@ public function getCreatedAt() } /** + *Information about the dimensions of the Parcel.
+ * * @return null|ParcelMeasurements */ @@ -106,6 +110,8 @@ public function getMeasurements() } /** + *Shipment tracking information of the Parcel.
+ * * @return null|TrackingData */ @@ -115,7 +121,7 @@ public function getTrackingData() } /** - *The delivery items contained in this parcel.
+ *Line Items or Custom Line Items delivered in this Parcel.
* * @return null|DeliveryItemCollection @@ -126,7 +132,7 @@ public function getItems() } /** - *Custom Fields of this parcel.
+ *Custom Fields of the Parcel.
* * @return null|CustomFields diff --git a/lib/commercetools-api/src/Models/Order/ParcelDraft.php b/lib/commercetools-api/src/Models/Order/ParcelDraft.php index 43596960c12..702e676fccd 100644 --- a/lib/commercetools-api/src/Models/Order/ParcelDraft.php +++ b/lib/commercetools-api/src/Models/Order/ParcelDraft.php @@ -29,19 +29,23 @@ interface ParcelDraft extends JsonObject public function getKey(); /** + *Information about the dimensions for the Parcel.
+ * * @return null|ParcelMeasurements */ public function getMeasurements(); /** + *Shipment tracking information for the Parcel.
+ * * @return null|TrackingData */ public function getTrackingData(); /** - *The delivery items contained in this parcel.
+ *Line Items or Custom Line Items delivered in this Parcel.
* * @return null|DeliveryItemCollection @@ -49,7 +53,7 @@ public function getTrackingData(); public function getItems(); /** - *Custom Fields of this parcel.
+ *Custom Fields for the Parcel.
* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Order/ParcelDraftBuilder.php b/lib/commercetools-api/src/Models/Order/ParcelDraftBuilder.php index 22f1b5e4438..6692883b3fc 100644 --- a/lib/commercetools-api/src/Models/Order/ParcelDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Order/ParcelDraftBuilder.php @@ -64,6 +64,8 @@ public function getKey() } /** + *Information about the dimensions for the Parcel.
+ * * @return null|ParcelMeasurements */ @@ -73,6 +75,8 @@ public function getMeasurements() } /** + *Shipment tracking information for the Parcel.
+ * * @return null|TrackingData */ @@ -82,7 +86,7 @@ public function getTrackingData() } /** - *The delivery items contained in this parcel.
+ *Line Items or Custom Line Items delivered in this Parcel.
* * @return null|DeliveryItemCollection @@ -93,7 +97,7 @@ public function getItems() } /** - *Custom Fields of this parcel.
+ *Custom Fields for the Parcel.
* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Order/ParcelDraftModel.php b/lib/commercetools-api/src/Models/Order/ParcelDraftModel.php index 16ddc49f78f..85c62e2a0ac 100644 --- a/lib/commercetools-api/src/Models/Order/ParcelDraftModel.php +++ b/lib/commercetools-api/src/Models/Order/ParcelDraftModel.php @@ -90,6 +90,8 @@ public function getKey() } /** + *Information about the dimensions for the Parcel.
+ * * * @return null|ParcelMeasurements */ @@ -109,6 +111,8 @@ public function getMeasurements() } /** + *Shipment tracking information for the Parcel.
+ * * * @return null|TrackingData */ @@ -128,7 +132,7 @@ public function getTrackingData() } /** - *The delivery items contained in this parcel.
+ *Line Items or Custom Line Items delivered in this Parcel.
* * * @return null|DeliveryItemCollection @@ -148,7 +152,7 @@ public function getItems() } /** - *Custom Fields of this parcel.
+ *Custom Fields for the Parcel.
* * * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Order/ParcelMeasurements.php b/lib/commercetools-api/src/Models/Order/ParcelMeasurements.php index 645812c359a..97c296d05cb 100644 --- a/lib/commercetools-api/src/Models/Order/ParcelMeasurements.php +++ b/lib/commercetools-api/src/Models/Order/ParcelMeasurements.php @@ -19,24 +19,32 @@ interface ParcelMeasurements extends JsonObject public const FIELD_WEIGHT_IN_GRAM = 'weightInGram'; /** + *Height of the Parcel.
+ * * @return null|int */ public function getHeightInMillimeter(); /** + *Length of the Parcel.
+ * * @return null|int */ public function getLengthInMillimeter(); /** + *Width of the Parcel.
+ * * @return null|int */ public function getWidthInMillimeter(); /** + *Weight of the Parcel.
+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Order/ParcelMeasurementsBuilder.php b/lib/commercetools-api/src/Models/Order/ParcelMeasurementsBuilder.php index e0bdb540129..64e8ce0bc9a 100644 --- a/lib/commercetools-api/src/Models/Order/ParcelMeasurementsBuilder.php +++ b/lib/commercetools-api/src/Models/Order/ParcelMeasurementsBuilder.php @@ -45,6 +45,8 @@ final class ParcelMeasurementsBuilder implements Builder private $weightInGram; /** + *Height of the Parcel.
+ * * @return null|int */ @@ -54,6 +56,8 @@ public function getHeightInMillimeter() } /** + *Length of the Parcel.
+ * * @return null|int */ @@ -63,6 +67,8 @@ public function getLengthInMillimeter() } /** + *Width of the Parcel.
+ * * @return null|int */ @@ -72,6 +78,8 @@ public function getWidthInMillimeter() } /** + *Weight of the Parcel.
+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Order/ParcelMeasurementsModel.php b/lib/commercetools-api/src/Models/Order/ParcelMeasurementsModel.php index 788e7b9cf61..402f6ca8455 100644 --- a/lib/commercetools-api/src/Models/Order/ParcelMeasurementsModel.php +++ b/lib/commercetools-api/src/Models/Order/ParcelMeasurementsModel.php @@ -60,6 +60,8 @@ public function __construct( } /** + *Height of the Parcel.
+ * * * @return null|int */ @@ -78,6 +80,8 @@ public function getHeightInMillimeter() } /** + *Length of the Parcel.
+ * * * @return null|int */ @@ -96,6 +100,8 @@ public function getLengthInMillimeter() } /** + *Width of the Parcel.
+ * * * @return null|int */ @@ -114,6 +120,8 @@ public function getWidthInMillimeter() } /** + *Weight of the Parcel.
+ * * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Order/ParcelModel.php b/lib/commercetools-api/src/Models/Order/ParcelModel.php index 0e2d3d5fba6..0c8692c5e50 100644 --- a/lib/commercetools-api/src/Models/Order/ParcelModel.php +++ b/lib/commercetools-api/src/Models/Order/ParcelModel.php @@ -127,6 +127,8 @@ public function getKey() } /** + *Date and time (UTC) the Parcel was created.
+ * * * @return null|DateTimeImmutable */ @@ -149,6 +151,8 @@ public function getCreatedAt() } /** + *Information about the dimensions of the Parcel.
+ * * * @return null|ParcelMeasurements */ @@ -168,6 +172,8 @@ public function getMeasurements() } /** + *Shipment tracking information of the Parcel.
+ * * * @return null|TrackingData */ @@ -187,7 +193,7 @@ public function getTrackingData() } /** - *The delivery items contained in this parcel.
+ *Line Items or Custom Line Items delivered in this Parcel.
* * * @return null|DeliveryItemCollection @@ -207,7 +213,7 @@ public function getItems() } /** - *Custom Fields of this parcel.
+ *Custom Fields of the Parcel.
* * * @return null|CustomFields diff --git a/lib/commercetools-api/src/Models/Order/PaymentInfo.php b/lib/commercetools-api/src/Models/Order/PaymentInfo.php index b5200167659..d274af7305e 100644 --- a/lib/commercetools-api/src/Models/Order/PaymentInfo.php +++ b/lib/commercetools-api/src/Models/Order/PaymentInfo.php @@ -17,6 +17,8 @@ interface PaymentInfo extends JsonObject public const FIELD_PAYMENTS = 'payments'; /** + *References to the Payments associated with the Order.
+ * * @return null|PaymentReferenceCollection */ diff --git a/lib/commercetools-api/src/Models/Order/PaymentInfoBuilder.php b/lib/commercetools-api/src/Models/Order/PaymentInfoBuilder.php index 0a64ff2d977..b5fd92c1d5c 100644 --- a/lib/commercetools-api/src/Models/Order/PaymentInfoBuilder.php +++ b/lib/commercetools-api/src/Models/Order/PaymentInfoBuilder.php @@ -28,6 +28,8 @@ final class PaymentInfoBuilder implements Builder private $payments; /** + *References to the Payments associated with the Order.
+ * * @return null|PaymentReferenceCollection */ diff --git a/lib/commercetools-api/src/Models/Order/PaymentInfoModel.php b/lib/commercetools-api/src/Models/Order/PaymentInfoModel.php index 36d5cf7e31d..edfbb3c9859 100644 --- a/lib/commercetools-api/src/Models/Order/PaymentInfoModel.php +++ b/lib/commercetools-api/src/Models/Order/PaymentInfoModel.php @@ -37,6 +37,8 @@ public function __construct( } /** + *References to the Payments associated with the Order.
+ * * * @return null|PaymentReferenceCollection */ diff --git a/lib/commercetools-api/src/Models/Order/ReturnInfo.php b/lib/commercetools-api/src/Models/Order/ReturnInfo.php index 3dc3ecc085e..97973842dc2 100644 --- a/lib/commercetools-api/src/Models/Order/ReturnInfo.php +++ b/lib/commercetools-api/src/Models/Order/ReturnInfo.php @@ -19,13 +19,15 @@ interface ReturnInfo extends JsonObject public const FIELD_RETURN_DATE = 'returnDate'; /** + *Information on the Line Items or Custom Line Items returned.
+ * * @return null|ReturnItemCollection */ public function getItems(); /** - *Identifies, which return tracking ID is connected to this particular return.
+ *User-defined identifier to track the return.
* * @return null|string @@ -33,6 +35,8 @@ public function getItems(); public function getReturnTrackingId(); /** + *Date and time (UTC) the return is initiated.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/ReturnInfoBuilder.php b/lib/commercetools-api/src/Models/Order/ReturnInfoBuilder.php index 0ecb814a293..dd4d8296785 100644 --- a/lib/commercetools-api/src/Models/Order/ReturnInfoBuilder.php +++ b/lib/commercetools-api/src/Models/Order/ReturnInfoBuilder.php @@ -40,6 +40,8 @@ final class ReturnInfoBuilder implements Builder private $returnDate; /** + *Information on the Line Items or Custom Line Items returned.
+ * * @return null|ReturnItemCollection */ @@ -49,7 +51,7 @@ public function getItems() } /** - *Identifies, which return tracking ID is connected to this particular return.
+ *User-defined identifier to track the return.
* * @return null|string @@ -60,6 +62,8 @@ public function getReturnTrackingId() } /** + *Date and time (UTC) the return is initiated.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/ReturnInfoDraft.php b/lib/commercetools-api/src/Models/Order/ReturnInfoDraft.php index ceff35c3023..dae0b84958d 100644 --- a/lib/commercetools-api/src/Models/Order/ReturnInfoDraft.php +++ b/lib/commercetools-api/src/Models/Order/ReturnInfoDraft.php @@ -19,13 +19,15 @@ interface ReturnInfoDraft extends JsonObject public const FIELD_RETURN_DATE = 'returnDate'; /** + *Information on the Line Items or Custom Line Items returned.
+ * * @return null|ReturnItemDraftCollection */ public function getItems(); /** - *Identifies, which return tracking ID is connected to this particular return.
+ *User-defined identifier for tracking the return.
* * @return null|string @@ -33,6 +35,8 @@ public function getItems(); public function getReturnTrackingId(); /** + *Date and time (UTC) the return is initiated.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/ReturnInfoDraftBuilder.php b/lib/commercetools-api/src/Models/Order/ReturnInfoDraftBuilder.php index 5d906d2c85a..b079a796017 100644 --- a/lib/commercetools-api/src/Models/Order/ReturnInfoDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Order/ReturnInfoDraftBuilder.php @@ -40,6 +40,8 @@ final class ReturnInfoDraftBuilder implements Builder private $returnDate; /** + *Information on the Line Items or Custom Line Items returned.
+ * * @return null|ReturnItemDraftCollection */ @@ -49,7 +51,7 @@ public function getItems() } /** - *Identifies, which return tracking ID is connected to this particular return.
+ *User-defined identifier for tracking the return.
* * @return null|string @@ -60,6 +62,8 @@ public function getReturnTrackingId() } /** + *Date and time (UTC) the return is initiated.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/ReturnInfoDraftModel.php b/lib/commercetools-api/src/Models/Order/ReturnInfoDraftModel.php index 3f008b18b2c..3f3baa64a8f 100644 --- a/lib/commercetools-api/src/Models/Order/ReturnInfoDraftModel.php +++ b/lib/commercetools-api/src/Models/Order/ReturnInfoDraftModel.php @@ -53,6 +53,8 @@ public function __construct( } /** + *Information on the Line Items or Custom Line Items returned.
+ * * * @return null|ReturnItemDraftCollection */ @@ -71,7 +73,7 @@ public function getItems() } /** - *Identifies, which return tracking ID is connected to this particular return.
+ *User-defined identifier for tracking the return.
* * * @return null|string @@ -91,6 +93,8 @@ public function getReturnTrackingId() } /** + *Date and time (UTC) the return is initiated.
+ * * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/ReturnInfoModel.php b/lib/commercetools-api/src/Models/Order/ReturnInfoModel.php index f434964ffb3..61b306c4437 100644 --- a/lib/commercetools-api/src/Models/Order/ReturnInfoModel.php +++ b/lib/commercetools-api/src/Models/Order/ReturnInfoModel.php @@ -53,6 +53,8 @@ public function __construct( } /** + *Information on the Line Items or Custom Line Items returned.
+ * * * @return null|ReturnItemCollection */ @@ -71,7 +73,7 @@ public function getItems() } /** - *Identifies, which return tracking ID is connected to this particular return.
+ *User-defined identifier to track the return.
* * * @return null|string @@ -91,6 +93,8 @@ public function getReturnTrackingId() } /** + *Date and time (UTC) the return is initiated.
+ * * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/ReturnItem.php b/lib/commercetools-api/src/Models/Order/ReturnItem.php index 00684a3cb58..50dbb7afe51 100644 --- a/lib/commercetools-api/src/Models/Order/ReturnItem.php +++ b/lib/commercetools-api/src/Models/Order/ReturnItem.php @@ -27,7 +27,7 @@ interface ReturnItem extends JsonObject public const FIELD_CREATED_AT = 'createdAt'; /** - *Unique identifier of the ReturnItem.
+ *Unique identifier of the Return Item.
* * @return null|string @@ -35,6 +35,8 @@ interface ReturnItem extends JsonObject public function getId(); /** + *Number of Line Items or Custom Line Items returned.
+ * * @return null|int */ @@ -47,25 +49,35 @@ public function getQuantity(); public function getType(); /** + *User-defined description for the return.
+ * * @return null|string */ public function getComment(); /** + *Shipment status of the Return Item.
+ * * @return null|string */ public function getShipmentState(); /** + *Payment status of the Return Item:
+ *NonRefundable
, for items in the Advised
ReturnShipmentStateInitial
, for items in the Returned
ReturnShipmentStateCustom Fields of this return item.
+ *Custom Fields of the Return Item.
* * @return null|CustomFields @@ -73,12 +85,16 @@ public function getPaymentState(); public function getCustom(); /** + *Date and time (UTC) the Return Item was last updated.
+ * * @return null|DateTimeImmutable */ public function getLastModifiedAt(); /** + *Date and time (UTC) the Return Item was intitially created.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/ReturnItemBuilder.php b/lib/commercetools-api/src/Models/Order/ReturnItemBuilder.php index bc7402cf533..7c62da26167 100644 --- a/lib/commercetools-api/src/Models/Order/ReturnItemBuilder.php +++ b/lib/commercetools-api/src/Models/Order/ReturnItemBuilder.php @@ -72,7 +72,7 @@ final class ReturnItemBuilder implements Builder private $createdAt; /** - *Unique identifier of the ReturnItem.
+ *Unique identifier of the Return Item.
* * @return null|string @@ -83,6 +83,8 @@ public function getId() } /** + *Number of Line Items or Custom Line Items returned.
+ * * @return null|int */ @@ -92,6 +94,8 @@ public function getQuantity() } /** + *User-defined description for the return.
+ * * @return null|string */ @@ -101,6 +105,8 @@ public function getComment() } /** + *Shipment status of the Return Item.
+ * * @return null|string */ @@ -110,6 +116,12 @@ public function getShipmentState() } /** + *Payment status of the Return Item:
+ *NonRefundable
, for items in the Advised
ReturnShipmentStateInitial
, for items in the Returned
ReturnShipmentStateCustom Fields of this return item.
+ *Custom Fields of the Return Item.
* * @return null|CustomFields @@ -130,6 +142,8 @@ public function getCustom() } /** + *Date and time (UTC) the Return Item was last updated.
+ * * @return null|DateTimeImmutable */ @@ -139,6 +153,8 @@ public function getLastModifiedAt() } /** + *Date and time (UTC) the Return Item was intitially created.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/ReturnItemDraft.php b/lib/commercetools-api/src/Models/Order/ReturnItemDraft.php index dbd12bd831d..ddb55011e6c 100644 --- a/lib/commercetools-api/src/Models/Order/ReturnItemDraft.php +++ b/lib/commercetools-api/src/Models/Order/ReturnItemDraft.php @@ -22,37 +22,50 @@ interface ReturnItemDraft extends JsonObject public const FIELD_CUSTOM = 'custom'; /** + *Number of Line Items or Custom Line Items to return.
+ * * @return null|int */ public function getQuantity(); /** + *id
of the LineItem to return.
Required if Line Items are returned, to create a LineItemReturnItem.
+ * * @return null|string */ public function getLineItemId(); /** + *id
of the CustomLineItem to return.
Required if Custom Line Items are returned, to create a CustomLineItemReturnItem.
+ * * @return null|string */ public function getCustomLineItemId(); /** + *User-defined description for the return.
+ * * @return null|string */ public function getComment(); /** + *Shipment status of the item to be returned.
+ * Can either be Advised
or Returned
only.
Custom Fields of this return item.
+ *Custom Fields for the Return Item.
* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Order/ReturnItemDraftBuilder.php b/lib/commercetools-api/src/Models/Order/ReturnItemDraftBuilder.php index 244f66b24aa..016ab8d501f 100644 --- a/lib/commercetools-api/src/Models/Order/ReturnItemDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Order/ReturnItemDraftBuilder.php @@ -59,6 +59,8 @@ final class ReturnItemDraftBuilder implements Builder private $custom; /** + *Number of Line Items or Custom Line Items to return.
+ * * @return null|int */ @@ -68,6 +70,9 @@ public function getQuantity() } /** + *id
of the LineItem to return.
Required if Line Items are returned, to create a LineItemReturnItem.
+ * * @return null|string */ @@ -77,6 +82,9 @@ public function getLineItemId() } /** + *id
of the CustomLineItem to return.
Required if Custom Line Items are returned, to create a CustomLineItemReturnItem.
+ * * @return null|string */ @@ -86,6 +94,8 @@ public function getCustomLineItemId() } /** + *User-defined description for the return.
+ * * @return null|string */ @@ -95,6 +105,9 @@ public function getComment() } /** + *Shipment status of the item to be returned.
+ * Can either be Advised
or Returned
only.
Custom Fields of this return item.
+ *Custom Fields for the Return Item.
* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Order/ReturnItemDraftModel.php b/lib/commercetools-api/src/Models/Order/ReturnItemDraftModel.php index 999e70daf39..ec67b8662b1 100644 --- a/lib/commercetools-api/src/Models/Order/ReturnItemDraftModel.php +++ b/lib/commercetools-api/src/Models/Order/ReturnItemDraftModel.php @@ -78,6 +78,8 @@ public function __construct( } /** + *Number of Line Items or Custom Line Items to return.
+ * * * @return null|int */ @@ -96,6 +98,9 @@ public function getQuantity() } /** + *id
of the LineItem to return.
Required if Line Items are returned, to create a LineItemReturnItem.
+ * * * @return null|string */ @@ -114,6 +119,9 @@ public function getLineItemId() } /** + *id
of the CustomLineItem to return.
Required if Custom Line Items are returned, to create a CustomLineItemReturnItem.
+ * * * @return null|string */ @@ -132,6 +140,8 @@ public function getCustomLineItemId() } /** + *User-defined description for the return.
+ * * * @return null|string */ @@ -150,6 +160,9 @@ public function getComment() } /** + *Shipment status of the item to be returned.
+ * Can either be Advised
or Returned
only.
Custom Fields of this return item.
+ *Custom Fields for the Return Item.
* * * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Order/ReturnItemModel.php b/lib/commercetools-api/src/Models/Order/ReturnItemModel.php index 4c33ed246c5..96906c99c1a 100644 --- a/lib/commercetools-api/src/Models/Order/ReturnItemModel.php +++ b/lib/commercetools-api/src/Models/Order/ReturnItemModel.php @@ -112,7 +112,7 @@ public function __construct( } /** - *Unique identifier of the ReturnItem.
+ *Unique identifier of the Return Item.
* * * @return null|string @@ -132,6 +132,8 @@ public function getId() } /** + *Number of Line Items or Custom Line Items returned.
+ * * * @return null|int */ @@ -168,6 +170,8 @@ public function getType() } /** + *User-defined description for the return.
+ * * * @return null|string */ @@ -186,6 +190,8 @@ public function getComment() } /** + *Shipment status of the Return Item.
+ * * * @return null|string */ @@ -204,6 +210,12 @@ public function getShipmentState() } /** + *Payment status of the Return Item:
+ *NonRefundable
, for items in the Advised
ReturnShipmentStateInitial
, for items in the Returned
ReturnShipmentStateCustom Fields of this return item.
+ *Custom Fields of the Return Item.
* * * @return null|CustomFields @@ -243,6 +255,8 @@ public function getCustom() } /** + *Date and time (UTC) the Return Item was last updated.
+ * * * @return null|DateTimeImmutable */ @@ -265,6 +279,8 @@ public function getLastModifiedAt() } /** + *Date and time (UTC) the Return Item was intitially created.
+ * * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/StagedOrderUpdateAction.php b/lib/commercetools-api/src/Models/Order/StagedOrderUpdateAction.php index 585baa0a746..d32257ef723 100644 --- a/lib/commercetools-api/src/Models/Order/StagedOrderUpdateAction.php +++ b/lib/commercetools-api/src/Models/Order/StagedOrderUpdateAction.php @@ -56,6 +56,7 @@ use Commercetools\Api\Models\OrderEdit\StagedOrderSetDeliveryCustomFieldAction; use Commercetools\Api\Models\OrderEdit\StagedOrderSetDeliveryCustomTypeAction; use Commercetools\Api\Models\OrderEdit\StagedOrderSetDeliveryItemsAction; +use Commercetools\Api\Models\OrderEdit\StagedOrderSetDirectDiscountsAction; use Commercetools\Api\Models\OrderEdit\StagedOrderSetItemShippingAddressCustomFieldAction; use Commercetools\Api\Models\OrderEdit\StagedOrderSetItemShippingAddressCustomTypeAction; use Commercetools\Api\Models\OrderEdit\StagedOrderSetLineItemCustomFieldAction; @@ -89,6 +90,7 @@ use Commercetools\Api\Models\OrderEdit\StagedOrderSetShippingMethodTaxAmountAction; use Commercetools\Api\Models\OrderEdit\StagedOrderSetShippingMethodTaxRateAction; use Commercetools\Api\Models\OrderEdit\StagedOrderSetShippingRateInputAction; +use Commercetools\Api\Models\OrderEdit\StagedOrderSetStoreAction; use Commercetools\Api\Models\OrderEdit\StagedOrderTransitionCustomLineItemStateAction; use Commercetools\Api\Models\OrderEdit\StagedOrderTransitionLineItemStateAction; use Commercetools\Api\Models\OrderEdit\StagedOrderTransitionStateAction; diff --git a/lib/commercetools-api/src/Models/Order/StagedOrderUpdateActionBuilder.php b/lib/commercetools-api/src/Models/Order/StagedOrderUpdateActionBuilder.php index 9776a9f528b..f3c6ceac1c1 100644 --- a/lib/commercetools-api/src/Models/Order/StagedOrderUpdateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/StagedOrderUpdateActionBuilder.php @@ -104,6 +104,8 @@ use Commercetools\Api\Models\OrderEdit\StagedOrderSetDeliveryCustomTypeActionBuilder; use Commercetools\Api\Models\OrderEdit\StagedOrderSetDeliveryItemsAction; use Commercetools\Api\Models\OrderEdit\StagedOrderSetDeliveryItemsActionBuilder; +use Commercetools\Api\Models\OrderEdit\StagedOrderSetDirectDiscountsAction; +use Commercetools\Api\Models\OrderEdit\StagedOrderSetDirectDiscountsActionBuilder; use Commercetools\Api\Models\OrderEdit\StagedOrderSetItemShippingAddressCustomFieldAction; use Commercetools\Api\Models\OrderEdit\StagedOrderSetItemShippingAddressCustomFieldActionBuilder; use Commercetools\Api\Models\OrderEdit\StagedOrderSetItemShippingAddressCustomTypeAction; @@ -170,6 +172,8 @@ use Commercetools\Api\Models\OrderEdit\StagedOrderSetShippingMethodTaxRateActionBuilder; use Commercetools\Api\Models\OrderEdit\StagedOrderSetShippingRateInputAction; use Commercetools\Api\Models\OrderEdit\StagedOrderSetShippingRateInputActionBuilder; +use Commercetools\Api\Models\OrderEdit\StagedOrderSetStoreAction; +use Commercetools\Api\Models\OrderEdit\StagedOrderSetStoreActionBuilder; use Commercetools\Api\Models\OrderEdit\StagedOrderTransitionCustomLineItemStateAction; use Commercetools\Api\Models\OrderEdit\StagedOrderTransitionCustomLineItemStateActionBuilder; use Commercetools\Api\Models\OrderEdit\StagedOrderTransitionLineItemStateAction; diff --git a/lib/commercetools-api/src/Models/Order/StagedOrderUpdateActionModel.php b/lib/commercetools-api/src/Models/Order/StagedOrderUpdateActionModel.php index 0e5ba6046f6..b7dd91dc37e 100644 --- a/lib/commercetools-api/src/Models/Order/StagedOrderUpdateActionModel.php +++ b/lib/commercetools-api/src/Models/Order/StagedOrderUpdateActionModel.php @@ -104,6 +104,8 @@ use Commercetools\Api\Models\OrderEdit\StagedOrderSetDeliveryCustomTypeActionModel; use Commercetools\Api\Models\OrderEdit\StagedOrderSetDeliveryItemsAction; use Commercetools\Api\Models\OrderEdit\StagedOrderSetDeliveryItemsActionModel; +use Commercetools\Api\Models\OrderEdit\StagedOrderSetDirectDiscountsAction; +use Commercetools\Api\Models\OrderEdit\StagedOrderSetDirectDiscountsActionModel; use Commercetools\Api\Models\OrderEdit\StagedOrderSetItemShippingAddressCustomFieldAction; use Commercetools\Api\Models\OrderEdit\StagedOrderSetItemShippingAddressCustomFieldActionModel; use Commercetools\Api\Models\OrderEdit\StagedOrderSetItemShippingAddressCustomTypeAction; @@ -170,6 +172,8 @@ use Commercetools\Api\Models\OrderEdit\StagedOrderSetShippingMethodTaxRateActionModel; use Commercetools\Api\Models\OrderEdit\StagedOrderSetShippingRateInputAction; use Commercetools\Api\Models\OrderEdit\StagedOrderSetShippingRateInputActionModel; +use Commercetools\Api\Models\OrderEdit\StagedOrderSetStoreAction; +use Commercetools\Api\Models\OrderEdit\StagedOrderSetStoreActionModel; use Commercetools\Api\Models\OrderEdit\StagedOrderTransitionCustomLineItemStateAction; use Commercetools\Api\Models\OrderEdit\StagedOrderTransitionCustomLineItemStateActionModel; use Commercetools\Api\Models\OrderEdit\StagedOrderTransitionLineItemStateAction; @@ -251,6 +255,7 @@ final class StagedOrderUpdateActionModel extends JsonObjectModel implements Stag 'setDeliveryCustomField' => StagedOrderSetDeliveryCustomFieldActionModel::class, 'setDeliveryCustomType' => StagedOrderSetDeliveryCustomTypeActionModel::class, 'setDeliveryItems' => StagedOrderSetDeliveryItemsActionModel::class, + 'setDirectDiscounts' => StagedOrderSetDirectDiscountsActionModel::class, 'setItemShippingAddressCustomField' => StagedOrderSetItemShippingAddressCustomFieldActionModel::class, 'setItemShippingAddressCustomType' => StagedOrderSetItemShippingAddressCustomTypeActionModel::class, 'setLineItemCustomField' => StagedOrderSetLineItemCustomFieldActionModel::class, @@ -284,6 +289,7 @@ final class StagedOrderUpdateActionModel extends JsonObjectModel implements Stag 'setShippingMethodTaxAmount' => StagedOrderSetShippingMethodTaxAmountActionModel::class, 'setShippingMethodTaxRate' => StagedOrderSetShippingMethodTaxRateActionModel::class, 'setShippingRateInput' => StagedOrderSetShippingRateInputActionModel::class, + 'setStore' => StagedOrderSetStoreActionModel::class, 'transitionCustomLineItemState' => StagedOrderTransitionCustomLineItemStateActionModel::class, 'transitionLineItemState' => StagedOrderTransitionLineItemStateActionModel::class, 'transitionState' => StagedOrderTransitionStateActionModel::class, diff --git a/lib/commercetools-api/src/Models/Order/SyncInfo.php b/lib/commercetools-api/src/Models/Order/SyncInfo.php index 1dbf7ba85b4..5bc7d38c8e9 100644 --- a/lib/commercetools-api/src/Models/Order/SyncInfo.php +++ b/lib/commercetools-api/src/Models/Order/SyncInfo.php @@ -20,7 +20,7 @@ interface SyncInfo extends JsonObject public const FIELD_SYNCED_AT = 'syncedAt'; /** - *Connection to a particular synchronization destination.
+ *Connection to a synchronization destination.
* * @return null|ChannelReference @@ -28,7 +28,7 @@ interface SyncInfo extends JsonObject public function getChannel(); /** - *Can be used to reference an external order instance, file etc.
+ *Identifier of an external order instance, file, or other resource.
* * @return null|string @@ -36,6 +36,8 @@ public function getChannel(); public function getExternalId(); /** + *Date and time (UTC) the information was synced.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/SyncInfoBuilder.php b/lib/commercetools-api/src/Models/Order/SyncInfoBuilder.php index dc0bf11ea3b..8832e5db8c2 100644 --- a/lib/commercetools-api/src/Models/Order/SyncInfoBuilder.php +++ b/lib/commercetools-api/src/Models/Order/SyncInfoBuilder.php @@ -42,7 +42,7 @@ final class SyncInfoBuilder implements Builder private $syncedAt; /** - *Connection to a particular synchronization destination.
+ *Connection to a synchronization destination.
* * @return null|ChannelReference @@ -53,7 +53,7 @@ public function getChannel() } /** - *Can be used to reference an external order instance, file etc.
+ *Identifier of an external order instance, file, or other resource.
* * @return null|string @@ -64,6 +64,8 @@ public function getExternalId() } /** + *Date and time (UTC) the information was synced.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/SyncInfoModel.php b/lib/commercetools-api/src/Models/Order/SyncInfoModel.php index db518a30e94..cdbcc02688d 100644 --- a/lib/commercetools-api/src/Models/Order/SyncInfoModel.php +++ b/lib/commercetools-api/src/Models/Order/SyncInfoModel.php @@ -55,7 +55,7 @@ public function __construct( } /** - *Connection to a particular synchronization destination.
+ *Connection to a synchronization destination.
* * * @return null|ChannelReference @@ -76,7 +76,7 @@ public function getChannel() } /** - *Can be used to reference an external order instance, file etc.
+ *Identifier of an external order instance, file, or other resource.
* * * @return null|string @@ -96,6 +96,8 @@ public function getExternalId() } /** + *Date and time (UTC) the information was synced.
+ * * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Order/TrackingData.php b/lib/commercetools-api/src/Models/Order/TrackingData.php index 6951988a7fa..7f1ff0a2c00 100644 --- a/lib/commercetools-api/src/Models/Order/TrackingData.php +++ b/lib/commercetools-api/src/Models/Order/TrackingData.php @@ -20,7 +20,7 @@ interface TrackingData extends JsonObject public const FIELD_IS_RETURN = 'isReturn'; /** - *The ID to track one parcel.
+ *Identifier to track the Parcel.
* * @return null|string @@ -28,7 +28,7 @@ interface TrackingData extends JsonObject public function getTrackingId(); /** - *The carrier that delivers the parcel.
+ *Name of the carrier that delivers the Parcel.
* * @return null|string @@ -36,19 +36,26 @@ public function getTrackingId(); public function getCarrier(); /** + *Name of the provider that serves as facade to several carriers.
+ * * @return null|string */ public function getProvider(); /** + *Transaction identifier with the provider
.
Flag to distinguish if the parcel is on the way to the customer (false) or on the way back (true).
+ *true
, the Parcel is being returned.false
, the Parcel is being delivered to the customer.The ID to track one parcel.
+ *Identifier to track the Parcel.
* * @return null|string @@ -62,7 +62,7 @@ public function getTrackingId() } /** - *The carrier that delivers the parcel.
+ *Name of the carrier that delivers the Parcel.
* * @return null|string @@ -73,6 +73,8 @@ public function getCarrier() } /** + *Name of the provider that serves as facade to several carriers.
+ * * @return null|string */ @@ -82,6 +84,8 @@ public function getProvider() } /** + *Transaction identifier with the provider
.
Flag to distinguish if the parcel is on the way to the customer (false) or on the way back (true).
+ *true
, the Parcel is being returned.false
, the Parcel is being delivered to the customer.The ID to track one parcel.
+ *Identifier to track the Parcel.
* * * @return null|string @@ -88,7 +88,7 @@ public function getTrackingId() } /** - *The carrier that delivers the parcel.
+ *Name of the carrier that delivers the Parcel.
* * * @return null|string @@ -108,6 +108,8 @@ public function getCarrier() } /** + *Name of the provider that serves as facade to several carriers.
+ * * * @return null|string */ @@ -126,6 +128,8 @@ public function getProvider() } /** + *Transaction identifier with the provider
.
Flag to distinguish if the parcel is on the way to the customer (false) or on the way back (true).
+ *true
, the Parcel is being returned.false
, the Parcel is being delivered to the customer.Unique identifier of the OrderEdit.
+ *Unique identifier of the Order Edit.
* * @return null|string @@ -38,7 +38,7 @@ interface OrderEdit extends BaseResource public function getId(); /** - *The current version of the OrderEdit.
+ *Current version of the Order Edit.
* * @return null|int @@ -46,80 +46,85 @@ public function getId(); public function getVersion(); /** + *User-defined unique identifier of the Order Edit.
+ * - * @return null|DateTimeImmutable + * @return null|string */ - public function getCreatedAt(); + public function getKey(); /** + *Reference to the Order updated with this edit.
+ * - * @return null|DateTimeImmutable + * @return null|OrderReference */ - public function getLastModifiedAt(); + public function getResource(); /** - *Present on resources created after 1 February 2019 except for events not tracked.
+ *Update actions applied to the Order referenced by resource
.
Present on resources created after 1 February 2019 except for events not tracked.
+ *For applied edits, it's a summary of the changes on the Order. + * For unapplied edits, it's a preview of the changes.
* - * @return null|CreatedBy + * @return null|OrderEditResult */ - public function getCreatedBy(); + public function getResult(); /** - *User-defined unique identifier of the OrderEdit.
+ *User-defined information regarding the Order Edit.
* * @return null|string */ - public function getKey(); + public function getComment(); /** - *The order to be updated with this edit.
+ *Custom Fields of the Order Edit.
* - * @return null|OrderReference + * @return null|CustomFields */ - public function getResource(); + public function getCustom(); /** - *The actions to apply to the Order. - * Cannot be updated after the edit has been applied.
+ *Date and time (UTC) the Order Edit was initially created.
* - * @return null|StagedOrderUpdateActionCollection + * @return null|DateTimeImmutable */ - public function getStagedActions(); + public function getCreatedAt(); /** + *Date and time (UTC) the Order Edit was last updated.
+ * - * @return null|CustomFields + * @return null|DateTimeImmutable */ - public function getCustom(); + public function getLastModifiedAt(); /** - *Contains a preview of the changes in case of unapplied edit. - * For applied edits, it contains the summary of the changes.
+ *Present on resources created after 1 February 2019 except for events not tracked.
* - * @return null|OrderEditResult + * @return null|LastModifiedBy */ - public function getResult(); + public function getLastModifiedBy(); /** - *This field can be used to add textual information regarding the edit.
+ *Present on resources created after 1 February 2019 except for events not tracked.
* - * @return null|string + * @return null|CreatedBy */ - public function getComment(); + public function getCreatedBy(); /** * @param ?string $id @@ -132,52 +137,52 @@ public function setId(?string $id): void; public function setVersion(?int $version): void; /** - * @param ?DateTimeImmutable $createdAt + * @param ?string $key */ - public function setCreatedAt(?DateTimeImmutable $createdAt): void; + public function setKey(?string $key): void; /** - * @param ?DateTimeImmutable $lastModifiedAt + * @param ?OrderReference $resource */ - public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void; + public function setResource(?OrderReference $resource): void; /** - * @param ?LastModifiedBy $lastModifiedBy + * @param ?StagedOrderUpdateActionCollection $stagedActions */ - public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void; + public function setStagedActions(?StagedOrderUpdateActionCollection $stagedActions): void; /** - * @param ?CreatedBy $createdBy + * @param ?OrderEditResult $result */ - public function setCreatedBy(?CreatedBy $createdBy): void; + public function setResult(?OrderEditResult $result): void; /** - * @param ?string $key + * @param ?string $comment */ - public function setKey(?string $key): void; + public function setComment(?string $comment): void; /** - * @param ?OrderReference $resource + * @param ?CustomFields $custom */ - public function setResource(?OrderReference $resource): void; + public function setCustom(?CustomFields $custom): void; /** - * @param ?StagedOrderUpdateActionCollection $stagedActions + * @param ?DateTimeImmutable $createdAt */ - public function setStagedActions(?StagedOrderUpdateActionCollection $stagedActions): void; + public function setCreatedAt(?DateTimeImmutable $createdAt): void; /** - * @param ?CustomFields $custom + * @param ?DateTimeImmutable $lastModifiedAt */ - public function setCustom(?CustomFields $custom): void; + public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void; /** - * @param ?OrderEditResult $result + * @param ?LastModifiedBy $lastModifiedBy */ - public function setResult(?OrderEditResult $result): void; + public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void; /** - * @param ?string $comment + * @param ?CreatedBy $createdBy */ - public function setComment(?string $comment): void; + public function setCreatedBy(?CreatedBy $createdBy): void; } diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditAddStagedActionAction.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditAddStagedActionAction.php index abe8d426b8e..c8fe77bf0b5 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditAddStagedActionAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditAddStagedActionAction.php @@ -17,6 +17,8 @@ interface OrderEditAddStagedActionAction extends OrderEditUpdateAction public const FIELD_STAGED_ACTION = 'stagedAction'; /** + *Order update action to append to the stagedActions
array.
Order update action to append to the stagedActions
array.
Order update action to append to the stagedActions
array.
This field is queryable.
+ * + + * @return null|string + */ + public function getType(); + + /** + *Date and time (UTC) the Order was edited.
+ * * @return null|DateTimeImmutable */ public function getAppliedAt(); /** + *Prices of the Order before the edit.
+ * * @return null|OrderExcerpt */ public function getExcerptBeforeEdit(); /** + *Prices of the Order after the edit.
+ * * @return null|OrderExcerpt */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditAppliedBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditAppliedBuilder.php index af985542489..c5015a9c6bd 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditAppliedBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditAppliedBuilder.php @@ -40,6 +40,8 @@ final class OrderEditAppliedBuilder implements Builder private $excerptAfterEdit; /** + *Date and time (UTC) the Order was edited.
+ * * @return null|DateTimeImmutable */ @@ -49,6 +51,8 @@ public function getAppliedAt() } /** + *Prices of the Order before the edit.
+ * * @return null|OrderExcerpt */ @@ -58,6 +62,8 @@ public function getExcerptBeforeEdit() } /** + *Prices of the Order after the edit.
+ * * @return null|OrderExcerpt */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditAppliedModel.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditAppliedModel.php index aa0564c121f..618c4d3a91d 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditAppliedModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditAppliedModel.php @@ -62,6 +62,8 @@ public function __construct( } /** + *This field is queryable.
+ * * * @return null|string */ @@ -80,6 +82,8 @@ public function getType() } /** + *Date and time (UTC) the Order was edited.
+ * * * @return null|DateTimeImmutable */ @@ -102,6 +106,8 @@ public function getAppliedAt() } /** + *Prices of the Order before the edit.
+ * * * @return null|OrderExcerpt */ @@ -121,6 +127,8 @@ public function getExcerptBeforeEdit() } /** + *Prices of the Order after the edit.
+ * * * @return null|OrderExcerpt */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditApply.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditApply.php index b926f385c87..a336c04a038 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditApply.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditApply.php @@ -17,12 +17,16 @@ interface OrderEditApply extends JsonObject public const FIELD_RESOURCE_VERSION = 'resourceVersion'; /** + *Current version
of the OrderEdit to be applied.
Current version
of the Order to which the OrderEdit is applied.
Current version
of the OrderEdit to be applied.
Current version
of the Order to which the OrderEdit is applied.
Current version
of the OrderEdit to be applied.
Current version
of the Order to which the OrderEdit is applied.
Unique identifier of the OrderEdit.
+ *Unique identifier of the Order Edit.
* * @return null|string @@ -116,7 +116,7 @@ public function getId() } /** - *The current version of the OrderEdit.
+ *Current version of the Order Edit.
* * @return null|int @@ -127,6 +127,8 @@ public function getVersion() } /** + *Date and time (UTC) the Order Edit was initially created.
+ * * @return null|DateTimeImmutable */ @@ -136,6 +138,8 @@ public function getCreatedAt() } /** + *Date and time (UTC) the Order Edit was last updated.
+ * * @return null|DateTimeImmutable */ @@ -145,62 +149,64 @@ public function getLastModifiedAt() } /** - *Present on resources created after 1 February 2019 except for events not tracked.
+ *User-defined unique identifier of the Order Edit.
* - * @return null|LastModifiedBy + * @return null|string */ - public function getLastModifiedBy() + public function getKey() { - return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy; + return $this->key; } /** - *Present on resources created after 1 February 2019 except for events not tracked.
+ *Reference to the Order updated with this edit.
* - * @return null|CreatedBy + * @return null|OrderReference */ - public function getCreatedBy() + public function getResource() { - return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + return $this->resource instanceof OrderReferenceBuilder ? $this->resource->build() : $this->resource; } /** - *User-defined unique identifier of the OrderEdit.
+ *Update actions applied to the Order referenced by resource
.
The order to be updated with this edit.
+ *For applied edits, it's a summary of the changes on the Order. + * For unapplied edits, it's a preview of the changes.
* - * @return null|OrderReference + * @return null|OrderEditResult */ - public function getResource() + public function getResult() { - return $this->resource instanceof OrderReferenceBuilder ? $this->resource->build() : $this->resource; + return $this->result instanceof OrderEditResultBuilder ? $this->result->build() : $this->result; } /** - *The actions to apply to the Order. - * Cannot be updated after the edit has been applied.
+ *User-defined information regarding the Order Edit.
* - * @return null|StagedOrderUpdateActionCollection + * @return null|string */ - public function getStagedActions() + public function getComment() { - return $this->stagedActions; + return $this->comment; } /** + *Custom Fields of the Order Edit.
+ * * @return null|CustomFields */ @@ -210,26 +216,25 @@ public function getCustom() } /** - *Contains a preview of the changes in case of unapplied edit. - * For applied edits, it contains the summary of the changes.
+ *Present on resources created after 1 February 2019 except for events not tracked.
* - * @return null|OrderEditResult + * @return null|LastModifiedBy */ - public function getResult() + public function getLastModifiedBy() { - return $this->result instanceof OrderEditResultBuilder ? $this->result->build() : $this->result; + return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy; } /** - *This field can be used to add textual information regarding the edit.
+ *Present on resources created after 1 February 2019 except for events not tracked.
* - * @return null|string + * @return null|CreatedBy */ - public function getComment() + public function getCreatedBy() { - return $this->comment; + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; } /** @@ -277,56 +282,56 @@ public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt) } /** - * @param ?LastModifiedBy $lastModifiedBy + * @param ?string $key * @return $this */ - public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) + public function withKey(?string $key) { - $this->lastModifiedBy = $lastModifiedBy; + $this->key = $key; return $this; } /** - * @param ?CreatedBy $createdBy + * @param ?OrderReference $resource * @return $this */ - public function withCreatedBy(?CreatedBy $createdBy) + public function withResource(?OrderReference $resource) { - $this->createdBy = $createdBy; + $this->resource = $resource; return $this; } /** - * @param ?string $key + * @param ?StagedOrderUpdateActionCollection $stagedActions * @return $this */ - public function withKey(?string $key) + public function withStagedActions(?StagedOrderUpdateActionCollection $stagedActions) { - $this->key = $key; + $this->stagedActions = $stagedActions; return $this; } /** - * @param ?OrderReference $resource + * @param ?OrderEditResult $result * @return $this */ - public function withResource(?OrderReference $resource) + public function withResult(?OrderEditResult $result) { - $this->resource = $resource; + $this->result = $result; return $this; } /** - * @param ?StagedOrderUpdateActionCollection $stagedActions + * @param ?string $comment * @return $this */ - public function withStagedActions(?StagedOrderUpdateActionCollection $stagedActions) + public function withComment(?string $comment) { - $this->stagedActions = $stagedActions; + $this->comment = $comment; return $this; } @@ -343,78 +348,78 @@ public function withCustom(?CustomFields $custom) } /** - * @param ?OrderEditResult $result + * @param ?LastModifiedBy $lastModifiedBy * @return $this */ - public function withResult(?OrderEditResult $result) + public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) { - $this->result = $result; + $this->lastModifiedBy = $lastModifiedBy; return $this; } /** - * @param ?string $comment + * @param ?CreatedBy $createdBy * @return $this */ - public function withComment(?string $comment) + public function withCreatedBy(?CreatedBy $createdBy) { - $this->comment = $comment; + $this->createdBy = $createdBy; return $this; } /** - * @deprecated use withLastModifiedBy() instead + * @deprecated use withResource() instead * @return $this */ - public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) + public function withResourceBuilder(?OrderReferenceBuilder $resource) { - $this->lastModifiedBy = $lastModifiedBy; + $this->resource = $resource; return $this; } /** - * @deprecated use withCreatedBy() instead + * @deprecated use withResult() instead * @return $this */ - public function withCreatedByBuilder(?CreatedByBuilder $createdBy) + public function withResultBuilder(?OrderEditResultBuilder $result) { - $this->createdBy = $createdBy; + $this->result = $result; return $this; } /** - * @deprecated use withResource() instead + * @deprecated use withCustom() instead * @return $this */ - public function withResourceBuilder(?OrderReferenceBuilder $resource) + public function withCustomBuilder(?CustomFieldsBuilder $custom) { - $this->resource = $resource; + $this->custom = $custom; return $this; } /** - * @deprecated use withCustom() instead + * @deprecated use withLastModifiedBy() instead * @return $this */ - public function withCustomBuilder(?CustomFieldsBuilder $custom) + public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) { - $this->custom = $custom; + $this->lastModifiedBy = $lastModifiedBy; return $this; } /** - * @deprecated use withResult() instead + * @deprecated use withCreatedBy() instead * @return $this */ - public function withResultBuilder(?OrderEditResultBuilder $result) + public function withCreatedByBuilder(?CreatedByBuilder $createdBy) { - $this->result = $result; + $this->createdBy = $createdBy; return $this; } @@ -426,14 +431,14 @@ public function build(): OrderEdit $this->version, $this->createdAt, $this->lastModifiedAt, - $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, - $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy, $this->key, $this->resource instanceof OrderReferenceBuilder ? $this->resource->build() : $this->resource, $this->stagedActions, - $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom, $this->result instanceof OrderEditResultBuilder ? $this->result->build() : $this->result, - $this->comment + $this->comment, + $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom, + $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, + $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy ); } diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditDraft.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditDraft.php index 910464f5daf..8ad3eb7dcf3 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditDraft.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditDraft.php @@ -24,7 +24,7 @@ interface OrderEditDraft extends JsonObject public const FIELD_DRY_RUN = 'dryRun'; /** - *User-defined unique identifier for the OrderEdit.
+ *User-defined unique identifier for the Order Edit.
* * @return null|string @@ -32,7 +32,7 @@ interface OrderEditDraft extends JsonObject public function getKey(); /** - *The order to be updated with this edit.
+ *Reference to the Order updated with this edit.
* * @return null|OrderReference @@ -40,7 +40,8 @@ public function getKey(); public function getResource(); /** - *The actions to apply to resource
.
Update actions to apply to the Order referenced in resource
.
+ * Cannot be updated if the edit has been applied.
The custom fields.
+ *Custom Fields for the Order Edit.
* * @return null|CustomFieldsDraft @@ -56,7 +57,7 @@ public function getStagedActions(); public function getCustom(); /** - *This field can be used to add additional textual information regarding the edit.
+ *User-defined description regarding the Order Edit.
* * @return null|string @@ -64,7 +65,9 @@ public function getCustom(); public function getComment(); /** - *When set to true
the edit is applied on the Order without persisting it.
Set to true
if you want to peview the edited Order first without persisting it (dry run).
+ * A dry run allows checking for potential errors when trying to apply the stagedActions
.
Order API Extensions, if any, are also called in dry runs.
* * @return null|bool diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditDraftBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditDraftBuilder.php index fa5527706ee..327023715a8 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditDraftBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditDraftBuilder.php @@ -62,7 +62,7 @@ final class OrderEditDraftBuilder implements Builder private $dryRun; /** - *User-defined unique identifier for the OrderEdit.
+ *User-defined unique identifier for the Order Edit.
* * @return null|string @@ -73,7 +73,7 @@ public function getKey() } /** - *The order to be updated with this edit.
+ *Reference to the Order updated with this edit.
* * @return null|OrderReference @@ -84,7 +84,8 @@ public function getResource() } /** - *The actions to apply to resource
.
Update actions to apply to the Order referenced in resource
.
+ * Cannot be updated if the edit has been applied.
The custom fields.
+ *Custom Fields for the Order Edit.
* * @return null|CustomFieldsDraft @@ -106,7 +107,7 @@ public function getCustom() } /** - *This field can be used to add additional textual information regarding the edit.
+ *User-defined description regarding the Order Edit.
* * @return null|string @@ -117,7 +118,9 @@ public function getComment() } /** - *When set to true
the edit is applied on the Order without persisting it.
Set to true
if you want to peview the edited Order first without persisting it (dry run).
+ * A dry run allows checking for potential errors when trying to apply the stagedActions
.
Order API Extensions, if any, are also called in dry runs.
* * @return null|bool diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditDraftModel.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditDraftModel.php index 322e3c0cbbf..3743209a70a 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditDraftModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditDraftModel.php @@ -81,7 +81,7 @@ public function __construct( } /** - *User-defined unique identifier for the OrderEdit.
+ *User-defined unique identifier for the Order Edit.
* * * @return null|string @@ -101,7 +101,7 @@ public function getKey() } /** - *The order to be updated with this edit.
+ *Reference to the Order updated with this edit.
* * * @return null|OrderReference @@ -122,7 +122,8 @@ public function getResource() } /** - *The actions to apply to resource
.
Update actions to apply to the Order referenced in resource
.
+ * Cannot be updated if the edit has been applied.
The custom fields.
+ *Custom Fields for the Order Edit.
* * * @return null|CustomFieldsDraft @@ -163,7 +164,7 @@ public function getCustom() } /** - *This field can be used to add additional textual information regarding the edit.
+ *User-defined description regarding the Order Edit.
* * * @return null|string @@ -183,7 +184,9 @@ public function getComment() } /** - *When set to true
the edit is applied on the Order without persisting it.
Set to true
if you want to peview the edited Order first without persisting it (dry run).
+ * A dry run allows checking for potential errors when trying to apply the stagedActions
.
Order API Extensions, if any, are also called in dry runs.
* * * @return null|bool diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditModel.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditModel.php index d5d9eedbfb7..43087633ee2 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditModel.php @@ -57,33 +57,33 @@ final class OrderEditModel extends JsonObjectModel implements OrderEdit /** * - * @var ?LastModifiedBy + * @var ?string */ - protected $lastModifiedBy; + protected $key; /** * - * @var ?CreatedBy + * @var ?OrderReference */ - protected $createdBy; + protected $resource; /** * - * @var ?string + * @var ?StagedOrderUpdateActionCollection */ - protected $key; + protected $stagedActions; /** * - * @var ?OrderReference + * @var ?OrderEditResult */ - protected $resource; + protected $result; /** * - * @var ?StagedOrderUpdateActionCollection + * @var ?string */ - protected $stagedActions; + protected $comment; /** * @@ -93,15 +93,15 @@ final class OrderEditModel extends JsonObjectModel implements OrderEdit /** * - * @var ?OrderEditResult + * @var ?LastModifiedBy */ - protected $result; + protected $lastModifiedBy; /** * - * @var ?string + * @var ?CreatedBy */ - protected $comment; + protected $createdBy; /** @@ -112,31 +112,31 @@ public function __construct( ?int $version = null, ?DateTimeImmutable $createdAt = null, ?DateTimeImmutable $lastModifiedAt = null, - ?LastModifiedBy $lastModifiedBy = null, - ?CreatedBy $createdBy = null, ?string $key = null, ?OrderReference $resource = null, ?StagedOrderUpdateActionCollection $stagedActions = null, - ?CustomFields $custom = null, ?OrderEditResult $result = null, - ?string $comment = null + ?string $comment = null, + ?CustomFields $custom = null, + ?LastModifiedBy $lastModifiedBy = null, + ?CreatedBy $createdBy = null ) { $this->id = $id; $this->version = $version; $this->createdAt = $createdAt; $this->lastModifiedAt = $lastModifiedAt; - $this->lastModifiedBy = $lastModifiedBy; - $this->createdBy = $createdBy; $this->key = $key; $this->resource = $resource; $this->stagedActions = $stagedActions; - $this->custom = $custom; $this->result = $result; $this->comment = $comment; + $this->custom = $custom; + $this->lastModifiedBy = $lastModifiedBy; + $this->createdBy = $createdBy; } /** - *Unique identifier of the OrderEdit.
+ *Unique identifier of the Order Edit.
* * * @return null|string @@ -156,7 +156,7 @@ public function getId() } /** - *The current version of the OrderEdit.
+ *Current version of the Order Edit.
* * * @return null|int @@ -176,6 +176,8 @@ public function getVersion() } /** + *Date and time (UTC) the Order Edit was initially created.
+ * * * @return null|DateTimeImmutable */ @@ -198,6 +200,8 @@ public function getCreatedAt() } /** + *Date and time (UTC) the Order Edit was last updated.
+ * * * @return null|DateTimeImmutable */ @@ -220,110 +224,111 @@ public function getLastModifiedAt() } /** - *Present on resources created after 1 February 2019 except for events not tracked.
+ *User-defined unique identifier of the Order Edit.
* * - * @return null|LastModifiedBy + * @return null|string */ - public function getLastModifiedBy() + public function getKey() { - if (is_null($this->lastModifiedBy)) { - /** @psalm-var stdClass|arrayPresent on resources created after 1 February 2019 except for events not tracked.
+ *Reference to the Order updated with this edit.
* * - * @return null|CreatedBy + * @return null|OrderReference */ - public function getCreatedBy() + public function getResource() { - if (is_null($this->createdBy)) { + if (is_null($this->resource)) { /** @psalm-var stdClass|arrayUser-defined unique identifier of the OrderEdit.
+ *Update actions applied to the Order referenced by resource
.
The order to be updated with this edit.
+ *For applied edits, it's a summary of the changes on the Order. + * For unapplied edits, it's a preview of the changes.
* * - * @return null|OrderReference + * @return null|OrderEditResult */ - public function getResource() + public function getResult() { - if (is_null($this->resource)) { + if (is_null($this->result)) { /** @psalm-var stdClass|arrayThe actions to apply to the Order. - * Cannot be updated after the edit has been applied.
+ *User-defined information regarding the Order Edit.
* * - * @return null|StagedOrderUpdateActionCollection + * @return null|string */ - public function getStagedActions() + public function getComment() { - if (is_null($this->stagedActions)) { - /** @psalm-var ?listCustom Fields of the Order Edit.
+ * * * @return null|CustomFields */ @@ -343,45 +348,45 @@ public function getCustom() } /** - *Contains a preview of the changes in case of unapplied edit. - * For applied edits, it contains the summary of the changes.
+ *Present on resources created after 1 February 2019 except for events not tracked.
* * - * @return null|OrderEditResult + * @return null|LastModifiedBy */ - public function getResult() + public function getLastModifiedBy() { - if (is_null($this->result)) { + if (is_null($this->lastModifiedBy)) { /** @psalm-var stdClass|arrayThis field can be used to add textual information regarding the edit.
+ *Present on resources created after 1 February 2019 except for events not tracked.
* * - * @return null|string + * @return null|CreatedBy */ - public function getComment() + public function getCreatedBy() { - if (is_null($this->comment)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_COMMENT); + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayThis field is queryable.
+ * + + * @return null|string + */ + public function getType(); } diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditNotProcessedModel.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditNotProcessedModel.php index 8de6b80c751..160cb17f3a8 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditNotProcessedModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditNotProcessedModel.php @@ -37,6 +37,8 @@ public function __construct( } /** + *This field is queryable.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditPagedQueryResponse.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditPagedQueryResponse.php index edeb5b11d38..7ec82a37f4a 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditPagedQueryResponse.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditPagedQueryResponse.php @@ -14,9 +14,9 @@ interface OrderEditPagedQueryResponse extends JsonObject { public const FIELD_LIMIT = 'limit'; + public const FIELD_OFFSET = 'offset'; public const FIELD_COUNT = 'count'; public const FIELD_TOTAL = 'total'; - public const FIELD_OFFSET = 'offset'; public const FIELD_RESULTS = 'results'; /** @@ -28,26 +28,36 @@ interface OrderEditPagedQueryResponse extends JsonObject public function getLimit(); /** + *Number of elements skipped.
+ * * @return null|int */ - public function getCount(); + public function getOffset(); /** + *Actual number of results returned.
+ * * @return null|int */ - public function getTotal(); + public function getCount(); /** - *Number of elements skipped.
+ *Total number of results matching the query.
+ * This number is an estimation that is not strongly consistent.
+ * This field is returned by default.
+ * For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false
.
+ * When the results are filtered with a Query Predicate, total
is subject to a limit.
OrderEdits matching the query.
+ * * @return null|OrderEditCollection */ @@ -58,6 +68,11 @@ public function getResults(); */ public function setLimit(?int $limit): void; + /** + * @param ?int $offset + */ + public function setOffset(?int $offset): void; + /** * @param ?int $count */ @@ -68,11 +83,6 @@ public function setCount(?int $count): void; */ public function setTotal(?int $total): void; - /** - * @param ?int $offset - */ - public function setOffset(?int $offset): void; - /** * @param ?OrderEditCollection $results */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditPagedQueryResponseBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditPagedQueryResponseBuilder.php index 968e4b8cf0f..9e69c225e7f 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditPagedQueryResponseBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditPagedQueryResponseBuilder.php @@ -30,19 +30,19 @@ final class OrderEditPagedQueryResponseBuilder implements Builder * @var ?int */ - private $count; + private $offset; /** * @var ?int */ - private $total; + private $count; /** * @var ?int */ - private $offset; + private $total; /** @@ -62,35 +62,45 @@ public function getLimit() } /** + *Number of elements skipped.
+ * * @return null|int */ - public function getCount() + public function getOffset() { - return $this->count; + return $this->offset; } /** + *Actual number of results returned.
+ * * @return null|int */ - public function getTotal() + public function getCount() { - return $this->total; + return $this->count; } /** - *Number of elements skipped.
+ *Total number of results matching the query.
+ * This number is an estimation that is not strongly consistent.
+ * This field is returned by default.
+ * For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false
.
+ * When the results are filtered with a Query Predicate, total
is subject to a limit.
OrderEdits matching the query.
+ * * @return null|OrderEditCollection */ @@ -111,34 +121,34 @@ public function withLimit(?int $limit) } /** - * @param ?int $count + * @param ?int $offset * @return $this */ - public function withCount(?int $count) + public function withOffset(?int $offset) { - $this->count = $count; + $this->offset = $offset; return $this; } /** - * @param ?int $total + * @param ?int $count * @return $this */ - public function withTotal(?int $total) + public function withCount(?int $count) { - $this->total = $total; + $this->count = $count; return $this; } /** - * @param ?int $offset + * @param ?int $total * @return $this */ - public function withOffset(?int $offset) + public function withTotal(?int $total) { - $this->offset = $offset; + $this->total = $total; return $this; } @@ -159,9 +169,9 @@ public function build(): OrderEditPagedQueryResponse { return new OrderEditPagedQueryResponseModel( $this->limit, + $this->offset, $this->count, $this->total, - $this->offset, $this->results ); } diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditPagedQueryResponseModel.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditPagedQueryResponseModel.php index b962e601b3d..9760192a97b 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditPagedQueryResponseModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditPagedQueryResponseModel.php @@ -29,19 +29,19 @@ final class OrderEditPagedQueryResponseModel extends JsonObjectModel implements * * @var ?int */ - protected $count; + protected $offset; /** * * @var ?int */ - protected $total; + protected $count; /** * * @var ?int */ - protected $offset; + protected $total; /** * @@ -55,15 +55,15 @@ final class OrderEditPagedQueryResponseModel extends JsonObjectModel implements */ public function __construct( ?int $limit = null, + ?int $offset = null, ?int $count = null, ?int $total = null, - ?int $offset = null, ?OrderEditCollection $results = null ) { $this->limit = $limit; + $this->offset = $offset; $this->count = $count; $this->total = $total; - $this->offset = $offset; $this->results = $results; } @@ -88,62 +88,72 @@ public function getLimit() } /** + *Number of elements skipped.
+ * * * @return null|int */ - public function getCount() + public function getOffset() { - if (is_null($this->count)) { + if (is_null($this->offset)) { /** @psalm-var ?int $data */ - $data = $this->raw(self::FIELD_COUNT); + $data = $this->raw(self::FIELD_OFFSET); if (is_null($data)) { return null; } - $this->count = (int) $data; + $this->offset = (int) $data; } - return $this->count; + return $this->offset; } /** + *Actual number of results returned.
+ * * * @return null|int */ - public function getTotal() + public function getCount() { - if (is_null($this->total)) { + if (is_null($this->count)) { /** @psalm-var ?int $data */ - $data = $this->raw(self::FIELD_TOTAL); + $data = $this->raw(self::FIELD_COUNT); if (is_null($data)) { return null; } - $this->total = (int) $data; + $this->count = (int) $data; } - return $this->total; + return $this->count; } /** - *Number of elements skipped.
+ *Total number of results matching the query.
+ * This number is an estimation that is not strongly consistent.
+ * This field is returned by default.
+ * For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false
.
+ * When the results are filtered with a Query Predicate, total
is subject to a limit.
OrderEdits matching the query.
+ * * * @return null|OrderEditCollection */ @@ -170,6 +180,14 @@ public function setLimit(?int $limit): void $this->limit = $limit; } + /** + * @param ?int $offset + */ + public function setOffset(?int $offset): void + { + $this->offset = $offset; + } + /** * @param ?int $count */ @@ -186,14 +204,6 @@ public function setTotal(?int $total): void $this->total = $total; } - /** - * @param ?int $offset - */ - public function setOffset(?int $offset): void - { - $this->offset = $offset; - } - /** * @param ?OrderEditCollection $results */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewFailure.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewFailure.php index 329fa1d3b3f..85714bc8495 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewFailure.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewFailure.php @@ -17,6 +17,8 @@ interface OrderEditPreviewFailure extends OrderEditResult public const FIELD_ERRORS = 'errors'; /** + *Errors returned.
+ * * @return null|ErrorObjectCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewFailureBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewFailureBuilder.php index bb3a84ffeac..22334b94fe3 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewFailureBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewFailureBuilder.php @@ -28,6 +28,8 @@ final class OrderEditPreviewFailureBuilder implements Builder private $errors; /** + *Errors returned.
+ * * @return null|ErrorObjectCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewFailureModel.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewFailureModel.php index ab4c72d89e3..160983ed645 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewFailureModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewFailureModel.php @@ -64,6 +64,8 @@ public function getType() } /** + *Errors returned.
+ * * * @return null|ErrorObjectCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewSuccess.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewSuccess.php index e395a1e4582..c4e4d340476 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewSuccess.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewSuccess.php @@ -18,12 +18,16 @@ interface OrderEditPreviewSuccess extends OrderEditResult public const FIELD_MESSAGE_PAYLOADS = 'messagePayloads'; /** + *A preview of the edited Order as it will be after all stagedActions
(incl. optional Order API Extensions) are applied.
Messages that will be generated if the edit is applied.
+ * * @return null|MessagePayloadCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewSuccessBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewSuccessBuilder.php index c3c910f1999..f63c601ec43 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewSuccessBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewSuccessBuilder.php @@ -34,6 +34,8 @@ final class OrderEditPreviewSuccessBuilder implements Builder private $messagePayloads; /** + *A preview of the edited Order as it will be after all stagedActions
(incl. optional Order API Extensions) are applied.
Messages that will be generated if the edit is applied.
+ * * @return null|MessagePayloadCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewSuccessModel.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewSuccessModel.php index 95338c6eddf..20fd6194a79 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewSuccessModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditPreviewSuccessModel.php @@ -72,6 +72,8 @@ public function getType() } /** + *A preview of the edited Order as it will be after all stagedActions
(incl. optional Order API Extensions) are applied.
Messages that will be generated if the edit is applied.
+ * * * @return null|MessagePayloadCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditReference.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditReference.php index aa0561376ed..34bde74d14e 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditReference.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditReference.php @@ -17,7 +17,7 @@ interface OrderEditReference extends Reference public const FIELD_OBJ = 'obj'; /** - *Contains the representation of the expanded OrderEdit. Only present in responses to requests with Reference Expansion for OrderEdits.
+ *Contains the representation of the expanded Order Edit. Only present in responses to requests with Reference Expansion for Order Edits.
* * @return null|OrderEdit diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditReferenceBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditReferenceBuilder.php index 1d43e1345bf..6d08bff6c58 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditReferenceBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditReferenceBuilder.php @@ -46,7 +46,7 @@ public function getId() } /** - *Contains the representation of the expanded OrderEdit. Only present in responses to requests with Reference Expansion for OrderEdits.
+ *Contains the representation of the expanded Order Edit. Only present in responses to requests with Reference Expansion for Order Edits.
* * @return null|OrderEdit diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditReferenceModel.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditReferenceModel.php index b86801a710a..ffb28450cd8 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditReferenceModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditReferenceModel.php @@ -95,7 +95,7 @@ public function getId() } /** - *Contains the representation of the expanded OrderEdit. Only present in responses to requests with Reference Expansion for OrderEdits.
+ *Contains the representation of the expanded Order Edit. Only present in responses to requests with Reference Expansion for Order Edits.
* * * @return null|OrderEdit diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditResourceIdentifier.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditResourceIdentifier.php index 6fd85a63d17..51851b0f49d 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditResourceIdentifier.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditResourceIdentifier.php @@ -15,7 +15,7 @@ interface OrderEditResourceIdentifier extends ResourceIdentifier { /** - *Unique identifier of the referenced OrderEdit. Either id
or key
is required.
Unique identifier of the referenced OrderEdit.
* * @return null|string @@ -23,7 +23,7 @@ interface OrderEditResourceIdentifier extends ResourceIdentifier public function getId(); /** - *User-defined unique identifier of the referenced OrderEdit. Either id
or key
is required.
User-defined unique identifier of the referenced OrderEdit.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditResourceIdentifierBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditResourceIdentifierBuilder.php index 4e3dcce67ec..c9af31443f2 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditResourceIdentifierBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditResourceIdentifierBuilder.php @@ -35,7 +35,7 @@ final class OrderEditResourceIdentifierBuilder implements Builder private $key; /** - *Unique identifier of the referenced OrderEdit. Either id
or key
is required.
Unique identifier of the referenced OrderEdit.
* * @return null|string @@ -46,7 +46,7 @@ public function getId() } /** - *User-defined unique identifier of the referenced OrderEdit. Either id
or key
is required.
User-defined unique identifier of the referenced OrderEdit.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditResourceIdentifierModel.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditResourceIdentifierModel.php index 25dfce54861..708cb6200bf 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditResourceIdentifierModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditResourceIdentifierModel.php @@ -75,7 +75,7 @@ public function getTypeId() } /** - *Unique identifier of the referenced OrderEdit. Either id
or key
is required.
Unique identifier of the referenced OrderEdit.
* * * @return null|string @@ -95,7 +95,7 @@ public function getId() } /** - *User-defined unique identifier of the referenced OrderEdit. Either id
or key
is required.
User-defined unique identifier of the referenced OrderEdit.
* * * @return null|string diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCommentAction.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCommentAction.php index 36a6b5d5319..fb3c299b21c 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCommentAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCommentAction.php @@ -16,6 +16,9 @@ interface OrderEditSetCommentAction extends OrderEditUpdateAction public const FIELD_COMMENT = 'comment'; /** + *Value to set. + * If empty, any existing value will be removed.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCommentActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCommentActionBuilder.php index 1edc4c9ca72..5cf9280b8d2 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCommentActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCommentActionBuilder.php @@ -27,6 +27,9 @@ final class OrderEditSetCommentActionBuilder implements Builder private $comment; /** + *Value to set. + * If empty, any existing value will be removed.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCommentActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCommentActionModel.php index e20b40c45b2..9ee4f2e0a91 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCommentActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCommentActionModel.php @@ -63,6 +63,9 @@ public function getAction() } /** + *Value to set. + * If empty, any existing value will be removed.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomTypeAction.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomTypeAction.php index 5de0628cb06..a3f20a6e3a9 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomTypeAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomTypeAction.php @@ -19,8 +19,8 @@ interface OrderEditSetCustomTypeAction extends OrderEditUpdateAction public const FIELD_FIELDS = 'fields'; /** - *Defines the Type that extends the OrderEdit with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the OrderEdit.
+ *Defines the Type that extends the Order Edit with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Order Edit.
* * @return null|TypeResourceIdentifier @@ -28,7 +28,7 @@ interface OrderEditSetCustomTypeAction extends OrderEditUpdateAction public function getType(); /** - *Sets the Custom Fields fields for the OrderEdit.
+ *Sets the Custom Fields fields for the Order Edit.
* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomTypeActionBuilder.php index 8a28e07cb79..b14c623ff23 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomTypeActionBuilder.php @@ -37,8 +37,8 @@ final class OrderEditSetCustomTypeActionBuilder implements Builder private $fields; /** - *Defines the Type that extends the OrderEdit with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the OrderEdit.
+ *Defines the Type that extends the Order Edit with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Order Edit.
* * @return null|TypeResourceIdentifier @@ -49,7 +49,7 @@ public function getType() } /** - *Sets the Custom Fields fields for the OrderEdit.
+ *Sets the Custom Fields fields for the Order Edit.
* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomTypeActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomTypeActionModel.php index 0b9eb0c7ae4..c973ecce326 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomTypeActionModel.php @@ -75,8 +75,8 @@ public function getAction() } /** - *Defines the Type that extends the OrderEdit with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the OrderEdit.
+ *Defines the Type that extends the Order Edit with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Order Edit.
* * * @return null|TypeResourceIdentifier @@ -97,7 +97,7 @@ public function getType() } /** - *Sets the Custom Fields fields for the OrderEdit.
+ *Sets the Custom Fields fields for the Order Edit.
* * * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetKeyAction.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetKeyAction.php index 6fd53e4b8d5..9c052aedf25 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetKeyAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetKeyAction.php @@ -16,7 +16,8 @@ interface OrderEditSetKeyAction extends OrderEditUpdateAction public const FIELD_KEY = 'key'; /** - *If key
is absent or null
, this field will be removed if it exists.
Value to set. + * If empty, any existing value will be removed.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetKeyActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetKeyActionBuilder.php index 5dc99c9b0af..7f87fa53516 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetKeyActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetKeyActionBuilder.php @@ -27,7 +27,8 @@ final class OrderEditSetKeyActionBuilder implements Builder private $key; /** - *If key
is absent or null
, this field will be removed if it exists.
Value to set. + * If empty, any existing value will be removed.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetKeyActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetKeyActionModel.php index f3a9281c750..5c3fb3b746d 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetKeyActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetKeyActionModel.php @@ -63,7 +63,8 @@ public function getAction() } /** - *If key
is absent or null
, this field will be removed if it exists.
Value to set. + * If empty, any existing value will be removed.
* * * @return null|string diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetStagedActionsAction.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetStagedActionsAction.php index a5864c5d654..dfe13f7143c 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetStagedActionsAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetStagedActionsAction.php @@ -17,7 +17,7 @@ interface OrderEditSetStagedActionsAction extends OrderEditUpdateAction public const FIELD_STAGED_ACTIONS = 'stagedActions'; /** - *The actions to edit the resource
.
Value to replace the stagedActions
of the Order Edit.
The actions to edit the resource
.
Value to replace the stagedActions
of the Order Edit.
The actions to edit the resource
.
Value to replace the stagedActions
of the Order Edit.
Expected version of the Order Edit on which the changes should be applied. + * If the expected version does not match the actual version, a 409 Conflict will be returned.
+ * * @return null|int */ public function getVersion(); /** + *Update actions to be performed on the Order Edit.
+ * * @return null|OrderEditUpdateActionCollection */ public function getActions(); /** + *If set to true
, the Order Edit is applied on the Order without persisting it.
Expected version of the Order Edit on which the changes should be applied. + * If the expected version does not match the actual version, a 409 Conflict will be returned.
+ * * @return null|int */ @@ -48,6 +51,8 @@ public function getVersion() } /** + *Update actions to be performed on the Order Edit.
+ * * @return null|OrderEditUpdateActionCollection */ @@ -57,6 +62,8 @@ public function getActions() } /** + *If set to true
, the Order Edit is applied on the Order without persisting it.
Expected version of the Order Edit on which the changes should be applied. + * If the expected version does not match the actual version, a 409 Conflict will be returned.
+ * * * @return null|int */ @@ -70,6 +73,8 @@ public function getVersion() } /** + *Update actions to be performed on the Order Edit.
+ * * * @return null|OrderEditUpdateActionCollection */ @@ -88,6 +93,8 @@ public function getActions() } /** + *If set to true
, the Order Edit is applied on the Order without persisting it.
Total price of the Order.
+ * * @return null|TypedMoney */ public function getTotalPrice(); /** + *Taxed price of the Order.
+ * * @return null|TaxedPrice */ public function getTaxedPrice(); /** + *Current version of the Order.
+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderExcerptBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/OrderExcerptBuilder.php index 0c5dd041eb0..8fda0cbd9d7 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderExcerptBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderExcerptBuilder.php @@ -43,6 +43,8 @@ final class OrderExcerptBuilder implements Builder private $version; /** + *Total price of the Order.
+ * * @return null|TypedMoney */ @@ -52,6 +54,8 @@ public function getTotalPrice() } /** + *Taxed price of the Order.
+ * * @return null|TaxedPrice */ @@ -61,6 +65,8 @@ public function getTaxedPrice() } /** + *Current version of the Order.
+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderExcerptModel.php b/lib/commercetools-api/src/Models/OrderEdit/OrderExcerptModel.php index 0b204913517..e81bc3fedec 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderExcerptModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderExcerptModel.php @@ -56,6 +56,8 @@ public function __construct( } /** + *Total price of the Order.
+ * * * @return null|TypedMoney */ @@ -75,6 +77,8 @@ public function getTotalPrice() } /** + *Taxed price of the Order.
+ * * * @return null|TaxedPrice */ @@ -94,6 +98,8 @@ public function getTaxedPrice() } /** + *Current version of the Order.
+ * * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemAction.php index 738d066c327..b87c0c3aa8b 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemAction.php @@ -9,6 +9,7 @@ namespace Commercetools\Api\Models\OrderEdit; use Commercetools\Api\Models\Cart\ExternalTaxRateDraft; +use Commercetools\Api\Models\Cart\ItemShippingDetailsDraft; use Commercetools\Api\Models\Common\LocalizedString; use Commercetools\Api\Models\Common\Money; use Commercetools\Api\Models\Order\StagedOrderUpdateAction; @@ -25,12 +26,13 @@ interface StagedOrderAddCustomLineItemAction extends StagedOrderUpdateAction public const FIELD_QUANTITY = 'quantity'; public const FIELD_SLUG = 'slug'; public const FIELD_TAX_CATEGORY = 'taxCategory'; - public const FIELD_CUSTOM = 'custom'; public const FIELD_EXTERNAL_TAX_RATE = 'externalTaxRate'; + public const FIELD_SHIPPING_DETAILS = 'shippingDetails'; public const FIELD_PRICE_MODE = 'priceMode'; + public const FIELD_CUSTOM = 'custom'; /** - *Draft type that stores amounts only in cent precision for the specified currency.
+ *Money value of the Custom Line Item. The value can be negative.
* * @return null|Money @@ -38,7 +40,7 @@ interface StagedOrderAddCustomLineItemAction extends StagedOrderUpdateAction public function getMoney(); /** - *JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.
+ *Name of the Custom Line Item.
* * @return null|LocalizedString @@ -54,19 +56,24 @@ public function getName(); public function getKey(); /** + *Number of Custom Line Items to add to the Cart.
+ * * @return null|int */ public function getQuantity(); /** + *User-defined identifier used in a deep-link URL for the Custom Line Item. It must match the pattern [a-zA-Z0-9_-]{2,256}
.
ResourceIdentifier to a TaxCategory.
+ *Used to select a Tax Rate when a Cart has the Platform
TaxMode.
+ * If TaxMode is Platform
, this field must not be empty.
The representation used when creating or updating a customizable data type with Custom Fields.
+ *An external Tax Rate can be set if the Cart has the External
TaxMode.
Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *Container for Custom Line Item-specific addresses.
* - * @return null|ExternalTaxRateDraft + * @return null|ItemShippingDetailsDraft */ - public function getExternalTaxRate(); + public function getShippingDetails(); /** *Custom Fields for the Custom Line Item.
+ * + + * @return null|CustomFieldsDraft + */ + public function getCustom(); + /** * @param ?Money $money */ @@ -132,17 +147,22 @@ public function setSlug(?string $slug): void; public function setTaxCategory(?TaxCategoryResourceIdentifier $taxCategory): void; /** - * @param ?CustomFieldsDraft $custom + * @param ?ExternalTaxRateDraft $externalTaxRate */ - public function setCustom(?CustomFieldsDraft $custom): void; + public function setExternalTaxRate(?ExternalTaxRateDraft $externalTaxRate): void; /** - * @param ?ExternalTaxRateDraft $externalTaxRate + * @param ?ItemShippingDetailsDraft $shippingDetails */ - public function setExternalTaxRate(?ExternalTaxRateDraft $externalTaxRate): void; + public function setShippingDetails(?ItemShippingDetailsDraft $shippingDetails): void; /** * @param ?string $priceMode */ public function setPriceMode(?string $priceMode): void; + + /** + * @param ?CustomFieldsDraft $custom + */ + public function setCustom(?CustomFieldsDraft $custom): void; } diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemActionBuilder.php index e661f2fecf6..1b49d6471ed 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemActionBuilder.php @@ -10,6 +10,8 @@ use Commercetools\Api\Models\Cart\ExternalTaxRateDraft; use Commercetools\Api\Models\Cart\ExternalTaxRateDraftBuilder; +use Commercetools\Api\Models\Cart\ItemShippingDetailsDraft; +use Commercetools\Api\Models\Cart\ItemShippingDetailsDraftBuilder; use Commercetools\Api\Models\Common\LocalizedString; use Commercetools\Api\Models\Common\LocalizedStringBuilder; use Commercetools\Api\Models\Common\Money; @@ -70,15 +72,15 @@ final class StagedOrderAddCustomLineItemActionBuilder implements Builder /** - * @var null|CustomFieldsDraft|CustomFieldsDraftBuilder + * @var null|ExternalTaxRateDraft|ExternalTaxRateDraftBuilder */ - private $custom; + private $externalTaxRate; /** - * @var null|ExternalTaxRateDraft|ExternalTaxRateDraftBuilder + * @var null|ItemShippingDetailsDraft|ItemShippingDetailsDraftBuilder */ - private $externalTaxRate; + private $shippingDetails; /** @@ -87,7 +89,13 @@ final class StagedOrderAddCustomLineItemActionBuilder implements Builder private $priceMode; /** - *Draft type that stores amounts only in cent precision for the specified currency.
+ + * @var null|CustomFieldsDraft|CustomFieldsDraftBuilder + */ + private $custom; + + /** + *Money value of the Custom Line Item. The value can be negative.
* * @return null|Money @@ -98,7 +106,7 @@ public function getMoney() } /** - *JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.
+ *Name of the Custom Line Item.
* * @return null|LocalizedString @@ -120,6 +128,8 @@ public function getKey() } /** + *Number of Custom Line Items to add to the Cart.
+ * * @return null|int */ @@ -129,6 +139,8 @@ public function getQuantity() } /** + *User-defined identifier used in a deep-link URL for the Custom Line Item. It must match the pattern [a-zA-Z0-9_-]{2,256}
.
ResourceIdentifier to a TaxCategory.
+ *Used to select a Tax Rate when a Cart has the Platform
TaxMode.
+ * If TaxMode is Platform
, this field must not be empty.
The representation used when creating or updating a customizable data type with Custom Fields.
+ *An external Tax Rate can be set if the Cart has the External
TaxMode.
Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *Container for Custom Line Item-specific addresses.
* - * @return null|ExternalTaxRateDraft + * @return null|ItemShippingDetailsDraft */ - public function getExternalTaxRate() + public function getShippingDetails() { - return $this->externalTaxRate instanceof ExternalTaxRateDraftBuilder ? $this->externalTaxRate->build() : $this->externalTaxRate; + return $this->shippingDetails instanceof ItemShippingDetailsDraftBuilder ? $this->shippingDetails->build() : $this->shippingDetails; } /** @@ -185,6 +198,17 @@ public function getPriceMode() return $this->priceMode; } + /** + *Custom Fields for the Custom Line Item.
+ * + + * @return null|CustomFieldsDraft + */ + public function getCustom() + { + return $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom; + } + /** * @param ?Money $money * @return $this @@ -252,23 +276,23 @@ public function withTaxCategory(?TaxCategoryResourceIdentifier $taxCategory) } /** - * @param ?CustomFieldsDraft $custom + * @param ?ExternalTaxRateDraft $externalTaxRate * @return $this */ - public function withCustom(?CustomFieldsDraft $custom) + public function withExternalTaxRate(?ExternalTaxRateDraft $externalTaxRate) { - $this->custom = $custom; + $this->externalTaxRate = $externalTaxRate; return $this; } /** - * @param ?ExternalTaxRateDraft $externalTaxRate + * @param ?ItemShippingDetailsDraft $shippingDetails * @return $this */ - public function withExternalTaxRate(?ExternalTaxRateDraft $externalTaxRate) + public function withShippingDetails(?ItemShippingDetailsDraft $shippingDetails) { - $this->externalTaxRate = $externalTaxRate; + $this->shippingDetails = $shippingDetails; return $this; } @@ -284,6 +308,17 @@ public function withPriceMode(?string $priceMode) return $this; } + /** + * @param ?CustomFieldsDraft $custom + * @return $this + */ + public function withCustom(?CustomFieldsDraft $custom) + { + $this->custom = $custom; + + return $this; + } + /** * @deprecated use withMoney() instead * @return $this @@ -318,23 +353,34 @@ public function withTaxCategoryBuilder(?TaxCategoryResourceIdentifierBuilder $ta } /** - * @deprecated use withCustom() instead + * @deprecated use withExternalTaxRate() instead * @return $this */ - public function withCustomBuilder(?CustomFieldsDraftBuilder $custom) + public function withExternalTaxRateBuilder(?ExternalTaxRateDraftBuilder $externalTaxRate) { - $this->custom = $custom; + $this->externalTaxRate = $externalTaxRate; return $this; } /** - * @deprecated use withExternalTaxRate() instead + * @deprecated use withShippingDetails() instead * @return $this */ - public function withExternalTaxRateBuilder(?ExternalTaxRateDraftBuilder $externalTaxRate) + public function withShippingDetailsBuilder(?ItemShippingDetailsDraftBuilder $shippingDetails) { - $this->externalTaxRate = $externalTaxRate; + $this->shippingDetails = $shippingDetails; + + return $this; + } + + /** + * @deprecated use withCustom() instead + * @return $this + */ + public function withCustomBuilder(?CustomFieldsDraftBuilder $custom) + { + $this->custom = $custom; return $this; } @@ -348,9 +394,10 @@ public function build(): StagedOrderAddCustomLineItemAction $this->quantity, $this->slug, $this->taxCategory instanceof TaxCategoryResourceIdentifierBuilder ? $this->taxCategory->build() : $this->taxCategory, - $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom, $this->externalTaxRate instanceof ExternalTaxRateDraftBuilder ? $this->externalTaxRate->build() : $this->externalTaxRate, - $this->priceMode + $this->shippingDetails instanceof ItemShippingDetailsDraftBuilder ? $this->shippingDetails->build() : $this->shippingDetails, + $this->priceMode, + $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom ); } diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemActionModel.php index fb016514ff5..66cdfe44d44 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddCustomLineItemActionModel.php @@ -10,6 +10,8 @@ use Commercetools\Api\Models\Cart\ExternalTaxRateDraft; use Commercetools\Api\Models\Cart\ExternalTaxRateDraftModel; +use Commercetools\Api\Models\Cart\ItemShippingDetailsDraft; +use Commercetools\Api\Models\Cart\ItemShippingDetailsDraftModel; use Commercetools\Api\Models\Common\LocalizedString; use Commercetools\Api\Models\Common\LocalizedStringModel; use Commercetools\Api\Models\Common\Money; @@ -76,15 +78,15 @@ final class StagedOrderAddCustomLineItemActionModel extends JsonObjectModel impl /** * - * @var ?CustomFieldsDraft + * @var ?ExternalTaxRateDraft */ - protected $custom; + protected $externalTaxRate; /** * - * @var ?ExternalTaxRateDraft + * @var ?ItemShippingDetailsDraft */ - protected $externalTaxRate; + protected $shippingDetails; /** * @@ -92,6 +94,12 @@ final class StagedOrderAddCustomLineItemActionModel extends JsonObjectModel impl */ protected $priceMode; + /** + * + * @var ?CustomFieldsDraft + */ + protected $custom; + /** * @psalm-suppress MissingParamType @@ -103,9 +111,10 @@ public function __construct( ?int $quantity = null, ?string $slug = null, ?TaxCategoryResourceIdentifier $taxCategory = null, - ?CustomFieldsDraft $custom = null, ?ExternalTaxRateDraft $externalTaxRate = null, + ?ItemShippingDetailsDraft $shippingDetails = null, ?string $priceMode = null, + ?CustomFieldsDraft $custom = null, ?string $action = null ) { $this->money = $money; @@ -114,9 +123,10 @@ public function __construct( $this->quantity = $quantity; $this->slug = $slug; $this->taxCategory = $taxCategory; - $this->custom = $custom; $this->externalTaxRate = $externalTaxRate; + $this->shippingDetails = $shippingDetails; $this->priceMode = $priceMode; + $this->custom = $custom; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -139,7 +149,7 @@ public function getAction() } /** - *Draft type that stores amounts only in cent precision for the specified currency.
+ *Money value of the Custom Line Item. The value can be negative.
* * * @return null|Money @@ -160,7 +170,7 @@ public function getMoney() } /** - *JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.
+ *Name of the Custom Line Item.
* * * @return null|LocalizedString @@ -201,6 +211,8 @@ public function getKey() } /** + *Number of Custom Line Items to add to the Cart.
+ * * * @return null|int */ @@ -219,6 +231,8 @@ public function getQuantity() } /** + *User-defined identifier used in a deep-link URL for the Custom Line Item. It must match the pattern [a-zA-Z0-9_-]{2,256}
.
ResourceIdentifier to a TaxCategory.
+ *Used to select a Tax Rate when a Cart has the Platform
TaxMode.
+ * If TaxMode is Platform
, this field must not be empty.
The representation used when creating or updating a customizable data type with Custom Fields.
+ *An external Tax Rate can be set if the Cart has the External
TaxMode.
Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *Container for Custom Line Item-specific addresses.
* * - * @return null|ExternalTaxRateDraft + * @return null|ItemShippingDetailsDraft */ - public function getExternalTaxRate() + public function getShippingDetails() { - if (is_null($this->externalTaxRate)) { + if (is_null($this->shippingDetails)) { /** @psalm-var stdClass|arrayCustom Fields for the Custom Line Item.
+ * + * + * @return null|CustomFieldsDraft + */ + public function getCustom() + { + if (is_null($this->custom)) { + /** @psalm-var stdClass|arrayUser-defined unique identifier of a Delivery.
+ *key
of an existing Delivery.
key
of the ShippingMethod,required for Multiple
ShippingMode.
key
of the ShippingMethod, required for Multiple
ShippingMode.
Items to be included in the Delivery.
+ * * @return null|DeliveryItemCollection */ public function getItems(); /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Address the parcels
should be delivered to.
Parcels of the Delivery.
+ *If provided, this update action also produces the Parcel Added To Delivery Message.
+ * * @return null|ParcelDraftCollection */ public function getParcels(); /** - *Custom Fields for the Transaction.
+ *Custom Fields for the Delivery.
* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddDeliveryActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddDeliveryActionBuilder.php index 67b40ba6db1..8a878dee2fb 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddDeliveryActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddDeliveryActionBuilder.php @@ -65,7 +65,7 @@ final class StagedOrderAddDeliveryActionBuilder implements Builder private $custom; /** - *User-defined unique identifier of a Delivery.
+ *key
of an existing Delivery.
key
of the ShippingMethod,required for Multiple
ShippingMode.
key
of the ShippingMethod, required for Multiple
ShippingMode.
Items to be included in the Delivery.
+ * * @return null|DeliveryItemCollection */ @@ -96,9 +98,7 @@ public function getItems() } /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Address the parcels
should be delivered to.
Parcels of the Delivery.
+ *If provided, this update action also produces the Parcel Added To Delivery Message.
+ * * @return null|ParcelDraftCollection */ @@ -118,7 +121,7 @@ public function getParcels() } /** - *Custom Fields for the Transaction.
+ *Custom Fields for the Delivery.
* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddDeliveryActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddDeliveryActionModel.php index 2a1d5022d78..83531d1cc42 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddDeliveryActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddDeliveryActionModel.php @@ -111,7 +111,7 @@ public function getAction() } /** - *User-defined unique identifier of a Delivery.
+ *key
of an existing Delivery.
key
of the ShippingMethod,required for Multiple
ShippingMode.
key
of the ShippingMethod, required for Multiple
ShippingMode.
Items to be included in the Delivery.
+ * * * @return null|DeliveryItemCollection */ @@ -169,9 +171,7 @@ public function getItems() } /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Address the parcels
should be delivered to.
Parcels of the Delivery.
+ *If provided, this update action also produces the Parcel Added To Delivery Message.
+ * * * @return null|ParcelDraftCollection */ @@ -210,7 +213,7 @@ public function getParcels() } /** - *Custom Fields for the Transaction.
+ *Custom Fields for the Delivery.
* * * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddDiscountCodeAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddDiscountCodeAction.php index 97d46e51838..5a57b881472 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddDiscountCodeAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddDiscountCodeAction.php @@ -17,6 +17,8 @@ interface StagedOrderAddDiscountCodeAction extends StagedOrderUpdateAction public const FIELD_CODE = 'code'; /** + *code
of a DiscountCode.
code
of a DiscountCode.
code
of a DiscountCode.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Address to append to itemShippingAddresses
.
+ * The new Address must have a key
that is unique across this Order.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Address to append to itemShippingAddresses
.
+ * The new Address must have a key
that is unique across this Order.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Address to append to itemShippingAddresses
.
+ * The new Address must have a key
that is unique across this Order.
User-defined unique identifier of the LineItem.
@@ -44,61 +45,64 @@ interface StagedOrderAddLineItemAction extends StagedOrderUpdateAction public function getKey(); /** - *The representation used when creating or updating a customizable data type with Custom Fields.
+ *id
of the published Product.
Either the productId
and variantId
, or sku
must be provided.
ResourceIdentifier to a Channel.
- * - - * @return null|ChannelResourceIdentifier - */ - public function getDistributionChannel(); - - /** - *Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
- * - - * @return null|ExternalTaxRateDraft - */ - public function getExternalTaxRate(); - - /** - * @return null|string */ public function getProductId(); /** + *id
of the ProductVariant in the Product.
+ * If not provided, the Master Variant is used.
Either the productId
and variantId
, or sku
must be provided.
SKU of the ProductVariant.
+ *Either the productId
and variantId
, or sku
must be provided.
Quantity of the Product Variant to add to the Cart.
+ * * @return null|int */ public function getQuantity(); /** + *Date and time (UTC) the Product Variant is added to the Cart. + * If not set, it defaults to the current date and time.
+ *Optional for backwards compatibility reasons.
+ * * @return null|DateTimeImmutable */ public function getAddedAt(); /** - *ResourceIdentifier to a Channel.
+ *Used to select a Product Price.
+ * The Channel must have the ProductDistribution
ChannelRoleEnum.
+ * If the Cart is bound to a Store with distributionChannels
set, the Channel must match one of the Store's distribution channels.
Used to identify Inventory entries that must be reserved.
+ * The Channel must have the InventorySupply
ChannelRoleEnum.
Draft type that stores amounts only in cent precision for the specified currency.
+ *Sets the LineItem price
value, and the priceMode
to ExternalPrice
LineItemPriceMode.
Sets the LineItem price
and totalPrice
values, and the priceMode
to ExternalTotal
LineItemPriceMode.
For order creation and updates, the sum of the targets
must match the quantity of the Line Items or Custom Line Items.
External Tax Rate for the Line Item, if the Cart has the External
TaxMode.
Inventory mode specific to the Line Item only, and valid for the entire quantity
of the Line Item.
+ * Set only if the inventory mode should be different from the inventoryMode
specified on the Cart.
Container for Line Item-specific addresses.
+ * + + * @return null|ItemShippingDetailsDraft */ - public function setCustom(?CustomFieldsDraft $custom): void; + public function getShippingDetails(); /** - * @param ?ChannelResourceIdentifier $distributionChannel + *Custom Fields for the Line Item.
+ * + + * @return null|CustomFieldsDraft */ - public function setDistributionChannel(?ChannelResourceIdentifier $distributionChannel): void; + public function getCustom(); /** - * @param ?ExternalTaxRateDraft $externalTaxRate + * @param ?string $key */ - public function setExternalTaxRate(?ExternalTaxRateDraft $externalTaxRate): void; + public function setKey(?string $key): void; /** * @param ?string $productId @@ -172,6 +188,11 @@ public function setQuantity(?int $quantity): void; */ public function setAddedAt(?DateTimeImmutable $addedAt): void; + /** + * @param ?ChannelResourceIdentifier $distributionChannel + */ + public function setDistributionChannel(?ChannelResourceIdentifier $distributionChannel): void; + /** * @param ?ChannelResourceIdentifier $supplyChannel */ @@ -187,8 +208,23 @@ public function setExternalPrice(?Money $externalPrice): void; */ public function setExternalTotalPrice(?ExternalLineItemTotalPrice $externalTotalPrice): void; + /** + * @param ?ExternalTaxRateDraft $externalTaxRate + */ + public function setExternalTaxRate(?ExternalTaxRateDraft $externalTaxRate): void; + + /** + * @param ?string $inventoryMode + */ + public function setInventoryMode(?string $inventoryMode): void; + /** * @param ?ItemShippingDetailsDraft $shippingDetails */ public function setShippingDetails(?ItemShippingDetailsDraft $shippingDetails): void; + + /** + * @param ?CustomFieldsDraft $custom + */ + public function setCustom(?CustomFieldsDraft $custom): void; } diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddLineItemActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddLineItemActionBuilder.php index 05d42395903..3c765a501be 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddLineItemActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddLineItemActionBuilder.php @@ -41,24 +41,6 @@ final class StagedOrderAddLineItemActionBuilder implements Builder */ private $key; - /** - - * @var null|CustomFieldsDraft|CustomFieldsDraftBuilder - */ - private $custom; - - /** - - * @var null|ChannelResourceIdentifier|ChannelResourceIdentifierBuilder - */ - private $distributionChannel; - - /** - - * @var null|ExternalTaxRateDraft|ExternalTaxRateDraftBuilder - */ - private $externalTaxRate; - /** * @var ?string @@ -89,6 +71,12 @@ final class StagedOrderAddLineItemActionBuilder implements Builder */ private $addedAt; + /** + + * @var null|ChannelResourceIdentifier|ChannelResourceIdentifierBuilder + */ + private $distributionChannel; + /** * @var null|ChannelResourceIdentifier|ChannelResourceIdentifierBuilder @@ -109,55 +97,43 @@ final class StagedOrderAddLineItemActionBuilder implements Builder /** - * @var null|ItemShippingDetailsDraft|ItemShippingDetailsDraftBuilder + * @var null|ExternalTaxRateDraft|ExternalTaxRateDraftBuilder */ - private $shippingDetails; + private $externalTaxRate; /** - *User-defined unique identifier of the LineItem.
- * - * @return null|string + * @var ?string */ - public function getKey() - { - return $this->key; - } + private $inventoryMode; /** - *The representation used when creating or updating a customizable data type with Custom Fields.
- * - * @return null|CustomFieldsDraft + * @var null|ItemShippingDetailsDraft|ItemShippingDetailsDraftBuilder */ - public function getCustom() - { - return $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom; - } + private $shippingDetails; /** - *ResourceIdentifier to a Channel.
- * - * @return null|ChannelResourceIdentifier + * @var null|CustomFieldsDraft|CustomFieldsDraftBuilder */ - public function getDistributionChannel() - { - return $this->distributionChannel instanceof ChannelResourceIdentifierBuilder ? $this->distributionChannel->build() : $this->distributionChannel; - } + private $custom; /** - *Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *User-defined unique identifier of the LineItem.
* - * @return null|ExternalTaxRateDraft + * @return null|string */ - public function getExternalTaxRate() + public function getKey() { - return $this->externalTaxRate instanceof ExternalTaxRateDraftBuilder ? $this->externalTaxRate->build() : $this->externalTaxRate; + return $this->key; } /** + *id
of the published Product.
Either the productId
and variantId
, or sku
must be provided.
id
of the ProductVariant in the Product.
+ * If not provided, the Master Variant is used.
Either the productId
and variantId
, or sku
must be provided.
SKU of the ProductVariant.
+ *Either the productId
and variantId
, or sku
must be provided.
Quantity of the Product Variant to add to the Cart.
+ * * @return null|int */ @@ -194,6 +179,10 @@ public function getQuantity() } /** + *Date and time (UTC) the Product Variant is added to the Cart. + * If not set, it defaults to the current date and time.
+ *Optional for backwards compatibility reasons.
+ * * @return null|DateTimeImmutable */ @@ -203,7 +192,21 @@ public function getAddedAt() } /** - *ResourceIdentifier to a Channel.
+ *Used to select a Product Price.
+ * The Channel must have the ProductDistribution
ChannelRoleEnum.
+ * If the Cart is bound to a Store with distributionChannels
set, the Channel must match one of the Store's distribution channels.
Used to identify Inventory entries that must be reserved.
+ * The Channel must have the InventorySupply
ChannelRoleEnum.
Draft type that stores amounts only in cent precision for the specified currency.
+ *Sets the LineItem price
value, and the priceMode
to ExternalPrice
LineItemPriceMode.
Sets the LineItem price
and totalPrice
values, and the priceMode
to ExternalTotal
LineItemPriceMode.
For order creation and updates, the sum of the targets
must match the quantity of the Line Items or Custom Line Items.
External Tax Rate for the Line Item, if the Cart has the External
TaxMode.
Inventory mode specific to the Line Item only, and valid for the entire quantity
of the Line Item.
+ * Set only if the inventory mode should be different from the inventoryMode
specified on the Cart.
Container for Line Item-specific addresses.
+ * + + * @return null|ItemShippingDetailsDraft */ - public function withCustom(?CustomFieldsDraft $custom) + public function getShippingDetails() { - $this->custom = $custom; - - return $this; + return $this->shippingDetails instanceof ItemShippingDetailsDraftBuilder ? $this->shippingDetails->build() : $this->shippingDetails; } /** - * @param ?ChannelResourceIdentifier $distributionChannel - * @return $this + *Custom Fields for the Line Item.
+ * + + * @return null|CustomFieldsDraft */ - public function withDistributionChannel(?ChannelResourceIdentifier $distributionChannel) + public function getCustom() { - $this->distributionChannel = $distributionChannel; - - return $this; + return $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom; } /** - * @param ?ExternalTaxRateDraft $externalTaxRate + * @param ?string $key * @return $this */ - public function withExternalTaxRate(?ExternalTaxRateDraft $externalTaxRate) + public function withKey(?string $key) { - $this->externalTaxRate = $externalTaxRate; + $this->key = $key; return $this; } @@ -343,6 +349,17 @@ public function withAddedAt(?DateTimeImmutable $addedAt) return $this; } + /** + * @param ?ChannelResourceIdentifier $distributionChannel + * @return $this + */ + public function withDistributionChannel(?ChannelResourceIdentifier $distributionChannel) + { + $this->distributionChannel = $distributionChannel; + + return $this; + } + /** * @param ?ChannelResourceIdentifier $supplyChannel * @return $this @@ -377,45 +394,56 @@ public function withExternalTotalPrice(?ExternalLineItemTotalPrice $externalTota } /** - * @param ?ItemShippingDetailsDraft $shippingDetails + * @param ?ExternalTaxRateDraft $externalTaxRate * @return $this */ - public function withShippingDetails(?ItemShippingDetailsDraft $shippingDetails) + public function withExternalTaxRate(?ExternalTaxRateDraft $externalTaxRate) { - $this->shippingDetails = $shippingDetails; + $this->externalTaxRate = $externalTaxRate; return $this; } /** - * @deprecated use withCustom() instead + * @param ?string $inventoryMode * @return $this */ - public function withCustomBuilder(?CustomFieldsDraftBuilder $custom) + public function withInventoryMode(?string $inventoryMode) { - $this->custom = $custom; + $this->inventoryMode = $inventoryMode; return $this; } /** - * @deprecated use withDistributionChannel() instead + * @param ?ItemShippingDetailsDraft $shippingDetails * @return $this */ - public function withDistributionChannelBuilder(?ChannelResourceIdentifierBuilder $distributionChannel) + public function withShippingDetails(?ItemShippingDetailsDraft $shippingDetails) { - $this->distributionChannel = $distributionChannel; + $this->shippingDetails = $shippingDetails; return $this; } /** - * @deprecated use withExternalTaxRate() instead + * @param ?CustomFieldsDraft $custom * @return $this */ - public function withExternalTaxRateBuilder(?ExternalTaxRateDraftBuilder $externalTaxRate) + public function withCustom(?CustomFieldsDraft $custom) { - $this->externalTaxRate = $externalTaxRate; + $this->custom = $custom; + + return $this; + } + + /** + * @deprecated use withDistributionChannel() instead + * @return $this + */ + public function withDistributionChannelBuilder(?ChannelResourceIdentifierBuilder $distributionChannel) + { + $this->distributionChannel = $distributionChannel; return $this; } @@ -453,6 +481,17 @@ public function withExternalTotalPriceBuilder(?ExternalLineItemTotalPriceBuilder return $this; } + /** + * @deprecated use withExternalTaxRate() instead + * @return $this + */ + public function withExternalTaxRateBuilder(?ExternalTaxRateDraftBuilder $externalTaxRate) + { + $this->externalTaxRate = $externalTaxRate; + + return $this; + } + /** * @deprecated use withShippingDetails() instead * @return $this @@ -464,22 +503,34 @@ public function withShippingDetailsBuilder(?ItemShippingDetailsDraftBuilder $shi return $this; } + /** + * @deprecated use withCustom() instead + * @return $this + */ + public function withCustomBuilder(?CustomFieldsDraftBuilder $custom) + { + $this->custom = $custom; + + return $this; + } + public function build(): StagedOrderAddLineItemAction { return new StagedOrderAddLineItemActionModel( $this->key, - $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom, - $this->distributionChannel instanceof ChannelResourceIdentifierBuilder ? $this->distributionChannel->build() : $this->distributionChannel, - $this->externalTaxRate instanceof ExternalTaxRateDraftBuilder ? $this->externalTaxRate->build() : $this->externalTaxRate, $this->productId, $this->variantId, $this->sku, $this->quantity, $this->addedAt, + $this->distributionChannel instanceof ChannelResourceIdentifierBuilder ? $this->distributionChannel->build() : $this->distributionChannel, $this->supplyChannel instanceof ChannelResourceIdentifierBuilder ? $this->supplyChannel->build() : $this->supplyChannel, $this->externalPrice instanceof MoneyBuilder ? $this->externalPrice->build() : $this->externalPrice, $this->externalTotalPrice instanceof ExternalLineItemTotalPriceBuilder ? $this->externalTotalPrice->build() : $this->externalTotalPrice, - $this->shippingDetails instanceof ItemShippingDetailsDraftBuilder ? $this->shippingDetails->build() : $this->shippingDetails + $this->externalTaxRate instanceof ExternalTaxRateDraftBuilder ? $this->externalTaxRate->build() : $this->externalTaxRate, + $this->inventoryMode, + $this->shippingDetails instanceof ItemShippingDetailsDraftBuilder ? $this->shippingDetails->build() : $this->shippingDetails, + $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom ); } diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddLineItemActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddLineItemActionModel.php index adb430c0ef0..8822334e991 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddLineItemActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddLineItemActionModel.php @@ -47,24 +47,6 @@ final class StagedOrderAddLineItemActionModel extends JsonObjectModel implements */ protected $key; - /** - * - * @var ?CustomFieldsDraft - */ - protected $custom; - - /** - * - * @var ?ChannelResourceIdentifier - */ - protected $distributionChannel; - - /** - * - * @var ?ExternalTaxRateDraft - */ - protected $externalTaxRate; - /** * * @var ?string @@ -95,6 +77,12 @@ final class StagedOrderAddLineItemActionModel extends JsonObjectModel implements */ protected $addedAt; + /** + * + * @var ?ChannelResourceIdentifier + */ + protected $distributionChannel; + /** * * @var ?ChannelResourceIdentifier @@ -113,45 +101,65 @@ final class StagedOrderAddLineItemActionModel extends JsonObjectModel implements */ protected $externalTotalPrice; + /** + * + * @var ?ExternalTaxRateDraft + */ + protected $externalTaxRate; + + /** + * + * @var ?string + */ + protected $inventoryMode; + /** * * @var ?ItemShippingDetailsDraft */ protected $shippingDetails; + /** + * + * @var ?CustomFieldsDraft + */ + protected $custom; + /** * @psalm-suppress MissingParamType */ public function __construct( ?string $key = null, - ?CustomFieldsDraft $custom = null, - ?ChannelResourceIdentifier $distributionChannel = null, - ?ExternalTaxRateDraft $externalTaxRate = null, ?string $productId = null, ?int $variantId = null, ?string $sku = null, ?int $quantity = null, ?DateTimeImmutable $addedAt = null, + ?ChannelResourceIdentifier $distributionChannel = null, ?ChannelResourceIdentifier $supplyChannel = null, ?Money $externalPrice = null, ?ExternalLineItemTotalPrice $externalTotalPrice = null, + ?ExternalTaxRateDraft $externalTaxRate = null, + ?string $inventoryMode = null, ?ItemShippingDetailsDraft $shippingDetails = null, + ?CustomFieldsDraft $custom = null, ?string $action = null ) { $this->key = $key; - $this->custom = $custom; - $this->distributionChannel = $distributionChannel; - $this->externalTaxRate = $externalTaxRate; $this->productId = $productId; $this->variantId = $variantId; $this->sku = $sku; $this->quantity = $quantity; $this->addedAt = $addedAt; + $this->distributionChannel = $distributionChannel; $this->supplyChannel = $supplyChannel; $this->externalPrice = $externalPrice; $this->externalTotalPrice = $externalTotalPrice; + $this->externalTaxRate = $externalTaxRate; + $this->inventoryMode = $inventoryMode; $this->shippingDetails = $shippingDetails; + $this->custom = $custom; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -194,69 +202,9 @@ public function getKey() } /** - *The representation used when creating or updating a customizable data type with Custom Fields.
+ *id
of the published Product.
Either the productId
and variantId
, or sku
must be provided.
ResourceIdentifier to a Channel.
- * - * - * @return null|ChannelResourceIdentifier - */ - public function getDistributionChannel() - { - if (is_null($this->distributionChannel)) { - /** @psalm-var stdClass|arrayControls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
- * - * - * @return null|ExternalTaxRateDraft - */ - public function getExternalTaxRate() - { - if (is_null($this->externalTaxRate)) { - /** @psalm-var stdClass|arrayid
of the ProductVariant in the Product.
+ * If not provided, the Master Variant is used.
Either the productId
and variantId
, or sku
must be provided.
SKU of the ProductVariant.
+ *Either the productId
and variantId
, or sku
must be provided.
Quantity of the Product Variant to add to the Cart.
+ * * * @return null|int */ @@ -329,6 +286,10 @@ public function getQuantity() } /** + *Date and time (UTC) the Product Variant is added to the Cart. + * If not set, it defaults to the current date and time.
+ *Optional for backwards compatibility reasons.
+ * * * @return null|DateTimeImmutable */ @@ -351,7 +312,31 @@ public function getAddedAt() } /** - *ResourceIdentifier to a Channel.
+ *Used to select a Product Price.
+ * The Channel must have the ProductDistribution
ChannelRoleEnum.
+ * If the Cart is bound to a Store with distributionChannels
set, the Channel must match one of the Store's distribution channels.
Used to identify Inventory entries that must be reserved.
+ * The Channel must have the InventorySupply
ChannelRoleEnum.
Draft type that stores amounts only in cent precision for the specified currency.
+ *Sets the LineItem price
value, and the priceMode
to ExternalPrice
LineItemPriceMode.
Sets the LineItem price
and totalPrice
values, and the priceMode
to ExternalTotal
LineItemPriceMode.
For order creation and updates, the sum of the targets
must match the quantity of the Line Items or Custom Line Items.
External Tax Rate for the Line Item, if the Cart has the External
TaxMode.
Inventory mode specific to the Line Item only, and valid for the entire quantity
of the Line Item.
+ * Set only if the inventory mode should be different from the inventoryMode
specified on the Cart.
Container for Line Item-specific addresses.
+ * + * + * @return null|ItemShippingDetailsDraft */ - public function setCustom(?CustomFieldsDraft $custom): void + public function getShippingDetails() { - $this->custom = $custom; + if (is_null($this->shippingDetails)) { + /** @psalm-var stdClass|arrayCustom Fields for the Line Item.
+ * + * + * @return null|CustomFieldsDraft */ - public function setDistributionChannel(?ChannelResourceIdentifier $distributionChannel): void + public function getCustom() { - $this->distributionChannel = $distributionChannel; + if (is_null($this->custom)) { + /** @psalm-var stdClass|arrayEither deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
key
of an existing Parcel.
Value to set.
+ * * @return null|ParcelMeasurements */ public function getMeasurements(); /** + *Value to set.
+ * * @return null|TrackingData */ public function getTrackingData(); /** + *Value to set.
+ * * @return null|DeliveryItemCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddParcelToDeliveryActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddParcelToDeliveryActionBuilder.php index 0e969f8f5ff..e4b7b6a7101 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddParcelToDeliveryActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddParcelToDeliveryActionBuilder.php @@ -64,7 +64,8 @@ final class StagedOrderAddParcelToDeliveryActionBuilder implements Builder private $items; /** - *Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
key
of an existing Parcel.
Value to set.
+ * * @return null|ParcelMeasurements */ @@ -104,6 +110,8 @@ public function getMeasurements() } /** + *Value to set.
+ * * @return null|TrackingData */ @@ -113,6 +121,8 @@ public function getTrackingData() } /** + *Value to set.
+ * * @return null|DeliveryItemCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddParcelToDeliveryActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddParcelToDeliveryActionModel.php index e82ca63baa0..db17cde6a6d 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddParcelToDeliveryActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddParcelToDeliveryActionModel.php @@ -110,7 +110,8 @@ public function getAction() } /** - *Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
key
of an existing Parcel.
Value to set.
+ * * * @return null|ParcelMeasurements */ @@ -187,6 +193,8 @@ public function getMeasurements() } /** + *Value to set.
+ * * * @return null|TrackingData */ @@ -206,6 +214,8 @@ public function getTrackingData() } /** + *Value to set.
+ * * * @return null|DeliveryItemCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentAction.php index abc2144c6c4..cf6cf33b710 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentAction.php @@ -18,7 +18,8 @@ interface StagedOrderAddPaymentAction extends StagedOrderUpdateAction public const FIELD_PAYMENT = 'payment'; /** - *ResourceIdentifier of a Payment.
+ *Payment to add to the PaymentInfo. + * Must not be assigned to another Order or active Cart already.
* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentActionBuilder.php index af4bd528cfe..2f58b80a277 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentActionBuilder.php @@ -31,7 +31,8 @@ final class StagedOrderAddPaymentActionBuilder implements Builder private $payment; /** - *ResourceIdentifier of a Payment.
+ *Payment to add to the PaymentInfo. + * Must not be assigned to another Order or active Cart already.
* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentActionModel.php index c4de39c3f15..6c493f9d837 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentActionModel.php @@ -67,7 +67,8 @@ public function getAction() } /** - *ResourceIdentifier of a Payment.
+ *Payment to add to the PaymentInfo. + * Must not be assigned to another Order or active Cart already.
* * * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddReturnInfoAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddReturnInfoAction.php index 72c672e7bfb..9fc90f9a87c 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddReturnInfoAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddReturnInfoAction.php @@ -21,18 +21,26 @@ interface StagedOrderAddReturnInfoAction extends StagedOrderUpdateAction public const FIELD_RETURN_DATE = 'returnDate'; /** + *Value to set.
+ * * @return null|string */ public function getReturnTrackingId(); /** + *Items to be returned. + * Must not be empty.
+ * * @return null|ReturnItemDraftCollection */ public function getItems(); /** + *Value to set. + * If not set, it defaults to the current date and time.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddReturnInfoActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddReturnInfoActionBuilder.php index dee4c41c7b2..8e4239db223 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddReturnInfoActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddReturnInfoActionBuilder.php @@ -43,6 +43,8 @@ final class StagedOrderAddReturnInfoActionBuilder implements Builder private $returnDate; /** + *Value to set.
+ * * @return null|string */ @@ -52,6 +54,9 @@ public function getReturnTrackingId() } /** + *Items to be returned. + * Must not be empty.
+ * * @return null|ReturnItemDraftCollection */ @@ -61,6 +66,9 @@ public function getItems() } /** + *Value to set. + * If not set, it defaults to the current date and time.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddReturnInfoActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddReturnInfoActionModel.php index 7dc8b7ee134..566cc06b5e9 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddReturnInfoActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddReturnInfoActionModel.php @@ -83,6 +83,8 @@ public function getAction() } /** + *Value to set.
+ * * * @return null|string */ @@ -101,6 +103,9 @@ public function getReturnTrackingId() } /** + *Items to be returned. + * Must not be empty.
+ * * * @return null|ReturnItemDraftCollection */ @@ -119,6 +124,9 @@ public function getItems() } /** + *Value to set. + * If not set, it defaults to the current date and time.
+ * * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddShoppingListAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddShoppingListAction.php index 7999a3f66d6..c17de2ffca8 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddShoppingListAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddShoppingListAction.php @@ -17,11 +17,11 @@ interface StagedOrderAddShoppingListAction extends StagedOrderUpdateAction { public const FIELD_SHOPPING_LIST = 'shoppingList'; - public const FIELD_SUPPLY_CHANNEL = 'supplyChannel'; public const FIELD_DISTRIBUTION_CHANNEL = 'distributionChannel'; + public const FIELD_SUPPLY_CHANNEL = 'supplyChannel'; /** - *ResourceIdentifier to a ShoppingList.
+ *Shopping List that contains the Line Items to be added.
* * @return null|ShoppingListResourceIdentifier @@ -29,20 +29,22 @@ interface StagedOrderAddShoppingListAction extends StagedOrderUpdateAction public function getShoppingList(); /** - *ResourceIdentifier to a Channel.
+ *distributionChannel
to set for all LineItems that are added to the Cart.
+ * The Channel must have the ProductDistribution
ChannelRoleEnum.
ResourceIdentifier to a Channel.
+ *supplyChannel
to set for all LineItems that are added to the Cart.
+ * The Channel must have the InventorySupply
ChannelRoleEnum.
ResourceIdentifier to a ShoppingList.
+ *Shopping List that contains the Line Items to be added.
* * @return null|ShoppingListResourceIdentifier @@ -56,25 +56,27 @@ public function getShoppingList() } /** - *ResourceIdentifier to a Channel.
+ *distributionChannel
to set for all LineItems that are added to the Cart.
+ * The Channel must have the ProductDistribution
ChannelRoleEnum.
ResourceIdentifier to a Channel.
+ *supplyChannel
to set for all LineItems that are added to the Cart.
+ * The Channel must have the InventorySupply
ChannelRoleEnum.
ResourceIdentifier to a ShoppingList.
+ *Shopping List that contains the Line Items to be added.
* * * @return null|ShoppingListResourceIdentifier @@ -106,45 +106,47 @@ public function getShoppingList() } /** - *ResourceIdentifier to a Channel.
+ *distributionChannel
to set for all LineItems that are added to the Cart.
+ * The Channel must have the ProductDistribution
ChannelRoleEnum.
ResourceIdentifier to a Channel.
+ *supplyChannel
to set for all LineItems that are added to the Cart.
+ * The Channel must have the InventorySupply
ChannelRoleEnum.
Unique identifier of the Order.
@@ -367,7 +374,7 @@ public function getId() } /** - *The current version of the order.
+ *Current version of the Order.
* * @return null|int @@ -378,6 +385,8 @@ public function getVersion() } /** + *Date and time (UTC) the Order was initially created.
+ * * @return null|DateTimeImmutable */ @@ -387,6 +396,8 @@ public function getCreatedAt() } /** + *Date and time (UTC) the Order was last updated.
+ * * @return null|DateTimeImmutable */ @@ -396,72 +407,64 @@ public function getLastModifiedAt() } /** - *Present on resources created after 1 February 2019 except for events not tracked.
- * - - * @return null|LastModifiedBy - */ - public function getLastModifiedBy() - { - return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy; - } - - /** - *Present on resources created after 1 February 2019 except for events not tracked.
+ *User-defined identifier of the Order that is unique across a Project.
* - * @return null|CreatedBy + * @return null|string */ - public function getCreatedBy() + public function getOrderNumber() { - return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + return $this->orderNumber; } /** - *This field will only be present if it was set for Order Import
+ *User-defined identifier of a purchase Order.
+ *It is typically set by the Buyer and can be used with Quotes to track the purchase Order during the quote and order flow.
* - * @return null|DateTimeImmutable + * @return null|string */ - public function getCompletedAt() + public function getPurchaseOrderNumber() { - return $this->completedAt; + return $this->purchaseOrderNumber; } /** - *String that uniquely identifies an order. - * It can be used to create more human-readable (in contrast to ID) identifier for the order. - * It should be unique across a project. - * Once it's set it cannot be changed.
+ *id
of the Customer that the Order belongs to.
Email address of the Customer that the Order belongs to.
+ * * @return null|string */ - public function getCustomerId() + public function getCustomerEmail() { - return $this->customerId; + return $this->customerEmail; } /** + *Reference to the Customer Group of the Customer that the Order belongs to. + * Used for LineItem Price selection.
+ * - * @return null|string + * @return null|CustomerGroupReference */ - public function getCustomerEmail() + public function getCustomerGroup() { - return $this->customerEmail; + return $this->customerGroup instanceof CustomerGroupReferenceBuilder ? $this->customerGroup->build() : $this->customerGroup; } /** - *Identifies carts and orders belonging to an anonymous session (the customer has not signed up/in yet).
+ *Anonymous session associated with the Order.
* * @return null|string @@ -472,7 +475,7 @@ public function getAnonymousId() } /** - *The Business Unit the Order belongs to.
+ *Reference to a Business Unit the Order belongs to.
* * @return null|BusinessUnitKeyReference @@ -483,6 +486,8 @@ public function getBusinessUnit() } /** + *Reference to a Store the Order belongs to.
+ * * @return null|StoreKeyReference */ @@ -492,6 +497,8 @@ public function getStore() } /** + *Line Items that are part of the Order.
+ * * @return null|LineItemCollection */ @@ -501,6 +508,8 @@ public function getLineItems() } /** + *Custom Line Items that are part of the Order.
+ * * @return null|CustomLineItemCollection */ @@ -510,6 +519,9 @@ public function getCustomLineItems() } /** + *Sum of the totalPrice
field of all LineItems and CustomLineItems, and if available, the price
field of ShippingInfo.
+ * Taxes are included if TaxRate includedInPrice
is true
for each price.
The taxes are calculated based on the shipping address.
+ *Platform
TaxMode, it is automatically set when a shipping address is set.External
TaxMode, it is automatically set when the external Tax Rate for all Line Items, Custom Line Items, and Shipping Methods in the Cart are set.Sum of taxedPrice
of ShippingInfo across all Shipping Methods.
- * For Platform
TaxMode, it is set automatically only if shipping address is set or Shipping Method is added to the Cart.
Sum of the taxedPrice
field of ShippingInfo across all Shipping Methods.
Holds all shipping-related information per Shipping Method.
- *For Multiple
ShippingMode, it is updated automatically after the Shipping Methods are added.
Indicates how Tax Rates are set.
* - * @return null|Address + * @return null|string */ - public function getShippingAddress() + public function getTaxMode() { - return $this->shippingAddress instanceof AddressBuilder ? $this->shippingAddress->build() : $this->shippingAddress; + return $this->taxMode; } /** + *Indicates how monetary values are rounded when calculating taxes for taxedPrice
.
Indicates whether one or multiple Shipping Methods are added to the Cart.
+ *Indicates how taxes are calculated when calculating taxes for taxedPrice
.
key
of the ShippingMethod for Single
ShippingMode.
Indicates how stock quantities are tracked for Line Items in the Order.
* * @return null|string */ - public function getShippingKey() + public function getInventoryMode() { - return $this->shippingKey; + return $this->inventoryMode; } /** - *Custom Fields of the Shipping Method for Single
ShippingMode.
Billing address associated with the Order.
* - * @return null|CustomFields + * @return null|Address */ - public function getShippingCustomFields() + public function getBillingAddress() { - return $this->shippingCustomFields instanceof CustomFieldsBuilder ? $this->shippingCustomFields->build() : $this->shippingCustomFields; + return $this->billingAddress instanceof AddressBuilder ? $this->billingAddress->build() : $this->billingAddress; } /** - *Holds all shipping-related information per Shipping Method for Multiple
ShippingMode.
It is updated automatically after the Shipping Method is added.
+ *Shipping address associated with the Order. + * Determines eligible ShippingMethod rates and Tax Rates of Line Items.
* - * @return null|ShippingCollection + * @return null|Address */ - public function getShipping() + public function getShippingAddress() { - return $this->shipping; + return $this->shippingAddress instanceof AddressBuilder ? $this->shippingAddress->build() : $this->shippingAddress; } /** + *Indicates whether there can be one or multiple Shipping Methods.
+ * * @return null|string */ - public function getTaxMode() + public function getShippingMode() { - return $this->taxMode; + return $this->shippingMode; } /** - *When calculating taxes for taxedPrice
, the selected mode is used for rouding.
key
of the ShippingMethod for Single
ShippingMode.
Set when the customer is set and the customer is a member of a customer group. - * Used for product variant price selection.
+ *Shipping-related information for Single
ShippingMode.
+ * Automatically set when a Shipping Method is set.
A two-digit country code as per ISO 3166-1 alpha-2. - * Used for product variant price selection.
+ *Input used to select a ShippingRatePriceTier.
+ * The data type of this field depends on the shippingRateInputType.type
configured in the Project:
CartClassification
, it is ClassificationShippingRateInput.CartScore
, it is ScoreShippingRateInput.CartValue
, it cannot be used.One of the four predefined OrderStates.
+ *Custom Fields of the Shipping Method for Single
ShippingMode.
This reference can point to a state in a custom workflow.
+ *Shipping-related information for Multiple
ShippingMode.
+ * Updated automatically each time a new Shipping Method is added.
Additional shipping addresses of the Order as specified by LineItems using the shippingDetails
field.
+ * Eligible Shipping Methods or applicable Tax Rates are determined by the address in shippingAddress
, and not itemShippingAddresses
.
Discount Codes added to the Order.
+ * An Order that has directDiscounts
cannot have discountCodes
.
Set if the ShippingMethod is set.
+ *Direct Discounts added to the Order.
+ * An Order that has discountCodes
cannot have directDiscounts
.
Automatically set when a Line Item with GiftLineItem
LineItemMode is removed from the Order.
Payment information related to the Order.
+ * - * @return null|ReturnInfoCollection + * @return null|PaymentInfo */ - public function getReturnInfo() + public function getPaymentInfo() { - return $this->returnInfo; + return $this->paymentInfo instanceof PaymentInfoBuilder ? $this->paymentInfo->build() : $this->paymentInfo; } /** - *The Purchase Order Number is typically set by the Buyer on a QuoteRequest to - * track the purchase order during the quote and order flow.
+ *Used for LineItem Price selection.
* * @return null|string */ - public function getPurchaseOrderNumber() + public function getCountry() { - return $this->purchaseOrderNumber; + return $this->country; } /** + *Languages of the Order. + * Can only contain languages supported by the Project.
+ * - * @return null|DiscountCodeInfoCollection + * @return null|string */ - public function getDiscountCodes() + public function getLocale() { - return $this->discountCodes; + return $this->locale; } /** - *Internal-only field.
+ *Indicates the origin of the Cart from which the Order was created.
* - * @deprecated - * @return null|int + + * @return null|string */ - public function getLastMessageSequenceNumber() + public function getOrigin() { - return $this->lastMessageSequenceNumber; + return $this->origin; } /** - *Set when this order was created from a cart.
- * The cart will have the state Ordered
.
Reference to the Cart for an Order created from Cart.
+ * The referenced Cart will have the Ordered
CartState.
Set when this order was created from a quote.
+ *Reference to the Quote for an Order created from Quote.
* * @return null|QuoteReference @@ -776,98 +812,127 @@ public function getQuote() } /** + *Current status of the Order.
+ * - * @return null|CustomFields + * @return null|string */ - public function getCustom() + public function getOrderState() { - return $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom; + return $this->orderState; } /** + *Shipment status of the Order.
+ * - * @return null|PaymentInfo + * @return null|string */ - public function getPaymentInfo() + public function getShipmentState() { - return $this->paymentInfo instanceof PaymentInfoBuilder ? $this->paymentInfo->build() : $this->paymentInfo; + return $this->shipmentState; } /** + *Payment status of the Order.
+ * * @return null|string */ - public function getLocale() + public function getPaymentState() { - return $this->locale; + return $this->paymentState; } /** + *State of the Order. + * This reference can point to a State in a custom workflow.
+ * - * @return null|string + * @return null|StateReference */ - public function getInventoryMode() + public function getState() { - return $this->inventoryMode; + return $this->state instanceof StateReferenceBuilder ? $this->state->build() : $this->state; } /** + *Contains synchronization activity information of the Order (like export or import). + * Can only be set with Update SyncInfo update action.
+ * - * @return null|string + * @return null|SyncInfoCollection */ - public function getOrigin() + public function getSyncInfo() { - return $this->origin; + return $this->syncInfo; } /** - *When calculating taxes for taxedPrice
, the selected mode is used for calculating the price with LineItemLevel (horizontally) or UnitPriceLevel (vertically) calculation mode.
Contains information regarding the returns associated with the Order.
* - * @return null|string + * @return null|ReturnInfoCollection */ - public function getTaxCalculationMode() + public function getReturnInfo() { - return $this->taxCalculationMode; + return $this->returnInfo; } /** - *Input used to select a ShippingRatePriceTier.
- * The data type of this field depends on the shippingRateInputType.type
configured in the Project:
CartClassification
, it is ClassificationShippingRateInput.CartScore
, it is ScoreShippingRateInput.CartValue
, it cannot be used.Internal-only field.
* + * @deprecated + * @return null|int + */ + public function getLastMessageSequenceNumber() + { + return $this->lastMessageSequenceNumber; + } - * @return null|ShippingRateInput + /** + *Custom Fields of the Order.
+ * + + * @return null|CustomFields */ - public function getShippingRateInput() + public function getCustom() { - return $this->shippingRateInput instanceof ShippingRateInputBuilder ? $this->shippingRateInput->build() : $this->shippingRateInput; + return $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom; } /** - *Contains addresses for orders with multiple shipping addresses.
+ *User-defined date and time (UTC) of the Order. + * Present only on an Order created using Order Import.
* - * @return null|AddressCollection + * @return null|DateTimeImmutable */ - public function getItemShippingAddresses() + public function getCompletedAt() { - return $this->itemShippingAddresses; + return $this->completedAt; } /** - *Automatically filled when a line item with LineItemMode GiftLineItem
is removed from this order.
Present on resources created after 1 February 2019 except for events not tracked.
* - * @return null|CartDiscountReferenceCollection + * @return null|LastModifiedBy */ - public function getRefusedGifts() + public function getLastModifiedBy() { - return $this->refusedGifts; + return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy; + } + + /** + *Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; } /** @@ -915,67 +980,56 @@ public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt) } /** - * @param ?LastModifiedBy $lastModifiedBy - * @return $this - */ - public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) - { - $this->lastModifiedBy = $lastModifiedBy; - - return $this; - } - - /** - * @param ?CreatedBy $createdBy + * @param ?string $orderNumber * @return $this */ - public function withCreatedBy(?CreatedBy $createdBy) + public function withOrderNumber(?string $orderNumber) { - $this->createdBy = $createdBy; + $this->orderNumber = $orderNumber; return $this; } /** - * @param ?DateTimeImmutable $completedAt + * @param ?string $purchaseOrderNumber * @return $this */ - public function withCompletedAt(?DateTimeImmutable $completedAt) + public function withPurchaseOrderNumber(?string $purchaseOrderNumber) { - $this->completedAt = $completedAt; + $this->purchaseOrderNumber = $purchaseOrderNumber; return $this; } /** - * @param ?string $orderNumber + * @param ?string $customerId * @return $this */ - public function withOrderNumber(?string $orderNumber) + public function withCustomerId(?string $customerId) { - $this->orderNumber = $orderNumber; + $this->customerId = $customerId; return $this; } /** - * @param ?string $customerId + * @param ?string $customerEmail * @return $this */ - public function withCustomerId(?string $customerId) + public function withCustomerEmail(?string $customerEmail) { - $this->customerId = $customerId; + $this->customerEmail = $customerEmail; return $this; } /** - * @param ?string $customerEmail + * @param ?CustomerGroupReference $customerGroup * @return $this */ - public function withCustomerEmail(?string $customerEmail) + public function withCustomerGroup(?CustomerGroupReference $customerGroup) { - $this->customerEmail = $customerEmail; + $this->customerGroup = $customerGroup; return $this; } @@ -1069,221 +1123,221 @@ public function withTaxedShippingPrice(?TaxedPrice $taxedShippingPrice) } /** - * @param ?Address $shippingAddress + * @param ?string $taxMode * @return $this */ - public function withShippingAddress(?Address $shippingAddress) + public function withTaxMode(?string $taxMode) { - $this->shippingAddress = $shippingAddress; + $this->taxMode = $taxMode; return $this; } /** - * @param ?Address $billingAddress + * @param ?string $taxRoundingMode * @return $this */ - public function withBillingAddress(?Address $billingAddress) + public function withTaxRoundingMode(?string $taxRoundingMode) { - $this->billingAddress = $billingAddress; + $this->taxRoundingMode = $taxRoundingMode; return $this; } /** - * @param ?string $shippingMode + * @param ?string $taxCalculationMode * @return $this */ - public function withShippingMode(?string $shippingMode) + public function withTaxCalculationMode(?string $taxCalculationMode) { - $this->shippingMode = $shippingMode; + $this->taxCalculationMode = $taxCalculationMode; return $this; } /** - * @param ?string $shippingKey + * @param ?string $inventoryMode * @return $this */ - public function withShippingKey(?string $shippingKey) + public function withInventoryMode(?string $inventoryMode) { - $this->shippingKey = $shippingKey; + $this->inventoryMode = $inventoryMode; return $this; } /** - * @param ?CustomFields $shippingCustomFields + * @param ?Address $billingAddress * @return $this */ - public function withShippingCustomFields(?CustomFields $shippingCustomFields) + public function withBillingAddress(?Address $billingAddress) { - $this->shippingCustomFields = $shippingCustomFields; + $this->billingAddress = $billingAddress; return $this; } /** - * @param ?ShippingCollection $shipping + * @param ?Address $shippingAddress * @return $this */ - public function withShipping(?ShippingCollection $shipping) + public function withShippingAddress(?Address $shippingAddress) { - $this->shipping = $shipping; + $this->shippingAddress = $shippingAddress; return $this; } /** - * @param ?string $taxMode + * @param ?string $shippingMode * @return $this */ - public function withTaxMode(?string $taxMode) + public function withShippingMode(?string $shippingMode) { - $this->taxMode = $taxMode; + $this->shippingMode = $shippingMode; return $this; } /** - * @param ?string $taxRoundingMode + * @param ?string $shippingKey * @return $this */ - public function withTaxRoundingMode(?string $taxRoundingMode) + public function withShippingKey(?string $shippingKey) { - $this->taxRoundingMode = $taxRoundingMode; + $this->shippingKey = $shippingKey; return $this; } /** - * @param ?CustomerGroupReference $customerGroup + * @param ?ShippingInfo $shippingInfo * @return $this */ - public function withCustomerGroup(?CustomerGroupReference $customerGroup) + public function withShippingInfo(?ShippingInfo $shippingInfo) { - $this->customerGroup = $customerGroup; + $this->shippingInfo = $shippingInfo; return $this; } /** - * @param ?string $country + * @param ?ShippingRateInput $shippingRateInput * @return $this */ - public function withCountry(?string $country) + public function withShippingRateInput(?ShippingRateInput $shippingRateInput) { - $this->country = $country; + $this->shippingRateInput = $shippingRateInput; return $this; } /** - * @param ?string $orderState + * @param ?CustomFields $shippingCustomFields * @return $this */ - public function withOrderState(?string $orderState) + public function withShippingCustomFields(?CustomFields $shippingCustomFields) { - $this->orderState = $orderState; + $this->shippingCustomFields = $shippingCustomFields; return $this; } /** - * @param ?StateReference $state + * @param ?ShippingCollection $shipping * @return $this */ - public function withState(?StateReference $state) + public function withShipping(?ShippingCollection $shipping) { - $this->state = $state; + $this->shipping = $shipping; return $this; } /** - * @param ?string $shipmentState + * @param ?AddressCollection $itemShippingAddresses * @return $this */ - public function withShipmentState(?string $shipmentState) + public function withItemShippingAddresses(?AddressCollection $itemShippingAddresses) { - $this->shipmentState = $shipmentState; + $this->itemShippingAddresses = $itemShippingAddresses; return $this; } /** - * @param ?string $paymentState + * @param ?DiscountCodeInfoCollection $discountCodes * @return $this */ - public function withPaymentState(?string $paymentState) + public function withDiscountCodes(?DiscountCodeInfoCollection $discountCodes) { - $this->paymentState = $paymentState; + $this->discountCodes = $discountCodes; return $this; } /** - * @param ?ShippingInfo $shippingInfo + * @param ?DirectDiscountCollection $directDiscounts * @return $this */ - public function withShippingInfo(?ShippingInfo $shippingInfo) + public function withDirectDiscounts(?DirectDiscountCollection $directDiscounts) { - $this->shippingInfo = $shippingInfo; + $this->directDiscounts = $directDiscounts; return $this; } /** - * @param ?SyncInfoCollection $syncInfo + * @param ?CartDiscountReferenceCollection $refusedGifts * @return $this */ - public function withSyncInfo(?SyncInfoCollection $syncInfo) + public function withRefusedGifts(?CartDiscountReferenceCollection $refusedGifts) { - $this->syncInfo = $syncInfo; + $this->refusedGifts = $refusedGifts; return $this; } /** - * @param ?ReturnInfoCollection $returnInfo + * @param ?PaymentInfo $paymentInfo * @return $this */ - public function withReturnInfo(?ReturnInfoCollection $returnInfo) + public function withPaymentInfo(?PaymentInfo $paymentInfo) { - $this->returnInfo = $returnInfo; + $this->paymentInfo = $paymentInfo; return $this; } /** - * @param ?string $purchaseOrderNumber + * @param ?string $country * @return $this */ - public function withPurchaseOrderNumber(?string $purchaseOrderNumber) + public function withCountry(?string $country) { - $this->purchaseOrderNumber = $purchaseOrderNumber; + $this->country = $country; return $this; } /** - * @param ?DiscountCodeInfoCollection $discountCodes + * @param ?string $locale * @return $this */ - public function withDiscountCodes(?DiscountCodeInfoCollection $discountCodes) + public function withLocale(?string $locale) { - $this->discountCodes = $discountCodes; + $this->locale = $locale; return $this; } /** - * @param ?int $lastMessageSequenceNumber + * @param ?string $origin * @return $this */ - public function withLastMessageSequenceNumber(?int $lastMessageSequenceNumber) + public function withOrigin(?string $origin) { - $this->lastMessageSequenceNumber = $lastMessageSequenceNumber; + $this->origin = $origin; return $this; } @@ -1311,109 +1365,109 @@ public function withQuote(?QuoteReference $quote) } /** - * @param ?CustomFields $custom + * @param ?string $orderState * @return $this */ - public function withCustom(?CustomFields $custom) + public function withOrderState(?string $orderState) { - $this->custom = $custom; + $this->orderState = $orderState; return $this; } /** - * @param ?PaymentInfo $paymentInfo + * @param ?string $shipmentState * @return $this */ - public function withPaymentInfo(?PaymentInfo $paymentInfo) + public function withShipmentState(?string $shipmentState) { - $this->paymentInfo = $paymentInfo; + $this->shipmentState = $shipmentState; return $this; } /** - * @param ?string $locale + * @param ?string $paymentState * @return $this */ - public function withLocale(?string $locale) + public function withPaymentState(?string $paymentState) { - $this->locale = $locale; + $this->paymentState = $paymentState; return $this; } /** - * @param ?string $inventoryMode + * @param ?StateReference $state * @return $this */ - public function withInventoryMode(?string $inventoryMode) + public function withState(?StateReference $state) { - $this->inventoryMode = $inventoryMode; + $this->state = $state; return $this; } /** - * @param ?string $origin + * @param ?SyncInfoCollection $syncInfo * @return $this */ - public function withOrigin(?string $origin) + public function withSyncInfo(?SyncInfoCollection $syncInfo) { - $this->origin = $origin; + $this->syncInfo = $syncInfo; return $this; } /** - * @param ?string $taxCalculationMode + * @param ?ReturnInfoCollection $returnInfo * @return $this */ - public function withTaxCalculationMode(?string $taxCalculationMode) + public function withReturnInfo(?ReturnInfoCollection $returnInfo) { - $this->taxCalculationMode = $taxCalculationMode; + $this->returnInfo = $returnInfo; return $this; } /** - * @param ?ShippingRateInput $shippingRateInput + * @param ?int $lastMessageSequenceNumber * @return $this */ - public function withShippingRateInput(?ShippingRateInput $shippingRateInput) + public function withLastMessageSequenceNumber(?int $lastMessageSequenceNumber) { - $this->shippingRateInput = $shippingRateInput; + $this->lastMessageSequenceNumber = $lastMessageSequenceNumber; return $this; } /** - * @param ?AddressCollection $itemShippingAddresses + * @param ?CustomFields $custom * @return $this */ - public function withItemShippingAddresses(?AddressCollection $itemShippingAddresses) + public function withCustom(?CustomFields $custom) { - $this->itemShippingAddresses = $itemShippingAddresses; + $this->custom = $custom; return $this; } /** - * @param ?CartDiscountReferenceCollection $refusedGifts + * @param ?DateTimeImmutable $completedAt * @return $this */ - public function withRefusedGifts(?CartDiscountReferenceCollection $refusedGifts) + public function withCompletedAt(?DateTimeImmutable $completedAt) { - $this->refusedGifts = $refusedGifts; + $this->completedAt = $completedAt; return $this; } /** - * @deprecated use withLastModifiedBy() instead + * @param ?LastModifiedBy $lastModifiedBy * @return $this */ - public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) + public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) { $this->lastModifiedBy = $lastModifiedBy; @@ -1421,16 +1475,27 @@ public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy } /** - * @deprecated use withCreatedBy() instead + * @param ?CreatedBy $createdBy * @return $this */ - public function withCreatedByBuilder(?CreatedByBuilder $createdBy) + public function withCreatedBy(?CreatedBy $createdBy) { $this->createdBy = $createdBy; return $this; } + /** + * @deprecated use withCustomerGroup() instead + * @return $this + */ + public function withCustomerGroupBuilder(?CustomerGroupReferenceBuilder $customerGroup) + { + $this->customerGroup = $customerGroup; + + return $this; + } + /** * @deprecated use withBusinessUnit() instead * @return $this @@ -1487,67 +1552,67 @@ public function withTaxedShippingPriceBuilder(?TaxedPriceBuilder $taxedShippingP } /** - * @deprecated use withShippingAddress() instead + * @deprecated use withBillingAddress() instead * @return $this */ - public function withShippingAddressBuilder(?AddressBuilder $shippingAddress) + public function withBillingAddressBuilder(?AddressBuilder $billingAddress) { - $this->shippingAddress = $shippingAddress; + $this->billingAddress = $billingAddress; return $this; } /** - * @deprecated use withBillingAddress() instead + * @deprecated use withShippingAddress() instead * @return $this */ - public function withBillingAddressBuilder(?AddressBuilder $billingAddress) + public function withShippingAddressBuilder(?AddressBuilder $shippingAddress) { - $this->billingAddress = $billingAddress; + $this->shippingAddress = $shippingAddress; return $this; } /** - * @deprecated use withShippingCustomFields() instead + * @deprecated use withShippingInfo() instead * @return $this */ - public function withShippingCustomFieldsBuilder(?CustomFieldsBuilder $shippingCustomFields) + public function withShippingInfoBuilder(?ShippingInfoBuilder $shippingInfo) { - $this->shippingCustomFields = $shippingCustomFields; + $this->shippingInfo = $shippingInfo; return $this; } /** - * @deprecated use withCustomerGroup() instead + * @deprecated use withShippingRateInput() instead * @return $this */ - public function withCustomerGroupBuilder(?CustomerGroupReferenceBuilder $customerGroup) + public function withShippingRateInputBuilder(?ShippingRateInputBuilder $shippingRateInput) { - $this->customerGroup = $customerGroup; + $this->shippingRateInput = $shippingRateInput; return $this; } /** - * @deprecated use withState() instead + * @deprecated use withShippingCustomFields() instead * @return $this */ - public function withStateBuilder(?StateReferenceBuilder $state) + public function withShippingCustomFieldsBuilder(?CustomFieldsBuilder $shippingCustomFields) { - $this->state = $state; + $this->shippingCustomFields = $shippingCustomFields; return $this; } /** - * @deprecated use withShippingInfo() instead + * @deprecated use withPaymentInfo() instead * @return $this */ - public function withShippingInfoBuilder(?ShippingInfoBuilder $shippingInfo) + public function withPaymentInfoBuilder(?PaymentInfoBuilder $paymentInfo) { - $this->shippingInfo = $shippingInfo; + $this->paymentInfo = $paymentInfo; return $this; } @@ -1574,6 +1639,17 @@ public function withQuoteBuilder(?QuoteReferenceBuilder $quote) return $this; } + /** + * @deprecated use withState() instead + * @return $this + */ + public function withStateBuilder(?StateReferenceBuilder $state) + { + $this->state = $state; + + return $this; + } + /** * @deprecated use withCustom() instead * @return $this @@ -1586,23 +1662,23 @@ public function withCustomBuilder(?CustomFieldsBuilder $custom) } /** - * @deprecated use withPaymentInfo() instead + * @deprecated use withLastModifiedBy() instead * @return $this */ - public function withPaymentInfoBuilder(?PaymentInfoBuilder $paymentInfo) + public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) { - $this->paymentInfo = $paymentInfo; + $this->lastModifiedBy = $lastModifiedBy; return $this; } /** - * @deprecated use withShippingRateInput() instead + * @deprecated use withCreatedBy() instead * @return $this */ - public function withShippingRateInputBuilder(?ShippingRateInputBuilder $shippingRateInput) + public function withCreatedByBuilder(?CreatedByBuilder $createdBy) { - $this->shippingRateInput = $shippingRateInput; + $this->createdBy = $createdBy; return $this; } @@ -1614,12 +1690,11 @@ public function build(): StagedOrder $this->version, $this->createdAt, $this->lastModifiedAt, - $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, - $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy, - $this->completedAt, $this->orderNumber, + $this->purchaseOrderNumber, $this->customerId, $this->customerEmail, + $this->customerGroup instanceof CustomerGroupReferenceBuilder ? $this->customerGroup->build() : $this->customerGroup, $this->anonymousId, $this->businessUnit instanceof BusinessUnitKeyReferenceBuilder ? $this->businessUnit->build() : $this->businessUnit, $this->store instanceof StoreKeyReferenceBuilder ? $this->store->build() : $this->store, @@ -1628,37 +1703,39 @@ public function build(): StagedOrder $this->totalPrice instanceof TypedMoneyBuilder ? $this->totalPrice->build() : $this->totalPrice, $this->taxedPrice instanceof TaxedPriceBuilder ? $this->taxedPrice->build() : $this->taxedPrice, $this->taxedShippingPrice instanceof TaxedPriceBuilder ? $this->taxedShippingPrice->build() : $this->taxedShippingPrice, - $this->shippingAddress instanceof AddressBuilder ? $this->shippingAddress->build() : $this->shippingAddress, + $this->taxMode, + $this->taxRoundingMode, + $this->taxCalculationMode, + $this->inventoryMode, $this->billingAddress instanceof AddressBuilder ? $this->billingAddress->build() : $this->billingAddress, + $this->shippingAddress instanceof AddressBuilder ? $this->shippingAddress->build() : $this->shippingAddress, $this->shippingMode, $this->shippingKey, + $this->shippingInfo instanceof ShippingInfoBuilder ? $this->shippingInfo->build() : $this->shippingInfo, + $this->shippingRateInput instanceof ShippingRateInputBuilder ? $this->shippingRateInput->build() : $this->shippingRateInput, $this->shippingCustomFields instanceof CustomFieldsBuilder ? $this->shippingCustomFields->build() : $this->shippingCustomFields, $this->shipping, - $this->taxMode, - $this->taxRoundingMode, - $this->customerGroup instanceof CustomerGroupReferenceBuilder ? $this->customerGroup->build() : $this->customerGroup, + $this->itemShippingAddresses, + $this->discountCodes, + $this->directDiscounts, + $this->refusedGifts, + $this->paymentInfo instanceof PaymentInfoBuilder ? $this->paymentInfo->build() : $this->paymentInfo, $this->country, + $this->locale, + $this->origin, + $this->cart instanceof CartReferenceBuilder ? $this->cart->build() : $this->cart, + $this->quote instanceof QuoteReferenceBuilder ? $this->quote->build() : $this->quote, $this->orderState, - $this->state instanceof StateReferenceBuilder ? $this->state->build() : $this->state, $this->shipmentState, $this->paymentState, - $this->shippingInfo instanceof ShippingInfoBuilder ? $this->shippingInfo->build() : $this->shippingInfo, + $this->state instanceof StateReferenceBuilder ? $this->state->build() : $this->state, $this->syncInfo, $this->returnInfo, - $this->purchaseOrderNumber, - $this->discountCodes, $this->lastMessageSequenceNumber, - $this->cart instanceof CartReferenceBuilder ? $this->cart->build() : $this->cart, - $this->quote instanceof QuoteReferenceBuilder ? $this->quote->build() : $this->quote, $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom, - $this->paymentInfo instanceof PaymentInfoBuilder ? $this->paymentInfo->build() : $this->paymentInfo, - $this->locale, - $this->inventoryMode, - $this->origin, - $this->taxCalculationMode, - $this->shippingRateInput instanceof ShippingRateInputBuilder ? $this->shippingRateInput->build() : $this->shippingRateInput, - $this->itemShippingAddresses, - $this->refusedGifts + $this->completedAt, + $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, + $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy ); } diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyAction.php index 6fa67b27a0f..d7cb0e7fc9b 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyAction.php @@ -19,13 +19,17 @@ interface StagedOrderChangeCustomLineItemMoneyAction extends StagedOrderUpdateAc public const FIELD_MONEY = 'money'; /** + *id
of the CustomLineItem to update.
Draft type that stores amounts only in cent precision for the specified currency.
+ *Value to set. + * Must not be empty. + * Can be a negative amount.
* * @return null|Money diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyActionBuilder.php index 030677c8cfa..a660b40ba9a 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyActionBuilder.php @@ -37,6 +37,8 @@ final class StagedOrderChangeCustomLineItemMoneyActionBuilder implements Builder private $money; /** + *id
of the CustomLineItem to update.
Draft type that stores amounts only in cent precision for the specified currency.
+ *Value to set. + * Must not be empty. + * Can be a negative amount.
* * @return null|Money diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyActionModel.php index a480349c7fb..3428966ca7d 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyActionModel.php @@ -75,6 +75,8 @@ public function getAction() } /** + *id
of the CustomLineItem to update.
Draft type that stores amounts only in cent precision for the specified currency.
+ *Value to set. + * Must not be empty. + * Can be a negative amount.
* * * @return null|Money diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemQuantityAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemQuantityAction.php index 9de14ea3c42..8b485e18764 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemQuantityAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemQuantityAction.php @@ -18,12 +18,17 @@ interface StagedOrderChangeCustomLineItemQuantityAction extends StagedOrderUpdat public const FIELD_QUANTITY = 'quantity'; /** + *id
of the CustomLineItem to update.
New value to set.
+ * If 0
, the Custom Line Item is removed from the Order.
id
of the CustomLineItem to update.
New value to set.
+ * If 0
, the Custom Line Item is removed from the Order.
id
of the CustomLineItem to update.
New value to set.
+ * If 0
, the Custom Line Item is removed from the Order.
New value to set.
+ * If 0
, the LineItem is removed from the Order.
Draft type that stores amounts only in cent precision for the specified currency.
+ *Sets the LineItem price
to the given value when changing the quantity of a Line Item with the ExternalPrice
LineItemPriceMode.
The LineItem price is updated as described in LineItem Price selection.
* * @return null|Money @@ -53,6 +57,8 @@ public function getQuantity(); public function getExternalPrice(); /** + *Sets the LineItem price
and totalPrice
to the given value when changing the quantity of a Line Item with the ExternalTotal
LineItemPriceMode.
New value to set.
+ * If 0
, the LineItem is removed from the Order.
Draft type that stores amounts only in cent precision for the specified currency.
+ *Sets the LineItem price
to the given value when changing the quantity of a Line Item with the ExternalPrice
LineItemPriceMode.
The LineItem price is updated as described in LineItem Price selection.
* * @return null|Money @@ -99,6 +103,8 @@ public function getExternalPrice() } /** + *Sets the LineItem price
and totalPrice
to the given value when changing the quantity of a Line Item with the ExternalTotal
LineItemPriceMode.
New value to set.
+ * If 0
, the LineItem is removed from the Order.
Draft type that stores amounts only in cent precision for the specified currency.
+ *Sets the LineItem price
to the given value when changing the quantity of a Line Item with the ExternalPrice
LineItemPriceMode.
The LineItem price is updated as described in LineItem Price selection.
* * * @return null|Money @@ -180,6 +184,8 @@ public function getExternalPrice() } /** + *Sets the LineItem price
and totalPrice
to the given value when changing the quantity of a Line Item with the ExternalTotal
LineItemPriceMode.
New status of the Order.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeOrderStateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeOrderStateActionBuilder.php index 12529ee2979..9e1b6c02162 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeOrderStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeOrderStateActionBuilder.php @@ -29,6 +29,8 @@ final class StagedOrderChangeOrderStateActionBuilder implements Builder private $orderState; /** + *New status of the Order.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeOrderStateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeOrderStateActionModel.php index e7ca59b3b8d..96e1ede61ba 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeOrderStateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeOrderStateActionModel.php @@ -65,6 +65,8 @@ public function getAction() } /** + *New status of the Order.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangePaymentStateAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangePaymentStateAction.php index eedbbed6479..fd2b2819f3d 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangePaymentStateAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangePaymentStateAction.php @@ -17,6 +17,8 @@ interface StagedOrderChangePaymentStateAction extends StagedOrderUpdateAction public const FIELD_PAYMENT_STATE = 'paymentState'; /** + *New payment status of the Order.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangePaymentStateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangePaymentStateActionBuilder.php index 810264ddced..727b78e8ef6 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangePaymentStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangePaymentStateActionBuilder.php @@ -29,6 +29,8 @@ final class StagedOrderChangePaymentStateActionBuilder implements Builder private $paymentState; /** + *New payment status of the Order.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangePaymentStateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangePaymentStateActionModel.php index fbbb0e823dc..6da45db6a6a 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangePaymentStateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangePaymentStateActionModel.php @@ -65,6 +65,8 @@ public function getAction() } /** + *New payment status of the Order.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeShipmentStateAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeShipmentStateAction.php index a8ca0162111..e227e2c0df4 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeShipmentStateAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeShipmentStateAction.php @@ -17,6 +17,8 @@ interface StagedOrderChangeShipmentStateAction extends StagedOrderUpdateAction public const FIELD_SHIPMENT_STATE = 'shipmentState'; /** + *New shipment status of the Order.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeShipmentStateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeShipmentStateActionBuilder.php index 4792b02197c..126c72b8467 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeShipmentStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeShipmentStateActionBuilder.php @@ -29,6 +29,8 @@ final class StagedOrderChangeShipmentStateActionBuilder implements Builder private $shipmentState; /** + *New shipment status of the Order.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeShipmentStateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeShipmentStateActionModel.php index 3603a158a7e..869c59d369c 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeShipmentStateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeShipmentStateActionModel.php @@ -65,6 +65,8 @@ public function getAction() } /** + *New shipment status of the Order.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxCalculationModeAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxCalculationModeAction.php index 782d626f32b..4d83338b7a3 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxCalculationModeAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxCalculationModeAction.php @@ -17,7 +17,7 @@ interface StagedOrderChangeTaxCalculationModeAction extends StagedOrderUpdateAct public const FIELD_TAX_CALCULATION_MODE = 'taxCalculationMode'; /** - *Determines in which Tax calculation mode taxed prices are calculated.
+ *New value to set.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxCalculationModeActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxCalculationModeActionBuilder.php index 2cf2eed242c..b6366cde32c 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxCalculationModeActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxCalculationModeActionBuilder.php @@ -29,7 +29,7 @@ final class StagedOrderChangeTaxCalculationModeActionBuilder implements Builder private $taxCalculationMode; /** - *Determines in which Tax calculation mode taxed prices are calculated.
+ *New value to set.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxCalculationModeActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxCalculationModeActionModel.php index 0acb6b71b37..51983ef3647 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxCalculationModeActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxCalculationModeActionModel.php @@ -65,7 +65,7 @@ public function getAction() } /** - *Determines in which Tax calculation mode taxed prices are calculated.
+ *New value to set.
* * * @return null|string diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxModeAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxModeAction.php index 04dd4a1befa..abba661c448 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxModeAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxModeAction.php @@ -17,7 +17,7 @@ interface StagedOrderChangeTaxModeAction extends StagedOrderUpdateAction public const FIELD_TAX_MODE = 'taxMode'; /** - *Indicates how taxes are set on the Cart.
+ *The new TaxMode.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxModeActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxModeActionBuilder.php index 80b68f8ae48..af43d1a2903 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxModeActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxModeActionBuilder.php @@ -29,7 +29,7 @@ final class StagedOrderChangeTaxModeActionBuilder implements Builder private $taxMode; /** - *Indicates how taxes are set on the Cart.
+ *The new TaxMode.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxModeActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxModeActionModel.php index 897d02b4b9b..f3bb0d0dc9a 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxModeActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxModeActionModel.php @@ -65,7 +65,7 @@ public function getAction() } /** - *Indicates how taxes are set on the Cart.
+ *The new TaxMode.
* * * @return null|string diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxRoundingModeAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxRoundingModeAction.php index 851b04ab326..c52250475f6 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxRoundingModeAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxRoundingModeAction.php @@ -17,7 +17,7 @@ interface StagedOrderChangeTaxRoundingModeAction extends StagedOrderUpdateAction public const FIELD_TAX_ROUNDING_MODE = 'taxRoundingMode'; /** - *Determines how monetary values are rounded.
+ *New value to set.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxRoundingModeActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxRoundingModeActionBuilder.php index 12f4024f783..f1c4d98300a 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxRoundingModeActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxRoundingModeActionBuilder.php @@ -29,7 +29,7 @@ final class StagedOrderChangeTaxRoundingModeActionBuilder implements Builder private $taxRoundingMode; /** - *Determines how monetary values are rounded.
+ *New value to set.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxRoundingModeActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxRoundingModeActionModel.php index 898e2f337b2..62321ae4f7e 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxRoundingModeActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeTaxRoundingModeActionModel.php @@ -65,7 +65,7 @@ public function getAction() } /** - *Determines how monetary values are rounded.
+ *New value to set.
* * * @return null|string diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateAction.php index 133dd1590c2..e40934c90ae 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateAction.php @@ -19,12 +19,16 @@ interface StagedOrderImportCustomLineItemStateAction extends StagedOrderUpdateAc public const FIELD_STATE = 'state'; /** + *id
of the CustomLineItem to update.
New status of the Custom Line Items.
+ * * @return null|ItemStateCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateActionBuilder.php index 2429fb6e6d3..4b187ce393e 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateActionBuilder.php @@ -36,6 +36,8 @@ final class StagedOrderImportCustomLineItemStateActionBuilder implements Builder private $state; /** + *id
of the CustomLineItem to update.
New status of the Custom Line Items.
+ * * @return null|ItemStateCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateActionModel.php index a95a4e474f8..92794b02dec 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateActionModel.php @@ -74,6 +74,8 @@ public function getAction() } /** + *id
of the CustomLineItem to update.
New status of the Custom Line Items.
+ * * * @return null|ItemStateCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateAction.php index b108d958047..2cf4ac3c145 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateAction.php @@ -19,12 +19,16 @@ interface StagedOrderImportLineItemStateAction extends StagedOrderUpdateAction public const FIELD_STATE = 'state'; /** + *id
of the LineItem to update.
New status of the Line Items.
+ * * @return null|ItemStateCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateActionBuilder.php index 6cdc27fced5..822ca2a0bb0 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateActionBuilder.php @@ -36,6 +36,8 @@ final class StagedOrderImportLineItemStateActionBuilder implements Builder private $state; /** + *id
of the LineItem to update.
New status of the Line Items.
+ * * @return null|ItemStateCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateActionModel.php index 32e803b8110..aaf5c30e94d 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateActionModel.php @@ -74,6 +74,8 @@ public function getAction() } /** + *id
of the LineItem to update.
New status of the Line Items.
+ * * * @return null|ItemStateCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderModel.php index 30374bf9976..b6b0ffd5969 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderModel.php @@ -13,6 +13,7 @@ use Commercetools\Api\Models\Cart\CartReference; use Commercetools\Api\Models\Cart\CartReferenceModel; use Commercetools\Api\Models\Cart\CustomLineItemCollection; +use Commercetools\Api\Models\Cart\DirectDiscountCollection; use Commercetools\Api\Models\Cart\DiscountCodeInfoCollection; use Commercetools\Api\Models\Cart\LineItemCollection; use Commercetools\Api\Models\Cart\ShippingCollection; @@ -86,39 +87,33 @@ final class StagedOrderModel extends JsonObjectModel implements StagedOrder /** * - * @var ?LastModifiedBy - */ - protected $lastModifiedBy; - - /** - * - * @var ?CreatedBy + * @var ?string */ - protected $createdBy; + protected $orderNumber; /** * - * @var ?DateTimeImmutable + * @var ?string */ - protected $completedAt; + protected $purchaseOrderNumber; /** * * @var ?string */ - protected $orderNumber; + protected $customerId; /** * * @var ?string */ - protected $customerId; + protected $customerEmail; /** * - * @var ?string + * @var ?CustomerGroupReference */ - protected $customerEmail; + protected $customerGroup; /** * @@ -170,123 +165,123 @@ final class StagedOrderModel extends JsonObjectModel implements StagedOrder /** * - * @var ?Address + * @var ?string */ - protected $shippingAddress; + protected $taxMode; /** * - * @var ?Address + * @var ?string */ - protected $billingAddress; + protected $taxRoundingMode; /** * * @var ?string */ - protected $shippingMode; + protected $taxCalculationMode; /** * * @var ?string */ - protected $shippingKey; + protected $inventoryMode; /** * - * @var ?CustomFields + * @var ?Address */ - protected $shippingCustomFields; + protected $billingAddress; /** * - * @var ?ShippingCollection + * @var ?Address */ - protected $shipping; + protected $shippingAddress; /** * * @var ?string */ - protected $taxMode; + protected $shippingMode; /** * * @var ?string */ - protected $taxRoundingMode; + protected $shippingKey; /** * - * @var ?CustomerGroupReference + * @var ?ShippingInfo */ - protected $customerGroup; + protected $shippingInfo; /** * - * @var ?string + * @var ?ShippingRateInput */ - protected $country; + protected $shippingRateInput; /** * - * @var ?string + * @var ?CustomFields */ - protected $orderState; + protected $shippingCustomFields; /** * - * @var ?StateReference + * @var ?ShippingCollection */ - protected $state; + protected $shipping; /** * - * @var ?string + * @var ?AddressCollection */ - protected $shipmentState; + protected $itemShippingAddresses; /** * - * @var ?string + * @var ?DiscountCodeInfoCollection */ - protected $paymentState; + protected $discountCodes; /** * - * @var ?ShippingInfo + * @var ?DirectDiscountCollection */ - protected $shippingInfo; + protected $directDiscounts; /** * - * @var ?SyncInfoCollection + * @var ?CartDiscountReferenceCollection */ - protected $syncInfo; + protected $refusedGifts; /** * - * @var ?ReturnInfoCollection + * @var ?PaymentInfo */ - protected $returnInfo; + protected $paymentInfo; /** * * @var ?string */ - protected $purchaseOrderNumber; + protected $country; /** * - * @var ?DiscountCodeInfoCollection + * @var ?string */ - protected $discountCodes; + protected $locale; /** - * @deprecated - * @var ?int + * + * @var ?string */ - protected $lastMessageSequenceNumber; + protected $origin; /** * @@ -302,57 +297,69 @@ final class StagedOrderModel extends JsonObjectModel implements StagedOrder /** * - * @var ?CustomFields + * @var ?string */ - protected $custom; + protected $orderState; /** * - * @var ?PaymentInfo + * @var ?string */ - protected $paymentInfo; + protected $shipmentState; /** * * @var ?string */ - protected $locale; + protected $paymentState; /** * - * @var ?string + * @var ?StateReference */ - protected $inventoryMode; + protected $state; /** * - * @var ?string + * @var ?SyncInfoCollection */ - protected $origin; + protected $syncInfo; /** * - * @var ?string + * @var ?ReturnInfoCollection */ - protected $taxCalculationMode; + protected $returnInfo; + + /** + * @deprecated + * @var ?int + */ + protected $lastMessageSequenceNumber; /** * - * @var ?ShippingRateInput + * @var ?CustomFields */ - protected $shippingRateInput; + protected $custom; /** * - * @var ?AddressCollection + * @var ?DateTimeImmutable */ - protected $itemShippingAddresses; + protected $completedAt; /** * - * @var ?CartDiscountReferenceCollection + * @var ?LastModifiedBy */ - protected $refusedGifts; + protected $lastModifiedBy; + + /** + * + * @var ?CreatedBy + */ + protected $createdBy; /** @@ -363,12 +370,11 @@ public function __construct( ?int $version = null, ?DateTimeImmutable $createdAt = null, ?DateTimeImmutable $lastModifiedAt = null, - ?LastModifiedBy $lastModifiedBy = null, - ?CreatedBy $createdBy = null, - ?DateTimeImmutable $completedAt = null, ?string $orderNumber = null, + ?string $purchaseOrderNumber = null, ?string $customerId = null, ?string $customerEmail = null, + ?CustomerGroupReference $customerGroup = null, ?string $anonymousId = null, ?BusinessUnitKeyReference $businessUnit = null, ?StoreKeyReference $store = null, @@ -377,48 +383,49 @@ public function __construct( ?TypedMoney $totalPrice = null, ?TaxedPrice $taxedPrice = null, ?TaxedPrice $taxedShippingPrice = null, - ?Address $shippingAddress = null, + ?string $taxMode = null, + ?string $taxRoundingMode = null, + ?string $taxCalculationMode = null, + ?string $inventoryMode = null, ?Address $billingAddress = null, + ?Address $shippingAddress = null, ?string $shippingMode = null, ?string $shippingKey = null, + ?ShippingInfo $shippingInfo = null, + ?ShippingRateInput $shippingRateInput = null, ?CustomFields $shippingCustomFields = null, ?ShippingCollection $shipping = null, - ?string $taxMode = null, - ?string $taxRoundingMode = null, - ?CustomerGroupReference $customerGroup = null, + ?AddressCollection $itemShippingAddresses = null, + ?DiscountCodeInfoCollection $discountCodes = null, + ?DirectDiscountCollection $directDiscounts = null, + ?CartDiscountReferenceCollection $refusedGifts = null, + ?PaymentInfo $paymentInfo = null, ?string $country = null, + ?string $locale = null, + ?string $origin = null, + ?CartReference $cart = null, + ?QuoteReference $quote = null, ?string $orderState = null, - ?StateReference $state = null, ?string $shipmentState = null, ?string $paymentState = null, - ?ShippingInfo $shippingInfo = null, + ?StateReference $state = null, ?SyncInfoCollection $syncInfo = null, ?ReturnInfoCollection $returnInfo = null, - ?string $purchaseOrderNumber = null, - ?DiscountCodeInfoCollection $discountCodes = null, ?int $lastMessageSequenceNumber = null, - ?CartReference $cart = null, - ?QuoteReference $quote = null, ?CustomFields $custom = null, - ?PaymentInfo $paymentInfo = null, - ?string $locale = null, - ?string $inventoryMode = null, - ?string $origin = null, - ?string $taxCalculationMode = null, - ?ShippingRateInput $shippingRateInput = null, - ?AddressCollection $itemShippingAddresses = null, - ?CartDiscountReferenceCollection $refusedGifts = null + ?DateTimeImmutable $completedAt = null, + ?LastModifiedBy $lastModifiedBy = null, + ?CreatedBy $createdBy = null ) { $this->id = $id; $this->version = $version; $this->createdAt = $createdAt; $this->lastModifiedAt = $lastModifiedAt; - $this->lastModifiedBy = $lastModifiedBy; - $this->createdBy = $createdBy; - $this->completedAt = $completedAt; $this->orderNumber = $orderNumber; + $this->purchaseOrderNumber = $purchaseOrderNumber; $this->customerId = $customerId; $this->customerEmail = $customerEmail; + $this->customerGroup = $customerGroup; $this->anonymousId = $anonymousId; $this->businessUnit = $businessUnit; $this->store = $store; @@ -427,37 +434,39 @@ public function __construct( $this->totalPrice = $totalPrice; $this->taxedPrice = $taxedPrice; $this->taxedShippingPrice = $taxedShippingPrice; - $this->shippingAddress = $shippingAddress; + $this->taxMode = $taxMode; + $this->taxRoundingMode = $taxRoundingMode; + $this->taxCalculationMode = $taxCalculationMode; + $this->inventoryMode = $inventoryMode; $this->billingAddress = $billingAddress; + $this->shippingAddress = $shippingAddress; $this->shippingMode = $shippingMode; $this->shippingKey = $shippingKey; + $this->shippingInfo = $shippingInfo; + $this->shippingRateInput = $shippingRateInput; $this->shippingCustomFields = $shippingCustomFields; $this->shipping = $shipping; - $this->taxMode = $taxMode; - $this->taxRoundingMode = $taxRoundingMode; - $this->customerGroup = $customerGroup; + $this->itemShippingAddresses = $itemShippingAddresses; + $this->discountCodes = $discountCodes; + $this->directDiscounts = $directDiscounts; + $this->refusedGifts = $refusedGifts; + $this->paymentInfo = $paymentInfo; $this->country = $country; + $this->locale = $locale; + $this->origin = $origin; + $this->cart = $cart; + $this->quote = $quote; $this->orderState = $orderState; - $this->state = $state; $this->shipmentState = $shipmentState; $this->paymentState = $paymentState; - $this->shippingInfo = $shippingInfo; + $this->state = $state; $this->syncInfo = $syncInfo; $this->returnInfo = $returnInfo; - $this->purchaseOrderNumber = $purchaseOrderNumber; - $this->discountCodes = $discountCodes; $this->lastMessageSequenceNumber = $lastMessageSequenceNumber; - $this->cart = $cart; - $this->quote = $quote; $this->custom = $custom; - $this->paymentInfo = $paymentInfo; - $this->locale = $locale; - $this->inventoryMode = $inventoryMode; - $this->origin = $origin; - $this->taxCalculationMode = $taxCalculationMode; - $this->shippingRateInput = $shippingRateInput; - $this->itemShippingAddresses = $itemShippingAddresses; - $this->refusedGifts = $refusedGifts; + $this->completedAt = $completedAt; + $this->lastModifiedBy = $lastModifiedBy; + $this->createdBy = $createdBy; } /** @@ -481,7 +490,7 @@ public function getId() } /** - *The current version of the order.
+ *Current version of the Order.
* * * @return null|int @@ -501,6 +510,8 @@ public function getVersion() } /** + *Date and time (UTC) the Order was initially created.
+ * * * @return null|DateTimeImmutable */ @@ -523,6 +534,8 @@ public function getCreatedAt() } /** + *Date and time (UTC) the Order was last updated.
+ * * * @return null|DateTimeImmutable */ @@ -545,132 +558,110 @@ public function getLastModifiedAt() } /** - *Present on resources created after 1 February 2019 except for events not tracked.
+ *User-defined identifier of the Order that is unique across a Project.
* * - * @return null|LastModifiedBy + * @return null|string */ - public function getLastModifiedBy() + public function getOrderNumber() { - if (is_null($this->lastModifiedBy)) { - /** @psalm-var stdClass|arrayPresent on resources created after 1 February 2019 except for events not tracked.
+ *User-defined identifier of a purchase Order.
+ *It is typically set by the Buyer and can be used with Quotes to track the purchase Order during the quote and order flow.
* * - * @return null|CreatedBy + * @return null|string */ - public function getCreatedBy() + public function getPurchaseOrderNumber() { - if (is_null($this->createdBy)) { - /** @psalm-var stdClass|arrayThis field will only be present if it was set for Order Import
+ *id
of the Customer that the Order belongs to.
String that uniquely identifies an order. - * It can be used to create more human-readable (in contrast to ID) identifier for the order. - * It should be unique across a project. - * Once it's set it cannot be changed.
+ *Email address of the Customer that the Order belongs to.
* * * @return null|string */ - public function getOrderNumber() + public function getCustomerEmail() { - if (is_null($this->orderNumber)) { + if (is_null($this->customerEmail)) { /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_ORDER_NUMBER); + $data = $this->raw(self::FIELD_CUSTOMER_EMAIL); if (is_null($data)) { return null; } - $this->orderNumber = (string) $data; + $this->customerEmail = (string) $data; } - return $this->orderNumber; + return $this->customerEmail; } /** + *Reference to the Customer Group of the Customer that the Order belongs to. + * Used for LineItem Price selection.
* - * @return null|string - */ - public function getCustomerId() - { - if (is_null($this->customerId)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_CUSTOMER_ID); - if (is_null($data)) { - return null; - } - $this->customerId = (string) $data; - } - - return $this->customerId; - } - - /** * - * @return null|string + * @return null|CustomerGroupReference */ - public function getCustomerEmail() + public function getCustomerGroup() { - if (is_null($this->customerEmail)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_CUSTOMER_EMAIL); + if (is_null($this->customerGroup)) { + /** @psalm-var stdClass|arrayIdentifies carts and orders belonging to an anonymous session (the customer has not signed up/in yet).
+ *Anonymous session associated with the Order.
* * * @return null|string @@ -690,7 +681,7 @@ public function getAnonymousId() } /** - *The Business Unit the Order belongs to.
+ *Reference to a Business Unit the Order belongs to.
* * * @return null|BusinessUnitKeyReference @@ -711,6 +702,8 @@ public function getBusinessUnit() } /** + *Reference to a Store the Order belongs to.
+ * * * @return null|StoreKeyReference */ @@ -730,6 +723,8 @@ public function getStore() } /** + *Line Items that are part of the Order.
+ * * * @return null|LineItemCollection */ @@ -748,6 +743,8 @@ public function getLineItems() } /** + *Custom Line Items that are part of the Order.
+ * * * @return null|CustomLineItemCollection */ @@ -766,6 +763,9 @@ public function getCustomLineItems() } /** + *Sum of the totalPrice
field of all LineItems and CustomLineItems, and if available, the price
field of ShippingInfo.
+ * Taxes are included if TaxRate includedInPrice
is true
for each price.
The taxes are calculated based on the shipping address.
+ *Platform
TaxMode, it is automatically set when a shipping address is set.External
TaxMode, it is automatically set when the external Tax Rate for all Line Items, Custom Line Items, and Shipping Methods in the Cart are set.Sum of taxedPrice
of ShippingInfo across all Shipping Methods.
- * For Platform
TaxMode, it is set automatically only if shipping address is set or Shipping Method is added to the Cart.
Sum of the taxedPrice
field of ShippingInfo across all Shipping Methods.
Holds all shipping-related information per Shipping Method.
- *For Multiple
ShippingMode, it is updated automatically after the Shipping Methods are added.
Indicates how Tax Rates are set.
* * - * @return null|Address + * @return null|string */ - public function getShippingAddress() + public function getTaxMode() { - if (is_null($this->shippingAddress)) { - /** @psalm-var stdClass|arrayIndicates how monetary values are rounded when calculating taxes for taxedPrice
.
Indicates whether one or multiple Shipping Methods are added to the Cart.
+ *Indicates how taxes are calculated when calculating taxes for taxedPrice
.
key
of the ShippingMethod for Single
ShippingMode.
Indicates how stock quantities are tracked for Line Items in the Order.
* * * @return null|string */ - public function getShippingKey() + public function getInventoryMode() { - if (is_null($this->shippingKey)) { + if (is_null($this->inventoryMode)) { /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_SHIPPING_KEY); + $data = $this->raw(self::FIELD_INVENTORY_MODE); if (is_null($data)) { return null; } - $this->shippingKey = (string) $data; + $this->inventoryMode = (string) $data; } - return $this->shippingKey; + return $this->inventoryMode; } /** - *Custom Fields of the Shipping Method for Single
ShippingMode.
Billing address associated with the Order.
* * - * @return null|CustomFields + * @return null|Address */ - public function getShippingCustomFields() + public function getBillingAddress() { - if (is_null($this->shippingCustomFields)) { + if (is_null($this->billingAddress)) { /** @psalm-var stdClass|arrayHolds all shipping-related information per Shipping Method for Multiple
ShippingMode.
It is updated automatically after the Shipping Method is added.
+ *Shipping address associated with the Order. + * Determines eligible ShippingMethod rates and Tax Rates of Line Items.
* * - * @return null|ShippingCollection + * @return null|Address */ - public function getShipping() + public function getShippingAddress() { - if (is_null($this->shipping)) { - /** @psalm-var ?listIndicates whether there can be one or multiple Shipping Methods.
+ * * * @return null|string */ - public function getTaxMode() + public function getShippingMode() { - if (is_null($this->taxMode)) { + if (is_null($this->shippingMode)) { /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_TAX_MODE); + $data = $this->raw(self::FIELD_SHIPPING_MODE); if (is_null($data)) { return null; } - $this->taxMode = (string) $data; + $this->shippingMode = (string) $data; } - return $this->taxMode; + return $this->shippingMode; } /** - *When calculating taxes for taxedPrice
, the selected mode is used for rouding.
key
of the ShippingMethod for Single
ShippingMode.
Set when the customer is set and the customer is a member of a customer group. - * Used for product variant price selection.
+ *Shipping-related information for Single
ShippingMode.
+ * Automatically set when a Shipping Method is set.
A two-digit country code as per ISO 3166-1 alpha-2. - * Used for product variant price selection.
+ *Input used to select a ShippingRatePriceTier.
+ * The data type of this field depends on the shippingRateInputType.type
configured in the Project:
CartClassification
, it is ClassificationShippingRateInput.CartScore
, it is ScoreShippingRateInput.CartValue
, it cannot be used.One of the four predefined OrderStates.
+ *Custom Fields of the Shipping Method for Single
ShippingMode.
This reference can point to a state in a custom workflow.
+ *Shipping-related information for Multiple
ShippingMode.
+ * Updated automatically each time a new Shipping Method is added.
Additional shipping addresses of the Order as specified by LineItems using the shippingDetails
field.
+ * Eligible Shipping Methods or applicable Tax Rates are determined by the address in shippingAddress
, and not itemShippingAddresses
.
Discount Codes added to the Order.
+ * An Order that has directDiscounts
cannot have discountCodes
.
Set if the ShippingMethod is set.
+ *Direct Discounts added to the Order.
+ * An Order that has discountCodes
cannot have directDiscounts
.
Automatically set when a Line Item with GiftLineItem
LineItemMode is removed from the Order.
Payment information related to the Order.
* - * @return null|ReturnInfoCollection + * + * @return null|PaymentInfo */ - public function getReturnInfo() + public function getPaymentInfo() { - if (is_null($this->returnInfo)) { - /** @psalm-var ?listThe Purchase Order Number is typically set by the Buyer on a QuoteRequest to - * track the purchase order during the quote and order flow.
+ *Used for LineItem Price selection.
* * * @return null|string */ - public function getPurchaseOrderNumber() + public function getCountry() { - if (is_null($this->purchaseOrderNumber)) { + if (is_null($this->country)) { /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_PURCHASE_ORDER_NUMBER); + $data = $this->raw(self::FIELD_COUNTRY); if (is_null($data)) { return null; } - $this->purchaseOrderNumber = (string) $data; + $this->country = (string) $data; } - return $this->purchaseOrderNumber; + return $this->country; } /** + *Languages of the Order. + * Can only contain languages supported by the Project.
* - * @return null|DiscountCodeInfoCollection + * + * @return null|string */ - public function getDiscountCodes() + public function getLocale() { - if (is_null($this->discountCodes)) { - /** @psalm-var ?listInternal-only field.
+ *Indicates the origin of the Cart from which the Order was created.
* - * @deprecated - * @return null|int + * + * @return null|string */ - public function getLastMessageSequenceNumber() + public function getOrigin() { - if (is_null($this->lastMessageSequenceNumber)) { - /** @psalm-var ?int $data */ - $data = $this->raw(self::FIELD_LAST_MESSAGE_SEQUENCE_NUMBER); + if (is_null($this->origin)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ORIGIN); if (is_null($data)) { return null; } - $this->lastMessageSequenceNumber = (int) $data; + $this->origin = (string) $data; } - return $this->lastMessageSequenceNumber; + return $this->origin; } /** - *Set when this order was created from a cart.
- * The cart will have the state Ordered
.
Reference to the Cart for an Order created from Cart.
+ * The referenced Cart will have the Ordered
CartState.
Set when this order was created from a quote.
+ *Reference to the Quote for an Order created from Quote.
* * * @return null|QuoteReference @@ -1268,182 +1292,234 @@ public function getQuote() } /** + *Current status of the Order.
* - * @return null|CustomFields + * + * @return null|string */ - public function getCustom() + public function getOrderState() { - if (is_null($this->custom)) { - /** @psalm-var stdClass|arrayShipment status of the Order.
* - * @return null|PaymentInfo + * + * @return null|string */ - public function getPaymentInfo() + public function getShipmentState() { - if (is_null($this->paymentInfo)) { - /** @psalm-var stdClass|arrayPayment status of the Order.
+ * * * @return null|string */ - public function getLocale() + public function getPaymentState() { - if (is_null($this->locale)) { + if (is_null($this->paymentState)) { /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_LOCALE); + $data = $this->raw(self::FIELD_PAYMENT_STATE); if (is_null($data)) { return null; } - $this->locale = (string) $data; + $this->paymentState = (string) $data; } - return $this->locale; + return $this->paymentState; } /** + *State of the Order. + * This reference can point to a State in a custom workflow.
* - * @return null|string + * + * @return null|StateReference */ - public function getInventoryMode() + public function getState() { - if (is_null($this->inventoryMode)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_INVENTORY_MODE); + if (is_null($this->state)) { + /** @psalm-var stdClass|arrayContains synchronization activity information of the Order (like export or import). + * Can only be set with Update SyncInfo update action.
* - * @return null|string + * + * @return null|SyncInfoCollection */ - public function getOrigin() + public function getSyncInfo() { - if (is_null($this->origin)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_ORIGIN); + if (is_null($this->syncInfo)) { + /** @psalm-var ?listWhen calculating taxes for taxedPrice
, the selected mode is used for calculating the price with LineItemLevel (horizontally) or UnitPriceLevel (vertically) calculation mode.
Contains information regarding the returns associated with the Order.
* * - * @return null|string + * @return null|ReturnInfoCollection */ - public function getTaxCalculationMode() + public function getReturnInfo() { - if (is_null($this->taxCalculationMode)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_TAX_CALCULATION_MODE); + if (is_null($this->returnInfo)) { + /** @psalm-var ?listInput used to select a ShippingRatePriceTier.
- * The data type of this field depends on the shippingRateInputType.type
configured in the Project:
CartClassification
, it is ClassificationShippingRateInput.CartScore
, it is ScoreShippingRateInput.CartValue
, it cannot be used.Internal-only field.
* + * @deprecated + * @return null|int + */ + public function getLastMessageSequenceNumber() + { + if (is_null($this->lastMessageSequenceNumber)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_LAST_MESSAGE_SEQUENCE_NUMBER); + if (is_null($data)) { + return null; + } + $this->lastMessageSequenceNumber = (int) $data; + } + + return $this->lastMessageSequenceNumber; + } + + /** + *Custom Fields of the Order.
* - * @return null|ShippingRateInput + * + * @return null|CustomFields */ - public function getShippingRateInput() + public function getCustom() { - if (is_null($this->shippingRateInput)) { + if (is_null($this->custom)) { /** @psalm-var stdClass|arrayContains addresses for orders with multiple shipping addresses.
+ *User-defined date and time (UTC) of the Order. + * Present only on an Order created using Order Import.
* * - * @return null|AddressCollection + * @return null|DateTimeImmutable */ - public function getItemShippingAddresses() + public function getCompletedAt() { - if (is_null($this->itemShippingAddresses)) { - /** @psalm-var ?listAutomatically filled when a line item with LineItemMode GiftLineItem
is removed from this order.
Present on resources created after 1 February 2019 except for events not tracked.
* * - * @return null|CartDiscountReferenceCollection + * @return null|LastModifiedBy */ - public function getRefusedGifts() + public function getLastModifiedBy() { - if (is_null($this->refusedGifts)) { - /** @psalm-var ?listPresent on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayid
of the Custom Line Item to remove.
id
of the Custom Line Item to remove.
id
of the Custom Line Item to remove.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Reference to a DiscountCode.
+ *Discount Code to remove from the Cart.
* * @return null|DiscountCodeReference diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveDiscountCodeActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveDiscountCodeActionBuilder.php index 28b4170d3e1..5c1e38204d3 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveDiscountCodeActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveDiscountCodeActionBuilder.php @@ -31,7 +31,7 @@ final class StagedOrderRemoveDiscountCodeActionBuilder implements Builder private $discountCode; /** - *Reference to a DiscountCode.
+ *Discount Code to remove from the Cart.
* * @return null|DiscountCodeReference diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveDiscountCodeActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveDiscountCodeActionModel.php index cc2c8078c51..411b9f47497 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveDiscountCodeActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveDiscountCodeActionModel.php @@ -67,7 +67,7 @@ public function getAction() } /** - *Reference to a DiscountCode.
+ *Discount Code to remove from the Cart.
* * * @return null|DiscountCodeReference diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveItemShippingAddressAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveItemShippingAddressAction.php index 8468d5d1e4b..3e6720ddf62 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveItemShippingAddressAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveItemShippingAddressAction.php @@ -17,6 +17,8 @@ interface StagedOrderRemoveItemShippingAddressAction extends StagedOrderUpdateAc public const FIELD_ADDRESS_KEY = 'addressKey'; /** + *key
of the Address to remove from itemShippingAddresses
.
key
of the Address to remove from itemShippingAddresses
.
key
of the Address to remove from itemShippingAddresses
.
New value to set.
+ * If absent or 0
, the Line Item is removed from the Cart.
Draft type that stores amounts only in cent precision for the specified currency.
+ *Sets the LineItem price
to the given value when decreasing the quantity of a Line Item with the ExternalPrice
LineItemPriceMode.
Sets the LineItem price
and totalPrice
to the given value when decreasing the quantity of a Line Item with the ExternalTotal
LineItemPriceMode.
For order creation and updates, the sum of the targets
must match the quantity of the Line Items or Custom Line Items.
Container for Line Item-specific addresses to remove.
* * @return null|ItemShippingDetailsDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveLineItemActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveLineItemActionBuilder.php index d3ea48db9c4..b90505bc399 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveLineItemActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveLineItemActionBuilder.php @@ -87,6 +87,9 @@ public function getLineItemKey() } /** + *New value to set.
+ * If absent or 0
, the Line Item is removed from the Cart.
Draft type that stores amounts only in cent precision for the specified currency.
+ *Sets the LineItem price
to the given value when decreasing the quantity of a Line Item with the ExternalPrice
LineItemPriceMode.
Sets the LineItem price
and totalPrice
to the given value when decreasing the quantity of a Line Item with the ExternalTotal
LineItemPriceMode.
For order creation and updates, the sum of the targets
must match the quantity of the Line Items or Custom Line Items.
Container for Line Item-specific addresses to remove.
* * @return null|ItemShippingDetailsDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveLineItemActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveLineItemActionModel.php index 01ba6586045..d6edf131ddb 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveLineItemActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveLineItemActionModel.php @@ -151,6 +151,9 @@ public function getLineItemKey() } /** + *New value to set.
+ * If absent or 0
, the Line Item is removed from the Cart.
Draft type that stores amounts only in cent precision for the specified currency.
+ *Sets the LineItem price
to the given value when decreasing the quantity of a Line Item with the ExternalPrice
LineItemPriceMode.
Sets the LineItem price
and totalPrice
to the given value when decreasing the quantity of a Line Item with the ExternalTotal
LineItemPriceMode.
For order creation and updates, the sum of the targets
must match the quantity of the Line Items or Custom Line Items.
Container for Line Item-specific addresses to remove.
* * * @return null|ItemShippingDetailsDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveParcelFromDeliveryAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveParcelFromDeliveryAction.php index ce310549d84..5b404b405f0 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveParcelFromDeliveryAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemoveParcelFromDeliveryAction.php @@ -18,7 +18,8 @@ interface StagedOrderRemoveParcelFromDeliveryAction extends StagedOrderUpdateAct public const FIELD_PARCEL_KEY = 'parcelKey'; /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
ResourceIdentifier of a Payment.
+ *Payment to remove from the PaymentInfo.
* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemovePaymentActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemovePaymentActionBuilder.php index c1040f75c88..36e458982ae 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemovePaymentActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemovePaymentActionBuilder.php @@ -31,7 +31,7 @@ final class StagedOrderRemovePaymentActionBuilder implements Builder private $payment; /** - *ResourceIdentifier of a Payment.
+ *Payment to remove from the PaymentInfo.
* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemovePaymentActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemovePaymentActionModel.php index e02c26292c5..ae0cf496d6e 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemovePaymentActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemovePaymentActionModel.php @@ -67,7 +67,7 @@ public function getAction() } /** - *ResourceIdentifier of a Payment.
+ *Payment to remove from the PaymentInfo.
* * * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressAction.php index 278ec8be282..7dc642dbce2 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressAction.php @@ -18,9 +18,8 @@ interface StagedOrderSetBillingAddressAction extends StagedOrderUpdateAction public const FIELD_ADDRESS = 'address'; /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set. + * If empty, any existing value is removed.
* * @return null|BaseAddress diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressActionBuilder.php index 813cdeea9cd..8d740ff8c07 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressActionBuilder.php @@ -31,9 +31,8 @@ final class StagedOrderSetBillingAddressActionBuilder implements Builder private $address; /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set. + * If empty, any existing value is removed.
* * @return null|BaseAddress diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressActionModel.php index 29b4b9df4b1..5a1cfe30625 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressActionModel.php @@ -67,9 +67,8 @@ public function getAction() } /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set. + * If empty, any existing value is removed.
* * * @return null|BaseAddress diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCountryAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCountryAction.php index 933a734a5a4..6a3ac073ae6 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCountryAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCountryAction.php @@ -17,6 +17,11 @@ interface StagedOrderSetCountryAction extends StagedOrderUpdateAction public const FIELD_COUNTRY = 'country'; /** + *Value to set. + * If empty, any existing value is removed.
+ *If the Cart is bound to a store
, the provided value must be included in the Store's countries
.
+ * Otherwise a CountryNotConfiguredInStore error is returned.
Value to set. + * If empty, any existing value is removed.
+ *If the Cart is bound to a store
, the provided value must be included in the Store's countries
.
+ * Otherwise a CountryNotConfiguredInStore error is returned.
Value to set. + * If empty, any existing value is removed.
+ *If the Cart is bound to a store
, the provided value must be included in the Store's countries
.
+ * Otherwise a CountryNotConfiguredInStore error is returned.
id
of the CustomLineItem to update.
id
of the CustomLineItem to update.
id
of the CustomLineItem to update.
id
of the CustomLineItem to update.
Defines the Type that extends the CustomLineItem with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the CustomLineItem.
+ *Defines the Type that extends the Custom Line Item with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Custom Line Item.
* * @return null|TypeResourceIdentifier @@ -36,7 +38,7 @@ public function getCustomLineItemId(); public function getType(); /** - *Sets the Custom Fields fields for the CustomLineItem.
+ *Sets the Custom Fields fields for the Custom Line Item.
* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeActionBuilder.php index d619022600d..6ac9ddb09bd 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeActionBuilder.php @@ -45,6 +45,8 @@ final class StagedOrderSetCustomLineItemCustomTypeActionBuilder implements Build private $fields; /** + *id
of the CustomLineItem to update.
Defines the Type that extends the CustomLineItem with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the CustomLineItem.
+ *Defines the Type that extends the Custom Line Item with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Custom Line Item.
* * @return null|TypeResourceIdentifier @@ -66,7 +68,7 @@ public function getType() } /** - *Sets the Custom Fields fields for the CustomLineItem.
+ *Sets the Custom Fields fields for the Custom Line Item.
* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeActionModel.php index c47a0d3c494..dbffc0a9e97 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeActionModel.php @@ -85,6 +85,8 @@ public function getAction() } /** + *id
of the CustomLineItem to update.
Defines the Type that extends the CustomLineItem with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the CustomLineItem.
+ *Defines the Type that extends the Custom Line Item with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Custom Line Item.
* * * @return null|TypeResourceIdentifier @@ -125,7 +127,7 @@ public function getType() } /** - *Sets the Custom Fields fields for the CustomLineItem.
+ *Sets the Custom Fields fields for the Custom Line Item.
* * * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsAction.php index 0c699fa4aa2..c689fd3db61 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsAction.php @@ -19,13 +19,16 @@ interface StagedOrderSetCustomLineItemShippingDetailsAction extends StagedOrderU public const FIELD_SHIPPING_DETAILS = 'shippingDetails'; /** + *id
of the CustomLineItem to update.
For order creation and updates, the sum of the targets
must match the quantity of the Line Items or Custom Line Items.
Value to set. + * If empty, any existing value is removed.
* * @return null|ItemShippingDetailsDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsActionBuilder.php index 5762f34ffd1..76cf041d506 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsActionBuilder.php @@ -37,6 +37,8 @@ final class StagedOrderSetCustomLineItemShippingDetailsActionBuilder implements private $shippingDetails; /** + *id
of the CustomLineItem to update.
For order creation and updates, the sum of the targets
must match the quantity of the Line Items or Custom Line Items.
Value to set. + * If empty, any existing value is removed.
* * @return null|ItemShippingDetailsDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsActionModel.php index 75936345cc9..f583b723dba 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsActionModel.php @@ -75,6 +75,8 @@ public function getAction() } /** + *id
of the CustomLineItem to update.
For order creation and updates, the sum of the targets
must match the quantity of the Line Items or Custom Line Items.
Value to set. + * If empty, any existing value is removed.
* * * @return null|ItemShippingDetailsDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountAction.php index 0f462bf11b1..bf4900678a1 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountAction.php @@ -19,18 +19,16 @@ interface StagedOrderSetCustomLineItemTaxAmountAction extends StagedOrderUpdateA public const FIELD_EXTERNAL_TAX_AMOUNT = 'externalTaxAmount'; /** + *id
of the CustomLineItem to update.
Cannot be used in LineItemDraft or CustomLineItemDraft.
- *Can only be set by these update actions:
- *Value to set. + * If empty, any existing value is removed.
* * @return null|ExternalTaxAmountDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountActionBuilder.php index c2adfbe494d..2b669cfcf8f 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountActionBuilder.php @@ -37,6 +37,8 @@ final class StagedOrderSetCustomLineItemTaxAmountActionBuilder implements Builde private $externalTaxAmount; /** + *id
of the CustomLineItem to update.
Cannot be used in LineItemDraft or CustomLineItemDraft.
- *Can only be set by these update actions:
- *Value to set. + * If empty, any existing value is removed.
* * @return null|ExternalTaxAmountDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountActionModel.php index 34e7133f119..5e72d851391 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountActionModel.php @@ -75,6 +75,8 @@ public function getAction() } /** + *id
of the CustomLineItem to update.
Cannot be used in LineItemDraft or CustomLineItemDraft.
- *Can only be set by these update actions:
- *Value to set. + * If empty, any existing value is removed.
* * * @return null|ExternalTaxAmountDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateAction.php index 3a8855ec3d5..7935559056a 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateAction.php @@ -19,13 +19,16 @@ interface StagedOrderSetCustomLineItemTaxRateAction extends StagedOrderUpdateAct public const FIELD_EXTERNAL_TAX_RATE = 'externalTaxRate'; /** + *id
of the CustomLineItem to update.
Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *Value to set. + * If empty, an existing value is removed.
* * @return null|ExternalTaxRateDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateActionBuilder.php index b4c623143ce..0d3f65b33d8 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateActionBuilder.php @@ -37,6 +37,8 @@ final class StagedOrderSetCustomLineItemTaxRateActionBuilder implements Builder private $externalTaxRate; /** + *id
of the CustomLineItem to update.
Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *Value to set. + * If empty, an existing value is removed.
* * @return null|ExternalTaxRateDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateActionModel.php index 92760105b66..9bd06c69556 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateActionModel.php @@ -75,6 +75,8 @@ public function getAction() } /** + *id
of the CustomLineItem to update.
Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *Value to set. + * If empty, an existing value is removed.
* * * @return null|ExternalTaxRateDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomShippingMethodAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomShippingMethodAction.php index f1c78a539d5..ed47c74f202 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomShippingMethodAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomShippingMethodAction.php @@ -23,19 +23,23 @@ interface StagedOrderSetCustomShippingMethodAction extends StagedOrderUpdateActi public const FIELD_EXTERNAL_TAX_RATE = 'externalTaxRate'; /** + *Name of the custom Shipping Method.
+ * * @return null|string */ public function getShippingMethodName(); /** + *Determines the shipping price.
+ * * @return null|ShippingRateDraft */ public function getShippingRate(); /** - *ResourceIdentifier to a TaxCategory.
+ *Tax Category used to determine the Tax Rate when the Cart has the Platform
TaxMode.
Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *External Tax Rate for the shippingRate
to be set if the Cart has the External
TaxMode.
Name of the custom Shipping Method.
+ * * @return null|string */ @@ -62,6 +64,8 @@ public function getShippingMethodName() } /** + *Determines the shipping price.
+ * * @return null|ShippingRateDraft */ @@ -71,7 +75,7 @@ public function getShippingRate() } /** - *ResourceIdentifier to a TaxCategory.
+ *Tax Category used to determine the Tax Rate when the Cart has the Platform
TaxMode.
Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *External Tax Rate for the shippingRate
to be set if the Cart has the External
TaxMode.
Name of the custom Shipping Method.
+ * * * @return null|string */ @@ -113,6 +115,8 @@ public function getShippingMethodName() } /** + *Determines the shipping price.
+ * * * @return null|ShippingRateDraft */ @@ -132,7 +136,7 @@ public function getShippingRate() } /** - *ResourceIdentifier to a TaxCategory.
+ *Tax Category used to determine the Tax Rate when the Cart has the Platform
TaxMode.
Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *External Tax Rate for the shippingRate
to be set if the Cart has the External
TaxMode.
Defines the Type that extends the StagedOrder with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the StagedOrder.
+ *Defines the Type that extends the Order Edit with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Order Edit.
* * @return null|TypeResourceIdentifier @@ -29,7 +29,7 @@ interface StagedOrderSetCustomTypeAction extends StagedOrderUpdateAction public function getType(); /** - *Sets the Custom Fields fields for the StagedOrder.
+ *Sets the Custom Fields fields for the Order Edit.
* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomTypeActionBuilder.php index aa0ce7e9adc..eb751a13675 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomTypeActionBuilder.php @@ -39,8 +39,8 @@ final class StagedOrderSetCustomTypeActionBuilder implements Builder private $fields; /** - *Defines the Type that extends the StagedOrder with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the StagedOrder.
+ *Defines the Type that extends the Order Edit with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Order Edit.
* * @return null|TypeResourceIdentifier @@ -51,7 +51,7 @@ public function getType() } /** - *Sets the Custom Fields fields for the StagedOrder.
+ *Sets the Custom Fields fields for the Order Edit.
* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomTypeActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomTypeActionModel.php index bc3d6f4df33..38f90911b14 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomTypeActionModel.php @@ -77,8 +77,8 @@ public function getAction() } /** - *Defines the Type that extends the StagedOrder with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the StagedOrder.
+ *Defines the Type that extends the Order Edit with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Order Edit.
* * * @return null|TypeResourceIdentifier @@ -99,7 +99,7 @@ public function getType() } /** - *Sets the Custom Fields fields for the StagedOrder.
+ *Sets the Custom Fields fields for the Order Edit.
* * * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerEmailAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerEmailAction.php index 0ddafed255a..ec4f4d49693 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerEmailAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerEmailAction.php @@ -17,6 +17,9 @@ interface StagedOrderSetCustomerEmailAction extends StagedOrderUpdateAction public const FIELD_EMAIL = 'email'; /** + *Value to set. + * If empty, any existing value will be removed.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerEmailActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerEmailActionBuilder.php index b302f879ebd..5a59cf4453a 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerEmailActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerEmailActionBuilder.php @@ -29,6 +29,9 @@ final class StagedOrderSetCustomerEmailActionBuilder implements Builder private $email; /** + *Value to set. + * If empty, any existing value will be removed.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerEmailActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerEmailActionModel.php index 9b314e4ca11..f19c8698f96 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerEmailActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerEmailActionModel.php @@ -65,6 +65,9 @@ public function getAction() } /** + *Value to set. + * If empty, any existing value will be removed.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerGroupAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerGroupAction.php index 44bbc16cb3e..4408a3fa31f 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerGroupAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerGroupAction.php @@ -18,7 +18,8 @@ interface StagedOrderSetCustomerGroupAction extends StagedOrderUpdateAction public const FIELD_CUSTOMER_GROUP = 'customerGroup'; /** - *ResourceIdentifier to a CustomerGroup.
+ *Value to set. + * If empty, any existing value is removed.
* * @return null|CustomerGroupResourceIdentifier diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerGroupActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerGroupActionBuilder.php index 0b3eccd0a0b..6c6b91b5d82 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerGroupActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerGroupActionBuilder.php @@ -31,7 +31,8 @@ final class StagedOrderSetCustomerGroupActionBuilder implements Builder private $customerGroup; /** - *ResourceIdentifier to a CustomerGroup.
+ *Value to set. + * If empty, any existing value is removed.
* * @return null|CustomerGroupResourceIdentifier diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerGroupActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerGroupActionModel.php index 7a742a8fc16..160b36b5a6e 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerGroupActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerGroupActionModel.php @@ -67,7 +67,8 @@ public function getAction() } /** - *ResourceIdentifier to a CustomerGroup.
+ *Value to set. + * If empty, any existing value is removed.
* * * @return null|CustomerGroupResourceIdentifier diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerIdAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerIdAction.php index 4d4b1e5f93e..3fa6bdf502f 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerIdAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomerIdAction.php @@ -17,6 +17,9 @@ interface StagedOrderSetCustomerIdAction extends StagedOrderUpdateAction public const FIELD_CUSTOMER_ID = 'customerId'; /** + *id
of an existing Customer.
+ * If empty, any existing value is removed.
id
of an existing Customer.
+ * If empty, any existing value is removed.
id
of an existing Customer.
+ * If empty, any existing value is removed.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set. + * If empty, any existing value will be removed.
* * @return null|BaseAddress diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressActionBuilder.php index 1d7ade11632..4651d4af85a 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressActionBuilder.php @@ -43,7 +43,8 @@ final class StagedOrderSetDeliveryAddressActionBuilder implements Builder private $address; /** - *Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set. + * If empty, any existing value will be removed.
* * @return null|BaseAddress diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressActionModel.php index f0cf3a918ec..1e5868ecc54 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressActionModel.php @@ -83,7 +83,8 @@ public function getAction() } /** - *Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set. + * If empty, any existing value will be removed.
* * * @return null|BaseAddress diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldAction.php index c7094e09f9c..34368defaf7 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldAction.php @@ -20,7 +20,8 @@ interface StagedOrderSetDeliveryAddressCustomFieldAction extends StagedOrderUpda public const FIELD_VALUE = 'value'; /** - *Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Defines the Type that extends the address
in a Delivery with Custom Fields.
- * If absent, any existing Type and Custom Fields are removed from the address
in a Delivery.
Defines the Type that extends the Delivery address
with Custom Fields.
+ * If absent, any existing Type and Custom Fields are removed from the Delivery address
.
Sets the Custom Fields fields for the address
in a Delivery.
Sets the Custom Fields fields for the Delivery address
.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Defines the Type that extends the address
in a Delivery with Custom Fields.
- * If absent, any existing Type and Custom Fields are removed from the address
in a Delivery.
Defines the Type that extends the Delivery address
with Custom Fields.
+ * If absent, any existing Type and Custom Fields are removed from the Delivery address
.
Sets the Custom Fields fields for the address
in a Delivery.
Sets the Custom Fields fields for the Delivery address
.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Defines the Type that extends the address
in a Delivery with Custom Fields.
- * If absent, any existing Type and Custom Fields are removed from the address
in a Delivery.
Defines the Type that extends the Delivery address
with Custom Fields.
+ * If absent, any existing Type and Custom Fields are removed from the Delivery address
.
Sets the Custom Fields fields for the address
in a Delivery.
Sets the Custom Fields fields for the Delivery address
.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Value to set. + * If empty, any existing value is removed.
+ * * @return null|DeliveryItemCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryItemsActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryItemsActionBuilder.php index a7ced5f4223..0cff4ff5e0f 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryItemsActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryItemsActionBuilder.php @@ -42,7 +42,8 @@ final class StagedOrderSetDeliveryItemsActionBuilder implements Builder private $items; /** - *Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Value to set. + * If empty, any existing value is removed.
+ * * @return null|DeliveryItemCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryItemsActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryItemsActionModel.php index 7b078ce481b..77306567517 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryItemsActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryItemsActionModel.php @@ -82,7 +82,8 @@ public function getAction() } /** - *Either deliveryId
or deliveryKey
is required for this update action.
id
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Either deliveryId
or deliveryKey
is required for this update action.
key
of an existing Delivery.
Either deliveryId
or deliveryKey
must be provided.
Value to set. + * If empty, any existing value is removed.
+ * * * @return null|DeliveryItemCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDirectDiscountsAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDirectDiscountsAction.php new file mode 100644 index 00000000000..75844f74496 --- /dev/null +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDirectDiscountsAction.php @@ -0,0 +1,36 @@ + + *key
of the Address in itemShippingAddresses
.
key
of the Address in itemShippingAddresses
.
key
of the Address in itemShippingAddresses
.
key
of the Address in itemShippingAddresses
.
key
of the Address in itemShippingAddresses
.
key
of the Address in itemShippingAddresses
.
Defines the Type that extends the LineItem with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the LineItem.
+ *Defines the Type that extends the Line Item with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Line Item.
* * @return null|TypeResourceIdentifier @@ -47,7 +47,7 @@ public function getLineItemKey(); public function getType(); /** - *Sets the Custom Fields fields for the LineItem.
+ *Sets the Custom Fields fields for the Line Item.
* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomTypeActionBuilder.php index 04ba23bce23..820523c0709 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomTypeActionBuilder.php @@ -73,8 +73,8 @@ public function getLineItemKey() } /** - *Defines the Type that extends the LineItem with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the LineItem.
+ *Defines the Type that extends the Line Item with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Line Item.
* * @return null|TypeResourceIdentifier @@ -85,7 +85,7 @@ public function getType() } /** - *Sets the Custom Fields fields for the LineItem.
+ *Sets the Custom Fields fields for the Line Item.
* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomTypeActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomTypeActionModel.php index 58e58a9bf7c..606d3f30ee8 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomTypeActionModel.php @@ -133,8 +133,8 @@ public function getLineItemKey() } /** - *Defines the Type that extends the LineItem with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the LineItem.
+ *Defines the Type that extends the Line Item with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Line Item.
* * * @return null|TypeResourceIdentifier @@ -155,7 +155,7 @@ public function getType() } /** - *Sets the Custom Fields fields for the LineItem.
+ *Sets the Custom Fields fields for the Line Item.
* * * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemDistributionChannelAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemDistributionChannelAction.php index 1469b5a6555..8c594aae893 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemDistributionChannelAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemDistributionChannelAction.php @@ -36,7 +36,11 @@ public function getLineItemId(); public function getLineItemKey(); /** - *ResourceIdentifier to a Channel.
+ *lineItemId
.lineItemId
.
+ * The Channel must have the ProductDistribution
ChannelRoleEnum.ResourceIdentifier to a Channel.
+ *lineItemId
.lineItemId
.
+ * The Channel must have the ProductDistribution
ChannelRoleEnum.ResourceIdentifier to a Channel.
+ *lineItemId
.lineItemId
.
+ * The Channel must have the ProductDistribution
ChannelRoleEnum.Draft type that stores amounts only in cent precision for the specified currency.
+ *Value to set.
+ * If externalPrice
is not given and the priceMode
is ExternalPrice
, the external price is unset and the priceMode
is set to Platform
.
Draft type that stores amounts only in cent precision for the specified currency.
+ *Value to set.
+ * If externalPrice
is not given and the priceMode
is ExternalPrice
, the external price is unset and the priceMode
is set to Platform
.
Draft type that stores amounts only in cent precision for the specified currency.
+ *Value to set.
+ * If externalPrice
is not given and the priceMode
is ExternalPrice
, the external price is unset and the priceMode
is set to Platform
.
For order creation and updates, the sum of the targets
must match the quantity of the Line Items or Custom Line Items.
Value to set. + * If empty, the existing value is removed.
* * @return null|ItemShippingDetailsDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemShippingDetailsActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemShippingDetailsActionBuilder.php index 9101be55f38..9c6d4885b9f 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemShippingDetailsActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemShippingDetailsActionBuilder.php @@ -65,7 +65,8 @@ public function getLineItemKey() } /** - *For order creation and updates, the sum of the targets
must match the quantity of the Line Items or Custom Line Items.
Value to set. + * If empty, the existing value is removed.
* * @return null|ItemShippingDetailsDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemShippingDetailsActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemShippingDetailsActionModel.php index 2dbe9b493d0..f52a8c362db 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemShippingDetailsActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemShippingDetailsActionModel.php @@ -123,7 +123,8 @@ public function getLineItemKey() } /** - *For order creation and updates, the sum of the targets
must match the quantity of the Line Items or Custom Line Items.
Value to set. + * If empty, the existing value is removed.
* * * @return null|ItemShippingDetailsDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemTaxAmountAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemTaxAmountAction.php index ec28e258c12..e5d979e894d 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemTaxAmountAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemTaxAmountAction.php @@ -37,12 +37,8 @@ public function getLineItemId(); public function getLineItemKey(); /** - *Cannot be used in LineItemDraft or CustomLineItemDraft.
- *Can only be set by these update actions:
- *Value to set. + * If empty, any existing value will be removed.
* * @return null|ExternalTaxAmountDraft @@ -50,7 +46,7 @@ public function getLineItemKey(); public function getExternalTaxAmount(); /** - *key
of the ShippingMethod used for this Line Item.```
+ *
key
of the ShippingMethod used for this Line Item.
* This is required for Carts with Multiple
ShippingMode.
Cannot be used in LineItemDraft or CustomLineItemDraft.
- *Can only be set by these update actions:
- *Value to set. + * If empty, any existing value will be removed.
* * @return null|ExternalTaxAmountDraft @@ -87,7 +83,7 @@ public function getExternalTaxAmount() } /** - *key
of the ShippingMethod used for this Line Item.```
+ *
key
of the ShippingMethod used for this Line Item.
* This is required for Carts with Multiple
ShippingMode.
Cannot be used in LineItemDraft or CustomLineItemDraft.
- *Can only be set by these update actions:
- *Value to set. + * If empty, any existing value will be removed.
* * * @return null|ExternalTaxAmountDraft @@ -157,7 +153,7 @@ public function getExternalTaxAmount() } /** - *key
of the ShippingMethod used for this Line Item.```
+ *
key
of the ShippingMethod used for this Line Item.
* This is required for Carts with Multiple
ShippingMode.
Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *Value to set. + * If empty, any existing value will be removed.
* * @return null|ExternalTaxRateDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemTaxRateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemTaxRateActionBuilder.php index fa88533175d..8ef010ba486 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemTaxRateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemTaxRateActionBuilder.php @@ -71,7 +71,8 @@ public function getLineItemKey() } /** - *Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *Value to set. + * If empty, any existing value will be removed.
* * @return null|ExternalTaxRateDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemTaxRateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemTaxRateActionModel.php index bd30c5ecd0c..0828680c48e 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemTaxRateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemTaxRateActionModel.php @@ -131,7 +131,8 @@ public function getLineItemKey() } /** - *Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *Value to set. + * If empty, any existing value will be removed.
* * * @return null|ExternalTaxRateDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemTotalPriceAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemTotalPriceAction.php index 4e08973b25d..9c66be40808 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemTotalPriceAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemTotalPriceAction.php @@ -36,6 +36,9 @@ public function getLineItemId(); public function getLineItemKey(); /** + *Value to set.
+ * If externalTotalPrice
is not given and the priceMode
is ExternalTotal
, the external price is unset and the priceMode
is set to Platform
.
Value to set.
+ * If externalTotalPrice
is not given and the priceMode
is ExternalTotal
, the external price is unset and the priceMode
is set to Platform
.
Value to set.
+ * If externalTotalPrice
is not given and the priceMode
is ExternalTotal
, the external price is unset and the priceMode
is set to Platform
.
Value to set. + * Must be one of the Project's languages. + * If empty, any existing value is removed.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLocaleActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLocaleActionBuilder.php index 3017eeff5ea..ba29b363af7 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLocaleActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLocaleActionBuilder.php @@ -29,6 +29,10 @@ final class StagedOrderSetLocaleActionBuilder implements Builder private $locale; /** + *Value to set. + * Must be one of the Project's languages. + * If empty, any existing value is removed.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLocaleActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLocaleActionModel.php index c4f6bc9c759..e4559ab5eec 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLocaleActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLocaleActionModel.php @@ -65,6 +65,10 @@ public function getAction() } /** + *Value to set. + * Must be one of the Project's languages. + * If empty, any existing value is removed.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderNumberAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderNumberAction.php index b50da5c3bcb..ebc249560c2 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderNumberAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderNumberAction.php @@ -17,6 +17,9 @@ interface StagedOrderSetOrderNumberAction extends StagedOrderUpdateAction public const FIELD_ORDER_NUMBER = 'orderNumber'; /** + *Value to set. Must be unique across a Project. + * Once set, the value cannot be changed.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderNumberActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderNumberActionBuilder.php index bbd4d4492e3..4becd2606f2 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderNumberActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderNumberActionBuilder.php @@ -29,6 +29,9 @@ final class StagedOrderSetOrderNumberActionBuilder implements Builder private $orderNumber; /** + *Value to set. Must be unique across a Project. + * Once set, the value cannot be changed.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderNumberActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderNumberActionModel.php index 7949830f255..164e4e91366 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderNumberActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderNumberActionModel.php @@ -65,6 +65,9 @@ public function getAction() } /** + *Value to set. Must be unique across a Project. + * Once set, the value cannot be changed.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderTotalTaxAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderTotalTaxAction.php index 4dcc2241bb4..a42a64d2823 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderTotalTaxAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderTotalTaxAction.php @@ -20,7 +20,7 @@ interface StagedOrderSetOrderTotalTaxAction extends StagedOrderUpdateAction public const FIELD_EXTERNAL_TAX_PORTIONS = 'externalTaxPortions'; /** - *Draft type that stores amounts only in cent precision for the specified currency.
+ *Total gross amount of the Order (totalNet + taxes).
* * @return null|Money @@ -28,6 +28,8 @@ interface StagedOrderSetOrderTotalTaxAction extends StagedOrderUpdateAction public function getExternalTotalGross(); /** + *Value to set.
+ * * @return null|TaxPortionDraftCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderTotalTaxActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderTotalTaxActionBuilder.php index 22e861a03f5..ba4cf390083 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderTotalTaxActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderTotalTaxActionBuilder.php @@ -38,7 +38,7 @@ final class StagedOrderSetOrderTotalTaxActionBuilder implements Builder private $externalTaxPortions; /** - *Draft type that stores amounts only in cent precision for the specified currency.
+ *Total gross amount of the Order (totalNet + taxes).
* * @return null|Money @@ -49,6 +49,8 @@ public function getExternalTotalGross() } /** + *Value to set.
+ * * @return null|TaxPortionDraftCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderTotalTaxActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderTotalTaxActionModel.php index 0defaa7908b..00713b92c2b 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderTotalTaxActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetOrderTotalTaxActionModel.php @@ -76,7 +76,7 @@ public function getAction() } /** - *Draft type that stores amounts only in cent precision for the specified currency.
+ *Total gross amount of the Order (totalNet + taxes).
* * * @return null|Money @@ -97,6 +97,8 @@ public function getExternalTotalGross() } /** + *Value to set.
+ * * * @return null|TaxPortionDraftCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelCustomFieldAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelCustomFieldAction.php index deb8346d68a..abf7857e89b 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelCustomFieldAction.php @@ -20,7 +20,8 @@ interface StagedOrderSetParcelCustomFieldAction extends StagedOrderUpdateAction public const FIELD_VALUE = 'value'; /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Value to set. + * If empty, any existing value will be removed.
+ * * @return null|DeliveryItemCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelItemsActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelItemsActionBuilder.php index 968b5d6bac2..5b557d6afb3 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelItemsActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelItemsActionBuilder.php @@ -42,7 +42,8 @@ final class StagedOrderSetParcelItemsActionBuilder implements Builder private $items; /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Value to set. + * If empty, any existing value will be removed.
+ * * @return null|DeliveryItemCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelItemsActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelItemsActionModel.php index 6d88d078d48..5b97ca5d593 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelItemsActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelItemsActionModel.php @@ -82,7 +82,8 @@ public function getAction() } /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Value to set. + * If empty, any existing value will be removed.
+ * * * @return null|DeliveryItemCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelMeasurementsAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelMeasurementsAction.php index 64a273e00db..6b300d20116 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelMeasurementsAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelMeasurementsAction.php @@ -20,7 +20,8 @@ interface StagedOrderSetParcelMeasurementsAction extends StagedOrderUpdateAction public const FIELD_MEASUREMENTS = 'measurements'; /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Value to set. + * If empty, any existing value will be removed.
+ * * @return null|ParcelMeasurements */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelMeasurementsActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelMeasurementsActionBuilder.php index b3430d7aaf1..6478e5df636 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelMeasurementsActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelMeasurementsActionBuilder.php @@ -43,7 +43,8 @@ final class StagedOrderSetParcelMeasurementsActionBuilder implements Builder private $measurements; /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Value to set. + * If empty, any existing value will be removed.
+ * * @return null|ParcelMeasurements */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelMeasurementsActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelMeasurementsActionModel.php index 1c5c8a5a4d8..16c152cfe0a 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelMeasurementsActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelMeasurementsActionModel.php @@ -83,7 +83,8 @@ public function getAction() } /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Value to set. + * If empty, any existing value will be removed.
+ * * * @return null|ParcelMeasurements */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelTrackingDataAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelTrackingDataAction.php index b214a7a73e8..6ebf3bd35fb 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelTrackingDataAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelTrackingDataAction.php @@ -20,7 +20,8 @@ interface StagedOrderSetParcelTrackingDataAction extends StagedOrderUpdateAction public const FIELD_TRACKING_DATA = 'trackingData'; /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Value to set. + * If empty, any existing value will be removed.
+ * * @return null|TrackingData */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelTrackingDataActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelTrackingDataActionBuilder.php index 729bf562c5f..c684237e698 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelTrackingDataActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelTrackingDataActionBuilder.php @@ -43,7 +43,8 @@ final class StagedOrderSetParcelTrackingDataActionBuilder implements Builder private $trackingData; /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Value to set. + * If empty, any existing value will be removed.
+ * * @return null|TrackingData */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelTrackingDataActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelTrackingDataActionModel.php index e9223145445..2fa8447b6bc 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelTrackingDataActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelTrackingDataActionModel.php @@ -83,7 +83,8 @@ public function getAction() } /** - *Either parcelId
or parcelKey
is required for this update action.
id
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Either parcelId
or parcelKey
is required for this update action.
key
of an existing Parcel.
Either parcelId
or parcelKey
must be provided.
Value to set. + * If empty, any existing value will be removed.
+ * * * @return null|TrackingData */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetPurchaseOrderNumberAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetPurchaseOrderNumberAction.php index 6ac0221c1a5..fb522a87934 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetPurchaseOrderNumberAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetPurchaseOrderNumberAction.php @@ -17,8 +17,7 @@ interface StagedOrderSetPurchaseOrderNumberAction extends StagedOrderUpdateActio public const FIELD_PURCHASE_ORDER_NUMBER = 'purchaseOrderNumber'; /** - *Identifier for a purchase order, usually in a B2B context. - * The Purchase Order Number is typically entered by the Buyer and can also be used with Quotes.
+ *Value to set.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetPurchaseOrderNumberActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetPurchaseOrderNumberActionBuilder.php index f0b3c99124a..bc2b2c18e81 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetPurchaseOrderNumberActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetPurchaseOrderNumberActionBuilder.php @@ -29,8 +29,7 @@ final class StagedOrderSetPurchaseOrderNumberActionBuilder implements Builder private $purchaseOrderNumber; /** - *Identifier for a purchase order, usually in a B2B context. - * The Purchase Order Number is typically entered by the Buyer and can also be used with Quotes.
+ *Value to set.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetPurchaseOrderNumberActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetPurchaseOrderNumberActionModel.php index 9769bdaf851..f889163dfb2 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetPurchaseOrderNumberActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetPurchaseOrderNumberActionModel.php @@ -65,8 +65,7 @@ public function getAction() } /** - *Identifier for a purchase order, usually in a B2B context. - * The Purchase Order Number is typically entered by the Buyer and can also be used with Quotes.
+ *Value to set.
* * * @return null|string diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnInfoAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnInfoAction.php index 96afa46ceba..f04a35c0e27 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnInfoAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnInfoAction.php @@ -18,6 +18,9 @@ interface StagedOrderSetReturnInfoAction extends StagedOrderUpdateAction public const FIELD_ITEMS = 'items'; /** + *Value to set. + * If empty, any existing value will be removed.
+ * * @return null|ReturnInfoDraftCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnInfoActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnInfoActionBuilder.php index af094fbee12..a4131fce04e 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnInfoActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnInfoActionBuilder.php @@ -30,6 +30,9 @@ final class StagedOrderSetReturnInfoActionBuilder implements Builder private $items; /** + *Value to set. + * If empty, any existing value will be removed.
+ * * @return null|ReturnInfoDraftCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnInfoActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnInfoActionModel.php index 26a87e14e22..6344c0f6542 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnInfoActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnInfoActionModel.php @@ -66,6 +66,9 @@ public function getAction() } /** + *Value to set. + * If empty, any existing value will be removed.
+ * * * @return null|ReturnInfoDraftCollection */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldAction.php index 84f70709bef..67d7b9a5cd2 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldAction.php @@ -19,6 +19,8 @@ interface StagedOrderSetReturnItemCustomFieldAction extends StagedOrderUpdateAct public const FIELD_VALUE = 'value'; /** + *id
of the ReturnItem to update.
id
of the ReturnItem to update.
id
of the ReturnItem to update.
id
of the ReturnItem to update.
Defines the Type that extends the ReturnItem with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the ReturnItem.
+ *Defines the Type that extends the Return Item with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Return Item.
* * @return null|TypeResourceIdentifier @@ -36,7 +38,7 @@ public function getReturnItemId(); public function getType(); /** - *Sets the Custom Fields fields for the ReturnItem.
+ *Sets the Custom Fields fields for the Return Item.
* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeActionBuilder.php index 3d76e782ab6..ad86a1675bf 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeActionBuilder.php @@ -45,6 +45,8 @@ final class StagedOrderSetReturnItemCustomTypeActionBuilder implements Builder private $fields; /** + *id
of the ReturnItem to update.
Defines the Type that extends the ReturnItem with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the ReturnItem.
+ *Defines the Type that extends the Return Item with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Return Item.
* * @return null|TypeResourceIdentifier @@ -66,7 +68,7 @@ public function getType() } /** - *Sets the Custom Fields fields for the ReturnItem.
+ *Sets the Custom Fields fields for the Return Item.
* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeActionModel.php index ce39adf2088..fdb675b1508 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeActionModel.php @@ -85,6 +85,8 @@ public function getAction() } /** + *id
of the ReturnItem to update.
Defines the Type that extends the ReturnItem with Custom Fields. - * If absent, any existing Type and Custom Fields are removed from the ReturnItem.
+ *Defines the Type that extends the Return Item with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the Return Item.
* * * @return null|TypeResourceIdentifier @@ -125,7 +127,7 @@ public function getType() } /** - *Sets the Custom Fields fields for the ReturnItem.
+ *Sets the Custom Fields fields for the Return Item.
* * * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateAction.php index cce1da88191..6958328c908 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateAction.php @@ -18,12 +18,16 @@ interface StagedOrderSetReturnPaymentStateAction extends StagedOrderUpdateAction public const FIELD_PAYMENT_STATE = 'paymentState'; /** + *id
of the ReturnItem to update.
New Payment status of the ReturnItem.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateActionBuilder.php index b5ff7557bbe..7711ea8e6bb 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateActionBuilder.php @@ -35,6 +35,8 @@ final class StagedOrderSetReturnPaymentStateActionBuilder implements Builder private $paymentState; /** + *id
of the ReturnItem to update.
New Payment status of the ReturnItem.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateActionModel.php index 026948bbc12..0a03d35e5b3 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateActionModel.php @@ -73,6 +73,8 @@ public function getAction() } /** + *id
of the ReturnItem to update.
New Payment status of the ReturnItem.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateAction.php index aebc1c86945..116fa85ce19 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateAction.php @@ -18,12 +18,16 @@ interface StagedOrderSetReturnShipmentStateAction extends StagedOrderUpdateActio public const FIELD_SHIPMENT_STATE = 'shipmentState'; /** + *id
of the ReturnItem to update.
New shipment state of the ReturnItem.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateActionBuilder.php index 2f94ab4d065..cdd41d2e5d1 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateActionBuilder.php @@ -35,6 +35,8 @@ final class StagedOrderSetReturnShipmentStateActionBuilder implements Builder private $shipmentState; /** + *id
of the ReturnItem to update.
New shipment state of the ReturnItem.
+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateActionModel.php index db07eb896a7..0e445f1b12d 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateActionModel.php @@ -73,6 +73,8 @@ public function getAction() } /** + *id
of the ReturnItem to update.
New shipment state of the ReturnItem.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressAction.php index 710f148ce16..132cbc39ce4 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressAction.php @@ -18,9 +18,8 @@ interface StagedOrderSetShippingAddressAction extends StagedOrderUpdateAction public const FIELD_ADDRESS = 'address'; /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set. + * If empty, any existing value is removed.
* * @return null|BaseAddress diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressActionBuilder.php index 526c670424c..41c463a631c 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressActionBuilder.php @@ -31,9 +31,8 @@ final class StagedOrderSetShippingAddressActionBuilder implements Builder private $address; /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set. + * If empty, any existing value is removed.
* * @return null|BaseAddress diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressActionModel.php index e2be7a9c8d4..d45f0029679 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressActionModel.php @@ -67,9 +67,8 @@ public function getAction() } /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set. + * If empty, any existing value is removed.
* * * @return null|BaseAddress diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressAndCustomShippingMethodAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressAndCustomShippingMethodAction.php index cc315177e63..e6c11729e11 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressAndCustomShippingMethodAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressAndCustomShippingMethodAction.php @@ -25,9 +25,7 @@ interface StagedOrderSetShippingAddressAndCustomShippingMethodAction extends Sta public const FIELD_EXTERNAL_TAX_RATE = 'externalTaxRate'; /** - *Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set for shippingAddress
.
Value to set.
+ * * @return null|string */ public function getShippingMethodName(); /** + *Value to set.
+ * * @return null|ShippingRateDraft */ public function getShippingRate(); /** - *ResourceIdentifier to a TaxCategory.
+ *Used to select a Tax Rate when the Order has the Platform
TaxMode.
Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *An external Tax Rate can be set if the Cart has the External
TaxMode.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set for shippingAddress
.
Value to set.
+ * * @return null|string */ @@ -83,6 +83,8 @@ public function getShippingMethodName() } /** + *Value to set.
+ * * @return null|ShippingRateDraft */ @@ -92,7 +94,7 @@ public function getShippingRate() } /** - *ResourceIdentifier to a TaxCategory.
+ *Used to select a Tax Rate when the Order has the Platform
TaxMode.
Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *An external Tax Rate can be set if the Cart has the External
TaxMode.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set for shippingAddress
.
Value to set.
+ * * * @return null|string */ @@ -146,6 +146,8 @@ public function getShippingMethodName() } /** + *Value to set.
+ * * * @return null|ShippingRateDraft */ @@ -165,7 +167,7 @@ public function getShippingRate() } /** - *ResourceIdentifier to a TaxCategory.
+ *Used to select a Tax Rate when the Order has the Platform
TaxMode.
Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *An external Tax Rate can be set if the Cart has the External
TaxMode.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set for shippingAddress
.
ResourceIdentifier to a ShippingMethod.
+ *Value to set.
* * @return null|ShippingMethodResourceIdentifier @@ -40,7 +38,7 @@ public function getAddress(); public function getShippingMethod(); /** - *Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *An external Tax Rate can be set if the Cart has the External
TaxMode.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set for shippingAddress
.
ResourceIdentifier to a ShippingMethod.
+ *Value to set.
* * @return null|ShippingMethodResourceIdentifier @@ -71,7 +69,7 @@ public function getShippingMethod() } /** - *Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *An external Tax Rate can be set if the Cart has the External
TaxMode.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
Value to set for shippingAddress
.
ResourceIdentifier to a ShippingMethod.
+ *Value to set.
* * * @return null|ShippingMethodResourceIdentifier @@ -131,7 +129,7 @@ public function getShippingMethod() } /** - *Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *An external Tax Rate can be set if the Cart has the External
TaxMode.
ResourceIdentifier to a ShippingMethod.
+ *Value to set. If empty, any existing value will be removed. + * If the referenced Shipping Method has a predicate that does not match the Cart, an InvalidOperation error is returned.
* * @return null|ShippingMethodResourceIdentifier @@ -28,7 +29,7 @@ interface StagedOrderSetShippingMethodAction extends StagedOrderUpdateAction public function getShippingMethod(); /** - *Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *An external Tax Rate can be set if the Cart has the External
TaxMode.
ResourceIdentifier to a ShippingMethod.
+ *Value to set. If empty, any existing value will be removed. + * If the referenced Shipping Method has a predicate that does not match the Cart, an InvalidOperation error is returned.
* * @return null|ShippingMethodResourceIdentifier @@ -50,7 +51,7 @@ public function getShippingMethod() } /** - *Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *An external Tax Rate can be set if the Cart has the External
TaxMode.
ResourceIdentifier to a ShippingMethod.
+ *Value to set. If empty, any existing value will be removed. + * If the referenced Shipping Method has a predicate that does not match the Cart, an InvalidOperation error is returned.
* * * @return null|ShippingMethodResourceIdentifier @@ -98,7 +99,7 @@ public function getShippingMethod() } /** - *Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *An external Tax Rate can be set if the Cart has the External
TaxMode.
Cannot be used in LineItemDraft or CustomLineItemDraft.
- *Can only be set by these update actions:
- *Value to set. If empty, any existing value will be removed.
* * @return null|ExternalTaxAmountDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxAmountActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxAmountActionBuilder.php index 57b5b2e0cf6..0d144569818 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxAmountActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxAmountActionBuilder.php @@ -48,12 +48,7 @@ public function getShippingKey() } /** - *Cannot be used in LineItemDraft or CustomLineItemDraft.
- *Can only be set by these update actions:
- *Value to set. If empty, any existing value will be removed.
* * @return null|ExternalTaxAmountDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxAmountActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxAmountActionModel.php index b47155f9c90..ec03981de8e 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxAmountActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxAmountActionModel.php @@ -95,12 +95,7 @@ public function getShippingKey() } /** - *Cannot be used in LineItemDraft or CustomLineItemDraft.
- *Can only be set by these update actions:
- *Value to set. If empty, any existing value will be removed.
* * * @return null|ExternalTaxAmountDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxRateAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxRateAction.php index 575ed3b0b3f..cbd8e6f7510 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxRateAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxRateAction.php @@ -27,7 +27,8 @@ interface StagedOrderSetShippingMethodTaxRateAction extends StagedOrderUpdateAct public function getShippingKey(); /** - *Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *Value to set. + * If empty, any existing value is removed.
* * @return null|ExternalTaxRateDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxRateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxRateActionBuilder.php index c57da509e85..f76008dd5de 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxRateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxRateActionBuilder.php @@ -48,7 +48,8 @@ public function getShippingKey() } /** - *Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *Value to set. + * If empty, any existing value is removed.
* * @return null|ExternalTaxRateDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxRateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxRateActionModel.php index 8107fd2a3ba..154bfddd10e 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxRateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingMethodTaxRateActionModel.php @@ -95,7 +95,8 @@ public function getShippingKey() } /** - *Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.
+ *Value to set. + * If empty, any existing value is removed.
* * * @return null|ExternalTaxRateDraft diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingRateInputAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingRateInputAction.php index aa012d5164d..20cfe7ffb40 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingRateInputAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingRateInputAction.php @@ -18,7 +18,12 @@ interface StagedOrderSetShippingRateInputAction extends StagedOrderUpdateAction public const FIELD_SHIPPING_RATE_INPUT = 'shippingRateInput'; /** - *Generic type holding specifc ShippingRateInputDraft types.
+ *The data type of this field depends on the shippingRateInputType.type
configured in the Project:
CartClassification
, it must be ClassificationShippingRateInputDraft.CartScore
, it must be ScoreShippingRateInputDraft.CartValue
, it cannot be set.Generic type holding specifc ShippingRateInputDraft types.
+ *The data type of this field depends on the shippingRateInputType.type
configured in the Project:
CartClassification
, it must be ClassificationShippingRateInputDraft.CartScore
, it must be ScoreShippingRateInputDraft.CartValue
, it cannot be set.Generic type holding specifc ShippingRateInputDraft types.
+ *The data type of this field depends on the shippingRateInputType.type
configured in the Project:
CartClassification
, it must be ClassificationShippingRateInputDraft.CartScore
, it must be ScoreShippingRateInputDraft.CartValue
, it cannot be set.If store
references the same Store the Order is currently assigned to or if you try to remove the value when no Store is currently assigned, a 400
error is returned.
Value to set. If empty, any existing value will be removed.
+ *If store
references the same Store the Order is currently assigned to or if you try to remove the value when no Store is currently assigned, a 400
error is returned.
Value to set. If empty, any existing value will be removed.
+ *If store
references the same Store the Order is currently assigned to or if you try to remove the value when no Store is currently assigned, a 400
error is returned.
id
of the CustomLineItem to update.
Number of Custom Line Items that should transition State.
+ * * @return null|int */ public function getQuantity(); /** - *ResourceIdentifier to a State.
+ *State the Custom Line Item should transition from.
* * @return null|StateResourceIdentifier @@ -43,7 +47,7 @@ public function getQuantity(); public function getFromState(); /** - *ResourceIdentifier to a State.
+ *State the Custom Line Item should transition to.
* * @return null|StateResourceIdentifier @@ -51,6 +55,8 @@ public function getFromState(); public function getToState(); /** + *Date and time (UTC) to perform the State transition.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateActionBuilder.php index 979f1ea6231..f00d3ab8897 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateActionBuilder.php @@ -56,6 +56,8 @@ final class StagedOrderTransitionCustomLineItemStateActionBuilder implements Bui private $actualTransitionDate; /** + *id
of the CustomLineItem to update.
Number of Custom Line Items that should transition State.
+ * * @return null|int */ @@ -74,7 +78,7 @@ public function getQuantity() } /** - *ResourceIdentifier to a State.
+ *State the Custom Line Item should transition from.
* * @return null|StateResourceIdentifier @@ -85,7 +89,7 @@ public function getFromState() } /** - *ResourceIdentifier to a State.
+ *State the Custom Line Item should transition to.
* * @return null|StateResourceIdentifier @@ -96,6 +100,8 @@ public function getToState() } /** + *Date and time (UTC) to perform the State transition.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateActionModel.php index c930d439bab..0f93e81e78a 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateActionModel.php @@ -100,6 +100,8 @@ public function getAction() } /** + *id
of the CustomLineItem to update.
Number of Custom Line Items that should transition State.
+ * * * @return null|int */ @@ -136,7 +140,7 @@ public function getQuantity() } /** - *ResourceIdentifier to a State.
+ *State the Custom Line Item should transition from.
* * * @return null|StateResourceIdentifier @@ -157,7 +161,7 @@ public function getFromState() } /** - *ResourceIdentifier to a State.
+ *State the Custom Line Item should transition to.
* * * @return null|StateResourceIdentifier @@ -178,6 +182,8 @@ public function getToState() } /** + *Date and time (UTC) to perform the State transition.
+ * * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateAction.php index d89d1839beb..cbe49ef9015 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateAction.php @@ -23,19 +23,23 @@ interface StagedOrderTransitionLineItemStateAction extends StagedOrderUpdateActi public const FIELD_ACTUAL_TRANSITION_DATE = 'actualTransitionDate'; /** + *id
of the LineItem to update.
Number of Line Items that should transition State.
+ * * @return null|int */ public function getQuantity(); /** - *ResourceIdentifier to a State.
+ *State the Line Item should transition from.
* * @return null|StateResourceIdentifier @@ -43,7 +47,7 @@ public function getQuantity(); public function getFromState(); /** - *ResourceIdentifier to a State.
+ *State the Line Item should transition to.
* * @return null|StateResourceIdentifier @@ -51,6 +55,8 @@ public function getFromState(); public function getToState(); /** + *Date and time (UTC) to perform the State transition.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateActionBuilder.php index 045bf37714c..4c5edb5bc71 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateActionBuilder.php @@ -56,6 +56,8 @@ final class StagedOrderTransitionLineItemStateActionBuilder implements Builder private $actualTransitionDate; /** + *id
of the LineItem to update.
Number of Line Items that should transition State.
+ * * @return null|int */ @@ -74,7 +78,7 @@ public function getQuantity() } /** - *ResourceIdentifier to a State.
+ *State the Line Item should transition from.
* * @return null|StateResourceIdentifier @@ -85,7 +89,7 @@ public function getFromState() } /** - *ResourceIdentifier to a State.
+ *State the Line Item should transition to.
* * @return null|StateResourceIdentifier @@ -96,6 +100,8 @@ public function getToState() } /** + *Date and time (UTC) to perform the State transition.
+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateActionModel.php index 5afcda79993..8e24d307a4e 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateActionModel.php @@ -100,6 +100,8 @@ public function getAction() } /** + *id
of the LineItem to update.
Number of Line Items that should transition State.
+ * * * @return null|int */ @@ -136,7 +140,7 @@ public function getQuantity() } /** - *ResourceIdentifier to a State.
+ *State the Line Item should transition from.
* * * @return null|StateResourceIdentifier @@ -157,7 +161,7 @@ public function getFromState() } /** - *ResourceIdentifier to a State.
+ *State the Line Item should transition to.
* * * @return null|StateResourceIdentifier @@ -178,6 +182,8 @@ public function getToState() } /** + *Date and time (UTC) to perform the State transition.
+ * * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionStateAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionStateAction.php index b12e3c1caee..213db8762aa 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionStateAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionStateAction.php @@ -19,7 +19,8 @@ interface StagedOrderTransitionStateAction extends StagedOrderUpdateAction public const FIELD_FORCE = 'force'; /** - *ResourceIdentifier to a State.
+ *Value to set. + * If there is no State yet, the new State must be an initial State.
* * @return null|StateResourceIdentifier @@ -27,6 +28,8 @@ interface StagedOrderTransitionStateAction extends StagedOrderUpdateAction public function getState(); /** + *Set to true
to turn off validation.
ResourceIdentifier to a State.
+ *Value to set. + * If there is no State yet, the new State must be an initial State.
* * @return null|StateResourceIdentifier @@ -48,6 +49,8 @@ public function getState() } /** + *Set to true
to turn off validation.
ResourceIdentifier to a State.
+ *Value to set. + * If there is no State yet, the new State must be an initial State.
* * * @return null|StateResourceIdentifier @@ -96,6 +97,8 @@ public function getState() } /** + *Set to true
to turn off validation.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
The new Address with the same key
as the Address it will replace.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
The new Address with the same key
as the Address it will replace.
Polymorphic base type that represents a postal address and contact details.
- * Depending on the read or write action, it can be either Address or AddressDraft that
- * only differ in the data type for the optional custom
field.
The new Address with the same key
as the Address it will replace.
ResourceIdentifier to a Channel.
+ *Set this to identify an external order instance, file, or other resource.
* - * @return null|ChannelResourceIdentifier + * @return null|string */ - public function getChannel(); + public function getExternalId(); /** + *The synchronization destination to set. Must not be empty.
+ * The referenced Channel must have the Channel Role OrderExport
or OrderImport
.
+ * Otherwise this update action returns an InvalidInput error.
If not set, it defaults to the current date and time.
+ * * @return null|DateTimeImmutable */ public function getSyncedAt(); /** - * @param ?ChannelResourceIdentifier $channel + * @param ?string $externalId */ - public function setChannel(?ChannelResourceIdentifier $channel): void; + public function setExternalId(?string $externalId): void; /** - * @param ?string $externalId + * @param ?ChannelResourceIdentifier $channel */ - public function setExternalId(?string $externalId): void; + public function setChannel(?ChannelResourceIdentifier $channel): void; /** * @param ?DateTimeImmutable $syncedAt diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderUpdateSyncInfoActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderUpdateSyncInfoActionBuilder.php index 91409805290..feb683543c1 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderUpdateSyncInfoActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderUpdateSyncInfoActionBuilder.php @@ -27,15 +27,15 @@ final class StagedOrderUpdateSyncInfoActionBuilder implements Builder { /** - * @var null|ChannelResourceIdentifier|ChannelResourceIdentifierBuilder + * @var ?string */ - private $channel; + private $externalId; /** - * @var ?string + * @var null|ChannelResourceIdentifier|ChannelResourceIdentifierBuilder */ - private $externalId; + private $channel; /** @@ -44,26 +44,32 @@ final class StagedOrderUpdateSyncInfoActionBuilder implements Builder private $syncedAt; /** - *ResourceIdentifier to a Channel.
+ *Set this to identify an external order instance, file, or other resource.
* - * @return null|ChannelResourceIdentifier + * @return null|string */ - public function getChannel() + public function getExternalId() { - return $this->channel instanceof ChannelResourceIdentifierBuilder ? $this->channel->build() : $this->channel; + return $this->externalId; } /** + *The synchronization destination to set. Must not be empty.
+ * The referenced Channel must have the Channel Role OrderExport
or OrderImport
.
+ * Otherwise this update action returns an InvalidInput error.
If not set, it defaults to the current date and time.
+ * * @return null|DateTimeImmutable */ @@ -73,23 +79,23 @@ public function getSyncedAt() } /** - * @param ?ChannelResourceIdentifier $channel + * @param ?string $externalId * @return $this */ - public function withChannel(?ChannelResourceIdentifier $channel) + public function withExternalId(?string $externalId) { - $this->channel = $channel; + $this->externalId = $externalId; return $this; } /** - * @param ?string $externalId + * @param ?ChannelResourceIdentifier $channel * @return $this */ - public function withExternalId(?string $externalId) + public function withChannel(?ChannelResourceIdentifier $channel) { - $this->externalId = $externalId; + $this->channel = $channel; return $this; } @@ -119,8 +125,8 @@ public function withChannelBuilder(?ChannelResourceIdentifierBuilder $channel) public function build(): StagedOrderUpdateSyncInfoAction { return new StagedOrderUpdateSyncInfoActionModel( - $this->channel instanceof ChannelResourceIdentifierBuilder ? $this->channel->build() : $this->channel, $this->externalId, + $this->channel instanceof ChannelResourceIdentifierBuilder ? $this->channel->build() : $this->channel, $this->syncedAt ); } diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderUpdateSyncInfoActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderUpdateSyncInfoActionModel.php index 8c917d935d5..53878173abb 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderUpdateSyncInfoActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderUpdateSyncInfoActionModel.php @@ -33,15 +33,15 @@ final class StagedOrderUpdateSyncInfoActionModel extends JsonObjectModel impleme /** * - * @var ?ChannelResourceIdentifier + * @var ?string */ - protected $channel; + protected $externalId; /** * - * @var ?string + * @var ?ChannelResourceIdentifier */ - protected $externalId; + protected $channel; /** * @@ -54,13 +54,13 @@ final class StagedOrderUpdateSyncInfoActionModel extends JsonObjectModel impleme * @psalm-suppress MissingParamType */ public function __construct( - ?ChannelResourceIdentifier $channel = null, ?string $externalId = null, + ?ChannelResourceIdentifier $channel = null, ?DateTimeImmutable $syncedAt = null, ?string $action = null ) { - $this->channel = $channel; $this->externalId = $externalId; + $this->channel = $channel; $this->syncedAt = $syncedAt; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -84,45 +84,51 @@ public function getAction() } /** - *ResourceIdentifier to a Channel.
+ *Set this to identify an external order instance, file, or other resource.
* * - * @return null|ChannelResourceIdentifier + * @return null|string */ - public function getChannel() + public function getExternalId() { - if (is_null($this->channel)) { - /** @psalm-var stdClass|arrayThe synchronization destination to set. Must not be empty.
+ * The referenced Channel must have the Channel Role OrderExport
or OrderImport
.
+ * Otherwise this update action returns an InvalidInput error.
If not set, it defaults to the current date and time.
+ * * * @return null|DateTimeImmutable */ @@ -146,19 +152,19 @@ public function getSyncedAt() /** - * @param ?ChannelResourceIdentifier $channel + * @param ?string $externalId */ - public function setChannel(?ChannelResourceIdentifier $channel): void + public function setExternalId(?string $externalId): void { - $this->channel = $channel; + $this->externalId = $externalId; } /** - * @param ?string $externalId + * @param ?ChannelResourceIdentifier $channel */ - public function setExternalId(?string $externalId): void + public function setChannel(?ChannelResourceIdentifier $channel): void { - $this->externalId = $externalId; + $this->channel = $channel; } /** diff --git a/references.txt b/references.txt index 7f8ab7506bd..b8aaba98d43 100644 --- a/references.txt +++ b/references.txt @@ -70,3 +70,4 @@ cf1efa8eee337b806a5a943b0e44af7d890e4802 cc581bbaa4c907418e64d72d70a1b17ef1297638 e40afdfd0ae914b593926d478cb307e9a3b7328b da31e9917b314501c2a67a8e3bc2e6dfe9c228ca +409fe5dd4ae936941f2654ae5fa5598ea983d3ac From a0d534d351f48da57bef05efdc4d10d31917fe54 Mon Sep 17 00:00:00 2001 From: Auto Mationid
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Using positive or negative quantities increases or decreases the number of items shipped to an address.
* @@ -37,6 +46,11 @@ public function getTargetsDelta(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?ItemShippingTargetCollection $targetsDelta */ diff --git a/lib/commercetools-api/src/Models/Cart/CartApplyDeltaToCustomLineItemShippingDetailsTargetsActionBuilder.php b/lib/commercetools-api/src/Models/Cart/CartApplyDeltaToCustomLineItemShippingDetailsTargetsActionBuilder.php index 84c742d5a32..58d8a6e5bf7 100644 --- a/lib/commercetools-api/src/Models/Cart/CartApplyDeltaToCustomLineItemShippingDetailsTargetsActionBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/CartApplyDeltaToCustomLineItemShippingDetailsTargetsActionBuilder.php @@ -26,6 +26,12 @@ final class CartApplyDeltaToCustomLineItemShippingDetailsTargetsActionBuilder im */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var ?ItemShippingTargetCollection @@ -33,7 +39,7 @@ final class CartApplyDeltaToCustomLineItemShippingDetailsTargetsActionBuilder im private $targetsDelta; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Using positive or negative quantities increases or decreases the number of items shipped to an address.
* @@ -65,6 +82,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?ItemShippingTargetCollection $targetsDelta * @return $this @@ -81,6 +109,7 @@ public function build(): CartApplyDeltaToCustomLineItemShippingDetailsTargetsAct { return new CartApplyDeltaToCustomLineItemShippingDetailsTargetsActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->targetsDelta ); } diff --git a/lib/commercetools-api/src/Models/Cart/CartApplyDeltaToCustomLineItemShippingDetailsTargetsActionModel.php b/lib/commercetools-api/src/Models/Cart/CartApplyDeltaToCustomLineItemShippingDetailsTargetsActionModel.php index e98e62e768e..f6da20fdfc9 100644 --- a/lib/commercetools-api/src/Models/Cart/CartApplyDeltaToCustomLineItemShippingDetailsTargetsActionModel.php +++ b/lib/commercetools-api/src/Models/Cart/CartApplyDeltaToCustomLineItemShippingDetailsTargetsActionModel.php @@ -32,6 +32,12 @@ final class CartApplyDeltaToCustomLineItemShippingDetailsTargetsActionModel exte */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?ItemShippingTargetCollection @@ -44,10 +50,12 @@ final class CartApplyDeltaToCustomLineItemShippingDetailsTargetsActionModel exte */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?ItemShippingTargetCollection $targetsDelta = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->targetsDelta = $targetsDelta; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -71,7 +79,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Using positive or negative quantities increases or decreases the number of items shipped to an address.
* @@ -119,6 +147,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?ItemShippingTargetCollection $targetsDelta */ diff --git a/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemMoneyAction.php b/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemMoneyAction.php index 419d56d67ea..fd1119a56b5 100644 --- a/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemMoneyAction.php +++ b/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemMoneyAction.php @@ -15,16 +15,25 @@ interface CartChangeCustomLineItemMoneyAction extends CartUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_MONEY = 'money'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. Must not be empty. Can be a negative amount.
* @@ -38,6 +47,11 @@ public function getMoney(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?Money $money */ diff --git a/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemMoneyActionBuilder.php b/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemMoneyActionBuilder.php index 0614170f5a8..38ca8e854bf 100644 --- a/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemMoneyActionBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemMoneyActionBuilder.php @@ -28,6 +28,12 @@ final class CartChangeCustomLineItemMoneyActionBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var null|Money|MoneyBuilder @@ -35,7 +41,7 @@ final class CartChangeCustomLineItemMoneyActionBuilder implements Builder private $money; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. Must not be empty. Can be a negative amount.
* @@ -67,6 +84,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?Money $money * @return $this @@ -93,6 +121,7 @@ public function build(): CartChangeCustomLineItemMoneyAction { return new CartChangeCustomLineItemMoneyActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->money instanceof MoneyBuilder ? $this->money->build() : $this->money ); } diff --git a/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemMoneyActionModel.php b/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemMoneyActionModel.php index 0ef0a2a6cc7..bafb5858ecd 100644 --- a/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemMoneyActionModel.php +++ b/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemMoneyActionModel.php @@ -34,6 +34,12 @@ final class CartChangeCustomLineItemMoneyActionModel extends JsonObjectModel imp */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?Money @@ -46,10 +52,12 @@ final class CartChangeCustomLineItemMoneyActionModel extends JsonObjectModel imp */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?Money $money = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->money = $money; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -73,7 +81,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. Must not be empty. Can be a negative amount.
* @@ -122,6 +150,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?Money $money */ diff --git a/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemPriceModeAction.php b/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemPriceModeAction.php index 1fabc298f09..ff255dcc3a8 100644 --- a/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemPriceModeAction.php +++ b/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemPriceModeAction.php @@ -14,16 +14,25 @@ interface CartChangeCustomLineItemPriceModeAction extends CartUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_MODE = 'mode'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
New value to set. Must not be empty.
* @@ -37,6 +46,11 @@ public function getMode(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?string $mode */ diff --git a/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemPriceModeActionBuilder.php b/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemPriceModeActionBuilder.php index c47abdb6893..8f3c54c4b97 100644 --- a/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemPriceModeActionBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemPriceModeActionBuilder.php @@ -26,6 +26,12 @@ final class CartChangeCustomLineItemPriceModeActionBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var ?string @@ -33,7 +39,7 @@ final class CartChangeCustomLineItemPriceModeActionBuilder implements Builder private $mode; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
New value to set. Must not be empty.
* @@ -65,6 +82,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?string $mode * @return $this @@ -81,6 +109,7 @@ public function build(): CartChangeCustomLineItemPriceModeAction { return new CartChangeCustomLineItemPriceModeActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->mode ); } diff --git a/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemPriceModeActionModel.php b/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemPriceModeActionModel.php index db255e637eb..b8fb6af3bd8 100644 --- a/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemPriceModeActionModel.php +++ b/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemPriceModeActionModel.php @@ -32,6 +32,12 @@ final class CartChangeCustomLineItemPriceModeActionModel extends JsonObjectModel */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?string @@ -44,10 +50,12 @@ final class CartChangeCustomLineItemPriceModeActionModel extends JsonObjectModel */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?string $mode = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->mode = $mode; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -71,7 +79,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
New value to set. Must not be empty.
* @@ -119,6 +147,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?string $mode */ diff --git a/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemQuantityAction.php b/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemQuantityAction.php index b38fd48b565..51e610b70d9 100644 --- a/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemQuantityAction.php +++ b/lib/commercetools-api/src/Models/Cart/CartChangeCustomLineItemQuantityAction.php @@ -14,16 +14,25 @@ interface CartChangeCustomLineItemQuantityAction extends CartUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_QUANTITY = 'quantity'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
New value to set.
*If 0
, the Custom Line Item is removed from the Cart.
id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
New value to set.
*If 0
, the Custom Line Item is removed from the Cart.
id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
New value to set.
*If 0
, the Custom Line Item is removed from the Cart.
id
of the Custom Line Item to remove.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
id
of the Custom Line Item to remove.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
id
of the Custom Line Item to remove.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Name of the Custom Field.
* @@ -48,6 +57,11 @@ public function getValue(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?string $name */ diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldActionBuilder.php index 6d57081bd99..602bd875f2c 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldActionBuilder.php @@ -26,6 +26,12 @@ final class CartSetCustomLineItemCustomFieldActionBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var ?string @@ -39,7 +45,7 @@ final class CartSetCustomLineItemCustomFieldActionBuilder implements Builder private $value; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Name of the Custom Field.
* @@ -84,6 +101,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?string $name * @return $this @@ -111,6 +139,7 @@ public function build(): CartSetCustomLineItemCustomFieldAction { return new CartSetCustomLineItemCustomFieldActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->name, $this->value ); diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldActionModel.php index a261f3e49e0..07003e8b31a 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldActionModel.php @@ -32,6 +32,12 @@ final class CartSetCustomLineItemCustomFieldActionModel extends JsonObjectModel */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?string @@ -50,11 +56,13 @@ final class CartSetCustomLineItemCustomFieldActionModel extends JsonObjectModel */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?string $name = null, $value = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->name = $name; $this->value = $value; $this->action = $action ?? self::DISCRIMINATOR_VALUE; @@ -79,7 +87,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Name of the Custom Field.
* @@ -149,6 +177,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?string $name */ diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomTypeAction.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomTypeAction.php index c5434ec77d3..7c30a47ece3 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomTypeAction.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomTypeAction.php @@ -16,17 +16,26 @@ interface CartSetCustomLineItemCustomTypeAction extends CartUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_TYPE = 'type'; public const FIELD_FIELDS = 'fields'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Defines the Type that extends the CustomLineItem with Custom Fields. * If absent, any existing Type and Custom Fields are removed from the CustomLineItem.
@@ -49,6 +58,11 @@ public function getFields(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?TypeResourceIdentifier $type */ diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomTypeActionBuilder.php index a3ac17e123a..6dd67ed3928 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomTypeActionBuilder.php @@ -30,6 +30,12 @@ final class CartSetCustomLineItemCustomTypeActionBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var null|TypeResourceIdentifier|TypeResourceIdentifierBuilder @@ -43,7 +49,7 @@ final class CartSetCustomLineItemCustomTypeActionBuilder implements Builder private $fields; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Defines the Type that extends the CustomLineItem with Custom Fields. * If absent, any existing Type and Custom Fields are removed from the CustomLineItem.
@@ -87,6 +104,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?TypeResourceIdentifier $type * @return $this @@ -135,6 +163,7 @@ public function build(): CartSetCustomLineItemCustomTypeAction { return new CartSetCustomLineItemCustomTypeActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->type instanceof TypeResourceIdentifierBuilder ? $this->type->build() : $this->type, $this->fields instanceof FieldContainerBuilder ? $this->fields->build() : $this->fields ); diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomTypeActionModel.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomTypeActionModel.php index bdad2655931..12829c4a627 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomTypeActionModel.php @@ -36,6 +36,12 @@ final class CartSetCustomLineItemCustomTypeActionModel extends JsonObjectModel i */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?TypeResourceIdentifier @@ -54,11 +60,13 @@ final class CartSetCustomLineItemCustomTypeActionModel extends JsonObjectModel i */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?TypeResourceIdentifier $type = null, ?FieldContainer $fields = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->type = $type; $this->fields = $fields; $this->action = $action ?? self::DISCRIMINATOR_VALUE; @@ -83,7 +91,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Defines the Type that extends the CustomLineItem with Custom Fields. * If absent, any existing Type and Custom Fields are removed from the CustomLineItem.
@@ -154,6 +182,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?TypeResourceIdentifier $type */ diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemShippingDetailsAction.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemShippingDetailsAction.php index 8a0ba788a54..2324cca8879 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemShippingDetailsAction.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemShippingDetailsAction.php @@ -14,16 +14,25 @@ interface CartSetCustomLineItemShippingDetailsAction extends CartUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_SHIPPING_DETAILS = 'shippingDetails'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, any existing value is removed.
@@ -38,6 +47,11 @@ public function getShippingDetails(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?ItemShippingDetailsDraft $shippingDetails */ diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemShippingDetailsActionBuilder.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemShippingDetailsActionBuilder.php index 99064ad75c1..19ad3e87136 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemShippingDetailsActionBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemShippingDetailsActionBuilder.php @@ -26,6 +26,12 @@ final class CartSetCustomLineItemShippingDetailsActionBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var null|ItemShippingDetailsDraft|ItemShippingDetailsDraftBuilder @@ -33,7 +39,7 @@ final class CartSetCustomLineItemShippingDetailsActionBuilder implements Builder private $shippingDetails; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, any existing value is removed.
@@ -66,6 +83,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?ItemShippingDetailsDraft $shippingDetails * @return $this @@ -92,6 +120,7 @@ public function build(): CartSetCustomLineItemShippingDetailsAction { return new CartSetCustomLineItemShippingDetailsActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->shippingDetails instanceof ItemShippingDetailsDraftBuilder ? $this->shippingDetails->build() : $this->shippingDetails ); } diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemShippingDetailsActionModel.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemShippingDetailsActionModel.php index 634594746b9..e275981ec95 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemShippingDetailsActionModel.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemShippingDetailsActionModel.php @@ -32,6 +32,12 @@ final class CartSetCustomLineItemShippingDetailsActionModel extends JsonObjectMo */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?ItemShippingDetailsDraft @@ -44,10 +50,12 @@ final class CartSetCustomLineItemShippingDetailsActionModel extends JsonObjectMo */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?ItemShippingDetailsDraft $shippingDetails = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->shippingDetails = $shippingDetails; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -71,7 +79,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, any existing value is removed.
@@ -121,6 +149,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?ItemShippingDetailsDraft $shippingDetails */ diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxAmountAction.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxAmountAction.php index 4f0d377c066..6e6d2ecee6f 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxAmountAction.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxAmountAction.php @@ -14,16 +14,25 @@ interface CartSetCustomLineItemTaxAmountAction extends CartUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_EXTERNAL_TAX_AMOUNT = 'externalTaxAmount'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, any existing value is removed.
@@ -38,6 +47,11 @@ public function getExternalTaxAmount(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?ExternalTaxAmountDraft $externalTaxAmount */ diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxAmountActionBuilder.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxAmountActionBuilder.php index e65c635fb91..4c86ed294eb 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxAmountActionBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxAmountActionBuilder.php @@ -26,6 +26,12 @@ final class CartSetCustomLineItemTaxAmountActionBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var null|ExternalTaxAmountDraft|ExternalTaxAmountDraftBuilder @@ -33,7 +39,7 @@ final class CartSetCustomLineItemTaxAmountActionBuilder implements Builder private $externalTaxAmount; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, any existing value is removed.
@@ -66,6 +83,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?ExternalTaxAmountDraft $externalTaxAmount * @return $this @@ -92,6 +120,7 @@ public function build(): CartSetCustomLineItemTaxAmountAction { return new CartSetCustomLineItemTaxAmountActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->externalTaxAmount instanceof ExternalTaxAmountDraftBuilder ? $this->externalTaxAmount->build() : $this->externalTaxAmount ); } diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxAmountActionModel.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxAmountActionModel.php index 1d5c61e85a5..5745acc4691 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxAmountActionModel.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxAmountActionModel.php @@ -32,6 +32,12 @@ final class CartSetCustomLineItemTaxAmountActionModel extends JsonObjectModel im */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?ExternalTaxAmountDraft @@ -44,10 +50,12 @@ final class CartSetCustomLineItemTaxAmountActionModel extends JsonObjectModel im */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?ExternalTaxAmountDraft $externalTaxAmount = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->externalTaxAmount = $externalTaxAmount; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -71,7 +79,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, any existing value is removed.
@@ -121,6 +149,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?ExternalTaxAmountDraft $externalTaxAmount */ diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxRateAction.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxRateAction.php index d220e6b9816..0d606fd2e78 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxRateAction.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxRateAction.php @@ -14,16 +14,25 @@ interface CartSetCustomLineItemTaxRateAction extends CartUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_EXTERNAL_TAX_RATE = 'externalTaxRate'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, an existing value is removed.
@@ -38,6 +47,11 @@ public function getExternalTaxRate(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?ExternalTaxRateDraft $externalTaxRate */ diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxRateActionBuilder.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxRateActionBuilder.php index dc6c3b5434a..15936c0196a 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxRateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxRateActionBuilder.php @@ -26,6 +26,12 @@ final class CartSetCustomLineItemTaxRateActionBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var null|ExternalTaxRateDraft|ExternalTaxRateDraftBuilder @@ -33,7 +39,7 @@ final class CartSetCustomLineItemTaxRateActionBuilder implements Builder private $externalTaxRate; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, an existing value is removed.
@@ -66,6 +83,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?ExternalTaxRateDraft $externalTaxRate * @return $this @@ -92,6 +120,7 @@ public function build(): CartSetCustomLineItemTaxRateAction { return new CartSetCustomLineItemTaxRateActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->externalTaxRate instanceof ExternalTaxRateDraftBuilder ? $this->externalTaxRate->build() : $this->externalTaxRate ); } diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxRateActionModel.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxRateActionModel.php index 0f889b57693..8787c70d6a6 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxRateActionModel.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemTaxRateActionModel.php @@ -32,6 +32,12 @@ final class CartSetCustomLineItemTaxRateActionModel extends JsonObjectModel impl */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?ExternalTaxRateDraft @@ -44,10 +50,12 @@ final class CartSetCustomLineItemTaxRateActionModel extends JsonObjectModel impl */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?ExternalTaxRateDraft $externalTaxRate = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->externalTaxRate = $externalTaxRate; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -71,7 +79,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, an existing value is removed.
@@ -121,6 +149,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?ExternalTaxRateDraft $externalTaxRate */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldAction.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldAction.php index 217bc2dfa67..bb1adc18c1c 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldAction.php @@ -14,17 +14,26 @@ interface OrderSetCustomLineItemCustomFieldAction extends OrderUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_NAME = 'name'; public const FIELD_VALUE = 'value'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Name of the Custom Field.
* @@ -48,6 +57,11 @@ public function getValue(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?string $name */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldActionBuilder.php index f8edeafdb6b..18e6768bebd 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldActionBuilder.php @@ -26,6 +26,12 @@ final class OrderSetCustomLineItemCustomFieldActionBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var ?string @@ -39,7 +45,7 @@ final class OrderSetCustomLineItemCustomFieldActionBuilder implements Builder private $value; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Name of the Custom Field.
* @@ -84,6 +101,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?string $name * @return $this @@ -111,6 +139,7 @@ public function build(): OrderSetCustomLineItemCustomFieldAction { return new OrderSetCustomLineItemCustomFieldActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->name, $this->value ); diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldActionModel.php index d3779b6da6a..8175841573d 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldActionModel.php @@ -32,6 +32,12 @@ final class OrderSetCustomLineItemCustomFieldActionModel extends JsonObjectModel */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?string @@ -50,11 +56,13 @@ final class OrderSetCustomLineItemCustomFieldActionModel extends JsonObjectModel */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?string $name = null, $value = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->name = $name; $this->value = $value; $this->action = $action ?? self::DISCRIMINATOR_VALUE; @@ -79,7 +87,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Name of the Custom Field.
* @@ -149,6 +177,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?string $name */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeAction.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeAction.php index 2758baf5ad4..3c64de5031f 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeAction.php @@ -16,17 +16,26 @@ interface OrderSetCustomLineItemCustomTypeAction extends OrderUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_TYPE = 'type'; public const FIELD_FIELDS = 'fields'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Defines the Type that extends the Custom Line Item with Custom Fields. * If absent, any existing Type and Custom Fields are removed from the Custom Line Item.
@@ -49,6 +58,11 @@ public function getFields(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?TypeResourceIdentifier $type */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeActionBuilder.php index 39e6a7ae20a..8869a14c0a3 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeActionBuilder.php @@ -30,6 +30,12 @@ final class OrderSetCustomLineItemCustomTypeActionBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var null|TypeResourceIdentifier|TypeResourceIdentifierBuilder @@ -43,7 +49,7 @@ final class OrderSetCustomLineItemCustomTypeActionBuilder implements Builder private $fields; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Defines the Type that extends the Custom Line Item with Custom Fields. * If absent, any existing Type and Custom Fields are removed from the Custom Line Item.
@@ -87,6 +104,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?TypeResourceIdentifier $type * @return $this @@ -135,6 +163,7 @@ public function build(): OrderSetCustomLineItemCustomTypeAction { return new OrderSetCustomLineItemCustomTypeActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->type instanceof TypeResourceIdentifierBuilder ? $this->type->build() : $this->type, $this->fields instanceof FieldContainerBuilder ? $this->fields->build() : $this->fields ); diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeActionModel.php index ebaa6dddeee..689612ed9ab 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomTypeActionModel.php @@ -36,6 +36,12 @@ final class OrderSetCustomLineItemCustomTypeActionModel extends JsonObjectModel */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?TypeResourceIdentifier @@ -54,11 +60,13 @@ final class OrderSetCustomLineItemCustomTypeActionModel extends JsonObjectModel */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?TypeResourceIdentifier $type = null, ?FieldContainer $fields = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->type = $type; $this->fields = $fields; $this->action = $action ?? self::DISCRIMINATOR_VALUE; @@ -83,7 +91,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Defines the Type that extends the Custom Line Item with Custom Fields. * If absent, any existing Type and Custom Fields are removed from the Custom Line Item.
@@ -154,6 +182,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?TypeResourceIdentifier $type */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsAction.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsAction.php index 3277b426414..88bd51208ff 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsAction.php @@ -15,16 +15,25 @@ interface OrderSetCustomLineItemShippingDetailsAction extends OrderUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_SHIPPING_DETAILS = 'shippingDetails'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, any existing value is removed.
@@ -39,6 +48,11 @@ public function getShippingDetails(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?ItemShippingDetailsDraft $shippingDetails */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsActionBuilder.php index 4bee7247d20..4d38efa558e 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsActionBuilder.php @@ -28,6 +28,12 @@ final class OrderSetCustomLineItemShippingDetailsActionBuilder implements Builde */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var null|ItemShippingDetailsDraft|ItemShippingDetailsDraftBuilder @@ -35,7 +41,7 @@ final class OrderSetCustomLineItemShippingDetailsActionBuilder implements Builde private $shippingDetails; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, any existing value is removed.
@@ -68,6 +85,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?ItemShippingDetailsDraft $shippingDetails * @return $this @@ -94,6 +122,7 @@ public function build(): OrderSetCustomLineItemShippingDetailsAction { return new OrderSetCustomLineItemShippingDetailsActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->shippingDetails instanceof ItemShippingDetailsDraftBuilder ? $this->shippingDetails->build() : $this->shippingDetails ); } diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsActionModel.php index 27a86378da5..7f25722e6d6 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemShippingDetailsActionModel.php @@ -34,6 +34,12 @@ final class OrderSetCustomLineItemShippingDetailsActionModel extends JsonObjectM */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?ItemShippingDetailsDraft @@ -46,10 +52,12 @@ final class OrderSetCustomLineItemShippingDetailsActionModel extends JsonObjectM */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?ItemShippingDetailsDraft $shippingDetails = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->shippingDetails = $shippingDetails; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -73,7 +81,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, any existing value is removed.
@@ -123,6 +151,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?ItemShippingDetailsDraft $shippingDetails */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyAction.php index d7cb0e7fc9b..e01124e5f57 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyAction.php @@ -16,16 +16,25 @@ interface StagedOrderChangeCustomLineItemMoneyAction extends StagedOrderUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_MONEY = 'money'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * Must not be empty. @@ -41,6 +50,11 @@ public function getMoney(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?Money $money */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyActionBuilder.php index a660b40ba9a..121e756aabc 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyActionBuilder.php @@ -30,6 +30,12 @@ final class StagedOrderChangeCustomLineItemMoneyActionBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var null|Money|MoneyBuilder @@ -37,7 +43,7 @@ final class StagedOrderChangeCustomLineItemMoneyActionBuilder implements Builder private $money; /** - *
id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * Must not be empty. @@ -71,6 +88,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?Money $money * @return $this @@ -97,6 +125,7 @@ public function build(): StagedOrderChangeCustomLineItemMoneyAction { return new StagedOrderChangeCustomLineItemMoneyActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->money instanceof MoneyBuilder ? $this->money->build() : $this->money ); } diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyActionModel.php index 3428966ca7d..ed2c0c327a4 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemMoneyActionModel.php @@ -36,6 +36,12 @@ final class StagedOrderChangeCustomLineItemMoneyActionModel extends JsonObjectMo */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?Money @@ -48,10 +54,12 @@ final class StagedOrderChangeCustomLineItemMoneyActionModel extends JsonObjectMo */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?Money $money = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->money = $money; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -75,7 +83,7 @@ public function getAction() } /** - *
id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * Must not be empty. @@ -126,6 +154,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?Money $money */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemQuantityAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemQuantityAction.php index 8b485e18764..f82704a77eb 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemQuantityAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderChangeCustomLineItemQuantityAction.php @@ -15,16 +15,25 @@ interface StagedOrderChangeCustomLineItemQuantityAction extends StagedOrderUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_QUANTITY = 'quantity'; /** - *
id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
New value to set.
* If 0
, the Custom Line Item is removed from the Order.
id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
New value to set.
* If 0
, the Custom Line Item is removed from the Order.
id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
New value to set.
* If 0
, the Custom Line Item is removed from the Order.
id
of the Custom Line Item to remove.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
id
of the Custom Line Item to remove.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
id
of the Custom Line Item to remove.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Name of the Custom Field.
* @@ -49,6 +58,11 @@ public function getValue(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?string $name */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldActionBuilder.php index 4e5cd02538d..fb1313390e5 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldActionBuilder.php @@ -28,6 +28,12 @@ final class StagedOrderSetCustomLineItemCustomFieldActionBuilder implements Buil */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var ?string @@ -41,7 +47,7 @@ final class StagedOrderSetCustomLineItemCustomFieldActionBuilder implements Buil private $value; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Name of the Custom Field.
* @@ -86,6 +103,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?string $name * @return $this @@ -113,6 +141,7 @@ public function build(): StagedOrderSetCustomLineItemCustomFieldAction { return new StagedOrderSetCustomLineItemCustomFieldActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->name, $this->value ); diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldActionModel.php index 3b6b5636787..8176e530519 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldActionModel.php @@ -34,6 +34,12 @@ final class StagedOrderSetCustomLineItemCustomFieldActionModel extends JsonObjec */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?string @@ -52,11 +58,13 @@ final class StagedOrderSetCustomLineItemCustomFieldActionModel extends JsonObjec */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?string $name = null, $value = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->name = $name; $this->value = $value; $this->action = $action ?? self::DISCRIMINATOR_VALUE; @@ -81,7 +89,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Name of the Custom Field.
* @@ -151,6 +179,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?string $name */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeAction.php index bb143a0e3ec..38fec38105f 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeAction.php @@ -17,17 +17,26 @@ interface StagedOrderSetCustomLineItemCustomTypeAction extends StagedOrderUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_TYPE = 'type'; public const FIELD_FIELDS = 'fields'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Defines the Type that extends the Custom Line Item with Custom Fields. * If absent, any existing Type and Custom Fields are removed from the Custom Line Item.
@@ -50,6 +59,11 @@ public function getFields(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?TypeResourceIdentifier $type */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeActionBuilder.php index 6ac9ddb09bd..93e4cf8ad2f 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeActionBuilder.php @@ -32,6 +32,12 @@ final class StagedOrderSetCustomLineItemCustomTypeActionBuilder implements Build */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var null|TypeResourceIdentifier|TypeResourceIdentifierBuilder @@ -45,7 +51,7 @@ final class StagedOrderSetCustomLineItemCustomTypeActionBuilder implements Build private $fields; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Defines the Type that extends the Custom Line Item with Custom Fields. * If absent, any existing Type and Custom Fields are removed from the Custom Line Item.
@@ -89,6 +106,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?TypeResourceIdentifier $type * @return $this @@ -137,6 +165,7 @@ public function build(): StagedOrderSetCustomLineItemCustomTypeAction { return new StagedOrderSetCustomLineItemCustomTypeActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->type instanceof TypeResourceIdentifierBuilder ? $this->type->build() : $this->type, $this->fields instanceof FieldContainerBuilder ? $this->fields->build() : $this->fields ); diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeActionModel.php index dbffc0a9e97..05e1d26d8ee 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomTypeActionModel.php @@ -38,6 +38,12 @@ final class StagedOrderSetCustomLineItemCustomTypeActionModel extends JsonObject */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?TypeResourceIdentifier @@ -56,11 +62,13 @@ final class StagedOrderSetCustomLineItemCustomTypeActionModel extends JsonObject */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?TypeResourceIdentifier $type = null, ?FieldContainer $fields = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->type = $type; $this->fields = $fields; $this->action = $action ?? self::DISCRIMINATOR_VALUE; @@ -85,7 +93,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Defines the Type that extends the Custom Line Item with Custom Fields. * If absent, any existing Type and Custom Fields are removed from the Custom Line Item.
@@ -156,6 +184,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?TypeResourceIdentifier $type */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsAction.php index c689fd3db61..f56242535f8 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsAction.php @@ -16,16 +16,25 @@ interface StagedOrderSetCustomLineItemShippingDetailsAction extends StagedOrderUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_SHIPPING_DETAILS = 'shippingDetails'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, any existing value is removed.
@@ -40,6 +49,11 @@ public function getShippingDetails(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?ItemShippingDetailsDraft $shippingDetails */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsActionBuilder.php index 76cf041d506..235fe20a0d3 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsActionBuilder.php @@ -30,6 +30,12 @@ final class StagedOrderSetCustomLineItemShippingDetailsActionBuilder implements */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var null|ItemShippingDetailsDraft|ItemShippingDetailsDraftBuilder @@ -37,7 +43,7 @@ final class StagedOrderSetCustomLineItemShippingDetailsActionBuilder implements private $shippingDetails; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, any existing value is removed.
@@ -70,6 +87,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?ItemShippingDetailsDraft $shippingDetails * @return $this @@ -96,6 +124,7 @@ public function build(): StagedOrderSetCustomLineItemShippingDetailsAction { return new StagedOrderSetCustomLineItemShippingDetailsActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->shippingDetails instanceof ItemShippingDetailsDraftBuilder ? $this->shippingDetails->build() : $this->shippingDetails ); } diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsActionModel.php index f583b723dba..7cb9a5f5148 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemShippingDetailsActionModel.php @@ -36,6 +36,12 @@ final class StagedOrderSetCustomLineItemShippingDetailsActionModel extends JsonO */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?ItemShippingDetailsDraft @@ -48,10 +54,12 @@ final class StagedOrderSetCustomLineItemShippingDetailsActionModel extends JsonO */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?ItemShippingDetailsDraft $shippingDetails = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->shippingDetails = $shippingDetails; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -75,7 +83,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, any existing value is removed.
@@ -125,6 +153,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?ItemShippingDetailsDraft $shippingDetails */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountAction.php index bf4900678a1..daaac2daa42 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountAction.php @@ -16,16 +16,25 @@ interface StagedOrderSetCustomLineItemTaxAmountAction extends StagedOrderUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_EXTERNAL_TAX_AMOUNT = 'externalTaxAmount'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, any existing value is removed.
@@ -40,6 +49,11 @@ public function getExternalTaxAmount(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?ExternalTaxAmountDraft $externalTaxAmount */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountActionBuilder.php index 2b669cfcf8f..bb78f772258 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountActionBuilder.php @@ -30,6 +30,12 @@ final class StagedOrderSetCustomLineItemTaxAmountActionBuilder implements Builde */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var null|ExternalTaxAmountDraft|ExternalTaxAmountDraftBuilder @@ -37,7 +43,7 @@ final class StagedOrderSetCustomLineItemTaxAmountActionBuilder implements Builde private $externalTaxAmount; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, any existing value is removed.
@@ -70,6 +87,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?ExternalTaxAmountDraft $externalTaxAmount * @return $this @@ -96,6 +124,7 @@ public function build(): StagedOrderSetCustomLineItemTaxAmountAction { return new StagedOrderSetCustomLineItemTaxAmountActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->externalTaxAmount instanceof ExternalTaxAmountDraftBuilder ? $this->externalTaxAmount->build() : $this->externalTaxAmount ); } diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountActionModel.php index 5e72d851391..33b0b8ad43b 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxAmountActionModel.php @@ -36,6 +36,12 @@ final class StagedOrderSetCustomLineItemTaxAmountActionModel extends JsonObjectM */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?ExternalTaxAmountDraft @@ -48,10 +54,12 @@ final class StagedOrderSetCustomLineItemTaxAmountActionModel extends JsonObjectM */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?ExternalTaxAmountDraft $externalTaxAmount = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->externalTaxAmount = $externalTaxAmount; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -75,7 +83,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, any existing value is removed.
@@ -125,6 +153,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?ExternalTaxAmountDraft $externalTaxAmount */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateAction.php index 7935559056a..1c2c8ad36cd 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateAction.php @@ -16,16 +16,25 @@ interface StagedOrderSetCustomLineItemTaxRateAction extends StagedOrderUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_EXTERNAL_TAX_RATE = 'externalTaxRate'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, an existing value is removed.
@@ -40,6 +49,11 @@ public function getExternalTaxRate(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?ExternalTaxRateDraft $externalTaxRate */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateActionBuilder.php index 0d3f65b33d8..ee1e8ba51da 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateActionBuilder.php @@ -30,6 +30,12 @@ final class StagedOrderSetCustomLineItemTaxRateActionBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var null|ExternalTaxRateDraft|ExternalTaxRateDraftBuilder @@ -37,7 +43,7 @@ final class StagedOrderSetCustomLineItemTaxRateActionBuilder implements Builder private $externalTaxRate; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, an existing value is removed.
@@ -70,6 +87,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?ExternalTaxRateDraft $externalTaxRate * @return $this @@ -96,6 +124,7 @@ public function build(): StagedOrderSetCustomLineItemTaxRateAction { return new StagedOrderSetCustomLineItemTaxRateActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->externalTaxRate instanceof ExternalTaxRateDraftBuilder ? $this->externalTaxRate->build() : $this->externalTaxRate ); } diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateActionModel.php index 9bd06c69556..4259b289fce 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemTaxRateActionModel.php @@ -36,6 +36,12 @@ final class StagedOrderSetCustomLineItemTaxRateActionModel extends JsonObjectMod */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?ExternalTaxRateDraft @@ -48,10 +54,12 @@ final class StagedOrderSetCustomLineItemTaxRateActionModel extends JsonObjectMod */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?ExternalTaxRateDraft $externalTaxRate = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->externalTaxRate = $externalTaxRate; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -75,7 +83,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Value to set. * If empty, an existing value is removed.
@@ -125,6 +153,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?ExternalTaxRateDraft $externalTaxRate */ diff --git a/references.txt b/references.txt index b8aaba98d43..f3e931f7815 100644 --- a/references.txt +++ b/references.txt @@ -71,3 +71,4 @@ cc581bbaa4c907418e64d72d70a1b17ef1297638 e40afdfd0ae914b593926d478cb307e9a3b7328b da31e9917b314501c2a67a8e3bc2e6dfe9c228ca 409fe5dd4ae936941f2654ae5fa5598ea983d3ac +e67d95b62824670b34d2441b151b4a4540c650fd From 567b845f3b0b9df50c328e59e30ad49c12f464ab Mon Sep 17 00:00:00 2001 From: Auto MationUser-defined unique identifier of the LineItem.
+ * + + * @return null|string + */ + public function getLineItemKey(); + /** *Date and time (UTC) when the transition of the Line Item State was performed.
* @@ -66,6 +75,11 @@ public function getToState(); */ public function setLineItemId(?string $lineItemId): void; + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void; + /** * @param ?DateTimeImmutable $transitionDate */ diff --git a/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessageBuilder.php b/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessageBuilder.php index 44037716006..3ae87c23402 100644 --- a/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessageBuilder.php +++ b/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessageBuilder.php @@ -95,6 +95,12 @@ final class LineItemStateTransitionMessageBuilder implements Builder */ private $lineItemId; + /** + + * @var ?string + */ + private $lineItemKey; + /** * @var ?DateTimeImmutable @@ -241,6 +247,17 @@ public function getLineItemId() return $this->lineItemId; } + /** + *User-defined unique identifier of the LineItem.
+ * + + * @return null|string + */ + public function getLineItemKey() + { + return $this->lineItemKey; + } + /** *Date and time (UTC) when the transition of the Line Item State was performed.
* @@ -406,6 +423,17 @@ public function withLineItemId(?string $lineItemId) return $this; } + /** + * @param ?string $lineItemKey + * @return $this + */ + public function withLineItemKey(?string $lineItemKey) + { + $this->lineItemKey = $lineItemKey; + + return $this; + } + /** * @param ?DateTimeImmutable $transitionDate * @return $this @@ -530,6 +558,7 @@ public function build(): LineItemStateTransitionMessage $this->resourceVersion, $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, $this->lineItemId, + $this->lineItemKey, $this->transitionDate, $this->quantity, $this->fromState instanceof StateReferenceBuilder ? $this->fromState->build() : $this->fromState, diff --git a/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessageModel.php b/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessageModel.php index 03d49e2d289..f1ba284f1ba 100644 --- a/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessageModel.php +++ b/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessageModel.php @@ -101,6 +101,12 @@ final class LineItemStateTransitionMessageModel extends JsonObjectModel implemen */ protected $lineItemId; + /** + * + * @var ?string + */ + protected $lineItemKey; + /** * * @var ?DateTimeImmutable @@ -141,6 +147,7 @@ public function __construct( ?int $resourceVersion = null, ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers = null, ?string $lineItemId = null, + ?string $lineItemKey = null, ?DateTimeImmutable $transitionDate = null, ?int $quantity = null, ?StateReference $fromState = null, @@ -158,6 +165,7 @@ public function __construct( $this->resourceVersion = $resourceVersion; $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; $this->lineItemId = $lineItemId; + $this->lineItemKey = $lineItemKey; $this->transitionDate = $transitionDate; $this->quantity = $quantity; $this->fromState = $fromState; @@ -418,6 +426,26 @@ public function getLineItemId() return $this->lineItemId; } + /** + *User-defined unique identifier of the LineItem.
+ * + * + * @return null|string + */ + public function getLineItemKey() + { + if (is_null($this->lineItemKey)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_LINE_ITEM_KEY); + if (is_null($data)) { + return null; + } + $this->lineItemKey = (string) $data; + } + + return $this->lineItemKey; + } + /** *Date and time (UTC) when the transition of the Line Item State was performed.
* @@ -593,6 +621,14 @@ public function setLineItemId(?string $lineItemId): void $this->lineItemId = $lineItemId; } + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void + { + $this->lineItemKey = $lineItemKey; + } + /** * @param ?DateTimeImmutable $transitionDate */ diff --git a/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessagePayload.php b/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessagePayload.php index f1df497c39a..4c255e18a3f 100644 --- a/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessagePayload.php +++ b/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessagePayload.php @@ -16,6 +16,7 @@ interface LineItemStateTransitionMessagePayload extends OrderMessagePayload { public const FIELD_LINE_ITEM_ID = 'lineItemId'; + public const FIELD_LINE_ITEM_KEY = 'lineItemKey'; public const FIELD_TRANSITION_DATE = 'transitionDate'; public const FIELD_QUANTITY = 'quantity'; public const FIELD_FROM_STATE = 'fromState'; @@ -29,6 +30,14 @@ interface LineItemStateTransitionMessagePayload extends OrderMessagePayload */ public function getLineItemId(); + /** + *User-defined unique identifier of the LineItem.
+ * + + * @return null|string + */ + public function getLineItemKey(); + /** *Date and time (UTC) when the transition of the Line Item State was performed.
* @@ -66,6 +75,11 @@ public function getToState(); */ public function setLineItemId(?string $lineItemId): void; + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void; + /** * @param ?DateTimeImmutable $transitionDate */ diff --git a/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessagePayloadBuilder.php index 95569e2c656..3f49c0e6442 100644 --- a/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessagePayloadBuilder.php +++ b/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessagePayloadBuilder.php @@ -29,6 +29,12 @@ final class LineItemStateTransitionMessagePayloadBuilder implements Builder */ private $lineItemId; + /** + + * @var ?string + */ + private $lineItemKey; + /** * @var ?DateTimeImmutable @@ -64,6 +70,17 @@ public function getLineItemId() return $this->lineItemId; } + /** + *User-defined unique identifier of the LineItem.
+ * + + * @return null|string + */ + public function getLineItemKey() + { + return $this->lineItemKey; + } + /** *Date and time (UTC) when the transition of the Line Item State was performed.
* @@ -119,6 +136,17 @@ public function withLineItemId(?string $lineItemId) return $this; } + /** + * @param ?string $lineItemKey + * @return $this + */ + public function withLineItemKey(?string $lineItemKey) + { + $this->lineItemKey = $lineItemKey; + + return $this; + } + /** * @param ?DateTimeImmutable $transitionDate * @return $this @@ -189,6 +217,7 @@ public function build(): LineItemStateTransitionMessagePayload { return new LineItemStateTransitionMessagePayloadModel( $this->lineItemId, + $this->lineItemKey, $this->transitionDate, $this->quantity, $this->fromState instanceof StateReferenceBuilder ? $this->fromState->build() : $this->fromState, diff --git a/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessagePayloadModel.php index ac54ae0c872..2d507cbec70 100644 --- a/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessagePayloadModel.php +++ b/lib/commercetools-api/src/Models/Message/LineItemStateTransitionMessagePayloadModel.php @@ -35,6 +35,12 @@ final class LineItemStateTransitionMessagePayloadModel extends JsonObjectModel i */ protected $lineItemId; + /** + * + * @var ?string + */ + protected $lineItemKey; + /** * * @var ?DateTimeImmutable @@ -65,6 +71,7 @@ final class LineItemStateTransitionMessagePayloadModel extends JsonObjectModel i */ public function __construct( ?string $lineItemId = null, + ?string $lineItemKey = null, ?DateTimeImmutable $transitionDate = null, ?int $quantity = null, ?StateReference $fromState = null, @@ -72,6 +79,7 @@ public function __construct( ?string $type = null ) { $this->lineItemId = $lineItemId; + $this->lineItemKey = $lineItemKey; $this->transitionDate = $transitionDate; $this->quantity = $quantity; $this->fromState = $fromState; @@ -117,6 +125,26 @@ public function getLineItemId() return $this->lineItemId; } + /** + *User-defined unique identifier of the LineItem.
+ * + * + * @return null|string + */ + public function getLineItemKey() + { + if (is_null($this->lineItemKey)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_LINE_ITEM_KEY); + if (is_null($data)) { + return null; + } + $this->lineItemKey = (string) $data; + } + + return $this->lineItemKey; + } + /** *Date and time (UTC) when the transition of the Line Item State was performed.
* @@ -212,6 +240,14 @@ public function setLineItemId(?string $lineItemId): void $this->lineItemId = $lineItemId; } + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void + { + $this->lineItemKey = $lineItemKey; + } + /** * @param ?DateTimeImmutable $transitionDate */ diff --git a/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessage.php b/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessage.php index 5edaa210699..cfd5fe66f72 100644 --- a/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessage.php +++ b/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessage.php @@ -18,6 +18,7 @@ interface OrderLineItemDiscountSetMessage extends OrderMessage { public const FIELD_LINE_ITEM_ID = 'lineItemId'; + public const FIELD_LINE_ITEM_KEY = 'lineItemKey'; public const FIELD_DISCOUNTED_PRICE_PER_QUANTITY = 'discountedPricePerQuantity'; public const FIELD_TOTAL_PRICE = 'totalPrice'; public const FIELD_TAXED_PRICE = 'taxedPrice'; @@ -31,6 +32,14 @@ interface OrderLineItemDiscountSetMessage extends OrderMessage */ public function getLineItemId(); + /** + *User-defined unique identifier of the LineItem.
+ * + + * @return null|string + */ + public function getLineItemKey(); + /** *Array of DiscountedLineItemPriceForQuantity after the Discount recalculation.
* @@ -68,6 +77,11 @@ public function getTaxedPricePortions(); */ public function setLineItemId(?string $lineItemId): void; + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void; + /** * @param ?DiscountedLineItemPriceForQuantityCollection $discountedPricePerQuantity */ diff --git a/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessageBuilder.php b/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessageBuilder.php index 91724b4f729..ed447c98f4c 100644 --- a/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessageBuilder.php +++ b/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessageBuilder.php @@ -99,6 +99,12 @@ final class OrderLineItemDiscountSetMessageBuilder implements Builder */ private $lineItemId; + /** + + * @var ?string + */ + private $lineItemKey; + /** * @var ?DiscountedLineItemPriceForQuantityCollection @@ -245,6 +251,17 @@ public function getLineItemId() return $this->lineItemId; } + /** + *User-defined unique identifier of the LineItem.
+ * + + * @return null|string + */ + public function getLineItemKey() + { + return $this->lineItemKey; + } + /** *Array of DiscountedLineItemPriceForQuantity after the Discount recalculation.
* @@ -410,6 +427,17 @@ public function withLineItemId(?string $lineItemId) return $this; } + /** + * @param ?string $lineItemKey + * @return $this + */ + public function withLineItemKey(?string $lineItemKey) + { + $this->lineItemKey = $lineItemKey; + + return $this; + } + /** * @param ?DiscountedLineItemPriceForQuantityCollection $discountedPricePerQuantity * @return $this @@ -534,6 +562,7 @@ public function build(): OrderLineItemDiscountSetMessage $this->resourceVersion, $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, $this->lineItemId, + $this->lineItemKey, $this->discountedPricePerQuantity, $this->totalPrice instanceof MoneyBuilder ? $this->totalPrice->build() : $this->totalPrice, $this->taxedPrice instanceof TaxedItemPriceBuilder ? $this->taxedPrice->build() : $this->taxedPrice, diff --git a/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessageModel.php b/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessageModel.php index 89e247189c4..848bf0c0c30 100644 --- a/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessageModel.php +++ b/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessageModel.php @@ -105,6 +105,12 @@ final class OrderLineItemDiscountSetMessageModel extends JsonObjectModel impleme */ protected $lineItemId; + /** + * + * @var ?string + */ + protected $lineItemKey; + /** * * @var ?DiscountedLineItemPriceForQuantityCollection @@ -145,6 +151,7 @@ public function __construct( ?int $resourceVersion = null, ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers = null, ?string $lineItemId = null, + ?string $lineItemKey = null, ?DiscountedLineItemPriceForQuantityCollection $discountedPricePerQuantity = null, ?Money $totalPrice = null, ?TaxedItemPrice $taxedPrice = null, @@ -162,6 +169,7 @@ public function __construct( $this->resourceVersion = $resourceVersion; $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; $this->lineItemId = $lineItemId; + $this->lineItemKey = $lineItemKey; $this->discountedPricePerQuantity = $discountedPricePerQuantity; $this->totalPrice = $totalPrice; $this->taxedPrice = $taxedPrice; @@ -422,6 +430,26 @@ public function getLineItemId() return $this->lineItemId; } + /** + *User-defined unique identifier of the LineItem.
+ * + * + * @return null|string + */ + public function getLineItemKey() + { + if (is_null($this->lineItemKey)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_LINE_ITEM_KEY); + if (is_null($data)) { + return null; + } + $this->lineItemKey = (string) $data; + } + + return $this->lineItemKey; + } + /** *Array of DiscountedLineItemPriceForQuantity after the Discount recalculation.
* @@ -593,6 +621,14 @@ public function setLineItemId(?string $lineItemId): void $this->lineItemId = $lineItemId; } + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void + { + $this->lineItemKey = $lineItemKey; + } + /** * @param ?DiscountedLineItemPriceForQuantityCollection $discountedPricePerQuantity */ diff --git a/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessagePayload.php b/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessagePayload.php index 2e7be7b3b2e..93eff9cde2d 100644 --- a/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessagePayload.php +++ b/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessagePayload.php @@ -18,6 +18,7 @@ interface OrderLineItemDiscountSetMessagePayload extends OrderMessagePayload { public const FIELD_LINE_ITEM_ID = 'lineItemId'; + public const FIELD_LINE_ITEM_KEY = 'lineItemKey'; public const FIELD_DISCOUNTED_PRICE_PER_QUANTITY = 'discountedPricePerQuantity'; public const FIELD_TOTAL_PRICE = 'totalPrice'; public const FIELD_TAXED_PRICE = 'taxedPrice'; @@ -31,6 +32,14 @@ interface OrderLineItemDiscountSetMessagePayload extends OrderMessagePayload */ public function getLineItemId(); + /** + *User-defined unique identifier of the LineItem.
+ * + + * @return null|string + */ + public function getLineItemKey(); + /** *Array of DiscountedLineItemPriceForQuantity after the Discount recalculation.
* @@ -68,6 +77,11 @@ public function getTaxedPricePortions(); */ public function setLineItemId(?string $lineItemId): void; + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void; + /** * @param ?DiscountedLineItemPriceForQuantityCollection $discountedPricePerQuantity */ diff --git a/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessagePayloadBuilder.php index e003e91b3c4..19a6439bcb2 100644 --- a/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessagePayloadBuilder.php +++ b/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessagePayloadBuilder.php @@ -32,6 +32,12 @@ final class OrderLineItemDiscountSetMessagePayloadBuilder implements Builder */ private $lineItemId; + /** + + * @var ?string + */ + private $lineItemKey; + /** * @var ?DiscountedLineItemPriceForQuantityCollection @@ -67,6 +73,17 @@ public function getLineItemId() return $this->lineItemId; } + /** + *User-defined unique identifier of the LineItem.
+ * + + * @return null|string + */ + public function getLineItemKey() + { + return $this->lineItemKey; + } + /** *Array of DiscountedLineItemPriceForQuantity after the Discount recalculation.
* @@ -122,6 +139,17 @@ public function withLineItemId(?string $lineItemId) return $this; } + /** + * @param ?string $lineItemKey + * @return $this + */ + public function withLineItemKey(?string $lineItemKey) + { + $this->lineItemKey = $lineItemKey; + + return $this; + } + /** * @param ?DiscountedLineItemPriceForQuantityCollection $discountedPricePerQuantity * @return $this @@ -192,6 +220,7 @@ public function build(): OrderLineItemDiscountSetMessagePayload { return new OrderLineItemDiscountSetMessagePayloadModel( $this->lineItemId, + $this->lineItemKey, $this->discountedPricePerQuantity, $this->totalPrice instanceof MoneyBuilder ? $this->totalPrice->build() : $this->totalPrice, $this->taxedPrice instanceof TaxedItemPriceBuilder ? $this->taxedPrice->build() : $this->taxedPrice, diff --git a/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessagePayloadModel.php index 0554fdde612..b0d680acc22 100644 --- a/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessagePayloadModel.php +++ b/lib/commercetools-api/src/Models/Message/OrderLineItemDiscountSetMessagePayloadModel.php @@ -38,6 +38,12 @@ final class OrderLineItemDiscountSetMessagePayloadModel extends JsonObjectModel */ protected $lineItemId; + /** + * + * @var ?string + */ + protected $lineItemKey; + /** * * @var ?DiscountedLineItemPriceForQuantityCollection @@ -68,6 +74,7 @@ final class OrderLineItemDiscountSetMessagePayloadModel extends JsonObjectModel */ public function __construct( ?string $lineItemId = null, + ?string $lineItemKey = null, ?DiscountedLineItemPriceForQuantityCollection $discountedPricePerQuantity = null, ?Money $totalPrice = null, ?TaxedItemPrice $taxedPrice = null, @@ -75,6 +82,7 @@ public function __construct( ?string $type = null ) { $this->lineItemId = $lineItemId; + $this->lineItemKey = $lineItemKey; $this->discountedPricePerQuantity = $discountedPricePerQuantity; $this->totalPrice = $totalPrice; $this->taxedPrice = $taxedPrice; @@ -120,6 +128,26 @@ public function getLineItemId() return $this->lineItemId; } + /** + *User-defined unique identifier of the LineItem.
+ * + * + * @return null|string + */ + public function getLineItemKey() + { + if (is_null($this->lineItemKey)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_LINE_ITEM_KEY); + if (is_null($data)) { + return null; + } + $this->lineItemKey = (string) $data; + } + + return $this->lineItemKey; + } + /** *Array of DiscountedLineItemPriceForQuantity after the Discount recalculation.
* @@ -211,6 +239,14 @@ public function setLineItemId(?string $lineItemId): void $this->lineItemId = $lineItemId; } + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void + { + $this->lineItemKey = $lineItemKey; + } + /** * @param ?DiscountedLineItemPriceForQuantityCollection $discountedPricePerQuantity */ diff --git a/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessage.php b/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessage.php index 720bc36be42..4c995cb3d4e 100644 --- a/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessage.php +++ b/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessage.php @@ -15,6 +15,7 @@ interface OrderLineItemDistributionChannelSetMessage extends OrderMessage { public const FIELD_LINE_ITEM_ID = 'lineItemId'; + public const FIELD_LINE_ITEM_KEY = 'lineItemKey'; public const FIELD_DISTRIBUTION_CHANNEL = 'distributionChannel'; /** @@ -25,6 +26,14 @@ interface OrderLineItemDistributionChannelSetMessage extends OrderMessage */ public function getLineItemId(); + /** + *User-defined unique identifier of the LineItem.
+ * + + * @return null|string + */ + public function getLineItemKey(); + /** *Distribution Channel that was set.
* @@ -38,6 +47,11 @@ public function getDistributionChannel(); */ public function setLineItemId(?string $lineItemId): void; + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void; + /** * @param ?ChannelReference $distributionChannel */ diff --git a/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessageBuilder.php b/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessageBuilder.php index 27b7a603ca4..d6db4eb8cd0 100644 --- a/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessageBuilder.php +++ b/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessageBuilder.php @@ -95,6 +95,12 @@ final class OrderLineItemDistributionChannelSetMessageBuilder implements Builder */ private $lineItemId; + /** + + * @var ?string + */ + private $lineItemKey; + /** * @var null|ChannelReference|ChannelReferenceBuilder @@ -223,6 +229,17 @@ public function getLineItemId() return $this->lineItemId; } + /** + *User-defined unique identifier of the LineItem.
+ * + + * @return null|string + */ + public function getLineItemKey() + { + return $this->lineItemKey; + } + /** *Distribution Channel that was set.
* @@ -355,6 +372,17 @@ public function withLineItemId(?string $lineItemId) return $this; } + /** + * @param ?string $lineItemKey + * @return $this + */ + public function withLineItemKey(?string $lineItemKey) + { + $this->lineItemKey = $lineItemKey; + + return $this; + } + /** * @param ?ChannelReference $distributionChannel * @return $this @@ -435,6 +463,7 @@ public function build(): OrderLineItemDistributionChannelSetMessage $this->resourceVersion, $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, $this->lineItemId, + $this->lineItemKey, $this->distributionChannel instanceof ChannelReferenceBuilder ? $this->distributionChannel->build() : $this->distributionChannel ); } diff --git a/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessageModel.php b/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessageModel.php index 7c5a9d7e6e2..f1785e39a53 100644 --- a/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessageModel.php +++ b/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessageModel.php @@ -101,6 +101,12 @@ final class OrderLineItemDistributionChannelSetMessageModel extends JsonObjectMo */ protected $lineItemId; + /** + * + * @var ?string + */ + protected $lineItemKey; + /** * * @var ?ChannelReference @@ -123,6 +129,7 @@ public function __construct( ?int $resourceVersion = null, ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers = null, ?string $lineItemId = null, + ?string $lineItemKey = null, ?ChannelReference $distributionChannel = null, ?string $type = null ) { @@ -137,6 +144,7 @@ public function __construct( $this->resourceVersion = $resourceVersion; $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; $this->lineItemId = $lineItemId; + $this->lineItemKey = $lineItemKey; $this->distributionChannel = $distributionChannel; $this->type = $type ?? self::DISCRIMINATOR_VALUE; } @@ -394,6 +402,26 @@ public function getLineItemId() return $this->lineItemId; } + /** + *User-defined unique identifier of the LineItem.
+ * + * + * @return null|string + */ + public function getLineItemKey() + { + if (is_null($this->lineItemKey)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_LINE_ITEM_KEY); + if (is_null($data)) { + return null; + } + $this->lineItemKey = (string) $data; + } + + return $this->lineItemKey; + } + /** *Distribution Channel that was set.
* @@ -504,6 +532,14 @@ public function setLineItemId(?string $lineItemId): void $this->lineItemId = $lineItemId; } + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void + { + $this->lineItemKey = $lineItemKey; + } + /** * @param ?ChannelReference $distributionChannel */ diff --git a/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessagePayload.php b/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessagePayload.php index a57058174c5..fab134aa58d 100644 --- a/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessagePayload.php +++ b/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessagePayload.php @@ -15,6 +15,7 @@ interface OrderLineItemDistributionChannelSetMessagePayload extends OrderMessagePayload { public const FIELD_LINE_ITEM_ID = 'lineItemId'; + public const FIELD_LINE_ITEM_KEY = 'lineItemKey'; public const FIELD_DISTRIBUTION_CHANNEL = 'distributionChannel'; /** @@ -25,6 +26,14 @@ interface OrderLineItemDistributionChannelSetMessagePayload extends OrderMessage */ public function getLineItemId(); + /** + *User-defined unique identifier of the LineItem.
+ * + + * @return null|string + */ + public function getLineItemKey(); + /** *Distribution Channel that was set.
* @@ -38,6 +47,11 @@ public function getDistributionChannel(); */ public function setLineItemId(?string $lineItemId): void; + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void; + /** * @param ?ChannelReference $distributionChannel */ diff --git a/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessagePayloadBuilder.php index 3ef1d5b8d74..4a4b8afddda 100644 --- a/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessagePayloadBuilder.php +++ b/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessagePayloadBuilder.php @@ -28,6 +28,12 @@ final class OrderLineItemDistributionChannelSetMessagePayloadBuilder implements */ private $lineItemId; + /** + + * @var ?string + */ + private $lineItemKey; + /** * @var null|ChannelReference|ChannelReferenceBuilder @@ -45,6 +51,17 @@ public function getLineItemId() return $this->lineItemId; } + /** + *User-defined unique identifier of the LineItem.
+ * + + * @return null|string + */ + public function getLineItemKey() + { + return $this->lineItemKey; + } + /** *Distribution Channel that was set.
* @@ -67,6 +84,17 @@ public function withLineItemId(?string $lineItemId) return $this; } + /** + * @param ?string $lineItemKey + * @return $this + */ + public function withLineItemKey(?string $lineItemKey) + { + $this->lineItemKey = $lineItemKey; + + return $this; + } + /** * @param ?ChannelReference $distributionChannel * @return $this @@ -93,6 +121,7 @@ public function build(): OrderLineItemDistributionChannelSetMessagePayload { return new OrderLineItemDistributionChannelSetMessagePayloadModel( $this->lineItemId, + $this->lineItemKey, $this->distributionChannel instanceof ChannelReferenceBuilder ? $this->distributionChannel->build() : $this->distributionChannel ); } diff --git a/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessagePayloadModel.php index 66732bc9b10..7ada5ec6b8a 100644 --- a/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessagePayloadModel.php +++ b/lib/commercetools-api/src/Models/Message/OrderLineItemDistributionChannelSetMessagePayloadModel.php @@ -34,6 +34,12 @@ final class OrderLineItemDistributionChannelSetMessagePayloadModel extends JsonO */ protected $lineItemId; + /** + * + * @var ?string + */ + protected $lineItemKey; + /** * * @var ?ChannelReference @@ -46,10 +52,12 @@ final class OrderLineItemDistributionChannelSetMessagePayloadModel extends JsonO */ public function __construct( ?string $lineItemId = null, + ?string $lineItemKey = null, ?ChannelReference $distributionChannel = null, ?string $type = null ) { $this->lineItemId = $lineItemId; + $this->lineItemKey = $lineItemKey; $this->distributionChannel = $distributionChannel; $this->type = $type ?? self::DISCRIMINATOR_VALUE; } @@ -92,6 +100,26 @@ public function getLineItemId() return $this->lineItemId; } + /** + *User-defined unique identifier of the LineItem.
+ * + * + * @return null|string + */ + public function getLineItemKey() + { + if (is_null($this->lineItemKey)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_LINE_ITEM_KEY); + if (is_null($data)) { + return null; + } + $this->lineItemKey = (string) $data; + } + + return $this->lineItemKey; + } + /** *Distribution Channel that was set.
* @@ -122,6 +150,14 @@ public function setLineItemId(?string $lineItemId): void $this->lineItemId = $lineItemId; } + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void + { + $this->lineItemKey = $lineItemKey; + } + /** * @param ?ChannelReference $distributionChannel */ diff --git a/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessage.php b/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessage.php index 4955293004e..083affa7af4 100644 --- a/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessage.php +++ b/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessage.php @@ -19,6 +19,7 @@ interface OrderLineItemRemovedMessage extends OrderMessage { public const FIELD_LINE_ITEM_ID = 'lineItemId'; + public const FIELD_LINE_ITEM_KEY = 'lineItemKey'; public const FIELD_REMOVED_QUANTITY = 'removedQuantity'; public const FIELD_NEW_QUANTITY = 'newQuantity'; public const FIELD_NEW_STATE = 'newState'; @@ -35,6 +36,14 @@ interface OrderLineItemRemovedMessage extends OrderMessage */ public function getLineItemId(); + /** + *User-defined unique identifier of the LineItem.
+ * + + * @return null|string + */ + public function getLineItemKey(); + /** *Quantity of Line Items that were removed during the Remove Line Item update action.
* @@ -96,6 +105,11 @@ public function getNewShippingDetail(); */ public function setLineItemId(?string $lineItemId): void; + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void; + /** * @param ?int $removedQuantity */ diff --git a/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessageBuilder.php b/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessageBuilder.php index 7965fa02b5b..49036fded37 100644 --- a/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessageBuilder.php +++ b/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessageBuilder.php @@ -102,6 +102,12 @@ final class OrderLineItemRemovedMessageBuilder implements Builder */ private $lineItemId; + /** + + * @var ?string + */ + private $lineItemKey; + /** * @var ?int @@ -266,6 +272,17 @@ public function getLineItemId() return $this->lineItemId; } + /** + *User-defined unique identifier of the LineItem.
+ * + + * @return null|string + */ + public function getLineItemKey() + { + return $this->lineItemKey; + } + /** *Quantity of Line Items that were removed during the Remove Line Item update action.
* @@ -464,6 +481,17 @@ public function withLineItemId(?string $lineItemId) return $this; } + /** + * @param ?string $lineItemKey + * @return $this + */ + public function withLineItemKey(?string $lineItemKey) + { + $this->lineItemKey = $lineItemKey; + + return $this; + } + /** * @param ?int $removedQuantity * @return $this @@ -643,6 +671,7 @@ public function build(): OrderLineItemRemovedMessage $this->resourceVersion, $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, $this->lineItemId, + $this->lineItemKey, $this->removedQuantity, $this->newQuantity, $this->newState, diff --git a/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessageModel.php b/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessageModel.php index ee17669f624..d7cfb465007 100644 --- a/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessageModel.php +++ b/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessageModel.php @@ -108,6 +108,12 @@ final class OrderLineItemRemovedMessageModel extends JsonObjectModel implements */ protected $lineItemId; + /** + * + * @var ?string + */ + protected $lineItemKey; + /** * * @var ?int @@ -166,6 +172,7 @@ public function __construct( ?int $resourceVersion = null, ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers = null, ?string $lineItemId = null, + ?string $lineItemKey = null, ?int $removedQuantity = null, ?int $newQuantity = null, ?ItemStateCollection $newState = null, @@ -186,6 +193,7 @@ public function __construct( $this->resourceVersion = $resourceVersion; $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; $this->lineItemId = $lineItemId; + $this->lineItemKey = $lineItemKey; $this->removedQuantity = $removedQuantity; $this->newQuantity = $newQuantity; $this->newState = $newState; @@ -449,6 +457,26 @@ public function getLineItemId() return $this->lineItemId; } + /** + *User-defined unique identifier of the LineItem.
+ * + * + * @return null|string + */ + public function getLineItemKey() + { + if (is_null($this->lineItemKey)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_LINE_ITEM_KEY); + if (is_null($data)) { + return null; + } + $this->lineItemKey = (string) $data; + } + + return $this->lineItemKey; + } + /** *Quantity of Line Items that were removed during the Remove Line Item update action.
* @@ -682,6 +710,14 @@ public function setLineItemId(?string $lineItemId): void $this->lineItemId = $lineItemId; } + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void + { + $this->lineItemKey = $lineItemKey; + } + /** * @param ?int $removedQuantity */ diff --git a/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessagePayload.php b/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessagePayload.php index 6e3feff88b1..168d3735bb8 100644 --- a/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessagePayload.php +++ b/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessagePayload.php @@ -19,6 +19,7 @@ interface OrderLineItemRemovedMessagePayload extends OrderMessagePayload { public const FIELD_LINE_ITEM_ID = 'lineItemId'; + public const FIELD_LINE_ITEM_KEY = 'lineItemKey'; public const FIELD_REMOVED_QUANTITY = 'removedQuantity'; public const FIELD_NEW_QUANTITY = 'newQuantity'; public const FIELD_NEW_STATE = 'newState'; @@ -35,6 +36,14 @@ interface OrderLineItemRemovedMessagePayload extends OrderMessagePayload */ public function getLineItemId(); + /** + *User-defined unique identifier of the LineItem.
+ * + + * @return null|string + */ + public function getLineItemKey(); + /** *Quantity of Line Items that were removed during the Remove Line Item update action.
* @@ -96,6 +105,11 @@ public function getNewShippingDetail(); */ public function setLineItemId(?string $lineItemId): void; + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void; + /** * @param ?int $removedQuantity */ diff --git a/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessagePayloadBuilder.php index 74f68fcb136..7652cdb2454 100644 --- a/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessagePayloadBuilder.php +++ b/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessagePayloadBuilder.php @@ -35,6 +35,12 @@ final class OrderLineItemRemovedMessagePayloadBuilder implements Builder */ private $lineItemId; + /** + + * @var ?string + */ + private $lineItemKey; + /** * @var ?int @@ -88,6 +94,17 @@ public function getLineItemId() return $this->lineItemId; } + /** + *User-defined unique identifier of the LineItem.
+ * + + * @return null|string + */ + public function getLineItemKey() + { + return $this->lineItemKey; + } + /** *Quantity of Line Items that were removed during the Remove Line Item update action.
* @@ -176,6 +193,17 @@ public function withLineItemId(?string $lineItemId) return $this; } + /** + * @param ?string $lineItemKey + * @return $this + */ + public function withLineItemKey(?string $lineItemKey) + { + $this->lineItemKey = $lineItemKey; + + return $this; + } + /** * @param ?int $removedQuantity * @return $this @@ -301,6 +329,7 @@ public function build(): OrderLineItemRemovedMessagePayload { return new OrderLineItemRemovedMessagePayloadModel( $this->lineItemId, + $this->lineItemKey, $this->removedQuantity, $this->newQuantity, $this->newState, diff --git a/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessagePayloadModel.php index b7c11a33856..fb353ab1885 100644 --- a/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessagePayloadModel.php +++ b/lib/commercetools-api/src/Models/Message/OrderLineItemRemovedMessagePayloadModel.php @@ -41,6 +41,12 @@ final class OrderLineItemRemovedMessagePayloadModel extends JsonObjectModel impl */ protected $lineItemId; + /** + * + * @var ?string + */ + protected $lineItemKey; + /** * * @var ?int @@ -89,6 +95,7 @@ final class OrderLineItemRemovedMessagePayloadModel extends JsonObjectModel impl */ public function __construct( ?string $lineItemId = null, + ?string $lineItemKey = null, ?int $removedQuantity = null, ?int $newQuantity = null, ?ItemStateCollection $newState = null, @@ -99,6 +106,7 @@ public function __construct( ?string $type = null ) { $this->lineItemId = $lineItemId; + $this->lineItemKey = $lineItemKey; $this->removedQuantity = $removedQuantity; $this->newQuantity = $newQuantity; $this->newState = $newState; @@ -147,6 +155,26 @@ public function getLineItemId() return $this->lineItemId; } + /** + *User-defined unique identifier of the LineItem.
+ * + * + * @return null|string + */ + public function getLineItemKey() + { + if (is_null($this->lineItemKey)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_LINE_ITEM_KEY); + if (is_null($data)) { + return null; + } + $this->lineItemKey = (string) $data; + } + + return $this->lineItemKey; + } + /** *Quantity of Line Items that were removed during the Remove Line Item update action.
* @@ -300,6 +328,14 @@ public function setLineItemId(?string $lineItemId): void $this->lineItemId = $lineItemId; } + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void + { + $this->lineItemKey = $lineItemKey; + } + /** * @param ?int $removedQuantity */ diff --git a/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateAction.php b/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateAction.php index f60fa5ee286..3803b95987f 100644 --- a/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateAction.php @@ -14,16 +14,25 @@ interface OrderImportLineItemStateAction extends OrderUpdateAction { public const FIELD_LINE_ITEM_ID = 'lineItemId'; + public const FIELD_LINE_ITEM_KEY = 'lineItemKey'; public const FIELD_STATE = 'state'; /** - *id
of the LineItem to update.
id
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
key
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
New status of the Line Items.
* @@ -37,6 +46,11 @@ public function getState(); */ public function setLineItemId(?string $lineItemId): void; + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void; + /** * @param ?ItemStateCollection $state */ diff --git a/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateActionBuilder.php index a2ac96b9092..543565dcaa1 100644 --- a/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateActionBuilder.php @@ -26,6 +26,12 @@ final class OrderImportLineItemStateActionBuilder implements Builder */ private $lineItemId; + /** + + * @var ?string + */ + private $lineItemKey; + /** * @var ?ItemStateCollection @@ -33,7 +39,7 @@ final class OrderImportLineItemStateActionBuilder implements Builder private $state; /** - *id
of the LineItem to update.
id
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
key
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
New status of the Line Items.
* @@ -65,6 +82,17 @@ public function withLineItemId(?string $lineItemId) return $this; } + /** + * @param ?string $lineItemKey + * @return $this + */ + public function withLineItemKey(?string $lineItemKey) + { + $this->lineItemKey = $lineItemKey; + + return $this; + } + /** * @param ?ItemStateCollection $state * @return $this @@ -81,6 +109,7 @@ public function build(): OrderImportLineItemStateAction { return new OrderImportLineItemStateActionModel( $this->lineItemId, + $this->lineItemKey, $this->state ); } diff --git a/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateActionModel.php b/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateActionModel.php index 4bef20c7443..3e3d411fea5 100644 --- a/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderImportLineItemStateActionModel.php @@ -32,6 +32,12 @@ final class OrderImportLineItemStateActionModel extends JsonObjectModel implemen */ protected $lineItemId; + /** + * + * @var ?string + */ + protected $lineItemKey; + /** * * @var ?ItemStateCollection @@ -44,10 +50,12 @@ final class OrderImportLineItemStateActionModel extends JsonObjectModel implemen */ public function __construct( ?string $lineItemId = null, + ?string $lineItemKey = null, ?ItemStateCollection $state = null, ?string $action = null ) { $this->lineItemId = $lineItemId; + $this->lineItemKey = $lineItemKey; $this->state = $state; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -71,7 +79,7 @@ public function getAction() } /** - *id
of the LineItem to update.
id
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
key
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
New status of the Line Items.
* @@ -119,6 +147,14 @@ public function setLineItemId(?string $lineItemId): void $this->lineItemId = $lineItemId; } + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void + { + $this->lineItemKey = $lineItemKey; + } + /** * @param ?ItemStateCollection $state */ diff --git a/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateAction.php b/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateAction.php index ccda9a71903..c3061620ae6 100644 --- a/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateAction.php @@ -16,19 +16,28 @@ interface OrderTransitionLineItemStateAction extends OrderUpdateAction { public const FIELD_LINE_ITEM_ID = 'lineItemId'; + public const FIELD_LINE_ITEM_KEY = 'lineItemKey'; public const FIELD_QUANTITY = 'quantity'; public const FIELD_FROM_STATE = 'fromState'; public const FIELD_TO_STATE = 'toState'; public const FIELD_ACTUAL_TRANSITION_DATE = 'actualTransitionDate'; /** - *id
of the LineItem to update.
id
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
key
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
Number of Line Items that should transition State.
* @@ -66,6 +75,11 @@ public function getActualTransitionDate(); */ public function setLineItemId(?string $lineItemId): void; + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void; + /** * @param ?int $quantity */ diff --git a/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateActionBuilder.php index 9c4b1769067..372de15f161 100644 --- a/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateActionBuilder.php @@ -29,6 +29,12 @@ final class OrderTransitionLineItemStateActionBuilder implements Builder */ private $lineItemId; + /** + + * @var ?string + */ + private $lineItemKey; + /** * @var ?int @@ -54,7 +60,7 @@ final class OrderTransitionLineItemStateActionBuilder implements Builder private $actualTransitionDate; /** - *id
of the LineItem to update.
id
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
key
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
Number of Line Items that should transition State.
* @@ -119,6 +136,17 @@ public function withLineItemId(?string $lineItemId) return $this; } + /** + * @param ?string $lineItemKey + * @return $this + */ + public function withLineItemKey(?string $lineItemKey) + { + $this->lineItemKey = $lineItemKey; + + return $this; + } + /** * @param ?int $quantity * @return $this @@ -189,6 +217,7 @@ public function build(): OrderTransitionLineItemStateAction { return new OrderTransitionLineItemStateActionModel( $this->lineItemId, + $this->lineItemKey, $this->quantity, $this->fromState instanceof StateResourceIdentifierBuilder ? $this->fromState->build() : $this->fromState, $this->toState instanceof StateResourceIdentifierBuilder ? $this->toState->build() : $this->toState, diff --git a/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateActionModel.php b/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateActionModel.php index f817ba21ec4..ff4d134616d 100644 --- a/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderTransitionLineItemStateActionModel.php @@ -35,6 +35,12 @@ final class OrderTransitionLineItemStateActionModel extends JsonObjectModel impl */ protected $lineItemId; + /** + * + * @var ?string + */ + protected $lineItemKey; + /** * * @var ?int @@ -65,6 +71,7 @@ final class OrderTransitionLineItemStateActionModel extends JsonObjectModel impl */ public function __construct( ?string $lineItemId = null, + ?string $lineItemKey = null, ?int $quantity = null, ?StateResourceIdentifier $fromState = null, ?StateResourceIdentifier $toState = null, @@ -72,6 +79,7 @@ public function __construct( ?string $action = null ) { $this->lineItemId = $lineItemId; + $this->lineItemKey = $lineItemKey; $this->quantity = $quantity; $this->fromState = $fromState; $this->toState = $toState; @@ -98,7 +106,7 @@ public function getAction() } /** - *id
of the LineItem to update.
id
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
key
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
Number of Line Items that should transition State.
* @@ -212,6 +240,14 @@ public function setLineItemId(?string $lineItemId): void $this->lineItemId = $lineItemId; } + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void + { + $this->lineItemKey = $lineItemKey; + } + /** * @param ?int $quantity */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateAction.php index 2cf4ac3c145..ec9bc1a24e6 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateAction.php @@ -16,16 +16,25 @@ interface StagedOrderImportLineItemStateAction extends StagedOrderUpdateAction { public const FIELD_LINE_ITEM_ID = 'lineItemId'; + public const FIELD_LINE_ITEM_KEY = 'lineItemKey'; public const FIELD_STATE = 'state'; /** - *id
of the LineItem to update.
id
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
key
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
New status of the Line Items.
* @@ -39,6 +48,11 @@ public function getState(); */ public function setLineItemId(?string $lineItemId): void; + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void; + /** * @param ?ItemStateCollection $state */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateActionBuilder.php index 822ca2a0bb0..d75242f28bf 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateActionBuilder.php @@ -29,6 +29,12 @@ final class StagedOrderImportLineItemStateActionBuilder implements Builder */ private $lineItemId; + /** + + * @var ?string + */ + private $lineItemKey; + /** * @var ?ItemStateCollection @@ -36,7 +42,7 @@ final class StagedOrderImportLineItemStateActionBuilder implements Builder private $state; /** - *id
of the LineItem to update.
id
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
key
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
New status of the Line Items.
* @@ -68,6 +85,17 @@ public function withLineItemId(?string $lineItemId) return $this; } + /** + * @param ?string $lineItemKey + * @return $this + */ + public function withLineItemKey(?string $lineItemKey) + { + $this->lineItemKey = $lineItemKey; + + return $this; + } + /** * @param ?ItemStateCollection $state * @return $this @@ -84,6 +112,7 @@ public function build(): StagedOrderImportLineItemStateAction { return new StagedOrderImportLineItemStateActionModel( $this->lineItemId, + $this->lineItemKey, $this->state ); } diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateActionModel.php index aaf5c30e94d..aa25b5c8a2e 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportLineItemStateActionModel.php @@ -35,6 +35,12 @@ final class StagedOrderImportLineItemStateActionModel extends JsonObjectModel im */ protected $lineItemId; + /** + * + * @var ?string + */ + protected $lineItemKey; + /** * * @var ?ItemStateCollection @@ -47,10 +53,12 @@ final class StagedOrderImportLineItemStateActionModel extends JsonObjectModel im */ public function __construct( ?string $lineItemId = null, + ?string $lineItemKey = null, ?ItemStateCollection $state = null, ?string $action = null ) { $this->lineItemId = $lineItemId; + $this->lineItemKey = $lineItemKey; $this->state = $state; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -74,7 +82,7 @@ public function getAction() } /** - *id
of the LineItem to update.
id
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
key
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
New status of the Line Items.
* @@ -122,6 +150,14 @@ public function setLineItemId(?string $lineItemId): void $this->lineItemId = $lineItemId; } + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void + { + $this->lineItemKey = $lineItemKey; + } + /** * @param ?ItemStateCollection $state */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateAction.php index cbe49ef9015..0a3a2c2f7ad 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateAction.php @@ -17,19 +17,28 @@ interface StagedOrderTransitionLineItemStateAction extends StagedOrderUpdateAction { public const FIELD_LINE_ITEM_ID = 'lineItemId'; + public const FIELD_LINE_ITEM_KEY = 'lineItemKey'; public const FIELD_QUANTITY = 'quantity'; public const FIELD_FROM_STATE = 'fromState'; public const FIELD_TO_STATE = 'toState'; public const FIELD_ACTUAL_TRANSITION_DATE = 'actualTransitionDate'; /** - *id
of the LineItem to update.
id
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
key
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
Number of Line Items that should transition State.
* @@ -67,6 +76,11 @@ public function getActualTransitionDate(); */ public function setLineItemId(?string $lineItemId): void; + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void; + /** * @param ?int $quantity */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateActionBuilder.php index 4c5edb5bc71..731ad8b5d8c 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateActionBuilder.php @@ -31,6 +31,12 @@ final class StagedOrderTransitionLineItemStateActionBuilder implements Builder */ private $lineItemId; + /** + + * @var ?string + */ + private $lineItemKey; + /** * @var ?int @@ -56,7 +62,7 @@ final class StagedOrderTransitionLineItemStateActionBuilder implements Builder private $actualTransitionDate; /** - *id
of the LineItem to update.
id
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
key
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
Number of Line Items that should transition State.
* @@ -121,6 +138,17 @@ public function withLineItemId(?string $lineItemId) return $this; } + /** + * @param ?string $lineItemKey + * @return $this + */ + public function withLineItemKey(?string $lineItemKey) + { + $this->lineItemKey = $lineItemKey; + + return $this; + } + /** * @param ?int $quantity * @return $this @@ -191,6 +219,7 @@ public function build(): StagedOrderTransitionLineItemStateAction { return new StagedOrderTransitionLineItemStateActionModel( $this->lineItemId, + $this->lineItemKey, $this->quantity, $this->fromState instanceof StateResourceIdentifierBuilder ? $this->fromState->build() : $this->fromState, $this->toState instanceof StateResourceIdentifierBuilder ? $this->toState->build() : $this->toState, diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateActionModel.php index 8e24d307a4e..014455301d1 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionLineItemStateActionModel.php @@ -37,6 +37,12 @@ final class StagedOrderTransitionLineItemStateActionModel extends JsonObjectMode */ protected $lineItemId; + /** + * + * @var ?string + */ + protected $lineItemKey; + /** * * @var ?int @@ -67,6 +73,7 @@ final class StagedOrderTransitionLineItemStateActionModel extends JsonObjectMode */ public function __construct( ?string $lineItemId = null, + ?string $lineItemKey = null, ?int $quantity = null, ?StateResourceIdentifier $fromState = null, ?StateResourceIdentifier $toState = null, @@ -74,6 +81,7 @@ public function __construct( ?string $action = null ) { $this->lineItemId = $lineItemId; + $this->lineItemKey = $lineItemKey; $this->quantity = $quantity; $this->fromState = $fromState; $this->toState = $toState; @@ -100,7 +108,7 @@ public function getAction() } /** - *id
of the LineItem to update.
id
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
key
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
Number of Line Items that should transition State.
* @@ -214,6 +242,14 @@ public function setLineItemId(?string $lineItemId): void $this->lineItemId = $lineItemId; } + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void + { + $this->lineItemKey = $lineItemKey; + } + /** * @param ?int $quantity */ diff --git a/references.txt b/references.txt index f3e931f7815..1c1e6f96f64 100644 --- a/references.txt +++ b/references.txt @@ -72,3 +72,4 @@ e40afdfd0ae914b593926d478cb307e9a3b7328b da31e9917b314501c2a67a8e3bc2e6dfe9c228ca 409fe5dd4ae936941f2654ae5fa5598ea983d3ac e67d95b62824670b34d2441b151b4a4540c650fd +eb9b378300a33f0fa88c299529ff4ea856d7a05a From ee47eee2224b448257e4246add19c538c3212671 Mon Sep 17 00:00:00 2001 From: Auto Mationid
of the APIClient which created the resource.
id
of the API Client which created the resource.
Indicates the Customer who created or modified the resource in the context of a Business Unit. Only present when an Associate acts on behalf of a company using the associate endpoints.
+ * + + * @return null|CustomerReference + */ + public function getAssociate(); + /** * @param ?string $clientId */ @@ -70,4 +79,9 @@ public function setCustomer(?CustomerReference $customer): void; * @param ?string $anonymousId */ public function setAnonymousId(?string $anonymousId): void; + + /** + * @param ?CustomerReference $associate + */ + public function setAssociate(?CustomerReference $associate): void; } diff --git a/lib/commercetools-api/src/Models/Common/ClientLoggingBuilder.php b/lib/commercetools-api/src/Models/Common/ClientLoggingBuilder.php index c79e13d0d9d..fe146f5f7c7 100644 --- a/lib/commercetools-api/src/Models/Common/ClientLoggingBuilder.php +++ b/lib/commercetools-api/src/Models/Common/ClientLoggingBuilder.php @@ -47,7 +47,13 @@ final class ClientLoggingBuilder implements Builder private $anonymousId; /** - *id
of the APIClient which created the resource.
id
of the API Client which created the resource.
Indicates the Customer who created or modified the resource in the context of a Business Unit. Only present when an Associate acts on behalf of a company using the associate endpoints.
+ * + + * @return null|CustomerReference + */ + public function getAssociate() + { + return $this->associate instanceof CustomerReferenceBuilder ? $this->associate->build() : $this->associate; + } + /** * @param ?string $clientId * @return $this @@ -134,6 +151,17 @@ public function withAnonymousId(?string $anonymousId) return $this; } + /** + * @param ?CustomerReference $associate + * @return $this + */ + public function withAssociate(?CustomerReference $associate) + { + $this->associate = $associate; + + return $this; + } + /** * @deprecated use withCustomer() instead * @return $this @@ -145,13 +173,25 @@ public function withCustomerBuilder(?CustomerReferenceBuilder $customer) return $this; } + /** + * @deprecated use withAssociate() instead + * @return $this + */ + public function withAssociateBuilder(?CustomerReferenceBuilder $associate) + { + $this->associate = $associate; + + return $this; + } + public function build(): ClientLogging { return new ClientLoggingModel( $this->clientId, $this->externalUserId, $this->customer instanceof CustomerReferenceBuilder ? $this->customer->build() : $this->customer, - $this->anonymousId + $this->anonymousId, + $this->associate instanceof CustomerReferenceBuilder ? $this->associate->build() : $this->associate ); } diff --git a/lib/commercetools-api/src/Models/Common/ClientLoggingModel.php b/lib/commercetools-api/src/Models/Common/ClientLoggingModel.php index dab05dd84ad..20d3d1655a4 100644 --- a/lib/commercetools-api/src/Models/Common/ClientLoggingModel.php +++ b/lib/commercetools-api/src/Models/Common/ClientLoggingModel.php @@ -45,6 +45,12 @@ final class ClientLoggingModel extends JsonObjectModel implements ClientLogging */ protected $anonymousId; + /** + * + * @var ?CustomerReference + */ + protected $associate; + /** * @psalm-suppress MissingParamType @@ -53,16 +59,18 @@ public function __construct( ?string $clientId = null, ?string $externalUserId = null, ?CustomerReference $customer = null, - ?string $anonymousId = null + ?string $anonymousId = null, + ?CustomerReference $associate = null ) { $this->clientId = $clientId; $this->externalUserId = $externalUserId; $this->customer = $customer; $this->anonymousId = $anonymousId; + $this->associate = $associate; } /** - *id
of the APIClient which created the resource.
id
of the API Client which created the resource.
Indicates the Customer who created or modified the resource in the context of a Business Unit. Only present when an Associate acts on behalf of a company using the associate endpoints.
+ * + * + * @return null|CustomerReference + */ + public function getAssociate() + { + if (is_null($this->associate)) { + /** @psalm-var stdClass|arrayid
of the APIClient which created the resource.
id
of the API Client which created the resource.
Indicates the Customer who created the resource in the context of a Business Unit. Only present when an Associate acts on behalf of a company using the associate endpoints.
+ * + + * @return null|CustomerReference + */ + public function getAssociate(); + /** * @param ?string $clientId */ @@ -65,4 +73,9 @@ public function setCustomer(?CustomerReference $customer): void; * @param ?string $anonymousId */ public function setAnonymousId(?string $anonymousId): void; + + /** + * @param ?CustomerReference $associate + */ + public function setAssociate(?CustomerReference $associate): void; } diff --git a/lib/commercetools-api/src/Models/Common/CreatedByBuilder.php b/lib/commercetools-api/src/Models/Common/CreatedByBuilder.php index 6a452aecaa0..c85df4c6fec 100644 --- a/lib/commercetools-api/src/Models/Common/CreatedByBuilder.php +++ b/lib/commercetools-api/src/Models/Common/CreatedByBuilder.php @@ -47,7 +47,13 @@ final class CreatedByBuilder implements Builder private $anonymousId; /** - *id
of the APIClient which created the resource.
id
of the API Client which created the resource.
Indicates the Customer who created the resource in the context of a Business Unit. Only present when an Associate acts on behalf of a company using the associate endpoints.
+ * + + * @return null|CustomerReference + */ + public function getAssociate() + { + return $this->associate instanceof CustomerReferenceBuilder ? $this->associate->build() : $this->associate; + } + /** * @param ?string $clientId * @return $this @@ -134,6 +151,17 @@ public function withAnonymousId(?string $anonymousId) return $this; } + /** + * @param ?CustomerReference $associate + * @return $this + */ + public function withAssociate(?CustomerReference $associate) + { + $this->associate = $associate; + + return $this; + } + /** * @deprecated use withCustomer() instead * @return $this @@ -145,13 +173,25 @@ public function withCustomerBuilder(?CustomerReferenceBuilder $customer) return $this; } + /** + * @deprecated use withAssociate() instead + * @return $this + */ + public function withAssociateBuilder(?CustomerReferenceBuilder $associate) + { + $this->associate = $associate; + + return $this; + } + public function build(): CreatedBy { return new CreatedByModel( $this->clientId, $this->externalUserId, $this->customer instanceof CustomerReferenceBuilder ? $this->customer->build() : $this->customer, - $this->anonymousId + $this->anonymousId, + $this->associate instanceof CustomerReferenceBuilder ? $this->associate->build() : $this->associate ); } diff --git a/lib/commercetools-api/src/Models/Common/CreatedByModel.php b/lib/commercetools-api/src/Models/Common/CreatedByModel.php index 6052824c470..f72778c4b69 100644 --- a/lib/commercetools-api/src/Models/Common/CreatedByModel.php +++ b/lib/commercetools-api/src/Models/Common/CreatedByModel.php @@ -45,6 +45,12 @@ final class CreatedByModel extends JsonObjectModel implements CreatedBy */ protected $anonymousId; + /** + * + * @var ?CustomerReference + */ + protected $associate; + /** * @psalm-suppress MissingParamType @@ -53,16 +59,18 @@ public function __construct( ?string $clientId = null, ?string $externalUserId = null, ?CustomerReference $customer = null, - ?string $anonymousId = null + ?string $anonymousId = null, + ?CustomerReference $associate = null ) { $this->clientId = $clientId; $this->externalUserId = $externalUserId; $this->customer = $customer; $this->anonymousId = $anonymousId; + $this->associate = $associate; } /** - *id
of the APIClient which created the resource.
id
of the API Client which created the resource.
Indicates the Customer who created the resource in the context of a Business Unit. Only present when an Associate acts on behalf of a company using the associate endpoints.
+ * + * + * @return null|CustomerReference + */ + public function getAssociate() + { + if (is_null($this->associate)) { + /** @psalm-var stdClass|arrayid
of the APIClient which modified the resource.
id
of the API Client which modified the resource.
Indicates the Customer who modified the resource in the context of a Business Unit. Only present when an Associate acts on behalf of a company using the associate endpoints.
+ * + + * @return null|CustomerReference + */ + public function getAssociate(); + /** * @param ?string $clientId */ @@ -65,4 +73,9 @@ public function setCustomer(?CustomerReference $customer): void; * @param ?string $anonymousId */ public function setAnonymousId(?string $anonymousId): void; + + /** + * @param ?CustomerReference $associate + */ + public function setAssociate(?CustomerReference $associate): void; } diff --git a/lib/commercetools-api/src/Models/Common/LastModifiedByBuilder.php b/lib/commercetools-api/src/Models/Common/LastModifiedByBuilder.php index 6850b861881..fbef084625d 100644 --- a/lib/commercetools-api/src/Models/Common/LastModifiedByBuilder.php +++ b/lib/commercetools-api/src/Models/Common/LastModifiedByBuilder.php @@ -47,7 +47,13 @@ final class LastModifiedByBuilder implements Builder private $anonymousId; /** - *id
of the APIClient which modified the resource.
id
of the API Client which modified the resource.
Indicates the Customer who modified the resource in the context of a Business Unit. Only present when an Associate acts on behalf of a company using the associate endpoints.
+ * + + * @return null|CustomerReference + */ + public function getAssociate() + { + return $this->associate instanceof CustomerReferenceBuilder ? $this->associate->build() : $this->associate; + } + /** * @param ?string $clientId * @return $this @@ -134,6 +151,17 @@ public function withAnonymousId(?string $anonymousId) return $this; } + /** + * @param ?CustomerReference $associate + * @return $this + */ + public function withAssociate(?CustomerReference $associate) + { + $this->associate = $associate; + + return $this; + } + /** * @deprecated use withCustomer() instead * @return $this @@ -145,13 +173,25 @@ public function withCustomerBuilder(?CustomerReferenceBuilder $customer) return $this; } + /** + * @deprecated use withAssociate() instead + * @return $this + */ + public function withAssociateBuilder(?CustomerReferenceBuilder $associate) + { + $this->associate = $associate; + + return $this; + } + public function build(): LastModifiedBy { return new LastModifiedByModel( $this->clientId, $this->externalUserId, $this->customer instanceof CustomerReferenceBuilder ? $this->customer->build() : $this->customer, - $this->anonymousId + $this->anonymousId, + $this->associate instanceof CustomerReferenceBuilder ? $this->associate->build() : $this->associate ); } diff --git a/lib/commercetools-api/src/Models/Common/LastModifiedByModel.php b/lib/commercetools-api/src/Models/Common/LastModifiedByModel.php index abef32579e4..f441d47a40a 100644 --- a/lib/commercetools-api/src/Models/Common/LastModifiedByModel.php +++ b/lib/commercetools-api/src/Models/Common/LastModifiedByModel.php @@ -45,6 +45,12 @@ final class LastModifiedByModel extends JsonObjectModel implements LastModifiedB */ protected $anonymousId; + /** + * + * @var ?CustomerReference + */ + protected $associate; + /** * @psalm-suppress MissingParamType @@ -53,16 +59,18 @@ public function __construct( ?string $clientId = null, ?string $externalUserId = null, ?CustomerReference $customer = null, - ?string $anonymousId = null + ?string $anonymousId = null, + ?CustomerReference $associate = null ) { $this->clientId = $clientId; $this->externalUserId = $externalUserId; $this->customer = $customer; $this->anonymousId = $anonymousId; + $this->associate = $associate; } /** - *id
of the APIClient which modified the resource.
id
of the API Client which modified the resource.
Indicates the Customer who modified the resource in the context of a Business Unit. Only present when an Associate acts on behalf of a company using the associate endpoints.
+ * + * + * @return null|CustomerReference + */ + public function getAssociate() + { + if (is_null($this->associate)) { + /** @psalm-var stdClass|arrayCustomer on the Order after the Set Customer Id update action.
+ *Customer on the Order after the Set Customer ID update action.
* * @return null|CustomerReference @@ -29,7 +29,7 @@ interface OrderCustomerSetMessage extends OrderMessage public function getCustomer(); /** - *CustomerGroup on the Order after the Set Customer Id update action.
+ *CustomerGroup on the Order after the Set Customer ID update action.
* * @return null|CustomerGroupReference @@ -37,7 +37,7 @@ public function getCustomer(); public function getCustomerGroup(); /** - *Customer on the Order before the Set Customer Id update action.
+ *Customer on the Order before the Set Customer ID update action.
* * @return null|CustomerReference @@ -45,7 +45,7 @@ public function getCustomerGroup(); public function getOldCustomer(); /** - *CustomerGroup on the Order before the Set Customer Id update action.
+ *CustomerGroup on the Order before the Set Customer ID update action.
* * @return null|CustomerGroupReference diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessageBuilder.php b/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessageBuilder.php index 05d4d80e45a..5e3d2ed7f02 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessageBuilder.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessageBuilder.php @@ -227,7 +227,7 @@ public function getResourceUserProvidedIdentifiers() } /** - *Customer on the Order after the Set Customer Id update action.
+ *Customer on the Order after the Set Customer ID update action.
* * @return null|CustomerReference @@ -238,7 +238,7 @@ public function getCustomer() } /** - *CustomerGroup on the Order after the Set Customer Id update action.
+ *CustomerGroup on the Order after the Set Customer ID update action.
* * @return null|CustomerGroupReference @@ -249,7 +249,7 @@ public function getCustomerGroup() } /** - *Customer on the Order before the Set Customer Id update action.
+ *Customer on the Order before the Set Customer ID update action.
* * @return null|CustomerReference @@ -260,7 +260,7 @@ public function getOldCustomer() } /** - *CustomerGroup on the Order before the Set Customer Id update action.
+ *CustomerGroup on the Order before the Set Customer ID update action.
* * @return null|CustomerGroupReference diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessageModel.php b/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessageModel.php index ac25c4492ab..1cfda25c21f 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessageModel.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessageModel.php @@ -393,7 +393,7 @@ public function getResourceUserProvidedIdentifiers() } /** - *Customer on the Order after the Set Customer Id update action.
+ *Customer on the Order after the Set Customer ID update action.
* * * @return null|CustomerReference @@ -414,7 +414,7 @@ public function getCustomer() } /** - *CustomerGroup on the Order after the Set Customer Id update action.
+ *CustomerGroup on the Order after the Set Customer ID update action.
* * * @return null|CustomerGroupReference @@ -435,7 +435,7 @@ public function getCustomerGroup() } /** - *Customer on the Order before the Set Customer Id update action.
+ *Customer on the Order before the Set Customer ID update action.
* * * @return null|CustomerReference @@ -456,7 +456,7 @@ public function getOldCustomer() } /** - *CustomerGroup on the Order before the Set Customer Id update action.
+ *CustomerGroup on the Order before the Set Customer ID update action.
* * * @return null|CustomerGroupReference diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessagePayload.php b/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessagePayload.php index 8b18dd11f5f..b138ba51725 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessagePayload.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessagePayload.php @@ -21,7 +21,7 @@ interface OrderCustomerSetMessagePayload extends OrderMessagePayload public const FIELD_OLD_CUSTOMER_GROUP = 'oldCustomerGroup'; /** - *Customer on the Order after the Set Customer Id update action.
+ *Customer on the Order after the Set Customer ID update action.
* * @return null|CustomerReference @@ -29,7 +29,7 @@ interface OrderCustomerSetMessagePayload extends OrderMessagePayload public function getCustomer(); /** - *CustomerGroup on the Order after the Set Customer Id update action.
+ *CustomerGroup on the Order after the Set Customer ID update action.
* * @return null|CustomerGroupReference @@ -37,7 +37,7 @@ public function getCustomer(); public function getCustomerGroup(); /** - *Customer on the Order before the Set Customer Id update action.
+ *Customer on the Order before the Set Customer ID update action.
* * @return null|CustomerReference @@ -45,7 +45,7 @@ public function getCustomerGroup(); public function getOldCustomer(); /** - *CustomerGroup on the Order before the Set Customer Id update action.
+ *CustomerGroup on the Order before the Set Customer ID update action.
* * @return null|CustomerGroupReference diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessagePayloadBuilder.php index 6655d8cc54d..19e05e123db 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessagePayloadBuilder.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessagePayloadBuilder.php @@ -49,7 +49,7 @@ final class OrderCustomerSetMessagePayloadBuilder implements Builder private $oldCustomerGroup; /** - *Customer on the Order after the Set Customer Id update action.
+ *Customer on the Order after the Set Customer ID update action.
* * @return null|CustomerReference @@ -60,7 +60,7 @@ public function getCustomer() } /** - *CustomerGroup on the Order after the Set Customer Id update action.
+ *CustomerGroup on the Order after the Set Customer ID update action.
* * @return null|CustomerGroupReference @@ -71,7 +71,7 @@ public function getCustomerGroup() } /** - *Customer on the Order before the Set Customer Id update action.
+ *Customer on the Order before the Set Customer ID update action.
* * @return null|CustomerReference @@ -82,7 +82,7 @@ public function getOldCustomer() } /** - *CustomerGroup on the Order before the Set Customer Id update action.
+ *CustomerGroup on the Order before the Set Customer ID update action.
* * @return null|CustomerGroupReference diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessagePayloadModel.php index a478cd4ebe4..63f0e176534 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessagePayloadModel.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomerSetMessagePayloadModel.php @@ -91,7 +91,7 @@ public function getType() } /** - *Customer on the Order after the Set Customer Id update action.
+ *Customer on the Order after the Set Customer ID update action.
* * * @return null|CustomerReference @@ -112,7 +112,7 @@ public function getCustomer() } /** - *CustomerGroup on the Order after the Set Customer Id update action.
+ *CustomerGroup on the Order after the Set Customer ID update action.
* * * @return null|CustomerGroupReference @@ -133,7 +133,7 @@ public function getCustomerGroup() } /** - *Customer on the Order before the Set Customer Id update action.
+ *Customer on the Order before the Set Customer ID update action.
* * * @return null|CustomerReference @@ -154,7 +154,7 @@ public function getOldCustomer() } /** - *CustomerGroup on the Order before the Set Customer Id update action.
+ *CustomerGroup on the Order before the Set Customer ID update action.
* * * @return null|CustomerGroupReference diff --git a/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImport.php b/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImport.php index 7ddc78e81b6..da25f63d824 100644 --- a/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImport.php +++ b/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImport.php @@ -99,6 +99,7 @@ public function getTiers(); /** *User-defined unique identifier for the Embedded Price.
+ *This field is required from 31 July 2023.
* * @return null|string diff --git a/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImportBuilder.php b/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImportBuilder.php index e076c32529f..e90508af135 100644 --- a/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImportBuilder.php +++ b/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImportBuilder.php @@ -187,6 +187,7 @@ public function getTiers() /** *User-defined unique identifier for the Embedded Price.
+ *This field is required from 31 July 2023.
* * @return null|string diff --git a/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImportModel.php b/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImportModel.php index 03de346ff07..b3f247f8605 100644 --- a/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImportModel.php +++ b/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImportModel.php @@ -308,6 +308,7 @@ public function getTiers() /** *User-defined unique identifier for the Embedded Price.
+ *This field is required from 31 July 2023.
* * * @return null|string diff --git a/references.txt b/references.txt index fb659e72820..62ad597026b 100644 --- a/references.txt +++ b/references.txt @@ -75,3 +75,4 @@ e67d95b62824670b34d2441b151b4a4540c650fd eb9b378300a33f0fa88c299529ff4ea856d7a05a ffae5451a83fffb30629a708d9325edfcc11d72a d64e3f818ddbb68526fbbe5c0ba3c1cfde9a7c0f +b07e7ba714fd02e261dac1818a92f4b434ffb62b From e9754b9f33b020dceefd3218fa072c6c3bc56cff Mon Sep 17 00:00:00 2001 From: Auto MationUser-defined unique identifier of the referenced Order.
- * - - * @return null|string - */ - public function getKey(); - - /** - * @param ?string $id - */ - public function setId(?string $id): void; - - /** - * @param ?string $key - */ - public function setKey(?string $key): void; -} diff --git a/lib/commercetools-api/src/Models/Order/OrderResourceIdentifierBuilder.php b/lib/commercetools-api/src/Models/Order/OrderResourceIdentifierBuilder.php deleted file mode 100644 index 8bc192164e6..00000000000 --- a/lib/commercetools-api/src/Models/Order/OrderResourceIdentifierBuilder.php +++ /dev/null @@ -1,94 +0,0 @@ - - */ -final class OrderResourceIdentifierBuilder implements Builder -{ - /** - - * @var ?string - */ - private $id; - - /** - - * @var ?string - */ - private $key; - - /** - *Unique identifier of the referenced Order.
- * - - * @return null|string - */ - public function getId() - { - return $this->id; - } - - /** - *User-defined unique identifier of the referenced Order.
- * - - * @return null|string - */ - public function getKey() - { - return $this->key; - } - - /** - * @param ?string $id - * @return $this - */ - public function withId(?string $id) - { - $this->id = $id; - - return $this; - } - - /** - * @param ?string $key - * @return $this - */ - public function withKey(?string $key) - { - $this->key = $key; - - return $this; - } - - - public function build(): OrderResourceIdentifier - { - return new OrderResourceIdentifierModel( - $this->id, - $this->key - ); - } - - public static function of(): OrderResourceIdentifierBuilder - { - return new self(); - } -} diff --git a/lib/commercetools-api/src/Models/Order/OrderResourceIdentifierCollection.php b/lib/commercetools-api/src/Models/Order/OrderResourceIdentifierCollection.php deleted file mode 100644 index 5a1d833185f..00000000000 --- a/lib/commercetools-api/src/Models/Order/OrderResourceIdentifierCollection.php +++ /dev/null @@ -1,56 +0,0 @@ - - * @method OrderResourceIdentifier current() - * @method OrderResourceIdentifier end() - * @method OrderResourceIdentifier at($offset) - */ -class OrderResourceIdentifierCollection extends ResourceIdentifierCollection -{ - /** - * @psalm-assert OrderResourceIdentifier $value - * @psalm-param OrderResourceIdentifier|stdClass $value - * @throws InvalidArgumentException - * - * @return OrderResourceIdentifierCollection - */ - public function add($value) - { - if (!$value instanceof OrderResourceIdentifier) { - throw new InvalidArgumentException(); - } - $this->store($value); - - return $this; - } - - /** - * @psalm-return callable(int):?OrderResourceIdentifier - */ - protected function mapper() - { - return function (?int $index): ?OrderResourceIdentifier { - $data = $this->get($index); - if ($data instanceof stdClass) { - /** @var OrderResourceIdentifier $data */ - $data = OrderResourceIdentifierModel::of($data); - $this->set($data, $index); - } - - return $data; - }; - } -} diff --git a/lib/commercetools-api/src/Models/Order/OrderResourceIdentifierModel.php b/lib/commercetools-api/src/Models/Order/OrderResourceIdentifierModel.php deleted file mode 100644 index c3eaedf0d78..00000000000 --- a/lib/commercetools-api/src/Models/Order/OrderResourceIdentifierModel.php +++ /dev/null @@ -1,133 +0,0 @@ -id = $id; - $this->key = $key; - $this->typeId = $typeId ?? self::DISCRIMINATOR_VALUE; - } - - /** - *Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.
- * - * - * @return null|string - */ - public function getTypeId() - { - if (is_null($this->typeId)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_TYPE_ID); - if (is_null($data)) { - return null; - } - $this->typeId = (string) $data; - } - - return $this->typeId; - } - - /** - *Unique identifier of the referenced Order.
- * - * - * @return null|string - */ - public function getId() - { - if (is_null($this->id)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_ID); - if (is_null($data)) { - return null; - } - $this->id = (string) $data; - } - - return $this->id; - } - - /** - *User-defined unique identifier of the referenced Order.
- * - * - * @return null|string - */ - public function getKey() - { - if (is_null($this->key)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_KEY); - if (is_null($data)) { - return null; - } - $this->key = (string) $data; - } - - return $this->key; - } - - - /** - * @param ?string $id - */ - public function setId(?string $id): void - { - $this->id = $id; - } - - /** - * @param ?string $key - */ - public function setKey(?string $key): void - { - $this->key = $key; - } -} diff --git a/references.txt b/references.txt index 62ad597026b..08dad2159d2 100644 --- a/references.txt +++ b/references.txt @@ -76,3 +76,4 @@ eb9b378300a33f0fa88c299529ff4ea856d7a05a ffae5451a83fffb30629a708d9325edfcc11d72a d64e3f818ddbb68526fbbe5c0ba3c1cfde9a7c0f b07e7ba714fd02e261dac1818a92f4b434ffb62b +68aece12ea78c79043175a729bc159bf2ecef280 From 24d574a47405acd509d561f1d3fd6d19606be0e2 Mon Sep 17 00:00:00 2001 From: Auto MationDetermines how taxes are calculated when calculating taxes for taxedPrice
.
Determines how taxes are calculated for taxedPrice
.
Determines how taxes are calculated when calculating taxes for taxedPrice
.
Determines how taxes are calculated for taxedPrice
.
Determines how taxes are calculated when calculating taxes for taxedPrice
.
Determines how taxes are calculated for taxedPrice
.
Part of the Cart that is discounted.
+ *Segment of the Cart that is discounted.
*Empty when the value
is set to giftLineItem
.
Part of the Cart that is discounted.
+ *Segment of the Cart that is discounted.
*Empty when the value
is set to giftLineItem
.
Defines what part of the Cart will be discounted.
+ *Defines what segment of the Cart will be discounted.
*If value
is set to giftLineItem
, this must not be set.
Defines what part of the Cart will be discounted.
+ *Defines what segment of the Cart will be discounted.
*If value
is set to giftLineItem
, this must not be set.
Defines what part of the Cart will be discounted.
+ *Defines what segment of the Cart will be discounted.
*If value
is set to giftLineItem
, this must not be set.
Part of the Cart that is discounted.
+ *Segment of the Cart that is discounted.
*Empty when the value
is set to giftLineItem
.
Total net price of the Line Item or Custom Line Item.
+ *Total net price of the Cart or Order.
* * @return null|Money @@ -27,7 +27,7 @@ interface TaxedPriceDraft extends JsonObject public function getTotalNet(); /** - *Total gross price of the Line Item or Custom Line Item.
+ *Total gross price of the Cart or Order.
* * @return null|Money diff --git a/lib/commercetools-api/src/Models/Cart/TaxedPriceDraftBuilder.php b/lib/commercetools-api/src/Models/Cart/TaxedPriceDraftBuilder.php index e837dfe4a52..f97a2e1a8b6 100644 --- a/lib/commercetools-api/src/Models/Cart/TaxedPriceDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/TaxedPriceDraftBuilder.php @@ -41,7 +41,7 @@ final class TaxedPriceDraftBuilder implements Builder private $taxPortions; /** - *Total net price of the Line Item or Custom Line Item.
+ *Total net price of the Cart or Order.
* * @return null|Money @@ -52,7 +52,7 @@ public function getTotalNet() } /** - *Total gross price of the Line Item or Custom Line Item.
+ *Total gross price of the Cart or Order.
* * @return null|Money diff --git a/lib/commercetools-api/src/Models/Cart/TaxedPriceDraftModel.php b/lib/commercetools-api/src/Models/Cart/TaxedPriceDraftModel.php index 635633565fc..491e8e85760 100644 --- a/lib/commercetools-api/src/Models/Cart/TaxedPriceDraftModel.php +++ b/lib/commercetools-api/src/Models/Cart/TaxedPriceDraftModel.php @@ -54,7 +54,7 @@ public function __construct( } /** - *Total net price of the Line Item or Custom Line Item.
+ *Total net price of the Cart or Order.
* * * @return null|Money @@ -75,7 +75,7 @@ public function getTotalNet() } /** - *Total gross price of the Line Item or Custom Line Item.
+ *Total gross price of the Cart or Order.
* * * @return null|Money diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscount.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscount.php index b137eb51b5d..5ded405ea74 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscount.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscount.php @@ -112,7 +112,7 @@ public function getKey(); public function getDescription(); /** - *Effect of the CartDiscount.
+ *Effect of the CartDiscount on the target
.
Sets a CartDiscountTarget. Empty if value
has type giftLineItem
.
Segment of the Cart that is discounted.
+ *Empty, if the value
is giftLineItem
.
Effect of the CartDiscount.
+ *Effect of the CartDiscount on the target
.
Sets a CartDiscountTarget. Empty if value
has type giftLineItem
.
Segment of the Cart that is discounted.
+ *Empty, if the value
is giftLineItem
.
Effect of the CartDiscount. - * For a target, relative or absolute Discount values or a fixed item Price value can be specified. If no target is specified, a Gift Line Item can be added to the Cart.
+ *Effect of the CartDiscount on the target
.
Must not be set when the value
has type giftLineItem
, otherwise a CartDiscountTarget must be set.
Segment of the Cart that will be discounted.
+ *Must not be set if the value
is giftLineItem
.
Effect of the CartDiscount. - * For a target, relative or absolute Discount values or a fixed item Price value can be specified. If no target is specified, a Gift Line Item can be added to the Cart.
+ *Effect of the CartDiscount on the target
.
Must not be set when the value
has type giftLineItem
, otherwise a CartDiscountTarget must be set.
Segment of the Cart that will be discounted.
+ *Must not be set if the value
is giftLineItem
.
Effect of the CartDiscount. - * For a target, relative or absolute Discount values or a fixed item Price value can be specified. If no target is specified, a Gift Line Item can be added to the Cart.
+ *Effect of the CartDiscount on the target
.
Must not be set when the value
has type giftLineItem
, otherwise a CartDiscountTarget must be set.
Segment of the Cart that will be discounted.
+ *Must not be set if the value
is giftLineItem
.
Effect of the CartDiscount.
+ *Effect of the CartDiscount on the target
.
Sets a CartDiscountTarget. Empty if value
has type giftLineItem
.
Segment of the Cart that is discounted.
+ *Empty, if the value
is giftLineItem
.
Number of Custom Line Items that are discounted per application of this Discount.
+ *Number of Custom Line Items that are discounted per application of this Discount.
+ * It must be less than or equal to the triggerQuantity
.
Maximum number of times this Discount can be applied.
+ *Maximum number of times this Discount can be applied. + * Do not set if the Discount should be applied an unlimited number of times.
* * @return null|int diff --git a/lib/commercetools-api/src/Models/CartDiscount/MultiBuyCustomLineItemsTargetBuilder.php b/lib/commercetools-api/src/Models/CartDiscount/MultiBuyCustomLineItemsTargetBuilder.php index cd0e4257fbd..13a92a75550 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/MultiBuyCustomLineItemsTargetBuilder.php +++ b/lib/commercetools-api/src/Models/CartDiscount/MultiBuyCustomLineItemsTargetBuilder.php @@ -73,7 +73,8 @@ public function getTriggerQuantity() } /** - *Number of Custom Line Items that are discounted per application of this Discount.
+ *Number of Custom Line Items that are discounted per application of this Discount.
+ * It must be less than or equal to the triggerQuantity
.
Maximum number of times this Discount can be applied.
+ *Maximum number of times this Discount can be applied. + * Do not set if the Discount should be applied an unlimited number of times.
* * @return null|int diff --git a/lib/commercetools-api/src/Models/CartDiscount/MultiBuyCustomLineItemsTargetModel.php b/lib/commercetools-api/src/Models/CartDiscount/MultiBuyCustomLineItemsTargetModel.php index a57670da524..c5c2fa38f51 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/MultiBuyCustomLineItemsTargetModel.php +++ b/lib/commercetools-api/src/Models/CartDiscount/MultiBuyCustomLineItemsTargetModel.php @@ -135,7 +135,8 @@ public function getTriggerQuantity() } /** - *Number of Custom Line Items that are discounted per application of this Discount.
+ *Number of Custom Line Items that are discounted per application of this Discount.
+ * It must be less than or equal to the triggerQuantity
.
Maximum number of times this Discount can be applied.
+ *Maximum number of times this Discount can be applied. + * Do not set if the Discount should be applied an unlimited number of times.
* * * @return null|int diff --git a/lib/commercetools-api/src/Models/CartDiscount/MultiBuyLineItemsTarget.php b/lib/commercetools-api/src/Models/CartDiscount/MultiBuyLineItemsTarget.php index e28e85e90e2..382fa2517e2 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/MultiBuyLineItemsTarget.php +++ b/lib/commercetools-api/src/Models/CartDiscount/MultiBuyLineItemsTarget.php @@ -36,7 +36,8 @@ public function getPredicate(); public function getTriggerQuantity(); /** - *Number of Line Items that are discounted per application of this Discount.
+ *Number of Line Items that are discounted per application of this Discount.
+ * It must be less than or equal to the triggerQuantity
.
Maximum number of times this Discount can be applied.
+ *Maximum number of times this Discount can be applied. + * Do not set if the Discount should be applied an unlimited number of times.
* * @return null|int diff --git a/lib/commercetools-api/src/Models/CartDiscount/MultiBuyLineItemsTargetBuilder.php b/lib/commercetools-api/src/Models/CartDiscount/MultiBuyLineItemsTargetBuilder.php index 015176885a7..1d7dc075199 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/MultiBuyLineItemsTargetBuilder.php +++ b/lib/commercetools-api/src/Models/CartDiscount/MultiBuyLineItemsTargetBuilder.php @@ -73,7 +73,8 @@ public function getTriggerQuantity() } /** - *Number of Line Items that are discounted per application of this Discount.
+ *Number of Line Items that are discounted per application of this Discount.
+ * It must be less than or equal to the triggerQuantity
.
Maximum number of times this Discount can be applied.
+ *Maximum number of times this Discount can be applied. + * Do not set if the Discount should be applied an unlimited number of times.
* * @return null|int diff --git a/lib/commercetools-api/src/Models/CartDiscount/MultiBuyLineItemsTargetModel.php b/lib/commercetools-api/src/Models/CartDiscount/MultiBuyLineItemsTargetModel.php index c118dfd93e1..018ea37f07d 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/MultiBuyLineItemsTargetModel.php +++ b/lib/commercetools-api/src/Models/CartDiscount/MultiBuyLineItemsTargetModel.php @@ -135,7 +135,8 @@ public function getTriggerQuantity() } /** - *Number of Line Items that are discounted per application of this Discount.
+ *Number of Line Items that are discounted per application of this Discount.
+ * It must be less than or equal to the triggerQuantity
.
Maximum number of times this Discount can be applied.
+ *Maximum number of times this Discount can be applied. + * Do not set if the Discount should be applied an unlimited number of times.
* * * @return null|int diff --git a/lib/commercetools-api/src/Models/Cart/CustomLineItemImportDraft.php b/lib/commercetools-api/src/Models/Order/CustomLineItemImportDraft.php similarity index 79% rename from lib/commercetools-api/src/Models/Cart/CustomLineItemImportDraft.php rename to lib/commercetools-api/src/Models/Order/CustomLineItemImportDraft.php index b7762662a26..54d7b3ced58 100644 --- a/lib/commercetools-api/src/Models/Cart/CustomLineItemImportDraft.php +++ b/lib/commercetools-api/src/Models/Order/CustomLineItemImportDraft.php @@ -6,11 +6,11 @@ * Do not change it. */ -namespace Commercetools\Api\Models\Cart; +namespace Commercetools\Api\Models\Order; +use Commercetools\Api\Models\Cart\ItemShippingDetailsDraft; use Commercetools\Api\Models\Common\LocalizedString; use Commercetools\Api\Models\Common\Money; -use Commercetools\Api\Models\Order\ItemStateCollection; use Commercetools\Api\Models\TaxCategory\TaxCategoryResourceIdentifier; use Commercetools\Api\Models\TaxCategory\TaxRate; use Commercetools\Api\Models\Type\CustomFieldsDraft; @@ -20,103 +20,104 @@ interface CustomLineItemImportDraft extends JsonObject { public const FIELD_NAME = 'name'; + public const FIELD_SLUG = 'slug'; public const FIELD_QUANTITY = 'quantity'; public const FIELD_MONEY = 'money'; - public const FIELD_SLUG = 'slug'; - public const FIELD_STATE = 'state'; public const FIELD_TAX_RATE = 'taxRate'; public const FIELD_TAX_CATEGORY = 'taxCategory'; - public const FIELD_CUSTOM = 'custom'; - public const FIELD_SHIPPING_DETAILS = 'shippingDetails'; public const FIELD_PRICE_MODE = 'priceMode'; + public const FIELD_SHIPPING_DETAILS = 'shippingDetails'; + public const FIELD_STATE = 'state'; + public const FIELD_CUSTOM = 'custom'; /** + *Name of the Custom Line Item.
+ * * @return null|LocalizedString */ public function getName(); /** - *The amount of a CustomLineItem in the cart. - * Must be a positive integer.
+ *User-defined identifier used in a deep-link URL for the Custom Line Item. This value should match the pattern [a-zA-Z0-9_-]{2,256}
.
The cost to add to the cart. The amount can be negative.
+ *The number of items in the Custom Line Item. Can be a negative value.
* - * @return null|Money - */ - public function getMoney(); - - /** - - * @return null|string + * @return null|int */ - public function getSlug(); + public function getQuantity(); /** + *The cost of individual items in the Custom Line Item. The amount can be negative.
+ * - * @return null|ItemStateCollection + * @return null|Money */ - public function getState(); + public function getMoney(); /** + *The tax rate used to calculate the taxedPrice
of the Order.
Include a value to associate a Tax Category with the Custom Line Item.
+ * * @return null|TaxCategoryResourceIdentifier */ public function getTaxCategory(); /** - *The custom fields.
+ *Standard
, Cart Discounts with a matching CartDiscountCustomLineItemsTarget
+ * are applied to the Custom Line Item.External
, Cart Discounts are not considered on the Custom Line Item.Container for Custom Line Item-specific addresses.
+ * * @return null|ItemShippingDetailsDraft */ public function getShippingDetails(); /** - *Standard
, Cart Discounts with a matching CartDiscountCustomLineItemsTarget
- * are applied to the Custom Line Item.External
, Cart Discounts are not considered on the Custom Line Item.State of the Custom Line Items.
* - * @return null|string + * @return null|ItemStateCollection */ - public function getPriceMode(); + public function getState(); /** - * @param ?LocalizedString $name - */ - public function setName(?LocalizedString $name): void; + *Custom Fields of the CustomLineItem.
+ * - /** - * @param ?int $quantity + * @return null|CustomFieldsDraft */ - public function setQuantity(?int $quantity): void; + public function getCustom(); /** - * @param ?Money $money + * @param ?LocalizedString $name */ - public function setMoney(?Money $money): void; + public function setName(?LocalizedString $name): void; /** * @param ?string $slug @@ -124,9 +125,14 @@ public function setMoney(?Money $money): void; public function setSlug(?string $slug): void; /** - * @param ?ItemStateCollection $state + * @param ?int $quantity */ - public function setState(?ItemStateCollection $state): void; + public function setQuantity(?int $quantity): void; + + /** + * @param ?Money $money + */ + public function setMoney(?Money $money): void; /** * @param ?TaxRate $taxRate @@ -139,9 +145,9 @@ public function setTaxRate(?TaxRate $taxRate): void; public function setTaxCategory(?TaxCategoryResourceIdentifier $taxCategory): void; /** - * @param ?CustomFieldsDraft $custom + * @param ?string $priceMode */ - public function setCustom(?CustomFieldsDraft $custom): void; + public function setPriceMode(?string $priceMode): void; /** * @param ?ItemShippingDetailsDraft $shippingDetails @@ -149,7 +155,12 @@ public function setCustom(?CustomFieldsDraft $custom): void; public function setShippingDetails(?ItemShippingDetailsDraft $shippingDetails): void; /** - * @param ?string $priceMode + * @param ?ItemStateCollection $state */ - public function setPriceMode(?string $priceMode): void; + public function setState(?ItemStateCollection $state): void; + + /** + * @param ?CustomFieldsDraft $custom + */ + public function setCustom(?CustomFieldsDraft $custom): void; } diff --git a/lib/commercetools-api/src/Models/Cart/CustomLineItemImportDraftBuilder.php b/lib/commercetools-api/src/Models/Order/CustomLineItemImportDraftBuilder.php similarity index 89% rename from lib/commercetools-api/src/Models/Cart/CustomLineItemImportDraftBuilder.php rename to lib/commercetools-api/src/Models/Order/CustomLineItemImportDraftBuilder.php index 87914ef7fcb..d46073486be 100644 --- a/lib/commercetools-api/src/Models/Cart/CustomLineItemImportDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Order/CustomLineItemImportDraftBuilder.php @@ -6,13 +6,14 @@ * Do not change it. */ -namespace Commercetools\Api\Models\Cart; +namespace Commercetools\Api\Models\Order; +use Commercetools\Api\Models\Cart\ItemShippingDetailsDraft; +use Commercetools\Api\Models\Cart\ItemShippingDetailsDraftBuilder; use Commercetools\Api\Models\Common\LocalizedString; use Commercetools\Api\Models\Common\LocalizedStringBuilder; use Commercetools\Api\Models\Common\Money; use Commercetools\Api\Models\Common\MoneyBuilder; -use Commercetools\Api\Models\Order\ItemStateCollection; use Commercetools\Api\Models\TaxCategory\TaxCategoryResourceIdentifier; use Commercetools\Api\Models\TaxCategory\TaxCategoryResourceIdentifierBuilder; use Commercetools\Api\Models\TaxCategory\TaxRate; @@ -39,27 +40,21 @@ final class CustomLineItemImportDraftBuilder implements Builder /** - * @var ?int - */ - private $quantity; - - /** - - * @var null|Money|MoneyBuilder + * @var ?string */ - private $money; + private $slug; /** - * @var ?string + * @var ?int */ - private $slug; + private $quantity; /** - * @var ?ItemStateCollection + * @var null|Money|MoneyBuilder */ - private $state; + private $money; /** @@ -75,9 +70,9 @@ final class CustomLineItemImportDraftBuilder implements Builder /** - * @var null|CustomFieldsDraft|CustomFieldsDraftBuilder + * @var ?string */ - private $custom; + private $priceMode; /** @@ -87,61 +82,63 @@ final class CustomLineItemImportDraftBuilder implements Builder /** - * @var ?string + * @var ?ItemStateCollection */ - private $priceMode; + private $state; /** - * @return null|LocalizedString + * @var null|CustomFieldsDraft|CustomFieldsDraftBuilder */ - public function getName() - { - return $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name; - } + private $custom; /** - *The amount of a CustomLineItem in the cart. - * Must be a positive integer.
+ *Name of the Custom Line Item.
* - * @return null|int + * @return null|LocalizedString */ - public function getQuantity() + public function getName() { - return $this->quantity; + return $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name; } /** - *The cost to add to the cart. The amount can be negative.
+ *User-defined identifier used in a deep-link URL for the Custom Line Item. This value should match the pattern [a-zA-Z0-9_-]{2,256}
.
The number of items in the Custom Line Item. Can be a negative value.
+ * - * @return null|string + * @return null|int */ - public function getSlug() + public function getQuantity() { - return $this->slug; + return $this->quantity; } /** + *The cost of individual items in the Custom Line Item. The amount can be negative.
+ * - * @return null|ItemStateCollection + * @return null|Money */ - public function getState() + public function getMoney() { - return $this->state; + return $this->money instanceof MoneyBuilder ? $this->money->build() : $this->money; } /** + *The tax rate used to calculate the taxedPrice
of the Order.
Include a value to associate a Tax Category with the Custom Line Item.
+ * * @return null|TaxCategoryResourceIdentifier */ @@ -160,17 +159,23 @@ public function getTaxCategory() } /** - *The custom fields.
+ *Standard
, Cart Discounts with a matching CartDiscountCustomLineItemsTarget
+ * are applied to the Custom Line Item.External
, Cart Discounts are not considered on the Custom Line Item.Container for Custom Line Item-specific addresses.
+ * * @return null|ItemShippingDetailsDraft */ @@ -180,71 +185,67 @@ public function getShippingDetails() } /** - *Standard
, Cart Discounts with a matching CartDiscountCustomLineItemsTarget
- * are applied to the Custom Line Item.External
, Cart Discounts are not considered on the Custom Line Item.State of the Custom Line Items.
* - * @return null|string + * @return null|ItemStateCollection */ - public function getPriceMode() + public function getState() { - return $this->priceMode; + return $this->state; } /** - * @param ?LocalizedString $name - * @return $this + *Custom Fields of the CustomLineItem.
+ * + + * @return null|CustomFieldsDraft */ - public function withName(?LocalizedString $name) + public function getCustom() { - $this->name = $name; - - return $this; + return $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom; } /** - * @param ?int $quantity + * @param ?LocalizedString $name * @return $this */ - public function withQuantity(?int $quantity) + public function withName(?LocalizedString $name) { - $this->quantity = $quantity; + $this->name = $name; return $this; } /** - * @param ?Money $money + * @param ?string $slug * @return $this */ - public function withMoney(?Money $money) + public function withSlug(?string $slug) { - $this->money = $money; + $this->slug = $slug; return $this; } /** - * @param ?string $slug + * @param ?int $quantity * @return $this */ - public function withSlug(?string $slug) + public function withQuantity(?int $quantity) { - $this->slug = $slug; + $this->quantity = $quantity; return $this; } /** - * @param ?ItemStateCollection $state + * @param ?Money $money * @return $this */ - public function withState(?ItemStateCollection $state) + public function withMoney(?Money $money) { - $this->state = $state; + $this->money = $money; return $this; } @@ -272,12 +273,12 @@ public function withTaxCategory(?TaxCategoryResourceIdentifier $taxCategory) } /** - * @param ?CustomFieldsDraft $custom + * @param ?string $priceMode * @return $this */ - public function withCustom(?CustomFieldsDraft $custom) + public function withPriceMode(?string $priceMode) { - $this->custom = $custom; + $this->priceMode = $priceMode; return $this; } @@ -294,12 +295,23 @@ public function withShippingDetails(?ItemShippingDetailsDraft $shippingDetails) } /** - * @param ?string $priceMode + * @param ?ItemStateCollection $state * @return $this */ - public function withPriceMode(?string $priceMode) + public function withState(?ItemStateCollection $state) { - $this->priceMode = $priceMode; + $this->state = $state; + + return $this; + } + + /** + * @param ?CustomFieldsDraft $custom + * @return $this + */ + public function withCustom(?CustomFieldsDraft $custom) + { + $this->custom = $custom; return $this; } @@ -349,23 +361,23 @@ public function withTaxCategoryBuilder(?TaxCategoryResourceIdentifierBuilder $ta } /** - * @deprecated use withCustom() instead + * @deprecated use withShippingDetails() instead * @return $this */ - public function withCustomBuilder(?CustomFieldsDraftBuilder $custom) + public function withShippingDetailsBuilder(?ItemShippingDetailsDraftBuilder $shippingDetails) { - $this->custom = $custom; + $this->shippingDetails = $shippingDetails; return $this; } /** - * @deprecated use withShippingDetails() instead + * @deprecated use withCustom() instead * @return $this */ - public function withShippingDetailsBuilder(?ItemShippingDetailsDraftBuilder $shippingDetails) + public function withCustomBuilder(?CustomFieldsDraftBuilder $custom) { - $this->shippingDetails = $shippingDetails; + $this->custom = $custom; return $this; } @@ -374,15 +386,15 @@ public function build(): CustomLineItemImportDraft { return new CustomLineItemImportDraftModel( $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name, + $this->slug, $this->quantity, $this->money instanceof MoneyBuilder ? $this->money->build() : $this->money, - $this->slug, - $this->state, $this->taxRate instanceof TaxRateBuilder ? $this->taxRate->build() : $this->taxRate, $this->taxCategory instanceof TaxCategoryResourceIdentifierBuilder ? $this->taxCategory->build() : $this->taxCategory, - $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom, + $this->priceMode, $this->shippingDetails instanceof ItemShippingDetailsDraftBuilder ? $this->shippingDetails->build() : $this->shippingDetails, - $this->priceMode + $this->state, + $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom ); } diff --git a/lib/commercetools-api/src/Models/Cart/CustomLineItemImportDraftCollection.php b/lib/commercetools-api/src/Models/Order/CustomLineItemImportDraftCollection.php similarity index 97% rename from lib/commercetools-api/src/Models/Cart/CustomLineItemImportDraftCollection.php rename to lib/commercetools-api/src/Models/Order/CustomLineItemImportDraftCollection.php index 5103ea2282a..325fa045b89 100644 --- a/lib/commercetools-api/src/Models/Cart/CustomLineItemImportDraftCollection.php +++ b/lib/commercetools-api/src/Models/Order/CustomLineItemImportDraftCollection.php @@ -6,7 +6,7 @@ * Do not change it. */ -namespace Commercetools\Api\Models\Cart; +namespace Commercetools\Api\Models\Order; use Commercetools\Base\MapperSequence; use Commercetools\Exception\InvalidArgumentException; diff --git a/lib/commercetools-api/src/Models/Cart/CustomLineItemImportDraftModel.php b/lib/commercetools-api/src/Models/Order/CustomLineItemImportDraftModel.php similarity index 89% rename from lib/commercetools-api/src/Models/Cart/CustomLineItemImportDraftModel.php rename to lib/commercetools-api/src/Models/Order/CustomLineItemImportDraftModel.php index 35964a4148e..348d9cec4cd 100644 --- a/lib/commercetools-api/src/Models/Cart/CustomLineItemImportDraftModel.php +++ b/lib/commercetools-api/src/Models/Order/CustomLineItemImportDraftModel.php @@ -6,13 +6,14 @@ * Do not change it. */ -namespace Commercetools\Api\Models\Cart; +namespace Commercetools\Api\Models\Order; +use Commercetools\Api\Models\Cart\ItemShippingDetailsDraft; +use Commercetools\Api\Models\Cart\ItemShippingDetailsDraftModel; use Commercetools\Api\Models\Common\LocalizedString; use Commercetools\Api\Models\Common\LocalizedStringModel; use Commercetools\Api\Models\Common\Money; use Commercetools\Api\Models\Common\MoneyModel; -use Commercetools\Api\Models\Order\ItemStateCollection; use Commercetools\Api\Models\TaxCategory\TaxCategoryResourceIdentifier; use Commercetools\Api\Models\TaxCategory\TaxCategoryResourceIdentifierModel; use Commercetools\Api\Models\TaxCategory\TaxRate; @@ -38,27 +39,21 @@ final class CustomLineItemImportDraftModel extends JsonObjectModel implements Cu /** * - * @var ?int - */ - protected $quantity; - - /** - * - * @var ?Money + * @var ?string */ - protected $money; + protected $slug; /** * - * @var ?string + * @var ?int */ - protected $slug; + protected $quantity; /** * - * @var ?ItemStateCollection + * @var ?Money */ - protected $state; + protected $money; /** * @@ -74,9 +69,9 @@ final class CustomLineItemImportDraftModel extends JsonObjectModel implements Cu /** * - * @var ?CustomFieldsDraft + * @var ?string */ - protected $custom; + protected $priceMode; /** * @@ -86,9 +81,15 @@ final class CustomLineItemImportDraftModel extends JsonObjectModel implements Cu /** * - * @var ?string + * @var ?ItemStateCollection */ - protected $priceMode; + protected $state; + + /** + * + * @var ?CustomFieldsDraft + */ + protected $custom; /** @@ -96,29 +97,31 @@ final class CustomLineItemImportDraftModel extends JsonObjectModel implements Cu */ public function __construct( ?LocalizedString $name = null, + ?string $slug = null, ?int $quantity = null, ?Money $money = null, - ?string $slug = null, - ?ItemStateCollection $state = null, ?TaxRate $taxRate = null, ?TaxCategoryResourceIdentifier $taxCategory = null, - ?CustomFieldsDraft $custom = null, + ?string $priceMode = null, ?ItemShippingDetailsDraft $shippingDetails = null, - ?string $priceMode = null + ?ItemStateCollection $state = null, + ?CustomFieldsDraft $custom = null ) { $this->name = $name; + $this->slug = $slug; $this->quantity = $quantity; $this->money = $money; - $this->slug = $slug; - $this->state = $state; $this->taxRate = $taxRate; $this->taxCategory = $taxCategory; - $this->custom = $custom; - $this->shippingDetails = $shippingDetails; $this->priceMode = $priceMode; + $this->shippingDetails = $shippingDetails; + $this->state = $state; + $this->custom = $custom; } /** + *Name of the Custom Line Item.
+ * * * @return null|LocalizedString */ @@ -138,8 +141,27 @@ public function getName() } /** - *The amount of a CustomLineItem in the cart. - * Must be a positive integer.
+ *User-defined identifier used in a deep-link URL for the Custom Line Item. This value should match the pattern [a-zA-Z0-9_-]{2,256}
.
The number of items in the Custom Line Item. Can be a negative value.
* * * @return null|int @@ -159,7 +181,7 @@ public function getQuantity() } /** - *The cost to add to the cart. The amount can be negative.
+ *The cost of individual items in the Custom Line Item. The amount can be negative.
* * * @return null|Money @@ -180,42 +202,8 @@ public function getMoney() } /** + *The tax rate used to calculate the taxedPrice
of the Order.
Include a value to associate a Tax Category with the Custom Line Item.
+ * * * @return null|TaxCategoryResourceIdentifier */ @@ -254,27 +244,32 @@ public function getTaxCategory() } /** - *The custom fields.
+ *Standard
, Cart Discounts with a matching CartDiscountCustomLineItemsTarget
+ * are applied to the Custom Line Item.External
, Cart Discounts are not considered on the Custom Line Item.Container for Custom Line Item-specific addresses.
+ * * * @return null|ItemShippingDetailsDraft */ @@ -294,68 +289,77 @@ public function getShippingDetails() } /** - *Standard
, Cart Discounts with a matching CartDiscountCustomLineItemsTarget
- * are applied to the Custom Line Item.External
, Cart Discounts are not considered on the Custom Line Item.State of the Custom Line Items.
* * - * @return null|string + * @return null|ItemStateCollection */ - public function getPriceMode() + public function getState() { - if (is_null($this->priceMode)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_PRICE_MODE); + if (is_null($this->state)) { + /** @psalm-var ?listCustom Fields of the CustomLineItem.
+ * + * + * @return null|CustomFieldsDraft */ - public function setName(?LocalizedString $name): void + public function getCustom() { - $this->name = $name; + if (is_null($this->custom)) { + /** @psalm-var stdClass|arrayDraft type that stores amounts only in cent precision for the specified currency.
+ *Discounted money value.
* * @return null|Money @@ -27,6 +27,8 @@ interface DiscountedLineItemPriceDraft extends JsonObject public function getValue(); /** + *Discounts to be applied.
+ * * @return null|DiscountedLineItemPortionCollection */ diff --git a/lib/commercetools-api/src/Models/Order/DiscountedLineItemPriceDraftBuilder.php b/lib/commercetools-api/src/Models/Order/DiscountedLineItemPriceDraftBuilder.php index e774a498793..ce5c8a2a785 100644 --- a/lib/commercetools-api/src/Models/Order/DiscountedLineItemPriceDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Order/DiscountedLineItemPriceDraftBuilder.php @@ -36,7 +36,7 @@ final class DiscountedLineItemPriceDraftBuilder implements Builder private $includedDiscounts; /** - *Draft type that stores amounts only in cent precision for the specified currency.
+ *Discounted money value.
* * @return null|Money @@ -47,6 +47,8 @@ public function getValue() } /** + *Discounts to be applied.
+ * * @return null|DiscountedLineItemPortionCollection */ diff --git a/lib/commercetools-api/src/Models/Order/DiscountedLineItemPriceDraftModel.php b/lib/commercetools-api/src/Models/Order/DiscountedLineItemPriceDraftModel.php index 73ee7ee0565..29159468546 100644 --- a/lib/commercetools-api/src/Models/Order/DiscountedLineItemPriceDraftModel.php +++ b/lib/commercetools-api/src/Models/Order/DiscountedLineItemPriceDraftModel.php @@ -47,7 +47,7 @@ public function __construct( } /** - *Draft type that stores amounts only in cent precision for the specified currency.
+ *Discounted money value.
* * * @return null|Money @@ -68,6 +68,8 @@ public function getValue() } /** + *Discounts to be applied.
+ * * * @return null|DiscountedLineItemPortionCollection */ diff --git a/lib/commercetools-api/src/Models/Order/LineItemImportDraft.php b/lib/commercetools-api/src/Models/Order/LineItemImportDraft.php index 1de13892d70..bc4a6f607eb 100644 --- a/lib/commercetools-api/src/Models/Order/LineItemImportDraft.php +++ b/lib/commercetools-api/src/Models/Order/LineItemImportDraft.php @@ -19,30 +19,21 @@ interface LineItemImportDraft extends JsonObject { - public const FIELD_PRODUCT_ID = 'productId'; public const FIELD_NAME = 'name'; public const FIELD_VARIANT = 'variant'; - public const FIELD_PRICE = 'price'; + public const FIELD_PRODUCT_ID = 'productId'; public const FIELD_QUANTITY = 'quantity'; - public const FIELD_STATE = 'state'; - public const FIELD_SUPPLY_CHANNEL = 'supplyChannel'; - public const FIELD_DISTRIBUTION_CHANNEL = 'distributionChannel'; + public const FIELD_PRICE = 'price'; public const FIELD_TAX_RATE = 'taxRate'; - public const FIELD_CUSTOM = 'custom'; + public const FIELD_DISTRIBUTION_CHANNEL = 'distributionChannel'; + public const FIELD_SUPPLY_CHANNEL = 'supplyChannel'; public const FIELD_INVENTORY_MODE = 'inventoryMode'; public const FIELD_SHIPPING_DETAILS = 'shippingDetails'; + public const FIELD_STATE = 'state'; + public const FIELD_CUSTOM = 'custom'; /** - *ID of the existing product. - * You also need to specify the ID of the variant if this property is set or alternatively you can just specify SKU of the product variant.
- * - - * @return null|string - */ - public function getProductId(); - - /** - *The product name.
+ *Name of the Line Item.
* * @return null|LocalizedString @@ -50,44 +41,49 @@ public function getProductId(); public function getName(); /** + *The Product Variant to use as a Line Item.
+ * * @return null|ProductVariantImportDraft */ public function getVariant(); /** + *id
of the Product the Product Variant belongs to.
If provided, you must also set variant.id
.
The number of Product Variants in the LineItem. Can be a negative value.
+ * * @return null|int */ public function getQuantity(); /** + *The Line Item price for quantity
= 1
. The amount can be negative.
Connection to a particular supplier. - * By providing supply channel information, you can uniquely identify - * inventory entries that should be reserved. - * The provided channel should have the - * InventorySupply role.
+ *The tax rate used to calculate the taxedPrice
of the Order.
The channel is used to select a ProductPrice. - * The provided channel should have the ProductDistribution role.
+ *The Channel used to select a Price.
+ * This Channel must have the ProductDistribution
role.
The custom fields.
+ *The Channel used to supply Line Items.
+ * By providing supply Channel information, you can uniquely identify Inventory entries that should be reserved.
+ * This Channel must have the InventorySupply
role.
Inventory mode specific to the line item only, valid for the entire quantity
of the line item.
- * Set only if inventory mode should be different from the inventoryMode
specified on the OrderImportDraft.
Inventory mode specific to the LineItem, valid for the entire quantity
of the LineItem.
+ * Set only if Inventory mode should be different from the inventoryMode
specified on the OrderImportDraft.
Container for Line Item-specific addresses.
+ * * @return null|ItemShippingDetailsDraft */ public function getShippingDetails(); /** - * @param ?string $productId + *States of the Line Item.
+ * + + * @return null|ItemStateCollection */ - public function setProductId(?string $productId): void; + public function getState(); + + /** + *Custom Fields of the LineItem.
+ * + + * @return null|CustomFieldsDraft + */ + public function getCustom(); /** * @param ?LocalizedString $name @@ -139,9 +144,9 @@ public function setName(?LocalizedString $name): void; public function setVariant(?ProductVariantImportDraft $variant): void; /** - * @param ?PriceDraft $price + * @param ?string $productId */ - public function setPrice(?PriceDraft $price): void; + public function setProductId(?string $productId): void; /** * @param ?int $quantity @@ -149,14 +154,14 @@ public function setPrice(?PriceDraft $price): void; public function setQuantity(?int $quantity): void; /** - * @param ?ItemStateCollection $state + * @param ?PriceDraft $price */ - public function setState(?ItemStateCollection $state): void; + public function setPrice(?PriceDraft $price): void; /** - * @param ?ChannelResourceIdentifier $supplyChannel + * @param ?TaxRate $taxRate */ - public function setSupplyChannel(?ChannelResourceIdentifier $supplyChannel): void; + public function setTaxRate(?TaxRate $taxRate): void; /** * @param ?ChannelResourceIdentifier $distributionChannel @@ -164,14 +169,9 @@ public function setSupplyChannel(?ChannelResourceIdentifier $supplyChannel): voi public function setDistributionChannel(?ChannelResourceIdentifier $distributionChannel): void; /** - * @param ?TaxRate $taxRate - */ - public function setTaxRate(?TaxRate $taxRate): void; - - /** - * @param ?CustomFieldsDraft $custom + * @param ?ChannelResourceIdentifier $supplyChannel */ - public function setCustom(?CustomFieldsDraft $custom): void; + public function setSupplyChannel(?ChannelResourceIdentifier $supplyChannel): void; /** * @param ?string $inventoryMode @@ -182,4 +182,14 @@ public function setInventoryMode(?string $inventoryMode): void; * @param ?ItemShippingDetailsDraft $shippingDetails */ public function setShippingDetails(?ItemShippingDetailsDraft $shippingDetails): void; + + /** + * @param ?ItemStateCollection $state + */ + public function setState(?ItemStateCollection $state): void; + + /** + * @param ?CustomFieldsDraft $custom + */ + public function setCustom(?CustomFieldsDraft $custom): void; } diff --git a/lib/commercetools-api/src/Models/Order/LineItemImportDraftBuilder.php b/lib/commercetools-api/src/Models/Order/LineItemImportDraftBuilder.php index 0ab8767c8f8..d7cb7818b78 100644 --- a/lib/commercetools-api/src/Models/Order/LineItemImportDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Order/LineItemImportDraftBuilder.php @@ -32,12 +32,6 @@ */ final class LineItemImportDraftBuilder implements Builder { - /** - - * @var ?string - */ - private $productId; - /** * @var null|LocalizedString|LocalizedStringBuilder @@ -52,9 +46,9 @@ final class LineItemImportDraftBuilder implements Builder /** - * @var null|PriceDraft|PriceDraftBuilder + * @var ?string */ - private $price; + private $productId; /** @@ -64,15 +58,15 @@ final class LineItemImportDraftBuilder implements Builder /** - * @var ?ItemStateCollection + * @var null|PriceDraft|PriceDraftBuilder */ - private $state; + private $price; /** - * @var null|ChannelResourceIdentifier|ChannelResourceIdentifierBuilder + * @var null|TaxRate|TaxRateBuilder */ - private $supplyChannel; + private $taxRate; /** @@ -82,15 +76,9 @@ final class LineItemImportDraftBuilder implements Builder /** - * @var null|TaxRate|TaxRateBuilder - */ - private $taxRate; - - /** - - * @var null|CustomFieldsDraft|CustomFieldsDraftBuilder + * @var null|ChannelResourceIdentifier|ChannelResourceIdentifierBuilder */ - private $custom; + private $supplyChannel; /** @@ -105,19 +93,19 @@ final class LineItemImportDraftBuilder implements Builder private $shippingDetails; /** - *ID of the existing product. - * You also need to specify the ID of the variant if this property is set or alternatively you can just specify SKU of the product variant.
- * - * @return null|string + * @var ?ItemStateCollection */ - public function getProductId() - { - return $this->productId; - } + private $state; /** - *The product name.
+ + * @var null|CustomFieldsDraft|CustomFieldsDraftBuilder + */ + private $custom; + + /** + *Name of the Line Item.
* * @return null|LocalizedString @@ -128,6 +116,8 @@ public function getName() } /** + *The Product Variant to use as a Line Item.
+ * * @return null|ProductVariantImportDraft */ @@ -137,15 +127,20 @@ public function getVariant() } /** + *id
of the Product the Product Variant belongs to.
If provided, you must also set variant.id
.
The number of Product Variants in the LineItem. Can be a negative value.
+ * * @return null|int */ @@ -155,32 +150,30 @@ public function getQuantity() } /** + *The Line Item price for quantity
= 1
. The amount can be negative.
Connection to a particular supplier. - * By providing supply channel information, you can uniquely identify - * inventory entries that should be reserved. - * The provided channel should have the - * InventorySupply role.
+ *The tax rate used to calculate the taxedPrice
of the Order.
The channel is used to select a ProductPrice. - * The provided channel should have the ProductDistribution role.
+ *The Channel used to select a Price.
+ * This Channel must have the ProductDistribution
role.
The custom fields.
+ *The Channel used to supply Line Items.
+ * By providing supply Channel information, you can uniquely identify Inventory entries that should be reserved.
+ * This Channel must have the InventorySupply
role.
Inventory mode specific to the line item only, valid for the entire quantity
of the line item.
- * Set only if inventory mode should be different from the inventoryMode
specified on the OrderImportDraft.
Inventory mode specific to the LineItem, valid for the entire quantity
of the LineItem.
+ * Set only if Inventory mode should be different from the inventoryMode
specified on the OrderImportDraft.
Container for Line Item-specific addresses.
+ * * @return null|ItemShippingDetailsDraft */ @@ -232,14 +220,25 @@ public function getShippingDetails() } /** - * @param ?string $productId - * @return $this + *States of the Line Item.
+ * + + * @return null|ItemStateCollection */ - public function withProductId(?string $productId) + public function getState() { - $this->productId = $productId; + return $this->state; + } - return $this; + /** + *Custom Fields of the LineItem.
+ * + + * @return null|CustomFieldsDraft + */ + public function getCustom() + { + return $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom; } /** @@ -265,12 +264,12 @@ public function withVariant(?ProductVariantImportDraft $variant) } /** - * @param ?PriceDraft $price + * @param ?string $productId * @return $this */ - public function withPrice(?PriceDraft $price) + public function withProductId(?string $productId) { - $this->price = $price; + $this->productId = $productId; return $this; } @@ -287,23 +286,23 @@ public function withQuantity(?int $quantity) } /** - * @param ?ItemStateCollection $state + * @param ?PriceDraft $price * @return $this */ - public function withState(?ItemStateCollection $state) + public function withPrice(?PriceDraft $price) { - $this->state = $state; + $this->price = $price; return $this; } /** - * @param ?ChannelResourceIdentifier $supplyChannel + * @param ?TaxRate $taxRate * @return $this */ - public function withSupplyChannel(?ChannelResourceIdentifier $supplyChannel) + public function withTaxRate(?TaxRate $taxRate) { - $this->supplyChannel = $supplyChannel; + $this->taxRate = $taxRate; return $this; } @@ -320,45 +319,56 @@ public function withDistributionChannel(?ChannelResourceIdentifier $distribution } /** - * @param ?TaxRate $taxRate + * @param ?ChannelResourceIdentifier $supplyChannel * @return $this */ - public function withTaxRate(?TaxRate $taxRate) + public function withSupplyChannel(?ChannelResourceIdentifier $supplyChannel) { - $this->taxRate = $taxRate; + $this->supplyChannel = $supplyChannel; return $this; } /** - * @param ?CustomFieldsDraft $custom + * @param ?string $inventoryMode * @return $this */ - public function withCustom(?CustomFieldsDraft $custom) + public function withInventoryMode(?string $inventoryMode) { - $this->custom = $custom; + $this->inventoryMode = $inventoryMode; return $this; } /** - * @param ?string $inventoryMode + * @param ?ItemShippingDetailsDraft $shippingDetails * @return $this */ - public function withInventoryMode(?string $inventoryMode) + public function withShippingDetails(?ItemShippingDetailsDraft $shippingDetails) { - $this->inventoryMode = $inventoryMode; + $this->shippingDetails = $shippingDetails; return $this; } /** - * @param ?ItemShippingDetailsDraft $shippingDetails + * @param ?ItemStateCollection $state * @return $this */ - public function withShippingDetails(?ItemShippingDetailsDraft $shippingDetails) + public function withState(?ItemStateCollection $state) { - $this->shippingDetails = $shippingDetails; + $this->state = $state; + + return $this; + } + + /** + * @param ?CustomFieldsDraft $custom + * @return $this + */ + public function withCustom(?CustomFieldsDraft $custom) + { + $this->custom = $custom; return $this; } @@ -397,12 +407,12 @@ public function withPriceBuilder(?PriceDraftBuilder $price) } /** - * @deprecated use withSupplyChannel() instead + * @deprecated use withTaxRate() instead * @return $this */ - public function withSupplyChannelBuilder(?ChannelResourceIdentifierBuilder $supplyChannel) + public function withTaxRateBuilder(?TaxRateBuilder $taxRate) { - $this->supplyChannel = $supplyChannel; + $this->taxRate = $taxRate; return $this; } @@ -419,34 +429,34 @@ public function withDistributionChannelBuilder(?ChannelResourceIdentifierBuilder } /** - * @deprecated use withTaxRate() instead + * @deprecated use withSupplyChannel() instead * @return $this */ - public function withTaxRateBuilder(?TaxRateBuilder $taxRate) + public function withSupplyChannelBuilder(?ChannelResourceIdentifierBuilder $supplyChannel) { - $this->taxRate = $taxRate; + $this->supplyChannel = $supplyChannel; return $this; } /** - * @deprecated use withCustom() instead + * @deprecated use withShippingDetails() instead * @return $this */ - public function withCustomBuilder(?CustomFieldsDraftBuilder $custom) + public function withShippingDetailsBuilder(?ItemShippingDetailsDraftBuilder $shippingDetails) { - $this->custom = $custom; + $this->shippingDetails = $shippingDetails; return $this; } /** - * @deprecated use withShippingDetails() instead + * @deprecated use withCustom() instead * @return $this */ - public function withShippingDetailsBuilder(?ItemShippingDetailsDraftBuilder $shippingDetails) + public function withCustomBuilder(?CustomFieldsDraftBuilder $custom) { - $this->shippingDetails = $shippingDetails; + $this->custom = $custom; return $this; } @@ -454,18 +464,18 @@ public function withShippingDetailsBuilder(?ItemShippingDetailsDraftBuilder $shi public function build(): LineItemImportDraft { return new LineItemImportDraftModel( - $this->productId, $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name, $this->variant instanceof ProductVariantImportDraftBuilder ? $this->variant->build() : $this->variant, - $this->price instanceof PriceDraftBuilder ? $this->price->build() : $this->price, + $this->productId, $this->quantity, - $this->state, - $this->supplyChannel instanceof ChannelResourceIdentifierBuilder ? $this->supplyChannel->build() : $this->supplyChannel, - $this->distributionChannel instanceof ChannelResourceIdentifierBuilder ? $this->distributionChannel->build() : $this->distributionChannel, + $this->price instanceof PriceDraftBuilder ? $this->price->build() : $this->price, $this->taxRate instanceof TaxRateBuilder ? $this->taxRate->build() : $this->taxRate, - $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom, + $this->distributionChannel instanceof ChannelResourceIdentifierBuilder ? $this->distributionChannel->build() : $this->distributionChannel, + $this->supplyChannel instanceof ChannelResourceIdentifierBuilder ? $this->supplyChannel->build() : $this->supplyChannel, $this->inventoryMode, - $this->shippingDetails instanceof ItemShippingDetailsDraftBuilder ? $this->shippingDetails->build() : $this->shippingDetails + $this->shippingDetails instanceof ItemShippingDetailsDraftBuilder ? $this->shippingDetails->build() : $this->shippingDetails, + $this->state, + $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom ); } diff --git a/lib/commercetools-api/src/Models/Order/LineItemImportDraftModel.php b/lib/commercetools-api/src/Models/Order/LineItemImportDraftModel.php index ed86bae1c9f..170f7c4599b 100644 --- a/lib/commercetools-api/src/Models/Order/LineItemImportDraftModel.php +++ b/lib/commercetools-api/src/Models/Order/LineItemImportDraftModel.php @@ -31,12 +31,6 @@ */ final class LineItemImportDraftModel extends JsonObjectModel implements LineItemImportDraft { - /** - * - * @var ?string - */ - protected $productId; - /** * * @var ?LocalizedString @@ -51,9 +45,9 @@ final class LineItemImportDraftModel extends JsonObjectModel implements LineItem /** * - * @var ?PriceDraft + * @var ?string */ - protected $price; + protected $productId; /** * @@ -63,15 +57,15 @@ final class LineItemImportDraftModel extends JsonObjectModel implements LineItem /** * - * @var ?ItemStateCollection + * @var ?PriceDraft */ - protected $state; + protected $price; /** * - * @var ?ChannelResourceIdentifier + * @var ?TaxRate */ - protected $supplyChannel; + protected $taxRate; /** * @@ -81,15 +75,9 @@ final class LineItemImportDraftModel extends JsonObjectModel implements LineItem /** * - * @var ?TaxRate - */ - protected $taxRate; - - /** - * - * @var ?CustomFieldsDraft + * @var ?ChannelResourceIdentifier */ - protected $custom; + protected $supplyChannel; /** * @@ -103,61 +91,52 @@ final class LineItemImportDraftModel extends JsonObjectModel implements LineItem */ protected $shippingDetails; + /** + * + * @var ?ItemStateCollection + */ + protected $state; + + /** + * + * @var ?CustomFieldsDraft + */ + protected $custom; + /** * @psalm-suppress MissingParamType */ public function __construct( - ?string $productId = null, ?LocalizedString $name = null, ?ProductVariantImportDraft $variant = null, - ?PriceDraft $price = null, + ?string $productId = null, ?int $quantity = null, - ?ItemStateCollection $state = null, - ?ChannelResourceIdentifier $supplyChannel = null, - ?ChannelResourceIdentifier $distributionChannel = null, + ?PriceDraft $price = null, ?TaxRate $taxRate = null, - ?CustomFieldsDraft $custom = null, + ?ChannelResourceIdentifier $distributionChannel = null, + ?ChannelResourceIdentifier $supplyChannel = null, ?string $inventoryMode = null, - ?ItemShippingDetailsDraft $shippingDetails = null + ?ItemShippingDetailsDraft $shippingDetails = null, + ?ItemStateCollection $state = null, + ?CustomFieldsDraft $custom = null ) { - $this->productId = $productId; $this->name = $name; $this->variant = $variant; - $this->price = $price; + $this->productId = $productId; $this->quantity = $quantity; - $this->state = $state; - $this->supplyChannel = $supplyChannel; - $this->distributionChannel = $distributionChannel; + $this->price = $price; $this->taxRate = $taxRate; - $this->custom = $custom; + $this->distributionChannel = $distributionChannel; + $this->supplyChannel = $supplyChannel; $this->inventoryMode = $inventoryMode; $this->shippingDetails = $shippingDetails; + $this->state = $state; + $this->custom = $custom; } /** - *ID of the existing product. - * You also need to specify the ID of the variant if this property is set or alternatively you can just specify SKU of the product variant.
- * - * - * @return null|string - */ - public function getProductId() - { - if (is_null($this->productId)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_PRODUCT_ID); - if (is_null($data)) { - return null; - } - $this->productId = (string) $data; - } - - return $this->productId; - } - - /** - *The product name.
+ *Name of the Line Item.
* * * @return null|LocalizedString @@ -178,6 +157,8 @@ public function getName() } /** + *The Product Variant to use as a Line Item.
+ * * * @return null|ProductVariantImportDraft */ @@ -197,25 +178,29 @@ public function getVariant() } /** + *id
of the Product the Product Variant belongs to.
If provided, you must also set variant.id
.
The number of Product Variants in the LineItem. Can be a negative value.
+ * * * @return null|int */ @@ -234,51 +219,50 @@ public function getQuantity() } /** + *The Line Item price for quantity
= 1
. The amount can be negative.
Connection to a particular supplier. - * By providing supply channel information, you can uniquely identify - * inventory entries that should be reserved. - * The provided channel should have the - * InventorySupply role.
+ *The tax rate used to calculate the taxedPrice
of the Order.
The channel is used to select a ProductPrice. - * The provided channel should have the ProductDistribution role.
+ *The Channel used to select a Price.
+ * This Channel must have the ProductDistribution
role.
The custom fields.
+ *The Channel used to supply Line Items.
+ * By providing supply Channel information, you can uniquely identify Inventory entries that should be reserved.
+ * This Channel must have the InventorySupply
role.
Inventory mode specific to the line item only, valid for the entire quantity
of the line item.
- * Set only if inventory mode should be different from the inventoryMode
specified on the OrderImportDraft.
Inventory mode specific to the LineItem, valid for the entire quantity
of the LineItem.
+ * Set only if Inventory mode should be different from the inventoryMode
specified on the OrderImportDraft.
Container for Line Item-specific addresses.
+ * * * @return null|ItemShippingDetailsDraft */ @@ -378,15 +347,48 @@ public function getShippingDetails() return $this->shippingDetails; } + /** + *States of the Line Item.
+ * + * + * @return null|ItemStateCollection + */ + public function getState() + { + if (is_null($this->state)) { + /** @psalm-var ?listCustom Fields of the LineItem.
+ * + * + * @return null|CustomFieldsDraft */ - public function setProductId(?string $productId): void + public function getCustom() { - $this->productId = $productId; + if (is_null($this->custom)) { + /** @psalm-var stdClass|arrayString that unique identifies an order. - * It can be used to create more human-readable (in contrast to ID) identifier for the order. - * It should be unique within a project.
+ *User-defined identifier of the Order. Must be unique across a Project. + * Once set, the value cannot be changed.
* * @return null|string @@ -61,7 +61,15 @@ interface OrderImportDraft extends JsonObject public function getOrderNumber(); /** - *If given the customer with that ID must exist in the project.
+ *User-defined identifier for a purchase Order.
+ * + + * @return null|string + */ + public function getPurchaseOrderNumber(); + + /** + *The id
of the Customer the Order belongs to.
The customer email can be used when no check against existing Customers is desired during order import.
+ *The Email address of the Customer the Order belongs to. Can be used instead of customerId
when no check against existing Customers is required.
If not given customLineItems
must not be empty.
The Customer Group of the Customer the Order belongs to.
* - * @return null|LineItemImportDraftCollection + * @return null|CustomerGroupResourceIdentifier */ - public function getLineItems(); + public function getCustomerGroup(); /** - *If not given lineItems
must not be empty.
ResourceIdentifier to the Business Unit the Order should belong to.
+ * When the customerId
of the Order is also set, the Customer must be an Associate of the Business Unit.
The Store the Order belongs to. + * Used for filtering.
+ *If a LineItemImportDraft or a CustomLineItemImportDraft specifies a distributionChannel
or a supplyChannel
that is not defined for the referenced Store, the Order Import gets rejected.
+ * The same applies when the provided country
is not defined for the referenced Store.
Order Import does not support calculation of taxes. - * When setting the draft the taxedPrice is to be provided.
+ *Line Items to add to the Order.
+ *If not specified, customLineItems
must not be empty.
Custom Line Items to add to the Cart.
+ *If not specified, lineItems
must not be empty.
The total Price of the Order. The amount can be negative.
+ * - * @return null|BaseAddress + * @return null|Money */ - public function getBillingAddress(); + public function getTotalPrice(); /** - *Set when the customer is set and the customer is a member of a customer group. - * Used for product variant price selection.
+ *Include TaxedPrice information for the Order. If not included, and if you have Tax Rates set for Line Items and Custom Line Items, the Order total will not be recalculated.
* - * @return null|CustomerGroupResourceIdentifier + * @return null|TaxedPriceDraft */ - public function getCustomerGroup(); + public function getTaxedPrice(); /** - *A two-digit country code as per ISO 3166-1 alpha-2. - * Used for product variant price selection.
+ *Determines how monetary values are rounded when calculating taxes for taxedPrice
.
Current status of the Order.
+ *Determines how taxes are calculated for taxedPrice
.
This reference can point to a state in a custom workflow.
+ *Determines how stock quantities are tracked for Line Items in the Cart.
* - * @return null|StateReference + * @return null|string */ - public function getState(); + public function getInventoryMode(); /** - *Shipment status of the Order.
+ *Billing address associated with the Order.
* - * @return null|string + * @return null|BaseAddress */ - public function getShipmentState(); + public function getBillingAddress(); /** + *Shipping address associated with the Order.
+ * - * @return null|string + * @return null|BaseAddress */ - public function getPaymentState(); + public function getShippingAddress(); /** - *Set if the ShippingMethod is set.
+ *Addresses for Orders with multiple shipping addresses. Addresses must include a value for key
.
Shipping-related information of the Order.
* * @return null|ShippingInfoImportDraft @@ -184,70 +211,79 @@ public function getShippingInfo(); public function getPaymentInfo(); /** + *Payment status of the Order.
+ * - * @return null|DateTimeImmutable + * @return null|string */ - public function getCompletedAt(); + public function getPaymentState(); /** - *The custom fields.
+ *Shipment status of the Order.
* - * @return null|CustomFieldsDraft + * @return null|string */ - public function getCustom(); + public function getShipmentState(); /** - *If not given the mode None
will be assigned by default.
Current status of the Order.
* * @return null|string */ - public function getInventoryMode(); + public function getOrderState(); /** - *If not given the tax rounding mode HalfEven
will be assigned by default.
State of the Order in a custom workflow.
* - * @return null|string + * @return null|StateReference */ - public function getTaxRoundingMode(); + public function getState(); /** - *Contains addresses for orders with multiple shipping addresses.
+ *Include a value to associate a country with the Order.
* - * @return null|BaseAddressCollection + * @return null|string */ - public function getItemShippingAddresses(); + public function getCountry(); /** - *The Business Unit the Cart belongs to.
+ *Indicates the origin of the Order.
* - * @return null|BusinessUnitResourceIdentifier + * @return null|string */ - public function getBusinessUnit(); + public function getOrigin(); /** + *User-defined date and time for the Order. This value does not influence the createdAt
or lastModifiedAt
values of the Order created by the Order Import.
The default origin is Customer
.
Custom Fields for the Order.
* - * @return null|string + * @return null|CustomFieldsDraft */ - public function getOrigin(); + public function getCustom(); /** * @param ?string $orderNumber */ public function setOrderNumber(?string $orderNumber): void; + /** + * @param ?string $purchaseOrderNumber + */ + public function setPurchaseOrderNumber(?string $purchaseOrderNumber): void; + /** * @param ?string $customerId */ @@ -258,6 +294,21 @@ public function setCustomerId(?string $customerId): void; */ public function setCustomerEmail(?string $customerEmail): void; + /** + * @param ?CustomerGroupResourceIdentifier $customerGroup + */ + public function setCustomerGroup(?CustomerGroupResourceIdentifier $customerGroup): void; + + /** + * @param ?BusinessUnitResourceIdentifier $businessUnit + */ + public function setBusinessUnit(?BusinessUnitResourceIdentifier $businessUnit): void; + + /** + * @param ?StoreResourceIdentifier $store + */ + public function setStore(?StoreResourceIdentifier $store): void; + /** * @param ?LineItemImportDraftCollection $lineItems */ @@ -279,44 +330,34 @@ public function setTotalPrice(?Money $totalPrice): void; public function setTaxedPrice(?TaxedPriceDraft $taxedPrice): void; /** - * @param ?BaseAddress $shippingAddress - */ - public function setShippingAddress(?BaseAddress $shippingAddress): void; - - /** - * @param ?BaseAddress $billingAddress - */ - public function setBillingAddress(?BaseAddress $billingAddress): void; - - /** - * @param ?CustomerGroupResourceIdentifier $customerGroup + * @param ?string $taxRoundingMode */ - public function setCustomerGroup(?CustomerGroupResourceIdentifier $customerGroup): void; + public function setTaxRoundingMode(?string $taxRoundingMode): void; /** - * @param ?string $country + * @param ?string $taxCalculationMode */ - public function setCountry(?string $country): void; + public function setTaxCalculationMode(?string $taxCalculationMode): void; /** - * @param ?string $orderState + * @param ?string $inventoryMode */ - public function setOrderState(?string $orderState): void; + public function setInventoryMode(?string $inventoryMode): void; /** - * @param ?StateReference $state + * @param ?BaseAddress $billingAddress */ - public function setState(?StateReference $state): void; + public function setBillingAddress(?BaseAddress $billingAddress): void; /** - * @param ?string $shipmentState + * @param ?BaseAddress $shippingAddress */ - public function setShipmentState(?string $shipmentState): void; + public function setShippingAddress(?BaseAddress $shippingAddress): void; /** - * @param ?string $paymentState + * @param ?BaseAddressCollection $itemShippingAddresses */ - public function setPaymentState(?string $paymentState): void; + public function setItemShippingAddresses(?BaseAddressCollection $itemShippingAddresses): void; /** * @param ?ShippingInfoImportDraft $shippingInfo @@ -329,42 +370,42 @@ public function setShippingInfo(?ShippingInfoImportDraft $shippingInfo): void; public function setPaymentInfo(?PaymentInfo $paymentInfo): void; /** - * @param ?DateTimeImmutable $completedAt + * @param ?string $paymentState */ - public function setCompletedAt(?DateTimeImmutable $completedAt): void; + public function setPaymentState(?string $paymentState): void; /** - * @param ?CustomFieldsDraft $custom + * @param ?string $shipmentState */ - public function setCustom(?CustomFieldsDraft $custom): void; + public function setShipmentState(?string $shipmentState): void; /** - * @param ?string $inventoryMode + * @param ?string $orderState */ - public function setInventoryMode(?string $inventoryMode): void; + public function setOrderState(?string $orderState): void; /** - * @param ?string $taxRoundingMode + * @param ?StateReference $state */ - public function setTaxRoundingMode(?string $taxRoundingMode): void; + public function setState(?StateReference $state): void; /** - * @param ?BaseAddressCollection $itemShippingAddresses + * @param ?string $country */ - public function setItemShippingAddresses(?BaseAddressCollection $itemShippingAddresses): void; + public function setCountry(?string $country): void; /** - * @param ?BusinessUnitResourceIdentifier $businessUnit + * @param ?string $origin */ - public function setBusinessUnit(?BusinessUnitResourceIdentifier $businessUnit): void; + public function setOrigin(?string $origin): void; /** - * @param ?StoreResourceIdentifier $store + * @param ?DateTimeImmutable $completedAt */ - public function setStore(?StoreResourceIdentifier $store): void; + public function setCompletedAt(?DateTimeImmutable $completedAt): void; /** - * @param ?string $origin + * @param ?CustomFieldsDraft $custom */ - public function setOrigin(?string $origin): void; + public function setCustom(?CustomFieldsDraft $custom): void; } diff --git a/lib/commercetools-api/src/Models/Order/OrderImportDraftBuilder.php b/lib/commercetools-api/src/Models/Order/OrderImportDraftBuilder.php index 9ad95fa59fe..1f0d4bb6db2 100644 --- a/lib/commercetools-api/src/Models/Order/OrderImportDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderImportDraftBuilder.php @@ -10,7 +10,6 @@ use Commercetools\Api\Models\BusinessUnit\BusinessUnitResourceIdentifier; use Commercetools\Api\Models\BusinessUnit\BusinessUnitResourceIdentifierBuilder; -use Commercetools\Api\Models\Cart\CustomLineItemImportDraftCollection; use Commercetools\Api\Models\Cart\TaxedPriceDraft; use Commercetools\Api\Models\Cart\TaxedPriceDraftBuilder; use Commercetools\Api\Models\Common\BaseAddress; @@ -45,6 +44,12 @@ final class OrderImportDraftBuilder implements Builder */ private $orderNumber; + /** + + * @var ?string + */ + private $purchaseOrderNumber; + /** * @var ?string @@ -59,75 +64,81 @@ final class OrderImportDraftBuilder implements Builder /** - * @var ?LineItemImportDraftCollection + * @var null|CustomerGroupResourceIdentifier|CustomerGroupResourceIdentifierBuilder */ - private $lineItems; + private $customerGroup; /** - * @var ?CustomLineItemImportDraftCollection + * @var null|BusinessUnitResourceIdentifier|BusinessUnitResourceIdentifierBuilder */ - private $customLineItems; + private $businessUnit; /** - * @var null|Money|MoneyBuilder + * @var null|StoreResourceIdentifier|StoreResourceIdentifierBuilder */ - private $totalPrice; + private $store; /** - * @var null|TaxedPriceDraft|TaxedPriceDraftBuilder + * @var ?LineItemImportDraftCollection */ - private $taxedPrice; + private $lineItems; /** - * @var null|BaseAddress|BaseAddressBuilder + * @var ?CustomLineItemImportDraftCollection */ - private $shippingAddress; + private $customLineItems; /** - * @var null|BaseAddress|BaseAddressBuilder + * @var null|Money|MoneyBuilder */ - private $billingAddress; + private $totalPrice; /** - * @var null|CustomerGroupResourceIdentifier|CustomerGroupResourceIdentifierBuilder + * @var null|TaxedPriceDraft|TaxedPriceDraftBuilder */ - private $customerGroup; + private $taxedPrice; /** * @var ?string */ - private $country; + private $taxRoundingMode; /** * @var ?string */ - private $orderState; + private $taxCalculationMode; /** - * @var null|StateReference|StateReferenceBuilder + * @var ?string */ - private $state; + private $inventoryMode; /** - * @var ?string + * @var null|BaseAddress|BaseAddressBuilder */ - private $shipmentState; + private $billingAddress; /** - * @var ?string + * @var null|BaseAddress|BaseAddressBuilder */ - private $paymentState; + private $shippingAddress; + + /** + + * @var ?BaseAddressCollection + */ + private $itemShippingAddresses; /** @@ -143,56 +154,55 @@ final class OrderImportDraftBuilder implements Builder /** - * @var ?DateTimeImmutable + * @var ?string */ - private $completedAt; + private $paymentState; /** - * @var null|CustomFieldsDraft|CustomFieldsDraftBuilder + * @var ?string */ - private $custom; + private $shipmentState; /** * @var ?string */ - private $inventoryMode; + private $orderState; /** - * @var ?string + * @var null|StateReference|StateReferenceBuilder */ - private $taxRoundingMode; + private $state; /** - * @var ?BaseAddressCollection + * @var ?string */ - private $itemShippingAddresses; + private $country; /** - * @var null|BusinessUnitResourceIdentifier|BusinessUnitResourceIdentifierBuilder + * @var ?string */ - private $businessUnit; + private $origin; /** - * @var null|StoreResourceIdentifier|StoreResourceIdentifierBuilder + * @var ?DateTimeImmutable */ - private $store; + private $completedAt; /** - * @var ?string + * @var null|CustomFieldsDraft|CustomFieldsDraftBuilder */ - private $origin; + private $custom; /** - *String that unique identifies an order. - * It can be used to create more human-readable (in contrast to ID) identifier for the order. - * It should be unique within a project.
+ *User-defined identifier of the Order. Must be unique across a Project. + * Once set, the value cannot be changed.
* * @return null|string @@ -203,7 +213,18 @@ public function getOrderNumber() } /** - *If given the customer with that ID must exist in the project.
+ *User-defined identifier for a purchase Order.
+ * + + * @return null|string + */ + public function getPurchaseOrderNumber() + { + return $this->purchaseOrderNumber; + } + + /** + *The id
of the Customer the Order belongs to.
The customer email can be used when no check against existing Customers is desired during order import.
+ *The Email address of the Customer the Order belongs to. Can be used instead of customerId
when no check against existing Customers is required.
If not given customLineItems
must not be empty.
The Customer Group of the Customer the Order belongs to.
* - * @return null|LineItemImportDraftCollection + * @return null|CustomerGroupResourceIdentifier */ - public function getLineItems() + public function getCustomerGroup() { - return $this->lineItems; + return $this->customerGroup instanceof CustomerGroupResourceIdentifierBuilder ? $this->customerGroup->build() : $this->customerGroup; } /** - *If not given lineItems
must not be empty.
ResourceIdentifier to the Business Unit the Order should belong to.
+ * When the customerId
of the Order is also set, the Customer must be an Associate of the Business Unit.
The Store the Order belongs to. + * Used for filtering.
+ *If a LineItemImportDraft or a CustomLineItemImportDraft specifies a distributionChannel
or a supplyChannel
that is not defined for the referenced Store, the Order Import gets rejected.
+ * The same applies when the provided country
is not defined for the referenced Store.
Order Import does not support calculation of taxes. - * When setting the draft the taxedPrice is to be provided.
+ *Line Items to add to the Order.
+ *If not specified, customLineItems
must not be empty.
Custom Line Items to add to the Cart.
+ *If not specified, lineItems
must not be empty.
The total Price of the Order. The amount can be negative.
+ * - * @return null|BaseAddress + * @return null|Money */ - public function getBillingAddress() + public function getTotalPrice() { - return $this->billingAddress instanceof BaseAddressBuilder ? $this->billingAddress->build() : $this->billingAddress; + return $this->totalPrice instanceof MoneyBuilder ? $this->totalPrice->build() : $this->totalPrice; } /** - *Set when the customer is set and the customer is a member of a customer group. - * Used for product variant price selection.
+ *Include TaxedPrice information for the Order. If not included, and if you have Tax Rates set for Line Items and Custom Line Items, the Order total will not be recalculated.
* - * @return null|CustomerGroupResourceIdentifier + * @return null|TaxedPriceDraft */ - public function getCustomerGroup() + public function getTaxedPrice() { - return $this->customerGroup instanceof CustomerGroupResourceIdentifierBuilder ? $this->customerGroup->build() : $this->customerGroup; + return $this->taxedPrice instanceof TaxedPriceDraftBuilder ? $this->taxedPrice->build() : $this->taxedPrice; } /** - *A two-digit country code as per ISO 3166-1 alpha-2. - * Used for product variant price selection.
+ *Determines how monetary values are rounded when calculating taxes for taxedPrice
.
Current status of the Order.
+ *Determines how taxes are calculated for taxedPrice
.
This reference can point to a state in a custom workflow.
+ *Determines how stock quantities are tracked for Line Items in the Cart.
* - * @return null|StateReference + * @return null|string */ - public function getState() + public function getInventoryMode() { - return $this->state instanceof StateReferenceBuilder ? $this->state->build() : $this->state; + return $this->inventoryMode; } /** - *Shipment status of the Order.
+ *Billing address associated with the Order.
* - * @return null|string + * @return null|BaseAddress */ - public function getShipmentState() + public function getBillingAddress() { - return $this->shipmentState; + return $this->billingAddress instanceof BaseAddressBuilder ? $this->billingAddress->build() : $this->billingAddress; } /** + *Shipping address associated with the Order.
+ * - * @return null|string + * @return null|BaseAddress */ - public function getPaymentState() + public function getShippingAddress() { - return $this->paymentState; + return $this->shippingAddress instanceof BaseAddressBuilder ? $this->shippingAddress->build() : $this->shippingAddress; + } + + /** + *Addresses for Orders with multiple shipping addresses. Addresses must include a value for key
.
Set if the ShippingMethod is set.
+ *Shipping-related information of the Order.
* * @return null|ShippingInfoImportDraft @@ -374,87 +417,91 @@ public function getPaymentInfo() } /** + *Payment status of the Order.
+ * - * @return null|DateTimeImmutable + * @return null|string */ - public function getCompletedAt() + public function getPaymentState() { - return $this->completedAt; + return $this->paymentState; } /** - *The custom fields.
+ *Shipment status of the Order.
* - * @return null|CustomFieldsDraft + * @return null|string */ - public function getCustom() + public function getShipmentState() { - return $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom; + return $this->shipmentState; } /** - *If not given the mode None
will be assigned by default.
Current status of the Order.
* * @return null|string */ - public function getInventoryMode() + public function getOrderState() { - return $this->inventoryMode; + return $this->orderState; } /** - *If not given the tax rounding mode HalfEven
will be assigned by default.
State of the Order in a custom workflow.
* - * @return null|string + * @return null|StateReference */ - public function getTaxRoundingMode() + public function getState() { - return $this->taxRoundingMode; + return $this->state instanceof StateReferenceBuilder ? $this->state->build() : $this->state; } /** - *Contains addresses for orders with multiple shipping addresses.
+ *Include a value to associate a country with the Order.
* - * @return null|BaseAddressCollection + * @return null|string */ - public function getItemShippingAddresses() + public function getCountry() { - return $this->itemShippingAddresses; + return $this->country; } /** - *The Business Unit the Cart belongs to.
+ *Indicates the origin of the Order.
* - * @return null|BusinessUnitResourceIdentifier + * @return null|string */ - public function getBusinessUnit() + public function getOrigin() { - return $this->businessUnit instanceof BusinessUnitResourceIdentifierBuilder ? $this->businessUnit->build() : $this->businessUnit; + return $this->origin; } /** + *User-defined date and time for the Order. This value does not influence the createdAt
or lastModifiedAt
values of the Order created by the Order Import.
The default origin is Customer
.
Custom Fields for the Order.
* - * @return null|string + * @return null|CustomFieldsDraft */ - public function getOrigin() + public function getCustom() { - return $this->origin; + return $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom; } /** @@ -468,6 +515,17 @@ public function withOrderNumber(?string $orderNumber) return $this; } + /** + * @param ?string $purchaseOrderNumber + * @return $this + */ + public function withPurchaseOrderNumber(?string $purchaseOrderNumber) + { + $this->purchaseOrderNumber = $purchaseOrderNumber; + + return $this; + } + /** * @param ?string $customerId * @return $this @@ -491,133 +549,144 @@ public function withCustomerEmail(?string $customerEmail) } /** - * @param ?LineItemImportDraftCollection $lineItems + * @param ?CustomerGroupResourceIdentifier $customerGroup * @return $this */ - public function withLineItems(?LineItemImportDraftCollection $lineItems) + public function withCustomerGroup(?CustomerGroupResourceIdentifier $customerGroup) { - $this->lineItems = $lineItems; + $this->customerGroup = $customerGroup; return $this; } /** - * @param ?CustomLineItemImportDraftCollection $customLineItems + * @param ?BusinessUnitResourceIdentifier $businessUnit * @return $this */ - public function withCustomLineItems(?CustomLineItemImportDraftCollection $customLineItems) + public function withBusinessUnit(?BusinessUnitResourceIdentifier $businessUnit) { - $this->customLineItems = $customLineItems; + $this->businessUnit = $businessUnit; return $this; } /** - * @param ?Money $totalPrice + * @param ?StoreResourceIdentifier $store * @return $this */ - public function withTotalPrice(?Money $totalPrice) + public function withStore(?StoreResourceIdentifier $store) { - $this->totalPrice = $totalPrice; + $this->store = $store; return $this; } /** - * @param ?TaxedPriceDraft $taxedPrice + * @param ?LineItemImportDraftCollection $lineItems * @return $this */ - public function withTaxedPrice(?TaxedPriceDraft $taxedPrice) + public function withLineItems(?LineItemImportDraftCollection $lineItems) { - $this->taxedPrice = $taxedPrice; + $this->lineItems = $lineItems; return $this; } /** - * @param ?BaseAddress $shippingAddress + * @param ?CustomLineItemImportDraftCollection $customLineItems * @return $this */ - public function withShippingAddress(?BaseAddress $shippingAddress) + public function withCustomLineItems(?CustomLineItemImportDraftCollection $customLineItems) { - $this->shippingAddress = $shippingAddress; + $this->customLineItems = $customLineItems; return $this; } /** - * @param ?BaseAddress $billingAddress + * @param ?Money $totalPrice * @return $this */ - public function withBillingAddress(?BaseAddress $billingAddress) + public function withTotalPrice(?Money $totalPrice) { - $this->billingAddress = $billingAddress; + $this->totalPrice = $totalPrice; return $this; } /** - * @param ?CustomerGroupResourceIdentifier $customerGroup + * @param ?TaxedPriceDraft $taxedPrice * @return $this */ - public function withCustomerGroup(?CustomerGroupResourceIdentifier $customerGroup) + public function withTaxedPrice(?TaxedPriceDraft $taxedPrice) { - $this->customerGroup = $customerGroup; + $this->taxedPrice = $taxedPrice; return $this; } /** - * @param ?string $country + * @param ?string $taxRoundingMode * @return $this */ - public function withCountry(?string $country) + public function withTaxRoundingMode(?string $taxRoundingMode) { - $this->country = $country; + $this->taxRoundingMode = $taxRoundingMode; return $this; } /** - * @param ?string $orderState + * @param ?string $taxCalculationMode * @return $this */ - public function withOrderState(?string $orderState) + public function withTaxCalculationMode(?string $taxCalculationMode) { - $this->orderState = $orderState; + $this->taxCalculationMode = $taxCalculationMode; return $this; } /** - * @param ?StateReference $state + * @param ?string $inventoryMode * @return $this */ - public function withState(?StateReference $state) + public function withInventoryMode(?string $inventoryMode) { - $this->state = $state; + $this->inventoryMode = $inventoryMode; return $this; } /** - * @param ?string $shipmentState + * @param ?BaseAddress $billingAddress * @return $this */ - public function withShipmentState(?string $shipmentState) + public function withBillingAddress(?BaseAddress $billingAddress) { - $this->shipmentState = $shipmentState; + $this->billingAddress = $billingAddress; return $this; } /** - * @param ?string $paymentState + * @param ?BaseAddress $shippingAddress * @return $this */ - public function withPaymentState(?string $paymentState) + public function withShippingAddress(?BaseAddress $shippingAddress) { - $this->paymentState = $paymentState; + $this->shippingAddress = $shippingAddress; + + return $this; + } + + /** + * @param ?BaseAddressCollection $itemShippingAddresses + * @return $this + */ + public function withItemShippingAddresses(?BaseAddressCollection $itemShippingAddresses) + { + $this->itemShippingAddresses = $itemShippingAddresses; return $this; } @@ -645,210 +714,210 @@ public function withPaymentInfo(?PaymentInfo $paymentInfo) } /** - * @param ?DateTimeImmutable $completedAt + * @param ?string $paymentState * @return $this */ - public function withCompletedAt(?DateTimeImmutable $completedAt) + public function withPaymentState(?string $paymentState) { - $this->completedAt = $completedAt; + $this->paymentState = $paymentState; return $this; } /** - * @param ?CustomFieldsDraft $custom + * @param ?string $shipmentState * @return $this */ - public function withCustom(?CustomFieldsDraft $custom) + public function withShipmentState(?string $shipmentState) { - $this->custom = $custom; + $this->shipmentState = $shipmentState; return $this; } /** - * @param ?string $inventoryMode + * @param ?string $orderState * @return $this */ - public function withInventoryMode(?string $inventoryMode) + public function withOrderState(?string $orderState) { - $this->inventoryMode = $inventoryMode; + $this->orderState = $orderState; return $this; } /** - * @param ?string $taxRoundingMode + * @param ?StateReference $state * @return $this */ - public function withTaxRoundingMode(?string $taxRoundingMode) + public function withState(?StateReference $state) { - $this->taxRoundingMode = $taxRoundingMode; + $this->state = $state; return $this; } /** - * @param ?BaseAddressCollection $itemShippingAddresses + * @param ?string $country * @return $this */ - public function withItemShippingAddresses(?BaseAddressCollection $itemShippingAddresses) + public function withCountry(?string $country) { - $this->itemShippingAddresses = $itemShippingAddresses; + $this->country = $country; return $this; } /** - * @param ?BusinessUnitResourceIdentifier $businessUnit + * @param ?string $origin * @return $this */ - public function withBusinessUnit(?BusinessUnitResourceIdentifier $businessUnit) + public function withOrigin(?string $origin) { - $this->businessUnit = $businessUnit; + $this->origin = $origin; return $this; } /** - * @param ?StoreResourceIdentifier $store + * @param ?DateTimeImmutable $completedAt * @return $this */ - public function withStore(?StoreResourceIdentifier $store) + public function withCompletedAt(?DateTimeImmutable $completedAt) { - $this->store = $store; + $this->completedAt = $completedAt; return $this; } /** - * @param ?string $origin + * @param ?CustomFieldsDraft $custom * @return $this */ - public function withOrigin(?string $origin) + public function withCustom(?CustomFieldsDraft $custom) { - $this->origin = $origin; + $this->custom = $custom; return $this; } /** - * @deprecated use withTotalPrice() instead + * @deprecated use withCustomerGroup() instead * @return $this */ - public function withTotalPriceBuilder(?MoneyBuilder $totalPrice) + public function withCustomerGroupBuilder(?CustomerGroupResourceIdentifierBuilder $customerGroup) { - $this->totalPrice = $totalPrice; + $this->customerGroup = $customerGroup; return $this; } /** - * @deprecated use withTaxedPrice() instead + * @deprecated use withBusinessUnit() instead * @return $this */ - public function withTaxedPriceBuilder(?TaxedPriceDraftBuilder $taxedPrice) + public function withBusinessUnitBuilder(?BusinessUnitResourceIdentifierBuilder $businessUnit) { - $this->taxedPrice = $taxedPrice; + $this->businessUnit = $businessUnit; return $this; } /** - * @deprecated use withShippingAddress() instead + * @deprecated use withStore() instead * @return $this */ - public function withShippingAddressBuilder(?BaseAddressBuilder $shippingAddress) + public function withStoreBuilder(?StoreResourceIdentifierBuilder $store) { - $this->shippingAddress = $shippingAddress; + $this->store = $store; return $this; } /** - * @deprecated use withBillingAddress() instead + * @deprecated use withTotalPrice() instead * @return $this */ - public function withBillingAddressBuilder(?BaseAddressBuilder $billingAddress) + public function withTotalPriceBuilder(?MoneyBuilder $totalPrice) { - $this->billingAddress = $billingAddress; + $this->totalPrice = $totalPrice; return $this; } /** - * @deprecated use withCustomerGroup() instead + * @deprecated use withTaxedPrice() instead * @return $this */ - public function withCustomerGroupBuilder(?CustomerGroupResourceIdentifierBuilder $customerGroup) + public function withTaxedPriceBuilder(?TaxedPriceDraftBuilder $taxedPrice) { - $this->customerGroup = $customerGroup; + $this->taxedPrice = $taxedPrice; return $this; } /** - * @deprecated use withState() instead + * @deprecated use withBillingAddress() instead * @return $this */ - public function withStateBuilder(?StateReferenceBuilder $state) + public function withBillingAddressBuilder(?BaseAddressBuilder $billingAddress) { - $this->state = $state; + $this->billingAddress = $billingAddress; return $this; } /** - * @deprecated use withShippingInfo() instead + * @deprecated use withShippingAddress() instead * @return $this */ - public function withShippingInfoBuilder(?ShippingInfoImportDraftBuilder $shippingInfo) + public function withShippingAddressBuilder(?BaseAddressBuilder $shippingAddress) { - $this->shippingInfo = $shippingInfo; + $this->shippingAddress = $shippingAddress; return $this; } /** - * @deprecated use withPaymentInfo() instead + * @deprecated use withShippingInfo() instead * @return $this */ - public function withPaymentInfoBuilder(?PaymentInfoBuilder $paymentInfo) + public function withShippingInfoBuilder(?ShippingInfoImportDraftBuilder $shippingInfo) { - $this->paymentInfo = $paymentInfo; + $this->shippingInfo = $shippingInfo; return $this; } /** - * @deprecated use withCustom() instead + * @deprecated use withPaymentInfo() instead * @return $this */ - public function withCustomBuilder(?CustomFieldsDraftBuilder $custom) + public function withPaymentInfoBuilder(?PaymentInfoBuilder $paymentInfo) { - $this->custom = $custom; + $this->paymentInfo = $paymentInfo; return $this; } /** - * @deprecated use withBusinessUnit() instead + * @deprecated use withState() instead * @return $this */ - public function withBusinessUnitBuilder(?BusinessUnitResourceIdentifierBuilder $businessUnit) + public function withStateBuilder(?StateReferenceBuilder $state) { - $this->businessUnit = $businessUnit; + $this->state = $state; return $this; } /** - * @deprecated use withStore() instead + * @deprecated use withCustom() instead * @return $this */ - public function withStoreBuilder(?StoreResourceIdentifierBuilder $store) + public function withCustomBuilder(?CustomFieldsDraftBuilder $custom) { - $this->store = $store; + $this->custom = $custom; return $this; } @@ -857,30 +926,32 @@ public function build(): OrderImportDraft { return new OrderImportDraftModel( $this->orderNumber, + $this->purchaseOrderNumber, $this->customerId, $this->customerEmail, + $this->customerGroup instanceof CustomerGroupResourceIdentifierBuilder ? $this->customerGroup->build() : $this->customerGroup, + $this->businessUnit instanceof BusinessUnitResourceIdentifierBuilder ? $this->businessUnit->build() : $this->businessUnit, + $this->store instanceof StoreResourceIdentifierBuilder ? $this->store->build() : $this->store, $this->lineItems, $this->customLineItems, $this->totalPrice instanceof MoneyBuilder ? $this->totalPrice->build() : $this->totalPrice, $this->taxedPrice instanceof TaxedPriceDraftBuilder ? $this->taxedPrice->build() : $this->taxedPrice, - $this->shippingAddress instanceof BaseAddressBuilder ? $this->shippingAddress->build() : $this->shippingAddress, + $this->taxRoundingMode, + $this->taxCalculationMode, + $this->inventoryMode, $this->billingAddress instanceof BaseAddressBuilder ? $this->billingAddress->build() : $this->billingAddress, - $this->customerGroup instanceof CustomerGroupResourceIdentifierBuilder ? $this->customerGroup->build() : $this->customerGroup, - $this->country, - $this->orderState, - $this->state instanceof StateReferenceBuilder ? $this->state->build() : $this->state, - $this->shipmentState, - $this->paymentState, + $this->shippingAddress instanceof BaseAddressBuilder ? $this->shippingAddress->build() : $this->shippingAddress, + $this->itemShippingAddresses, $this->shippingInfo instanceof ShippingInfoImportDraftBuilder ? $this->shippingInfo->build() : $this->shippingInfo, $this->paymentInfo instanceof PaymentInfoBuilder ? $this->paymentInfo->build() : $this->paymentInfo, + $this->paymentState, + $this->shipmentState, + $this->orderState, + $this->state instanceof StateReferenceBuilder ? $this->state->build() : $this->state, + $this->country, + $this->origin, $this->completedAt, - $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom, - $this->inventoryMode, - $this->taxRoundingMode, - $this->itemShippingAddresses, - $this->businessUnit instanceof BusinessUnitResourceIdentifierBuilder ? $this->businessUnit->build() : $this->businessUnit, - $this->store instanceof StoreResourceIdentifierBuilder ? $this->store->build() : $this->store, - $this->origin + $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom ); } diff --git a/lib/commercetools-api/src/Models/Order/OrderImportDraftModel.php b/lib/commercetools-api/src/Models/Order/OrderImportDraftModel.php index 663cf832a9b..c60b86ab4cf 100644 --- a/lib/commercetools-api/src/Models/Order/OrderImportDraftModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderImportDraftModel.php @@ -10,7 +10,6 @@ use Commercetools\Api\Models\BusinessUnit\BusinessUnitResourceIdentifier; use Commercetools\Api\Models\BusinessUnit\BusinessUnitResourceIdentifierModel; -use Commercetools\Api\Models\Cart\CustomLineItemImportDraftCollection; use Commercetools\Api\Models\Cart\TaxedPriceDraft; use Commercetools\Api\Models\Cart\TaxedPriceDraftModel; use Commercetools\Api\Models\Common\BaseAddress; @@ -44,6 +43,12 @@ final class OrderImportDraftModel extends JsonObjectModel implements OrderImport */ protected $orderNumber; + /** + * + * @var ?string + */ + protected $purchaseOrderNumber; + /** * * @var ?string @@ -58,75 +63,81 @@ final class OrderImportDraftModel extends JsonObjectModel implements OrderImport /** * - * @var ?LineItemImportDraftCollection + * @var ?CustomerGroupResourceIdentifier */ - protected $lineItems; + protected $customerGroup; /** * - * @var ?CustomLineItemImportDraftCollection + * @var ?BusinessUnitResourceIdentifier */ - protected $customLineItems; + protected $businessUnit; /** * - * @var ?Money + * @var ?StoreResourceIdentifier */ - protected $totalPrice; + protected $store; /** * - * @var ?TaxedPriceDraft + * @var ?LineItemImportDraftCollection */ - protected $taxedPrice; + protected $lineItems; /** * - * @var ?BaseAddress + * @var ?CustomLineItemImportDraftCollection */ - protected $shippingAddress; + protected $customLineItems; /** * - * @var ?BaseAddress + * @var ?Money */ - protected $billingAddress; + protected $totalPrice; /** * - * @var ?CustomerGroupResourceIdentifier + * @var ?TaxedPriceDraft */ - protected $customerGroup; + protected $taxedPrice; /** * * @var ?string */ - protected $country; + protected $taxRoundingMode; /** * * @var ?string */ - protected $orderState; + protected $taxCalculationMode; /** * - * @var ?StateReference + * @var ?string */ - protected $state; + protected $inventoryMode; /** * - * @var ?string + * @var ?BaseAddress */ - protected $shipmentState; + protected $billingAddress; /** * - * @var ?string + * @var ?BaseAddress */ - protected $paymentState; + protected $shippingAddress; + + /** + * + * @var ?BaseAddressCollection + */ + protected $itemShippingAddresses; /** * @@ -142,51 +153,51 @@ final class OrderImportDraftModel extends JsonObjectModel implements OrderImport /** * - * @var ?DateTimeImmutable + * @var ?string */ - protected $completedAt; + protected $paymentState; /** * - * @var ?CustomFieldsDraft + * @var ?string */ - protected $custom; + protected $shipmentState; /** * * @var ?string */ - protected $inventoryMode; + protected $orderState; /** * - * @var ?string + * @var ?StateReference */ - protected $taxRoundingMode; + protected $state; /** * - * @var ?BaseAddressCollection + * @var ?string */ - protected $itemShippingAddresses; + protected $country; /** * - * @var ?BusinessUnitResourceIdentifier + * @var ?string */ - protected $businessUnit; + protected $origin; /** * - * @var ?StoreResourceIdentifier + * @var ?DateTimeImmutable */ - protected $store; + protected $completedAt; /** * - * @var ?string + * @var ?CustomFieldsDraft */ - protected $origin; + protected $custom; /** @@ -194,62 +205,65 @@ final class OrderImportDraftModel extends JsonObjectModel implements OrderImport */ public function __construct( ?string $orderNumber = null, + ?string $purchaseOrderNumber = null, ?string $customerId = null, ?string $customerEmail = null, + ?CustomerGroupResourceIdentifier $customerGroup = null, + ?BusinessUnitResourceIdentifier $businessUnit = null, + ?StoreResourceIdentifier $store = null, ?LineItemImportDraftCollection $lineItems = null, ?CustomLineItemImportDraftCollection $customLineItems = null, ?Money $totalPrice = null, ?TaxedPriceDraft $taxedPrice = null, - ?BaseAddress $shippingAddress = null, + ?string $taxRoundingMode = null, + ?string $taxCalculationMode = null, + ?string $inventoryMode = null, ?BaseAddress $billingAddress = null, - ?CustomerGroupResourceIdentifier $customerGroup = null, - ?string $country = null, - ?string $orderState = null, - ?StateReference $state = null, - ?string $shipmentState = null, - ?string $paymentState = null, + ?BaseAddress $shippingAddress = null, + ?BaseAddressCollection $itemShippingAddresses = null, ?ShippingInfoImportDraft $shippingInfo = null, ?PaymentInfo $paymentInfo = null, + ?string $paymentState = null, + ?string $shipmentState = null, + ?string $orderState = null, + ?StateReference $state = null, + ?string $country = null, + ?string $origin = null, ?DateTimeImmutable $completedAt = null, - ?CustomFieldsDraft $custom = null, - ?string $inventoryMode = null, - ?string $taxRoundingMode = null, - ?BaseAddressCollection $itemShippingAddresses = null, - ?BusinessUnitResourceIdentifier $businessUnit = null, - ?StoreResourceIdentifier $store = null, - ?string $origin = null + ?CustomFieldsDraft $custom = null ) { $this->orderNumber = $orderNumber; + $this->purchaseOrderNumber = $purchaseOrderNumber; $this->customerId = $customerId; $this->customerEmail = $customerEmail; + $this->customerGroup = $customerGroup; + $this->businessUnit = $businessUnit; + $this->store = $store; $this->lineItems = $lineItems; $this->customLineItems = $customLineItems; $this->totalPrice = $totalPrice; $this->taxedPrice = $taxedPrice; - $this->shippingAddress = $shippingAddress; + $this->taxRoundingMode = $taxRoundingMode; + $this->taxCalculationMode = $taxCalculationMode; + $this->inventoryMode = $inventoryMode; $this->billingAddress = $billingAddress; - $this->customerGroup = $customerGroup; - $this->country = $country; - $this->orderState = $orderState; - $this->state = $state; - $this->shipmentState = $shipmentState; - $this->paymentState = $paymentState; + $this->shippingAddress = $shippingAddress; + $this->itemShippingAddresses = $itemShippingAddresses; $this->shippingInfo = $shippingInfo; $this->paymentInfo = $paymentInfo; + $this->paymentState = $paymentState; + $this->shipmentState = $shipmentState; + $this->orderState = $orderState; + $this->state = $state; + $this->country = $country; + $this->origin = $origin; $this->completedAt = $completedAt; $this->custom = $custom; - $this->inventoryMode = $inventoryMode; - $this->taxRoundingMode = $taxRoundingMode; - $this->itemShippingAddresses = $itemShippingAddresses; - $this->businessUnit = $businessUnit; - $this->store = $store; - $this->origin = $origin; } /** - *String that unique identifies an order. - * It can be used to create more human-readable (in contrast to ID) identifier for the order. - * It should be unique within a project.
+ *User-defined identifier of the Order. Must be unique across a Project. + * Once set, the value cannot be changed.
* * * @return null|string @@ -269,7 +283,27 @@ public function getOrderNumber() } /** - *If given the customer with that ID must exist in the project.
+ *User-defined identifier for a purchase Order.
+ * + * + * @return null|string + */ + public function getPurchaseOrderNumber() + { + if (is_null($this->purchaseOrderNumber)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_PURCHASE_ORDER_NUMBER); + if (is_null($data)) { + return null; + } + $this->purchaseOrderNumber = (string) $data; + } + + return $this->purchaseOrderNumber; + } + + /** + *The id
of the Customer the Order belongs to.
The customer email can be used when no check against existing Customers is desired during order import.
+ *The Email address of the Customer the Order belongs to. Can be used instead of customerId
when no check against existing Customers is required.
If not given customLineItems
must not be empty.
The Customer Group of the Customer the Order belongs to.
+ * + * + * @return null|CustomerGroupResourceIdentifier + */ + public function getCustomerGroup() + { + if (is_null($this->customerGroup)) { + /** @psalm-var stdClass|arrayResourceIdentifier to the Business Unit the Order should belong to.
+ * When the customerId
of the Order is also set, the Customer must be an Associate of the Business Unit.
The Store the Order belongs to. + * Used for filtering.
+ *If a LineItemImportDraft or a CustomLineItemImportDraft specifies a distributionChannel
or a supplyChannel
that is not defined for the referenced Store, the Order Import gets rejected.
+ * The same applies when the provided country
is not defined for the referenced Store.
Line Items to add to the Order.
+ *If not specified, customLineItems
must not be empty.
If not given lineItems
must not be empty.
Custom Line Items to add to the Cart.
+ *If not specified, lineItems
must not be empty.
The total Price of the Order. The amount can be negative.
+ * * * @return null|Money */ @@ -368,8 +473,7 @@ public function getTotalPrice() } /** - *Order Import does not support calculation of taxes. - * When setting the draft the taxedPrice is to be provided.
+ *Include TaxedPrice information for the Order. If not included, and if you have Tax Rates set for Line Items and Custom Line Items, the Order total will not be recalculated.
* * * @return null|TaxedPriceDraft @@ -390,167 +494,129 @@ public function getTaxedPrice() } /** + *Determines how monetary values are rounded when calculating taxes for taxedPrice
.
Determines how taxes are calculated for taxedPrice
.
Set when the customer is set and the customer is a member of a customer group. - * Used for product variant price selection.
+ *Determines how stock quantities are tracked for Line Items in the Cart.
* * - * @return null|CustomerGroupResourceIdentifier + * @return null|string */ - public function getCustomerGroup() + public function getInventoryMode() { - if (is_null($this->customerGroup)) { - /** @psalm-var stdClass|arrayA two-digit country code as per ISO 3166-1 alpha-2. - * Used for product variant price selection.
+ *Billing address associated with the Order.
* * - * @return null|string + * @return null|BaseAddress */ - public function getCountry() + public function getBillingAddress() { - if (is_null($this->country)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_COUNTRY); + if (is_null($this->billingAddress)) { + /** @psalm-var stdClass|arrayCurrent status of the Order.
- * - * - * @return null|string - */ - public function getOrderState() - { - if (is_null($this->orderState)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_ORDER_STATE); - if (is_null($data)) { - return null; - } - $this->orderState = (string) $data; + $this->billingAddress = BaseAddressModel::of($data); } - return $this->orderState; + return $this->billingAddress; } /** - *This reference can point to a state in a custom workflow.
+ *Shipping address associated with the Order.
* * - * @return null|StateReference + * @return null|BaseAddress */ - public function getState() + public function getShippingAddress() { - if (is_null($this->state)) { + if (is_null($this->shippingAddress)) { /** @psalm-var stdClass|arrayShipment status of the Order.
+ *Addresses for Orders with multiple shipping addresses. Addresses must include a value for key
.
Set if the ShippingMethod is set.
+ *Shipping-related information of the Order.
* * * @return null|ShippingInfoImportDraft @@ -592,166 +658,169 @@ public function getPaymentInfo() } /** + *Payment status of the Order.
* - * @return null|DateTimeImmutable + * + * @return null|string */ - public function getCompletedAt() + public function getPaymentState() { - if (is_null($this->completedAt)) { + if (is_null($this->paymentState)) { /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_COMPLETED_AT); + $data = $this->raw(self::FIELD_PAYMENT_STATE); if (is_null($data)) { return null; } - $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); - if (false === $data) { - return null; - } - $this->completedAt = $data; + $this->paymentState = (string) $data; } - return $this->completedAt; + return $this->paymentState; } /** - *The custom fields.
+ *Shipment status of the Order.
* * - * @return null|CustomFieldsDraft + * @return null|string */ - public function getCustom() + public function getShipmentState() { - if (is_null($this->custom)) { - /** @psalm-var stdClass|arrayIf not given the mode None
will be assigned by default.
Current status of the Order.
* * * @return null|string */ - public function getInventoryMode() + public function getOrderState() { - if (is_null($this->inventoryMode)) { + if (is_null($this->orderState)) { /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_INVENTORY_MODE); + $data = $this->raw(self::FIELD_ORDER_STATE); if (is_null($data)) { return null; } - $this->inventoryMode = (string) $data; + $this->orderState = (string) $data; } - return $this->inventoryMode; + return $this->orderState; } /** - *If not given the tax rounding mode HalfEven
will be assigned by default.
State of the Order in a custom workflow.
* * - * @return null|string + * @return null|StateReference */ - public function getTaxRoundingMode() + public function getState() { - if (is_null($this->taxRoundingMode)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_TAX_ROUNDING_MODE); + if (is_null($this->state)) { + /** @psalm-var stdClass|arrayContains addresses for orders with multiple shipping addresses.
+ *Include a value to associate a country with the Order.
* * - * @return null|BaseAddressCollection + * @return null|string */ - public function getItemShippingAddresses() + public function getCountry() { - if (is_null($this->itemShippingAddresses)) { - /** @psalm-var ?listThe Business Unit the Cart belongs to.
+ *Indicates the origin of the Order.
* * - * @return null|BusinessUnitResourceIdentifier + * @return null|string */ - public function getBusinessUnit() + public function getOrigin() { - if (is_null($this->businessUnit)) { - /** @psalm-var stdClass|arrayUser-defined date and time for the Order. This value does not influence the createdAt
or lastModifiedAt
values of the Order created by the Order Import.
The default origin is Customer
.
Custom Fields for the Order.
* * - * @return null|string + * @return null|CustomFieldsDraft */ - public function getOrigin() + public function getCustom() { - if (is_null($this->origin)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_ORIGIN); + if (is_null($this->custom)) { + /** @psalm-var stdClass|arrayThe sequential ID of the variant within the product. - * The variant with provided ID should exist in some existing product, so you also need to specify the productId if this property is set, - * or alternatively you can just specify SKU of the product variant.
+ *The id
of the ProductVariant. Required if you do not set a value for sku
.
+ * If set, you must specify a productId
in the LineItemImportDraft also.
The SKU of the existing variant.
+ *The sku
of the ProductVariant. Required if you do not set a value for id
.
The Embedded Prices of the variant.
- * The prices should not contain two prices for the same price scope (same currency, country, customer group, channel, valid from and valid until).
- * If this property is defined, then it will override the prices
property from the original product variant, otherwise prices
property from the original product variant would be copied in the resulting order.
The Prices of the Product Variant if you want to override the prices
property in the referenced ProductVariant.
+ * If not set, the prices
from the referenced ProductVariant are used in the resulting Order.
+ * If set, each Price must have its unique price scope (same value.currencyCode
, country
, customerGroup
, channel
, validFrom
and validUntil
).
If this property is defined, then it will override the attributes
property from the original
- * product variant, otherwise attributes
property from the original product variant would be copied in the resulting order.
The Attributes of the Product Variant if you want to override the attributes
property in the referenced ProductVariant.
+ * If not set, the attributes
from the referenced ProductVariant are copied to the resulting Order.
If this property is defined, then it will override the images
property from the original
- * product variant, otherwise images
property from the original product variant would be copied in the resulting order.
The Images of the Product Variant if you want to override the images
property in the referenced ProductVariant.
+ * If not set, the images
from the referenced ProductVariant are copied to the resulting Order.
The sequential ID of the variant within the product. - * The variant with provided ID should exist in some existing product, so you also need to specify the productId if this property is set, - * or alternatively you can just specify SKU of the product variant.
+ *The id
of the ProductVariant. Required if you do not set a value for sku
.
+ * If set, you must specify a productId
in the LineItemImportDraft also.
The SKU of the existing variant.
+ *The sku
of the ProductVariant. Required if you do not set a value for id
.
The Embedded Prices of the variant.
- * The prices should not contain two prices for the same price scope (same currency, country, customer group, channel, valid from and valid until).
- * If this property is defined, then it will override the prices
property from the original product variant, otherwise prices
property from the original product variant would be copied in the resulting order.
The Prices of the Product Variant if you want to override the prices
property in the referenced ProductVariant.
+ * If not set, the prices
from the referenced ProductVariant are used in the resulting Order.
+ * If set, each Price must have its unique price scope (same value.currencyCode
, country
, customerGroup
, channel
, validFrom
and validUntil
).
If this property is defined, then it will override the attributes
property from the original
- * product variant, otherwise attributes
property from the original product variant would be copied in the resulting order.
The Attributes of the Product Variant if you want to override the attributes
property in the referenced ProductVariant.
+ * If not set, the attributes
from the referenced ProductVariant are copied to the resulting Order.
If this property is defined, then it will override the images
property from the original
- * product variant, otherwise images
property from the original product variant would be copied in the resulting order.
The Images of the Product Variant if you want to override the images
property in the referenced ProductVariant.
+ * If not set, the images
from the referenced ProductVariant are copied to the resulting Order.
The sequential ID of the variant within the product. - * The variant with provided ID should exist in some existing product, so you also need to specify the productId if this property is set, - * or alternatively you can just specify SKU of the product variant.
+ *The id
of the ProductVariant. Required if you do not set a value for sku
.
+ * If set, you must specify a productId
in the LineItemImportDraft also.
The SKU of the existing variant.
+ *The sku
of the ProductVariant. Required if you do not set a value for id
.
The Embedded Prices of the variant.
- * The prices should not contain two prices for the same price scope (same currency, country, customer group, channel, valid from and valid until).
- * If this property is defined, then it will override the prices
property from the original product variant, otherwise prices
property from the original product variant would be copied in the resulting order.
The Prices of the Product Variant if you want to override the prices
property in the referenced ProductVariant.
+ * If not set, the prices
from the referenced ProductVariant are used in the resulting Order.
+ * If set, each Price must have its unique price scope (same value.currencyCode
, country
, customerGroup
, channel
, validFrom
and validUntil
).
If this property is defined, then it will override the attributes
property from the original
- * product variant, otherwise attributes
property from the original product variant would be copied in the resulting order.
The Attributes of the Product Variant if you want to override the attributes
property in the referenced ProductVariant.
+ * If not set, the attributes
from the referenced ProductVariant are copied to the resulting Order.
If this property is defined, then it will override the images
property from the original
- * product variant, otherwise images
property from the original product variant would be copied in the resulting order.
The Images of the Product Variant if you want to override the images
property in the referenced ProductVariant.
+ * If not set, the images
from the referenced ProductVariant are copied to the resulting Order.
Name of the Shipping Method.
+ * * @return null|string */ public function getShippingMethodName(); /** + *The base price for the Shipping Method.
+ * * @return null|Money */ public function getPrice(); /** - *The shipping rate used to determine the price.
+ *Shipping rate information for the Order.
* * @return null|ShippingRateDraft @@ -49,19 +53,23 @@ public function getPrice(); public function getShippingRate(); /** + *Include a Tax Rate for the Shipping Method.
+ * * @return null|TaxRate */ public function getTaxRate(); /** + *Include a value to associate a Tax Category with the shipping information.
+ * * @return null|TaxCategoryResourceIdentifier */ public function getTaxCategory(); /** - *Not set if custom shipping method is used.
+ *Include a value to associate a Shipping Method with the Order.
* * @return null|ShippingMethodResourceIdentifier @@ -69,7 +77,7 @@ public function getTaxCategory(); public function getShippingMethod(); /** - *Deliveries are compilations of information on how the articles are being delivered to the customers.
+ *Information on how items are to be delivered to customers.
* * @return null|DeliveryDraftCollection @@ -77,13 +85,15 @@ public function getShippingMethod(); public function getDeliveries(); /** + *Discounted Price of the Shipping Method.
+ * * @return null|DiscountedLineItemPriceDraft */ public function getDiscountedPrice(); /** - *Indicates whether the ShippingMethod referenced is allowed for the cart or not.
+ *Indicates if the ShippingMethod referenced is allowed for the Order or not.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/Order/ShippingInfoImportDraftBuilder.php b/lib/commercetools-api/src/Models/Order/ShippingInfoImportDraftBuilder.php index be50972e657..b832bb79b40 100644 --- a/lib/commercetools-api/src/Models/Order/ShippingInfoImportDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Order/ShippingInfoImportDraftBuilder.php @@ -85,6 +85,8 @@ final class ShippingInfoImportDraftBuilder implements Builder private $shippingMethodState; /** + *Name of the Shipping Method.
+ * * @return null|string */ @@ -94,6 +96,8 @@ public function getShippingMethodName() } /** + *The base price for the Shipping Method.
+ * * @return null|Money */ @@ -103,7 +107,7 @@ public function getPrice() } /** - *The shipping rate used to determine the price.
+ *Shipping rate information for the Order.
* * @return null|ShippingRateDraft @@ -114,6 +118,8 @@ public function getShippingRate() } /** + *Include a Tax Rate for the Shipping Method.
+ * * @return null|TaxRate */ @@ -123,6 +129,8 @@ public function getTaxRate() } /** + *Include a value to associate a Tax Category with the shipping information.
+ * * @return null|TaxCategoryResourceIdentifier */ @@ -132,7 +140,7 @@ public function getTaxCategory() } /** - *Not set if custom shipping method is used.
+ *Include a value to associate a Shipping Method with the Order.
* * @return null|ShippingMethodResourceIdentifier @@ -143,7 +151,7 @@ public function getShippingMethod() } /** - *Deliveries are compilations of information on how the articles are being delivered to the customers.
+ *Information on how items are to be delivered to customers.
* * @return null|DeliveryDraftCollection @@ -154,6 +162,8 @@ public function getDeliveries() } /** + *Discounted Price of the Shipping Method.
+ * * @return null|DiscountedLineItemPriceDraft */ @@ -163,7 +173,7 @@ public function getDiscountedPrice() } /** - *Indicates whether the ShippingMethod referenced is allowed for the cart or not.
+ *Indicates if the ShippingMethod referenced is allowed for the Order or not.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/Order/ShippingInfoImportDraftModel.php b/lib/commercetools-api/src/Models/Order/ShippingInfoImportDraftModel.php index 4e588752a07..af6b2596f0e 100644 --- a/lib/commercetools-api/src/Models/Order/ShippingInfoImportDraftModel.php +++ b/lib/commercetools-api/src/Models/Order/ShippingInfoImportDraftModel.php @@ -110,6 +110,8 @@ public function __construct( } /** + *Name of the Shipping Method.
+ * * * @return null|string */ @@ -128,6 +130,8 @@ public function getShippingMethodName() } /** + *The base price for the Shipping Method.
+ * * * @return null|Money */ @@ -147,7 +151,7 @@ public function getPrice() } /** - *The shipping rate used to determine the price.
+ *Shipping rate information for the Order.
* * * @return null|ShippingRateDraft @@ -168,6 +172,8 @@ public function getShippingRate() } /** + *Include a Tax Rate for the Shipping Method.
+ * * * @return null|TaxRate */ @@ -187,6 +193,8 @@ public function getTaxRate() } /** + *Include a value to associate a Tax Category with the shipping information.
+ * * * @return null|TaxCategoryResourceIdentifier */ @@ -206,7 +214,7 @@ public function getTaxCategory() } /** - *Not set if custom shipping method is used.
+ *Include a value to associate a Shipping Method with the Order.
* * * @return null|ShippingMethodResourceIdentifier @@ -227,7 +235,7 @@ public function getShippingMethod() } /** - *Deliveries are compilations of information on how the articles are being delivered to the customers.
+ *Information on how items are to be delivered to customers.
* * * @return null|DeliveryDraftCollection @@ -247,6 +255,8 @@ public function getDeliveries() } /** + *Discounted Price of the Shipping Method.
+ * * * @return null|DiscountedLineItemPriceDraft */ @@ -266,7 +276,7 @@ public function getDiscountedPrice() } /** - *Indicates whether the ShippingMethod referenced is allowed for the cart or not.
+ *Indicates if the ShippingMethod referenced is allowed for the Order or not.
* * * @return null|string diff --git a/references.txt b/references.txt index 08dad2159d2..a74971923bf 100644 --- a/references.txt +++ b/references.txt @@ -77,3 +77,4 @@ ffae5451a83fffb30629a708d9325edfcc11d72a d64e3f818ddbb68526fbbe5c0ba3c1cfde9a7c0f b07e7ba714fd02e261dac1818a92f4b434ffb62b 68aece12ea78c79043175a729bc159bf2ecef280 +1983af4216979cb57ba71255ef917e9cbb03bded From 9bd758b419272eb81399c2afbd91c18836f060f5 Mon Sep 17 00:00:00 2001 From: Auto MationValue after the change.
+ * + + * @return null|InheritedAssociate + */ + public function getNextValue() + { + return $this->nextValue instanceof InheritedAssociateBuilder ? $this->nextValue->build() : $this->nextValue; + } + + /** + * @param ?string $change + * @return $this + */ + public function withChange(?string $change) + { + $this->change = $change; + + return $this; + } + + /** + * @param ?InheritedAssociate $nextValue + * @return $this + */ + public function withNextValue(?InheritedAssociate $nextValue) + { + $this->nextValue = $nextValue; + + return $this; + } + + /** + * @deprecated use withNextValue() instead + * @return $this + */ + public function withNextValueBuilder(?InheritedAssociateBuilder $nextValue) + { + $this->nextValue = $nextValue; + + return $this; + } + + public function build(): AddInheritedAssociateChange + { + return new AddInheritedAssociateChangeModel( + $this->change, + $this->nextValue instanceof InheritedAssociateBuilder ? $this->nextValue->build() : $this->nextValue + ); + } + + public static function of(): AddInheritedAssociateChangeBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-history/src/Models/Change/AddInheritedAssociateChangeCollection.php b/lib/commercetools-history/src/Models/Change/AddInheritedAssociateChangeCollection.php new file mode 100644 index 00000000000..7db44a9e7ec --- /dev/null +++ b/lib/commercetools-history/src/Models/Change/AddInheritedAssociateChangeCollection.php @@ -0,0 +1,56 @@ + + * @method AddInheritedAssociateChange current() + * @method AddInheritedAssociateChange end() + * @method AddInheritedAssociateChange at($offset) + */ +class AddInheritedAssociateChangeCollection extends ChangeCollection +{ + /** + * @psalm-assert AddInheritedAssociateChange $value + * @psalm-param AddInheritedAssociateChange|stdClass $value + * @throws InvalidArgumentException + * + * @return AddInheritedAssociateChangeCollection + */ + public function add($value) + { + if (!$value instanceof AddInheritedAssociateChange) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?AddInheritedAssociateChange + */ + protected function mapper() + { + return function (?int $index): ?AddInheritedAssociateChange { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var AddInheritedAssociateChange $data */ + $data = AddInheritedAssociateChangeModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-history/src/Models/Change/AddInheritedAssociateChangeModel.php b/lib/commercetools-history/src/Models/Change/AddInheritedAssociateChangeModel.php new file mode 100644 index 00000000000..7d7257186d3 --- /dev/null +++ b/lib/commercetools-history/src/Models/Change/AddInheritedAssociateChangeModel.php @@ -0,0 +1,134 @@ +change = $change; + $this->nextValue = $nextValue; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + * + * @return null|string + */ + public function getChange() + { + if (is_null($this->change)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CHANGE); + if (is_null($data)) { + return null; + } + $this->change = (string) $data; + } + + return $this->change; + } + + /** + *Value after the change.
+ * + * + * @return null|InheritedAssociate + */ + public function getNextValue() + { + if (is_null($this->nextValue)) { + /** @psalm-var stdClass|arrayValue after the change.
+ * + + * @return null|bool + */ + public function getNextValue(); + + /** + * @param ?string $change + */ + public function setChange(?string $change): void; + + /** + * @param ?bool $previousValue + */ + public function setPreviousValue(?bool $previousValue): void; + + /** + * @param ?bool $nextValue + */ + public function setNextValue(?bool $nextValue): void; +} diff --git a/lib/commercetools-history/src/Models/Change/ChangeBuyerAssignableChangeBuilder.php b/lib/commercetools-history/src/Models/Change/ChangeBuyerAssignableChangeBuilder.php new file mode 100644 index 00000000000..b933a0252bc --- /dev/null +++ b/lib/commercetools-history/src/Models/Change/ChangeBuyerAssignableChangeBuilder.php @@ -0,0 +1,119 @@ + + */ +final class ChangeBuyerAssignableChangeBuilder implements Builder +{ + /** + + * @var ?string + */ + private $change; + + /** + + * @var ?bool + */ + private $previousValue; + + /** + + * @var ?bool + */ + private $nextValue; + + /** + + * @return null|string + */ + public function getChange() + { + return $this->change; + } + + /** + *Value before the change.
+ * + + * @return null|bool + */ + public function getPreviousValue() + { + return $this->previousValue; + } + + /** + *Value after the change.
+ * + + * @return null|bool + */ + public function getNextValue() + { + return $this->nextValue; + } + + /** + * @param ?string $change + * @return $this + */ + public function withChange(?string $change) + { + $this->change = $change; + + return $this; + } + + /** + * @param ?bool $previousValue + * @return $this + */ + public function withPreviousValue(?bool $previousValue) + { + $this->previousValue = $previousValue; + + return $this; + } + + /** + * @param ?bool $nextValue + * @return $this + */ + public function withNextValue(?bool $nextValue) + { + $this->nextValue = $nextValue; + + return $this; + } + + + public function build(): ChangeBuyerAssignableChange + { + return new ChangeBuyerAssignableChangeModel( + $this->change, + $this->previousValue, + $this->nextValue + ); + } + + public static function of(): ChangeBuyerAssignableChangeBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-history/src/Models/Change/ChangeBuyerAssignableChangeCollection.php b/lib/commercetools-history/src/Models/Change/ChangeBuyerAssignableChangeCollection.php new file mode 100644 index 00000000000..426b39c21ec --- /dev/null +++ b/lib/commercetools-history/src/Models/Change/ChangeBuyerAssignableChangeCollection.php @@ -0,0 +1,56 @@ + + * @method ChangeBuyerAssignableChange current() + * @method ChangeBuyerAssignableChange end() + * @method ChangeBuyerAssignableChange at($offset) + */ +class ChangeBuyerAssignableChangeCollection extends ChangeCollection +{ + /** + * @psalm-assert ChangeBuyerAssignableChange $value + * @psalm-param ChangeBuyerAssignableChange|stdClass $value + * @throws InvalidArgumentException + * + * @return ChangeBuyerAssignableChangeCollection + */ + public function add($value) + { + if (!$value instanceof ChangeBuyerAssignableChange) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?ChangeBuyerAssignableChange + */ + protected function mapper() + { + return function (?int $index): ?ChangeBuyerAssignableChange { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var ChangeBuyerAssignableChange $data */ + $data = ChangeBuyerAssignableChangeModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-history/src/Models/Change/ChangeBuyerAssignableChangeModel.php b/lib/commercetools-history/src/Models/Change/ChangeBuyerAssignableChangeModel.php new file mode 100644 index 00000000000..1cc8898ff26 --- /dev/null +++ b/lib/commercetools-history/src/Models/Change/ChangeBuyerAssignableChangeModel.php @@ -0,0 +1,167 @@ +change = $change; + $this->previousValue = $previousValue; + $this->nextValue = $nextValue; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + * + * @return null|string + */ + public function getChange() + { + if (is_null($this->change)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CHANGE); + if (is_null($data)) { + return null; + } + $this->change = (string) $data; + } + + return $this->change; + } + + /** + *Value before the change.
+ * + * + * @return null|bool + */ + public function getPreviousValue() + { + if (is_null($this->previousValue)) { + /** @psalm-var ?bool $data */ + $data = $this->raw(self::FIELD_PREVIOUS_VALUE); + if (is_null($data)) { + return null; + } + $this->previousValue = (bool) $data; + } + + return $this->previousValue; + } + + /** + *Value after the change.
+ * + * + * @return null|bool + */ + public function getNextValue() + { + if (is_null($this->nextValue)) { + /** @psalm-var ?bool $data */ + $data = $this->raw(self::FIELD_NEXT_VALUE); + if (is_null($data)) { + return null; + } + $this->nextValue = (bool) $data; + } + + return $this->nextValue; + } + + + /** + * @param ?string $change + */ + public function setChange(?string $change): void + { + $this->change = $change; + } + + /** + * @param ?bool $previousValue + */ + public function setPreviousValue(?bool $previousValue): void + { + $this->previousValue = $previousValue; + } + + /** + * @param ?bool $nextValue + */ + public function setNextValue(?bool $nextValue): void + { + $this->nextValue = $nextValue; + } + + + +} diff --git a/lib/commercetools-history/src/Models/Change/ChangeInheritedAssociateChange.php b/lib/commercetools-history/src/Models/Change/ChangeInheritedAssociateChange.php new file mode 100644 index 00000000000..331605502d1 --- /dev/null +++ b/lib/commercetools-history/src/Models/Change/ChangeInheritedAssociateChange.php @@ -0,0 +1,63 @@ +Value before the change. + * + + * @return null|InheritedAssociate + */ + public function getPreviousValue(); + + /** + *Value after the change.
+ * + + * @return null|InheritedAssociate + */ + public function getNextValue(); + + /** + * @param ?string $change + */ + public function setChange(?string $change): void; + + /** + * @param ?InheritedAssociate $previousValue + */ + public function setPreviousValue(?InheritedAssociate $previousValue): void; + + /** + * @param ?InheritedAssociate $nextValue + */ + public function setNextValue(?InheritedAssociate $nextValue): void; +} diff --git a/lib/commercetools-history/src/Models/Change/ChangeInheritedAssociateChangeBuilder.php b/lib/commercetools-history/src/Models/Change/ChangeInheritedAssociateChangeBuilder.php new file mode 100644 index 00000000000..2dac0d77faa --- /dev/null +++ b/lib/commercetools-history/src/Models/Change/ChangeInheritedAssociateChangeBuilder.php @@ -0,0 +1,142 @@ + + */ +final class ChangeInheritedAssociateChangeBuilder implements Builder +{ + /** + + * @var ?string + */ + private $change; + + /** + + * @var null|InheritedAssociate|InheritedAssociateBuilder + */ + private $previousValue; + + /** + + * @var null|InheritedAssociate|InheritedAssociateBuilder + */ + private $nextValue; + + /** + + * @return null|string + */ + public function getChange() + { + return $this->change; + } + + /** + *Value before the change.
+ * + + * @return null|InheritedAssociate + */ + public function getPreviousValue() + { + return $this->previousValue instanceof InheritedAssociateBuilder ? $this->previousValue->build() : $this->previousValue; + } + + /** + *Value after the change.
+ * + + * @return null|InheritedAssociate + */ + public function getNextValue() + { + return $this->nextValue instanceof InheritedAssociateBuilder ? $this->nextValue->build() : $this->nextValue; + } + + /** + * @param ?string $change + * @return $this + */ + public function withChange(?string $change) + { + $this->change = $change; + + return $this; + } + + /** + * @param ?InheritedAssociate $previousValue + * @return $this + */ + public function withPreviousValue(?InheritedAssociate $previousValue) + { + $this->previousValue = $previousValue; + + return $this; + } + + /** + * @param ?InheritedAssociate $nextValue + * @return $this + */ + public function withNextValue(?InheritedAssociate $nextValue) + { + $this->nextValue = $nextValue; + + return $this; + } + + /** + * @deprecated use withPreviousValue() instead + * @return $this + */ + public function withPreviousValueBuilder(?InheritedAssociateBuilder $previousValue) + { + $this->previousValue = $previousValue; + + return $this; + } + + /** + * @deprecated use withNextValue() instead + * @return $this + */ + public function withNextValueBuilder(?InheritedAssociateBuilder $nextValue) + { + $this->nextValue = $nextValue; + + return $this; + } + + public function build(): ChangeInheritedAssociateChange + { + return new ChangeInheritedAssociateChangeModel( + $this->change, + $this->previousValue instanceof InheritedAssociateBuilder ? $this->previousValue->build() : $this->previousValue, + $this->nextValue instanceof InheritedAssociateBuilder ? $this->nextValue->build() : $this->nextValue + ); + } + + public static function of(): ChangeInheritedAssociateChangeBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-history/src/Models/Change/ChangeInheritedAssociateChangeCollection.php b/lib/commercetools-history/src/Models/Change/ChangeInheritedAssociateChangeCollection.php new file mode 100644 index 00000000000..ba239194f6e --- /dev/null +++ b/lib/commercetools-history/src/Models/Change/ChangeInheritedAssociateChangeCollection.php @@ -0,0 +1,56 @@ + + * @method ChangeInheritedAssociateChange current() + * @method ChangeInheritedAssociateChange end() + * @method ChangeInheritedAssociateChange at($offset) + */ +class ChangeInheritedAssociateChangeCollection extends ChangeCollection +{ + /** + * @psalm-assert ChangeInheritedAssociateChange $value + * @psalm-param ChangeInheritedAssociateChange|stdClass $value + * @throws InvalidArgumentException + * + * @return ChangeInheritedAssociateChangeCollection + */ + public function add($value) + { + if (!$value instanceof ChangeInheritedAssociateChange) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?ChangeInheritedAssociateChange + */ + protected function mapper() + { + return function (?int $index): ?ChangeInheritedAssociateChange { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var ChangeInheritedAssociateChange $data */ + $data = ChangeInheritedAssociateChangeModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-history/src/Models/Change/ChangeInheritedAssociateChangeModel.php b/lib/commercetools-history/src/Models/Change/ChangeInheritedAssociateChangeModel.php new file mode 100644 index 00000000000..ea92c419f0d --- /dev/null +++ b/lib/commercetools-history/src/Models/Change/ChangeInheritedAssociateChangeModel.php @@ -0,0 +1,171 @@ +change = $change; + $this->previousValue = $previousValue; + $this->nextValue = $nextValue; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + * + * @return null|string + */ + public function getChange() + { + if (is_null($this->change)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CHANGE); + if (is_null($data)) { + return null; + } + $this->change = (string) $data; + } + + return $this->change; + } + + /** + *Value before the change.
+ * + * + * @return null|InheritedAssociate + */ + public function getPreviousValue() + { + if (is_null($this->previousValue)) { + /** @psalm-var stdClass|arrayValue after the change.
+ * + * + * @return null|InheritedAssociate + */ + public function getNextValue() + { + if (is_null($this->nextValue)) { + /** @psalm-var stdClass|arrayThe value before the change.
+ * + + * @return null|InheritedAssociate + */ + public function getPreviousValue() + { + return $this->previousValue instanceof InheritedAssociateBuilder ? $this->previousValue->build() : $this->previousValue; + } + + /** + * @param ?string $change + * @return $this + */ + public function withChange(?string $change) + { + $this->change = $change; + + return $this; + } + + /** + * @param ?InheritedAssociate $previousValue + * @return $this + */ + public function withPreviousValue(?InheritedAssociate $previousValue) + { + $this->previousValue = $previousValue; + + return $this; + } + + /** + * @deprecated use withPreviousValue() instead + * @return $this + */ + public function withPreviousValueBuilder(?InheritedAssociateBuilder $previousValue) + { + $this->previousValue = $previousValue; + + return $this; + } + + public function build(): RemoveInheritedAssociateChange + { + return new RemoveInheritedAssociateChangeModel( + $this->change, + $this->previousValue instanceof InheritedAssociateBuilder ? $this->previousValue->build() : $this->previousValue + ); + } + + public static function of(): RemoveInheritedAssociateChangeBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-history/src/Models/Change/RemoveInheritedAssociateChangeCollection.php b/lib/commercetools-history/src/Models/Change/RemoveInheritedAssociateChangeCollection.php new file mode 100644 index 00000000000..7e5d9e0ac89 --- /dev/null +++ b/lib/commercetools-history/src/Models/Change/RemoveInheritedAssociateChangeCollection.php @@ -0,0 +1,56 @@ + + * @method RemoveInheritedAssociateChange current() + * @method RemoveInheritedAssociateChange end() + * @method RemoveInheritedAssociateChange at($offset) + */ +class RemoveInheritedAssociateChangeCollection extends ChangeCollection +{ + /** + * @psalm-assert RemoveInheritedAssociateChange $value + * @psalm-param RemoveInheritedAssociateChange|stdClass $value + * @throws InvalidArgumentException + * + * @return RemoveInheritedAssociateChangeCollection + */ + public function add($value) + { + if (!$value instanceof RemoveInheritedAssociateChange) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?RemoveInheritedAssociateChange + */ + protected function mapper() + { + return function (?int $index): ?RemoveInheritedAssociateChange { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var RemoveInheritedAssociateChange $data */ + $data = RemoveInheritedAssociateChangeModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-history/src/Models/Change/RemoveInheritedAssociateChangeModel.php b/lib/commercetools-history/src/Models/Change/RemoveInheritedAssociateChangeModel.php new file mode 100644 index 00000000000..364b2b9584d --- /dev/null +++ b/lib/commercetools-history/src/Models/Change/RemoveInheritedAssociateChangeModel.php @@ -0,0 +1,134 @@ +change = $change; + $this->previousValue = $previousValue; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + * + * @return null|string + */ + public function getChange() + { + if (is_null($this->change)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CHANGE); + if (is_null($data)) { + return null; + } + $this->change = (string) $data; + } + + return $this->change; + } + + /** + *The value before the change.
+ * + * + * @return null|InheritedAssociate + */ + public function getPreviousValue() + { + if (is_null($this->previousValue)) { + /** @psalm-var stdClass|arrayValue after the change.
+ * + + * @return null|LocalizedString + */ + public function getNextValue(); + + /** + * @param ?string $change + */ + public function setChange(?string $change): void; + + /** + * @param ?LocalizedString $previousValue + */ + public function setPreviousValue(?LocalizedString $previousValue): void; + + /** + * @param ?LocalizedString $nextValue + */ + public function setNextValue(?LocalizedString $nextValue): void; +} diff --git a/lib/commercetools-history/src/Models/Change/SetLocalizedNameChangeBuilder.php b/lib/commercetools-history/src/Models/Change/SetLocalizedNameChangeBuilder.php new file mode 100644 index 00000000000..a20c68fe1be --- /dev/null +++ b/lib/commercetools-history/src/Models/Change/SetLocalizedNameChangeBuilder.php @@ -0,0 +1,142 @@ + + */ +final class SetLocalizedNameChangeBuilder implements Builder +{ + /** + + * @var ?string + */ + private $change; + + /** + + * @var null|LocalizedString|LocalizedStringBuilder + */ + private $previousValue; + + /** + + * @var null|LocalizedString|LocalizedStringBuilder + */ + private $nextValue; + + /** + + * @return null|string + */ + public function getChange() + { + return $this->change; + } + + /** + *Value before the change.
+ * + + * @return null|LocalizedString + */ + public function getPreviousValue() + { + return $this->previousValue instanceof LocalizedStringBuilder ? $this->previousValue->build() : $this->previousValue; + } + + /** + *Value after the change.
+ * + + * @return null|LocalizedString + */ + public function getNextValue() + { + return $this->nextValue instanceof LocalizedStringBuilder ? $this->nextValue->build() : $this->nextValue; + } + + /** + * @param ?string $change + * @return $this + */ + public function withChange(?string $change) + { + $this->change = $change; + + return $this; + } + + /** + * @param ?LocalizedString $previousValue + * @return $this + */ + public function withPreviousValue(?LocalizedString $previousValue) + { + $this->previousValue = $previousValue; + + return $this; + } + + /** + * @param ?LocalizedString $nextValue + * @return $this + */ + public function withNextValue(?LocalizedString $nextValue) + { + $this->nextValue = $nextValue; + + return $this; + } + + /** + * @deprecated use withPreviousValue() instead + * @return $this + */ + public function withPreviousValueBuilder(?LocalizedStringBuilder $previousValue) + { + $this->previousValue = $previousValue; + + return $this; + } + + /** + * @deprecated use withNextValue() instead + * @return $this + */ + public function withNextValueBuilder(?LocalizedStringBuilder $nextValue) + { + $this->nextValue = $nextValue; + + return $this; + } + + public function build(): SetLocalizedNameChange + { + return new SetLocalizedNameChangeModel( + $this->change, + $this->previousValue instanceof LocalizedStringBuilder ? $this->previousValue->build() : $this->previousValue, + $this->nextValue instanceof LocalizedStringBuilder ? $this->nextValue->build() : $this->nextValue + ); + } + + public static function of(): SetLocalizedNameChangeBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-history/src/Models/Change/SetLocalizedNameChangeCollection.php b/lib/commercetools-history/src/Models/Change/SetLocalizedNameChangeCollection.php new file mode 100644 index 00000000000..94b16835153 --- /dev/null +++ b/lib/commercetools-history/src/Models/Change/SetLocalizedNameChangeCollection.php @@ -0,0 +1,56 @@ + + * @method SetLocalizedNameChange current() + * @method SetLocalizedNameChange end() + * @method SetLocalizedNameChange at($offset) + */ +class SetLocalizedNameChangeCollection extends ChangeCollection +{ + /** + * @psalm-assert SetLocalizedNameChange $value + * @psalm-param SetLocalizedNameChange|stdClass $value + * @throws InvalidArgumentException + * + * @return SetLocalizedNameChangeCollection + */ + public function add($value) + { + if (!$value instanceof SetLocalizedNameChange) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?SetLocalizedNameChange + */ + protected function mapper() + { + return function (?int $index): ?SetLocalizedNameChange { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var SetLocalizedNameChange $data */ + $data = SetLocalizedNameChangeModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-history/src/Models/Change/SetLocalizedNameChangeModel.php b/lib/commercetools-history/src/Models/Change/SetLocalizedNameChangeModel.php new file mode 100644 index 00000000000..2a6fc99c0b1 --- /dev/null +++ b/lib/commercetools-history/src/Models/Change/SetLocalizedNameChangeModel.php @@ -0,0 +1,171 @@ +change = $change; + $this->previousValue = $previousValue; + $this->nextValue = $nextValue; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + * + * @return null|string + */ + public function getChange() + { + if (is_null($this->change)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CHANGE); + if (is_null($data)) { + return null; + } + $this->change = (string) $data; + } + + return $this->change; + } + + /** + *Value before the change.
+ * + * + * @return null|LocalizedString + */ + public function getPreviousValue() + { + if (is_null($this->previousValue)) { + /** @psalm-var stdClass|arrayValue after the change.
+ * + * + * @return null|LocalizedString + */ + public function getNextValue() + { + if (is_null($this->nextValue)) { + /** @psalm-var stdClass|arrayValue after the change.
+ * + + * @return null|array + */ + public function getNextValue(); + + /** + * @param ?string $change + */ + public function setChange(?string $change): void; + + /** + * @param ?array $previousValue + */ + public function setPreviousValue(?array $previousValue): void; + + /** + * @param ?array $nextValue + */ + public function setNextValue(?array $nextValue): void; +} diff --git a/lib/commercetools-history/src/Models/Change/SetPermissionsChangeBuilder.php b/lib/commercetools-history/src/Models/Change/SetPermissionsChangeBuilder.php new file mode 100644 index 00000000000..bbf98bcec9a --- /dev/null +++ b/lib/commercetools-history/src/Models/Change/SetPermissionsChangeBuilder.php @@ -0,0 +1,119 @@ + + */ +final class SetPermissionsChangeBuilder implements Builder +{ + /** + + * @var ?string + */ + private $change; + + /** + + * @var ?array + */ + private $previousValue; + + /** + + * @var ?array + */ + private $nextValue; + + /** + + * @return null|string + */ + public function getChange() + { + return $this->change; + } + + /** + *Value before the change.
+ * + + * @return null|array + */ + public function getPreviousValue() + { + return $this->previousValue; + } + + /** + *Value after the change.
+ * + + * @return null|array + */ + public function getNextValue() + { + return $this->nextValue; + } + + /** + * @param ?string $change + * @return $this + */ + public function withChange(?string $change) + { + $this->change = $change; + + return $this; + } + + /** + * @param ?array $previousValue + * @return $this + */ + public function withPreviousValue(?array $previousValue) + { + $this->previousValue = $previousValue; + + return $this; + } + + /** + * @param ?array $nextValue + * @return $this + */ + public function withNextValue(?array $nextValue) + { + $this->nextValue = $nextValue; + + return $this; + } + + + public function build(): SetPermissionsChange + { + return new SetPermissionsChangeModel( + $this->change, + $this->previousValue, + $this->nextValue + ); + } + + public static function of(): SetPermissionsChangeBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-history/src/Models/Change/SetPermissionsChangeCollection.php b/lib/commercetools-history/src/Models/Change/SetPermissionsChangeCollection.php new file mode 100644 index 00000000000..e5223b62f71 --- /dev/null +++ b/lib/commercetools-history/src/Models/Change/SetPermissionsChangeCollection.php @@ -0,0 +1,56 @@ + + * @method SetPermissionsChange current() + * @method SetPermissionsChange end() + * @method SetPermissionsChange at($offset) + */ +class SetPermissionsChangeCollection extends ChangeCollection +{ + /** + * @psalm-assert SetPermissionsChange $value + * @psalm-param SetPermissionsChange|stdClass $value + * @throws InvalidArgumentException + * + * @return SetPermissionsChangeCollection + */ + public function add($value) + { + if (!$value instanceof SetPermissionsChange) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?SetPermissionsChange + */ + protected function mapper() + { + return function (?int $index): ?SetPermissionsChange { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var SetPermissionsChange $data */ + $data = SetPermissionsChangeModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-history/src/Models/Change/SetPermissionsChangeModel.php b/lib/commercetools-history/src/Models/Change/SetPermissionsChangeModel.php new file mode 100644 index 00000000000..43d5a71f3c5 --- /dev/null +++ b/lib/commercetools-history/src/Models/Change/SetPermissionsChangeModel.php @@ -0,0 +1,167 @@ +change = $change; + $this->previousValue = $previousValue; + $this->nextValue = $nextValue; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + * + * @return null|string + */ + public function getChange() + { + if (is_null($this->change)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CHANGE); + if (is_null($data)) { + return null; + } + $this->change = (string) $data; + } + + return $this->change; + } + + /** + *Value before the change.
+ * + * + * @return null|array + */ + public function getPreviousValue() + { + if (is_null($this->previousValue)) { + /** @psalm-var ?listValue after the change.
+ * + * + * @return null|array + */ + public function getNextValue() + { + if (is_null($this->nextValue)) { + /** @psalm-var ?listName of the Associate Role.
+ * + + * @return null|string + */ + public function getName(); + + /** + * @param ?string $key + */ + public function setKey(?string $key): void; + + /** + * @param ?string $name + */ + public function setName(?string $name): void; +} diff --git a/lib/commercetools-history/src/Models/Label/AssociateRoleLabelBuilder.php b/lib/commercetools-history/src/Models/Label/AssociateRoleLabelBuilder.php new file mode 100644 index 00000000000..7ea157011cc --- /dev/null +++ b/lib/commercetools-history/src/Models/Label/AssociateRoleLabelBuilder.php @@ -0,0 +1,92 @@ + + */ +final class AssociateRoleLabelBuilder implements Builder +{ + /** + + * @var ?string + */ + private $key; + + /** + + * @var ?string + */ + private $name; + + /** + *User-defined unique identifier of the Associate Role.
+ * + + * @return null|string + */ + public function getKey() + { + return $this->key; + } + + /** + *Name of the Associate Role.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + * @param ?string $key + * @return $this + */ + public function withKey(?string $key) + { + $this->key = $key; + + return $this; + } + + /** + * @param ?string $name + * @return $this + */ + public function withName(?string $name) + { + $this->name = $name; + + return $this; + } + + + public function build(): AssociateRoleLabel + { + return new AssociateRoleLabelModel( + $this->key, + $this->name + ); + } + + public static function of(): AssociateRoleLabelBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-history/src/Models/Label/AssociateRoleLabelCollection.php b/lib/commercetools-history/src/Models/Label/AssociateRoleLabelCollection.php new file mode 100644 index 00000000000..e9d9fe15a44 --- /dev/null +++ b/lib/commercetools-history/src/Models/Label/AssociateRoleLabelCollection.php @@ -0,0 +1,56 @@ + + * @method AssociateRoleLabel current() + * @method AssociateRoleLabel end() + * @method AssociateRoleLabel at($offset) + */ +class AssociateRoleLabelCollection extends LabelCollection +{ + /** + * @psalm-assert AssociateRoleLabel $value + * @psalm-param AssociateRoleLabel|stdClass $value + * @throws InvalidArgumentException + * + * @return AssociateRoleLabelCollection + */ + public function add($value) + { + if (!$value instanceof AssociateRoleLabel) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?AssociateRoleLabel + */ + protected function mapper() + { + return function (?int $index): ?AssociateRoleLabel { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var AssociateRoleLabel $data */ + $data = AssociateRoleLabelModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-history/src/Models/Label/AssociateRoleLabelModel.php b/lib/commercetools-history/src/Models/Label/AssociateRoleLabelModel.php new file mode 100644 index 00000000000..219b3f1c160 --- /dev/null +++ b/lib/commercetools-history/src/Models/Label/AssociateRoleLabelModel.php @@ -0,0 +1,133 @@ +key = $key; + $this->name = $name; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *User-defined unique identifier of the Associate Role.
+ * + * + * @return null|string + */ + public function getKey() + { + if (is_null($this->key)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_KEY); + if (is_null($data)) { + return null; + } + $this->key = (string) $data; + } + + return $this->key; + } + + /** + *Name of the Associate Role.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + + /** + * @param ?string $key + */ + public function setKey(?string $key): void + { + $this->key = $key; + } + + /** + * @param ?string $name + */ + public function setName(?string $name): void + { + $this->name = $name; + } + + + +} diff --git a/lib/commercetools-history/src/Models/Label/LabelModel.php b/lib/commercetools-history/src/Models/Label/LabelModel.php index dca7b572193..b3996f78947 100644 --- a/lib/commercetools-history/src/Models/Label/LabelModel.php +++ b/lib/commercetools-history/src/Models/Label/LabelModel.php @@ -32,6 +32,7 @@ final class LabelModel extends JsonObjectModel implements Label * */ private static $discriminatorClasses = [ + 'AssociateRoleLabel' => AssociateRoleLabelModel::class, 'BusinessUnitLabel' => BusinessUnitLabelModel::class, 'CustomObjectLabel' => CustomObjectLabelModel::class, 'CustomerLabel' => CustomerLabelModel::class, diff --git a/references.txt b/references.txt index a74971923bf..c519a4855cf 100644 --- a/references.txt +++ b/references.txt @@ -78,3 +78,4 @@ d64e3f818ddbb68526fbbe5c0ba3c1cfde9a7c0f b07e7ba714fd02e261dac1818a92f4b434ffb62b 68aece12ea78c79043175a729bc159bf2ecef280 1983af4216979cb57ba71255ef917e9cbb03bded +c9260db322647c370b40e1883a503f6a0aec131d From c7ac721f1f2d82c7adc6eba536271c92eb735a3f Mon Sep 17 00:00:00 2001 From: Auto MationUser-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getCustomLineItemKey(); + /** *Date and time (UTC) when the transition of the Custom Line Item State was performed.
* @@ -66,6 +75,11 @@ public function getToState(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?DateTimeImmutable $transitionDate */ diff --git a/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessageBuilder.php b/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessageBuilder.php index e86499624a8..621963a3a0e 100644 --- a/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessageBuilder.php +++ b/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessageBuilder.php @@ -95,6 +95,12 @@ final class CustomLineItemStateTransitionMessageBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var ?DateTimeImmutable @@ -241,6 +247,17 @@ public function getCustomLineItemId() return $this->customLineItemId; } + /** + *User-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getCustomLineItemKey() + { + return $this->customLineItemKey; + } + /** *Date and time (UTC) when the transition of the Custom Line Item State was performed.
* @@ -406,6 +423,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?DateTimeImmutable $transitionDate * @return $this @@ -530,6 +558,7 @@ public function build(): CustomLineItemStateTransitionMessage $this->resourceVersion, $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, $this->customLineItemId, + $this->customLineItemKey, $this->transitionDate, $this->quantity, $this->fromState instanceof StateReferenceBuilder ? $this->fromState->build() : $this->fromState, diff --git a/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessageModel.php b/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessageModel.php index 8250c178ea8..4778d4a00bf 100644 --- a/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessageModel.php +++ b/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessageModel.php @@ -101,6 +101,12 @@ final class CustomLineItemStateTransitionMessageModel extends JsonObjectModel im */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?DateTimeImmutable @@ -141,6 +147,7 @@ public function __construct( ?int $resourceVersion = null, ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers = null, ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?DateTimeImmutable $transitionDate = null, ?int $quantity = null, ?StateReference $fromState = null, @@ -158,6 +165,7 @@ public function __construct( $this->resourceVersion = $resourceVersion; $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->transitionDate = $transitionDate; $this->quantity = $quantity; $this->fromState = $fromState; @@ -418,6 +426,26 @@ public function getCustomLineItemId() return $this->customLineItemId; } + /** + *User-defined unique identifier of the Custom Line Item.
+ * + * + * @return null|string + */ + public function getCustomLineItemKey() + { + if (is_null($this->customLineItemKey)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CUSTOM_LINE_ITEM_KEY); + if (is_null($data)) { + return null; + } + $this->customLineItemKey = (string) $data; + } + + return $this->customLineItemKey; + } + /** *Date and time (UTC) when the transition of the Custom Line Item State was performed.
* @@ -593,6 +621,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?DateTimeImmutable $transitionDate */ diff --git a/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessagePayload.php b/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessagePayload.php index 90f156668ec..3e55549a896 100644 --- a/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessagePayload.php +++ b/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessagePayload.php @@ -16,6 +16,7 @@ interface CustomLineItemStateTransitionMessagePayload extends OrderMessagePayload { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_TRANSITION_DATE = 'transitionDate'; public const FIELD_QUANTITY = 'quantity'; public const FIELD_FROM_STATE = 'fromState'; @@ -29,6 +30,14 @@ interface CustomLineItemStateTransitionMessagePayload extends OrderMessagePayloa */ public function getCustomLineItemId(); + /** + *User-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getCustomLineItemKey(); + /** *Date and time (UTC) when the transition of the Custom Line Item State was performed.
* @@ -66,6 +75,11 @@ public function getToState(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?DateTimeImmutable $transitionDate */ diff --git a/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessagePayloadBuilder.php index f428f767b15..1f693ceb13b 100644 --- a/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessagePayloadBuilder.php +++ b/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessagePayloadBuilder.php @@ -29,6 +29,12 @@ final class CustomLineItemStateTransitionMessagePayloadBuilder implements Builde */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var ?DateTimeImmutable @@ -64,6 +70,17 @@ public function getCustomLineItemId() return $this->customLineItemId; } + /** + *User-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getCustomLineItemKey() + { + return $this->customLineItemKey; + } + /** *Date and time (UTC) when the transition of the Custom Line Item State was performed.
* @@ -119,6 +136,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?DateTimeImmutable $transitionDate * @return $this @@ -189,6 +217,7 @@ public function build(): CustomLineItemStateTransitionMessagePayload { return new CustomLineItemStateTransitionMessagePayloadModel( $this->customLineItemId, + $this->customLineItemKey, $this->transitionDate, $this->quantity, $this->fromState instanceof StateReferenceBuilder ? $this->fromState->build() : $this->fromState, diff --git a/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessagePayloadModel.php index bf4756f1594..d3217d6f821 100644 --- a/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessagePayloadModel.php +++ b/lib/commercetools-api/src/Models/Message/CustomLineItemStateTransitionMessagePayloadModel.php @@ -35,6 +35,12 @@ final class CustomLineItemStateTransitionMessagePayloadModel extends JsonObjectM */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?DateTimeImmutable @@ -65,6 +71,7 @@ final class CustomLineItemStateTransitionMessagePayloadModel extends JsonObjectM */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?DateTimeImmutable $transitionDate = null, ?int $quantity = null, ?StateReference $fromState = null, @@ -72,6 +79,7 @@ public function __construct( ?string $type = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->transitionDate = $transitionDate; $this->quantity = $quantity; $this->fromState = $fromState; @@ -117,6 +125,26 @@ public function getCustomLineItemId() return $this->customLineItemId; } + /** + *User-defined unique identifier of the Custom Line Item.
+ * + * + * @return null|string + */ + public function getCustomLineItemKey() + { + if (is_null($this->customLineItemKey)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CUSTOM_LINE_ITEM_KEY); + if (is_null($data)) { + return null; + } + $this->customLineItemKey = (string) $data; + } + + return $this->customLineItemKey; + } + /** *Date and time (UTC) when the transition of the Custom Line Item State was performed.
* @@ -212,6 +240,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?DateTimeImmutable $transitionDate */ diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessage.php b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessage.php index dd5bb94edfe..2f1932a15b0 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessage.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessage.php @@ -16,6 +16,7 @@ interface OrderCustomLineItemDiscountSetMessage extends OrderMessage { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_DISCOUNTED_PRICE_PER_QUANTITY = 'discountedPricePerQuantity'; public const FIELD_TAXED_PRICE = 'taxedPrice'; @@ -27,6 +28,14 @@ interface OrderCustomLineItemDiscountSetMessage extends OrderMessage */ public function getCustomLineItemId(); + /** + *User-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getCustomLineItemKey(); + /** *Array of DiscountedLineItemPriceForQuantity after the Discount recalculation.
* @@ -48,6 +57,11 @@ public function getTaxedPrice(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?DiscountedLineItemPriceForQuantityCollection $discountedPricePerQuantity */ diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessageBuilder.php b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessageBuilder.php index 3d717b5b63f..235181fea89 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessageBuilder.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessageBuilder.php @@ -96,6 +96,12 @@ final class OrderCustomLineItemDiscountSetMessageBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var ?DiscountedLineItemPriceForQuantityCollection @@ -230,6 +236,17 @@ public function getCustomLineItemId() return $this->customLineItemId; } + /** + *User-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getCustomLineItemKey() + { + return $this->customLineItemKey; + } + /** *Array of DiscountedLineItemPriceForQuantity after the Discount recalculation.
* @@ -373,6 +390,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?DiscountedLineItemPriceForQuantityCollection $discountedPricePerQuantity * @return $this @@ -464,6 +492,7 @@ public function build(): OrderCustomLineItemDiscountSetMessage $this->resourceVersion, $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, $this->customLineItemId, + $this->customLineItemKey, $this->discountedPricePerQuantity, $this->taxedPrice instanceof TaxedItemPriceBuilder ? $this->taxedPrice->build() : $this->taxedPrice ); diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessageModel.php b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessageModel.php index 4db3435bdf0..e254dbc2d0f 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessageModel.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessageModel.php @@ -102,6 +102,12 @@ final class OrderCustomLineItemDiscountSetMessageModel extends JsonObjectModel i */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?DiscountedLineItemPriceForQuantityCollection @@ -130,6 +136,7 @@ public function __construct( ?int $resourceVersion = null, ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers = null, ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?DiscountedLineItemPriceForQuantityCollection $discountedPricePerQuantity = null, ?TaxedItemPrice $taxedPrice = null, ?string $type = null @@ -145,6 +152,7 @@ public function __construct( $this->resourceVersion = $resourceVersion; $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->discountedPricePerQuantity = $discountedPricePerQuantity; $this->taxedPrice = $taxedPrice; $this->type = $type ?? self::DISCRIMINATOR_VALUE; @@ -403,6 +411,26 @@ public function getCustomLineItemId() return $this->customLineItemId; } + /** + *User-defined unique identifier of the Custom Line Item.
+ * + * + * @return null|string + */ + public function getCustomLineItemKey() + { + if (is_null($this->customLineItemKey)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CUSTOM_LINE_ITEM_KEY); + if (is_null($data)) { + return null; + } + $this->customLineItemKey = (string) $data; + } + + return $this->customLineItemKey; + } + /** *Array of DiscountedLineItemPriceForQuantity after the Discount recalculation.
* @@ -533,6 +561,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?DiscountedLineItemPriceForQuantityCollection $discountedPricePerQuantity */ diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessagePayload.php b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessagePayload.php index 9c16e648e3b..2c1c3099aec 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessagePayload.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessagePayload.php @@ -16,6 +16,7 @@ interface OrderCustomLineItemDiscountSetMessagePayload extends OrderMessagePayload { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_DISCOUNTED_PRICE_PER_QUANTITY = 'discountedPricePerQuantity'; public const FIELD_TAXED_PRICE = 'taxedPrice'; @@ -27,6 +28,14 @@ interface OrderCustomLineItemDiscountSetMessagePayload extends OrderMessagePaylo */ public function getCustomLineItemId(); + /** + *User-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getCustomLineItemKey(); + /** *Array of DiscountedLineItemPriceForQuantity after the Discount recalculation.
* @@ -48,6 +57,11 @@ public function getTaxedPrice(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?DiscountedLineItemPriceForQuantityCollection $discountedPricePerQuantity */ diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessagePayloadBuilder.php index 0a11b35a783..24d8c253491 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessagePayloadBuilder.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessagePayloadBuilder.php @@ -29,6 +29,12 @@ final class OrderCustomLineItemDiscountSetMessagePayloadBuilder implements Build */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var ?DiscountedLineItemPriceForQuantityCollection @@ -52,6 +58,17 @@ public function getCustomLineItemId() return $this->customLineItemId; } + /** + *User-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getCustomLineItemKey() + { + return $this->customLineItemKey; + } + /** *Array of DiscountedLineItemPriceForQuantity after the Discount recalculation.
* @@ -85,6 +102,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?DiscountedLineItemPriceForQuantityCollection $discountedPricePerQuantity * @return $this @@ -122,6 +150,7 @@ public function build(): OrderCustomLineItemDiscountSetMessagePayload { return new OrderCustomLineItemDiscountSetMessagePayloadModel( $this->customLineItemId, + $this->customLineItemKey, $this->discountedPricePerQuantity, $this->taxedPrice instanceof TaxedItemPriceBuilder ? $this->taxedPrice->build() : $this->taxedPrice ); diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessagePayloadModel.php index 08b246e4d62..22e067220e2 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessagePayloadModel.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemDiscountSetMessagePayloadModel.php @@ -35,6 +35,12 @@ final class OrderCustomLineItemDiscountSetMessagePayloadModel extends JsonObject */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?DiscountedLineItemPriceForQuantityCollection @@ -53,11 +59,13 @@ final class OrderCustomLineItemDiscountSetMessagePayloadModel extends JsonObject */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?DiscountedLineItemPriceForQuantityCollection $discountedPricePerQuantity = null, ?TaxedItemPrice $taxedPrice = null, ?string $type = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->discountedPricePerQuantity = $discountedPricePerQuantity; $this->taxedPrice = $taxedPrice; $this->type = $type ?? self::DISCRIMINATOR_VALUE; @@ -101,6 +109,26 @@ public function getCustomLineItemId() return $this->customLineItemId; } + /** + *User-defined unique identifier of the Custom Line Item.
+ * + * + * @return null|string + */ + public function getCustomLineItemKey() + { + if (is_null($this->customLineItemKey)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CUSTOM_LINE_ITEM_KEY); + if (is_null($data)) { + return null; + } + $this->customLineItemKey = (string) $data; + } + + return $this->customLineItemKey; + } + /** *Array of DiscountedLineItemPriceForQuantity after the Discount recalculation.
* @@ -151,6 +179,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?DiscountedLineItemPriceForQuantityCollection $discountedPricePerQuantity */ diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessage.php b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessage.php index e602f6d8e8f..29eec8790d1 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessage.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessage.php @@ -14,6 +14,7 @@ interface OrderCustomLineItemQuantityChangedMessage extends OrderMessage { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_QUANTITY = 'quantity'; public const FIELD_OLD_QUANTITY = 'oldQuantity'; @@ -25,6 +26,14 @@ interface OrderCustomLineItemQuantityChangedMessage extends OrderMessage */ public function getCustomLineItemId(); + /** + *User-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getCustomLineItemKey(); + /** *Custom Line Item quantity after the Change Custom Line Item Quantity update action.
* @@ -46,6 +55,11 @@ public function getOldQuantity(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?int $quantity */ diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessageBuilder.php b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessageBuilder.php index 0a5ae868be7..1fdc9249483 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessageBuilder.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessageBuilder.php @@ -93,6 +93,12 @@ final class OrderCustomLineItemQuantityChangedMessageBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var ?int @@ -227,6 +233,17 @@ public function getCustomLineItemId() return $this->customLineItemId; } + /** + *User-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getCustomLineItemKey() + { + return $this->customLineItemKey; + } + /** *Custom Line Item quantity after the Change Custom Line Item Quantity update action.
* @@ -370,6 +387,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?int $quantity * @return $this @@ -450,6 +478,7 @@ public function build(): OrderCustomLineItemQuantityChangedMessage $this->resourceVersion, $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, $this->customLineItemId, + $this->customLineItemKey, $this->quantity, $this->oldQuantity ); diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessageModel.php b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessageModel.php index 3c6a234f1a9..ad8446e1667 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessageModel.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessageModel.php @@ -99,6 +99,12 @@ final class OrderCustomLineItemQuantityChangedMessageModel extends JsonObjectMod */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?int @@ -127,6 +133,7 @@ public function __construct( ?int $resourceVersion = null, ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers = null, ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?int $quantity = null, ?int $oldQuantity = null, ?string $type = null @@ -142,6 +149,7 @@ public function __construct( $this->resourceVersion = $resourceVersion; $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->quantity = $quantity; $this->oldQuantity = $oldQuantity; $this->type = $type ?? self::DISCRIMINATOR_VALUE; @@ -400,6 +408,26 @@ public function getCustomLineItemId() return $this->customLineItemId; } + /** + *User-defined unique identifier of the Custom Line Item.
+ * + * + * @return null|string + */ + public function getCustomLineItemKey() + { + if (is_null($this->customLineItemKey)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CUSTOM_LINE_ITEM_KEY); + if (is_null($data)) { + return null; + } + $this->customLineItemKey = (string) $data; + } + + return $this->customLineItemKey; + } + /** *Custom Line Item quantity after the Change Custom Line Item Quantity update action.
* @@ -529,6 +557,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?int $quantity */ diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessagePayload.php b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessagePayload.php index 622da203c26..f7e0d0f04a8 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessagePayload.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessagePayload.php @@ -14,6 +14,7 @@ interface OrderCustomLineItemQuantityChangedMessagePayload extends OrderMessagePayload { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_QUANTITY = 'quantity'; public const FIELD_OLD_QUANTITY = 'oldQuantity'; @@ -25,6 +26,14 @@ interface OrderCustomLineItemQuantityChangedMessagePayload extends OrderMessageP */ public function getCustomLineItemId(); + /** + *User-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getCustomLineItemKey(); + /** *Custom Line Item quantity after the Change Custom Line Item Quantity update action.
* @@ -46,6 +55,11 @@ public function getOldQuantity(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?int $quantity */ diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessagePayloadBuilder.php index 7ad9601cc6b..5eae9c68112 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessagePayloadBuilder.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessagePayloadBuilder.php @@ -26,6 +26,12 @@ final class OrderCustomLineItemQuantityChangedMessagePayloadBuilder implements B */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var ?int @@ -49,6 +55,17 @@ public function getCustomLineItemId() return $this->customLineItemId; } + /** + *User-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getCustomLineItemKey() + { + return $this->customLineItemKey; + } + /** *Custom Line Item quantity after the Change Custom Line Item Quantity update action.
* @@ -82,6 +99,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?int $quantity * @return $this @@ -109,6 +137,7 @@ public function build(): OrderCustomLineItemQuantityChangedMessagePayload { return new OrderCustomLineItemQuantityChangedMessagePayloadModel( $this->customLineItemId, + $this->customLineItemKey, $this->quantity, $this->oldQuantity ); diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessagePayloadModel.php index d0bed523500..bf47bc8578d 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessagePayloadModel.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemQuantityChangedMessagePayloadModel.php @@ -32,6 +32,12 @@ final class OrderCustomLineItemQuantityChangedMessagePayloadModel extends JsonOb */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?int @@ -50,11 +56,13 @@ final class OrderCustomLineItemQuantityChangedMessagePayloadModel extends JsonOb */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?int $quantity = null, ?int $oldQuantity = null, ?string $type = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->quantity = $quantity; $this->oldQuantity = $oldQuantity; $this->type = $type ?? self::DISCRIMINATOR_VALUE; @@ -98,6 +106,26 @@ public function getCustomLineItemId() return $this->customLineItemId; } + /** + *User-defined unique identifier of the Custom Line Item.
+ * + * + * @return null|string + */ + public function getCustomLineItemKey() + { + if (is_null($this->customLineItemKey)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CUSTOM_LINE_ITEM_KEY); + if (is_null($data)) { + return null; + } + $this->customLineItemKey = (string) $data; + } + + return $this->customLineItemKey; + } + /** *Custom Line Item quantity after the Change Custom Line Item Quantity update action.
* @@ -147,6 +175,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?int $quantity */ diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessage.php b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessage.php index b92665b597c..79b42b13e89 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessage.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessage.php @@ -15,6 +15,7 @@ interface OrderCustomLineItemRemovedMessage extends OrderMessage { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_CUSTOM_LINE_ITEM = 'customLineItem'; /** @@ -25,6 +26,14 @@ interface OrderCustomLineItemRemovedMessage extends OrderMessage */ public function getCustomLineItemId(); + /** + *User-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getCustomLineItemKey(); + /** *Custom Line Item that was removed from the Order.
* @@ -38,6 +47,11 @@ public function getCustomLineItem(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?CustomLineItem $customLineItem */ diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessageBuilder.php b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessageBuilder.php index 8583c350a39..c4efed05753 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessageBuilder.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessageBuilder.php @@ -95,6 +95,12 @@ final class OrderCustomLineItemRemovedMessageBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var null|CustomLineItem|CustomLineItemBuilder @@ -223,6 +229,17 @@ public function getCustomLineItemId() return $this->customLineItemId; } + /** + *User-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getCustomLineItemKey() + { + return $this->customLineItemKey; + } + /** *Custom Line Item that was removed from the Order.
* @@ -355,6 +372,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?CustomLineItem $customLineItem * @return $this @@ -435,6 +463,7 @@ public function build(): OrderCustomLineItemRemovedMessage $this->resourceVersion, $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, $this->customLineItemId, + $this->customLineItemKey, $this->customLineItem instanceof CustomLineItemBuilder ? $this->customLineItem->build() : $this->customLineItem ); } diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessageModel.php b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessageModel.php index 8d13fa10f72..15c9f58a1b3 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessageModel.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessageModel.php @@ -101,6 +101,12 @@ final class OrderCustomLineItemRemovedMessageModel extends JsonObjectModel imple */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?CustomLineItem @@ -123,6 +129,7 @@ public function __construct( ?int $resourceVersion = null, ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers = null, ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?CustomLineItem $customLineItem = null, ?string $type = null ) { @@ -137,6 +144,7 @@ public function __construct( $this->resourceVersion = $resourceVersion; $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->customLineItem = $customLineItem; $this->type = $type ?? self::DISCRIMINATOR_VALUE; } @@ -394,6 +402,26 @@ public function getCustomLineItemId() return $this->customLineItemId; } + /** + *User-defined unique identifier of the Custom Line Item.
+ * + * + * @return null|string + */ + public function getCustomLineItemKey() + { + if (is_null($this->customLineItemKey)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CUSTOM_LINE_ITEM_KEY); + if (is_null($data)) { + return null; + } + $this->customLineItemKey = (string) $data; + } + + return $this->customLineItemKey; + } + /** *Custom Line Item that was removed from the Order.
* @@ -504,6 +532,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?CustomLineItem $customLineItem */ diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessagePayload.php b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessagePayload.php index 524fee1aff5..783fae8c252 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessagePayload.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessagePayload.php @@ -15,6 +15,7 @@ interface OrderCustomLineItemRemovedMessagePayload extends OrderMessagePayload { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_CUSTOM_LINE_ITEM = 'customLineItem'; /** @@ -25,6 +26,14 @@ interface OrderCustomLineItemRemovedMessagePayload extends OrderMessagePayload */ public function getCustomLineItemId(); + /** + *User-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getCustomLineItemKey(); + /** *Custom Line Item that was removed from the Order.
* @@ -38,6 +47,11 @@ public function getCustomLineItem(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?CustomLineItem $customLineItem */ diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessagePayloadBuilder.php index b2c2c32ae1f..e3c87d79d03 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessagePayloadBuilder.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessagePayloadBuilder.php @@ -28,6 +28,12 @@ final class OrderCustomLineItemRemovedMessagePayloadBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var null|CustomLineItem|CustomLineItemBuilder @@ -45,6 +51,17 @@ public function getCustomLineItemId() return $this->customLineItemId; } + /** + *User-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getCustomLineItemKey() + { + return $this->customLineItemKey; + } + /** *Custom Line Item that was removed from the Order.
* @@ -67,6 +84,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?CustomLineItem $customLineItem * @return $this @@ -93,6 +121,7 @@ public function build(): OrderCustomLineItemRemovedMessagePayload { return new OrderCustomLineItemRemovedMessagePayloadModel( $this->customLineItemId, + $this->customLineItemKey, $this->customLineItem instanceof CustomLineItemBuilder ? $this->customLineItem->build() : $this->customLineItem ); } diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessagePayloadModel.php index 1d07158d47e..afe39e05549 100644 --- a/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessagePayloadModel.php +++ b/lib/commercetools-api/src/Models/Message/OrderCustomLineItemRemovedMessagePayloadModel.php @@ -34,6 +34,12 @@ final class OrderCustomLineItemRemovedMessagePayloadModel extends JsonObjectMode */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?CustomLineItem @@ -46,10 +52,12 @@ final class OrderCustomLineItemRemovedMessagePayloadModel extends JsonObjectMode */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?CustomLineItem $customLineItem = null, ?string $type = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->customLineItem = $customLineItem; $this->type = $type ?? self::DISCRIMINATOR_VALUE; } @@ -92,6 +100,26 @@ public function getCustomLineItemId() return $this->customLineItemId; } + /** + *User-defined unique identifier of the Custom Line Item.
+ * + * + * @return null|string + */ + public function getCustomLineItemKey() + { + if (is_null($this->customLineItemKey)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CUSTOM_LINE_ITEM_KEY); + if (is_null($data)) { + return null; + } + $this->customLineItemKey = (string) $data; + } + + return $this->customLineItemKey; + } + /** *Custom Line Item that was removed from the Order.
* @@ -122,6 +150,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?CustomLineItem $customLineItem */ diff --git a/lib/commercetools-api/src/Models/Order/CustomLineItemImportDraft.php b/lib/commercetools-api/src/Models/Order/CustomLineItemImportDraft.php index 54d7b3ced58..8fdb3287b24 100644 --- a/lib/commercetools-api/src/Models/Order/CustomLineItemImportDraft.php +++ b/lib/commercetools-api/src/Models/Order/CustomLineItemImportDraft.php @@ -20,6 +20,7 @@ interface CustomLineItemImportDraft extends JsonObject { public const FIELD_NAME = 'name'; + public const FIELD_KEY = 'key'; public const FIELD_SLUG = 'slug'; public const FIELD_QUANTITY = 'quantity'; public const FIELD_MONEY = 'money'; @@ -38,6 +39,14 @@ interface CustomLineItemImportDraft extends JsonObject */ public function getName(); + /** + *User-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getKey(); + /** *User-defined identifier used in a deep-link URL for the Custom Line Item. This value should match the pattern [a-zA-Z0-9_-]{2,256}
.
User-defined unique identifier of the Custom Line Item.
+ * + + * @return null|string + */ + public function getKey() + { + return $this->key; + } + /** *User-defined identifier used in a deep-link URL for the Custom Line Item. This value should match the pattern [a-zA-Z0-9_-]{2,256}
.
User-defined unique identifier of the Custom Line Item.
+ * + * + * @return null|string + */ + public function getKey() + { + if (is_null($this->key)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_KEY); + if (is_null($data)) { + return null; + } + $this->key = (string) $data; + } + + return $this->key; + } + /** *User-defined identifier used in a deep-link URL for the Custom Line Item. This value should match the pattern [a-zA-Z0-9_-]{2,256}
.
User-defined unique identifier of the Line Item.
+ * + + * @return null|string + */ + public function getKey(); + /** *The Product Variant to use as a Line Item.
* @@ -138,6 +147,11 @@ public function getCustom(); */ public function setName(?LocalizedString $name): void; + /** + * @param ?string $key + */ + public function setKey(?string $key): void; + /** * @param ?ProductVariantImportDraft $variant */ diff --git a/lib/commercetools-api/src/Models/Order/LineItemImportDraftBuilder.php b/lib/commercetools-api/src/Models/Order/LineItemImportDraftBuilder.php index d7cb7818b78..045298acadb 100644 --- a/lib/commercetools-api/src/Models/Order/LineItemImportDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Order/LineItemImportDraftBuilder.php @@ -38,6 +38,12 @@ final class LineItemImportDraftBuilder implements Builder */ private $name; + /** + + * @var ?string + */ + private $key; + /** * @var null|ProductVariantImportDraft|ProductVariantImportDraftBuilder @@ -115,6 +121,17 @@ public function getName() return $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name; } + /** + *User-defined unique identifier of the Line Item.
+ * + + * @return null|string + */ + public function getKey() + { + return $this->key; + } + /** *The Product Variant to use as a Line Item.
* @@ -252,6 +269,17 @@ public function withName(?LocalizedString $name) return $this; } + /** + * @param ?string $key + * @return $this + */ + public function withKey(?string $key) + { + $this->key = $key; + + return $this; + } + /** * @param ?ProductVariantImportDraft $variant * @return $this @@ -465,6 +493,7 @@ public function build(): LineItemImportDraft { return new LineItemImportDraftModel( $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name, + $this->key, $this->variant instanceof ProductVariantImportDraftBuilder ? $this->variant->build() : $this->variant, $this->productId, $this->quantity, diff --git a/lib/commercetools-api/src/Models/Order/LineItemImportDraftModel.php b/lib/commercetools-api/src/Models/Order/LineItemImportDraftModel.php index 170f7c4599b..3e3a22ae4de 100644 --- a/lib/commercetools-api/src/Models/Order/LineItemImportDraftModel.php +++ b/lib/commercetools-api/src/Models/Order/LineItemImportDraftModel.php @@ -37,6 +37,12 @@ final class LineItemImportDraftModel extends JsonObjectModel implements LineItem */ protected $name; + /** + * + * @var ?string + */ + protected $key; + /** * * @var ?ProductVariantImportDraft @@ -109,6 +115,7 @@ final class LineItemImportDraftModel extends JsonObjectModel implements LineItem */ public function __construct( ?LocalizedString $name = null, + ?string $key = null, ?ProductVariantImportDraft $variant = null, ?string $productId = null, ?int $quantity = null, @@ -122,6 +129,7 @@ public function __construct( ?CustomFieldsDraft $custom = null ) { $this->name = $name; + $this->key = $key; $this->variant = $variant; $this->productId = $productId; $this->quantity = $quantity; @@ -156,6 +164,26 @@ public function getName() return $this->name; } + /** + *User-defined unique identifier of the Line Item.
+ * + * + * @return null|string + */ + public function getKey() + { + if (is_null($this->key)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_KEY); + if (is_null($data)) { + return null; + } + $this->key = (string) $data; + } + + return $this->key; + } + /** *The Product Variant to use as a Line Item.
* @@ -397,6 +425,14 @@ public function setName(?LocalizedString $name): void $this->name = $name; } + /** + * @param ?string $key + */ + public function setKey(?string $key): void + { + $this->key = $key; + } + /** * @param ?ProductVariantImportDraft $variant */ diff --git a/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateAction.php b/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateAction.php index e0173eec29a..ffa8fc0c7ac 100644 --- a/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateAction.php @@ -14,16 +14,25 @@ interface OrderImportCustomLineItemStateAction extends OrderUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_STATE = 'state'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
New status of the Custom Line Items.
* @@ -37,6 +46,11 @@ public function getState(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?ItemStateCollection $state */ diff --git a/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateActionBuilder.php index f5808b17fa4..f590399000b 100644 --- a/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateActionBuilder.php @@ -26,6 +26,12 @@ final class OrderImportCustomLineItemStateActionBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var ?ItemStateCollection @@ -33,7 +39,7 @@ final class OrderImportCustomLineItemStateActionBuilder implements Builder private $state; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
New status of the Custom Line Items.
* @@ -65,6 +82,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?ItemStateCollection $state * @return $this @@ -81,6 +109,7 @@ public function build(): OrderImportCustomLineItemStateAction { return new OrderImportCustomLineItemStateActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->state ); } diff --git a/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateActionModel.php b/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateActionModel.php index 76fa9b7c174..de8080615d4 100644 --- a/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderImportCustomLineItemStateActionModel.php @@ -32,6 +32,12 @@ final class OrderImportCustomLineItemStateActionModel extends JsonObjectModel im */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?ItemStateCollection @@ -44,10 +50,12 @@ final class OrderImportCustomLineItemStateActionModel extends JsonObjectModel im */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?ItemStateCollection $state = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->state = $state; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -71,7 +79,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
New status of the Custom Line Items.
* @@ -119,6 +147,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?ItemStateCollection $state */ diff --git a/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateAction.php b/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateAction.php index 0599639e81d..2c6f341bf62 100644 --- a/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateAction.php @@ -16,19 +16,28 @@ interface OrderTransitionCustomLineItemStateAction extends OrderUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_QUANTITY = 'quantity'; public const FIELD_FROM_STATE = 'fromState'; public const FIELD_TO_STATE = 'toState'; public const FIELD_ACTUAL_TRANSITION_DATE = 'actualTransitionDate'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Number of Custom Line Items that should transition State.
* @@ -66,6 +75,11 @@ public function getActualTransitionDate(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?int $quantity */ diff --git a/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateActionBuilder.php index cd60789d03d..09e835df8d7 100644 --- a/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateActionBuilder.php @@ -29,6 +29,12 @@ final class OrderTransitionCustomLineItemStateActionBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var ?int @@ -54,7 +60,7 @@ final class OrderTransitionCustomLineItemStateActionBuilder implements Builder private $actualTransitionDate; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Number of Custom Line Items that should transition State.
* @@ -119,6 +136,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?int $quantity * @return $this @@ -189,6 +217,7 @@ public function build(): OrderTransitionCustomLineItemStateAction { return new OrderTransitionCustomLineItemStateActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->quantity, $this->fromState instanceof StateResourceIdentifierBuilder ? $this->fromState->build() : $this->fromState, $this->toState instanceof StateResourceIdentifierBuilder ? $this->toState->build() : $this->toState, diff --git a/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateActionModel.php b/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateActionModel.php index 0003d2fc9a9..b54913087d0 100644 --- a/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderTransitionCustomLineItemStateActionModel.php @@ -35,6 +35,12 @@ final class OrderTransitionCustomLineItemStateActionModel extends JsonObjectMode */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?int @@ -65,6 +71,7 @@ final class OrderTransitionCustomLineItemStateActionModel extends JsonObjectMode */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?int $quantity = null, ?StateResourceIdentifier $fromState = null, ?StateResourceIdentifier $toState = null, @@ -72,6 +79,7 @@ public function __construct( ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->quantity = $quantity; $this->fromState = $fromState; $this->toState = $toState; @@ -98,7 +106,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Number of Custom Line Items that should transition State.
* @@ -212,6 +240,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?int $quantity */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateAction.php index e40934c90ae..0520ebfaf2d 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateAction.php @@ -16,16 +16,25 @@ interface StagedOrderImportCustomLineItemStateAction extends StagedOrderUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_STATE = 'state'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
New status of the Custom Line Items.
* @@ -39,6 +48,11 @@ public function getState(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?ItemStateCollection $state */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateActionBuilder.php index 4b187ce393e..f012262bbce 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateActionBuilder.php @@ -29,6 +29,12 @@ final class StagedOrderImportCustomLineItemStateActionBuilder implements Builder */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var ?ItemStateCollection @@ -36,7 +42,7 @@ final class StagedOrderImportCustomLineItemStateActionBuilder implements Builder private $state; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
New status of the Custom Line Items.
* @@ -68,6 +85,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?ItemStateCollection $state * @return $this @@ -84,6 +112,7 @@ public function build(): StagedOrderImportCustomLineItemStateAction { return new StagedOrderImportCustomLineItemStateActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->state ); } diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateActionModel.php index 92794b02dec..dc7344e98a7 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderImportCustomLineItemStateActionModel.php @@ -35,6 +35,12 @@ final class StagedOrderImportCustomLineItemStateActionModel extends JsonObjectMo */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?ItemStateCollection @@ -47,10 +53,12 @@ final class StagedOrderImportCustomLineItemStateActionModel extends JsonObjectMo */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?ItemStateCollection $state = null, ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->state = $state; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -74,7 +82,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
New status of the Custom Line Items.
* @@ -122,6 +150,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?ItemStateCollection $state */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateAction.php index a0c2497749e..57608fecad9 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateAction.php @@ -17,19 +17,28 @@ interface StagedOrderTransitionCustomLineItemStateAction extends StagedOrderUpdateAction { public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; + public const FIELD_CUSTOM_LINE_ITEM_KEY = 'customLineItemKey'; public const FIELD_QUANTITY = 'quantity'; public const FIELD_FROM_STATE = 'fromState'; public const FIELD_TO_STATE = 'toState'; public const FIELD_ACTUAL_TRANSITION_DATE = 'actualTransitionDate'; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Number of Custom Line Items that should transition State.
* @@ -67,6 +76,11 @@ public function getActualTransitionDate(); */ public function setCustomLineItemId(?string $customLineItemId): void; + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void; + /** * @param ?int $quantity */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateActionBuilder.php index f00d3ab8897..63884626338 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateActionBuilder.php @@ -31,6 +31,12 @@ final class StagedOrderTransitionCustomLineItemStateActionBuilder implements Bui */ private $customLineItemId; + /** + + * @var ?string + */ + private $customLineItemKey; + /** * @var ?int @@ -56,7 +62,7 @@ final class StagedOrderTransitionCustomLineItemStateActionBuilder implements Bui private $actualTransitionDate; /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Number of Custom Line Items that should transition State.
* @@ -121,6 +138,17 @@ public function withCustomLineItemId(?string $customLineItemId) return $this; } + /** + * @param ?string $customLineItemKey + * @return $this + */ + public function withCustomLineItemKey(?string $customLineItemKey) + { + $this->customLineItemKey = $customLineItemKey; + + return $this; + } + /** * @param ?int $quantity * @return $this @@ -191,6 +219,7 @@ public function build(): StagedOrderTransitionCustomLineItemStateAction { return new StagedOrderTransitionCustomLineItemStateActionModel( $this->customLineItemId, + $this->customLineItemKey, $this->quantity, $this->fromState instanceof StateResourceIdentifierBuilder ? $this->fromState->build() : $this->fromState, $this->toState instanceof StateResourceIdentifierBuilder ? $this->toState->build() : $this->toState, diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateActionModel.php index 0f93e81e78a..d50568489cd 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderTransitionCustomLineItemStateActionModel.php @@ -37,6 +37,12 @@ final class StagedOrderTransitionCustomLineItemStateActionModel extends JsonObje */ protected $customLineItemId; + /** + * + * @var ?string + */ + protected $customLineItemKey; + /** * * @var ?int @@ -67,6 +73,7 @@ final class StagedOrderTransitionCustomLineItemStateActionModel extends JsonObje */ public function __construct( ?string $customLineItemId = null, + ?string $customLineItemKey = null, ?int $quantity = null, ?StateResourceIdentifier $fromState = null, ?StateResourceIdentifier $toState = null, @@ -74,6 +81,7 @@ public function __construct( ?string $action = null ) { $this->customLineItemId = $customLineItemId; + $this->customLineItemKey = $customLineItemKey; $this->quantity = $quantity; $this->fromState = $fromState; $this->toState = $toState; @@ -100,7 +108,7 @@ public function getAction() } /** - *id
of the CustomLineItem to update.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
Number of Custom Line Items that should transition State.
* @@ -214,6 +242,14 @@ public function setCustomLineItemId(?string $customLineItemId): void $this->customLineItemId = $customLineItemId; } + /** + * @param ?string $customLineItemKey + */ + public function setCustomLineItemKey(?string $customLineItemKey): void + { + $this->customLineItemKey = $customLineItemKey; + } + /** * @param ?int $quantity */ diff --git a/references.txt b/references.txt index ff35bd518e2..694e994fdc2 100644 --- a/references.txt +++ b/references.txt @@ -81,3 +81,4 @@ b07e7ba714fd02e261dac1818a92f4b434ffb62b c9260db322647c370b40e1883a503f6a0aec131d 03d2ea8ce027fa53701a10fbfb27e4e9626ae223 7ca1a57b89f7abd9deecf8bf3e236b9a8109ecb4 +fc8383e5c0bead4d9aba4d3724ba28c1010ac325 From c8dcfb20273db275dd4d2ca1bad095821e0ed3bb Mon Sep 17 00:00:00 2001 From: Auto MationUser-defined unique identifier for the Embedded Price.
- *This field is required from 31 July 2023.
* * @return null|string diff --git a/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImportBuilder.php b/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImportBuilder.php index e90508af135..e076c32529f 100644 --- a/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImportBuilder.php +++ b/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImportBuilder.php @@ -187,7 +187,6 @@ public function getTiers() /** *User-defined unique identifier for the Embedded Price.
- *This field is required from 31 July 2023.
* * @return null|string diff --git a/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImportModel.php b/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImportModel.php index b3f247f8605..03de346ff07 100644 --- a/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImportModel.php +++ b/lib/commercetools-import/src/Models/Productdrafts/PriceDraftImportModel.php @@ -308,7 +308,6 @@ public function getTiers() /** *User-defined unique identifier for the Embedded Price.
- *This field is required from 31 July 2023.
* * * @return null|string diff --git a/references.txt b/references.txt index 47b3fd7ef34..496aaf64664 100644 --- a/references.txt +++ b/references.txt @@ -89,3 +89,4 @@ f15664352ad27ec193e2ca1140e7dbeae4fa3167 42b64a42df6aa9c806903287bed0674c134113b1 754ae90cfe73d7429934ccce580e799a949ed98d 43ec24cb27d83029991ae44c2c5af31fa2e6bebc +b47352c3ed66fd9ad8e6b14402217fec39941d06 From ba6c264c8e0b048bb75c30de39383ed28fab426b Mon Sep 17 00:00:00 2001 From: Auto MationCent precision money values in different currencies.
+ *Money values in cent precision or high precision of different currencies.
* - * @return null|CentPrecisionMoneyCollection + * @return null|TypedMoneyCollection */ public function getMoney(); /** - * @param ?CentPrecisionMoneyCollection $money + * @param ?TypedMoneyCollection $money */ - public function setMoney(?CentPrecisionMoneyCollection $money): void; + public function setMoney(?TypedMoneyCollection $money): void; } diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedBuilder.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedBuilder.php index 5c8f1706a7e..22905edbc1c 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedBuilder.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedBuilder.php @@ -8,7 +8,7 @@ namespace Commercetools\Api\Models\CartDiscount; -use Commercetools\Api\Models\Common\CentPrecisionMoneyCollection; +use Commercetools\Api\Models\Common\TypedMoneyCollection; use Commercetools\Base\Builder; use Commercetools\Base\DateTimeImmutableCollection; use Commercetools\Base\JsonObject; @@ -23,15 +23,15 @@ final class CartDiscountValueFixedBuilder implements Builder { /** - * @var ?CentPrecisionMoneyCollection + * @var ?TypedMoneyCollection */ private $money; /** - *Cent precision money values in different currencies.
+ *Money values in cent precision or high precision of different currencies.
* - * @return null|CentPrecisionMoneyCollection + * @return null|TypedMoneyCollection */ public function getMoney() { @@ -39,10 +39,10 @@ public function getMoney() } /** - * @param ?CentPrecisionMoneyCollection $money + * @param ?TypedMoneyCollection $money * @return $this */ - public function withMoney(?CentPrecisionMoneyCollection $money) + public function withMoney(?TypedMoneyCollection $money) { $this->money = $money; diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedDraft.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedDraft.php index aad2280141d..db3be4fa2f5 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedDraft.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedDraft.php @@ -8,7 +8,7 @@ namespace Commercetools\Api\Models\CartDiscount; -use Commercetools\Api\Models\Common\MoneyCollection; +use Commercetools\Api\Models\Common\TypedMoneyDraftCollection; use Commercetools\Base\DateTimeImmutableCollection; use Commercetools\Base\JsonObject; @@ -17,16 +17,16 @@ interface CartDiscountValueFixedDraft extends CartDiscountValueDraft public const FIELD_MONEY = 'money'; /** - *Money values in different currencies. + *
Money values provided either in cent precision or high precision for different currencies. * A fixed Cart Discount will only match a price if this array contains a value with the same currency. If it contains 10€ and 15$, the matching € price will be discounted by 10€ and the matching $ price will be discounted to 15$.
* - * @return null|MoneyCollection + * @return null|TypedMoneyDraftCollection */ public function getMoney(); /** - * @param ?MoneyCollection $money + * @param ?TypedMoneyDraftCollection $money */ - public function setMoney(?MoneyCollection $money): void; + public function setMoney(?TypedMoneyDraftCollection $money): void; } diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedDraftBuilder.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedDraftBuilder.php index be04a0f60d6..75fe07203f8 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedDraftBuilder.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedDraftBuilder.php @@ -8,7 +8,7 @@ namespace Commercetools\Api\Models\CartDiscount; -use Commercetools\Api\Models\Common\MoneyCollection; +use Commercetools\Api\Models\Common\TypedMoneyDraftCollection; use Commercetools\Base\Builder; use Commercetools\Base\DateTimeImmutableCollection; use Commercetools\Base\JsonObject; @@ -23,16 +23,16 @@ final class CartDiscountValueFixedDraftBuilder implements Builder { /** - * @var ?MoneyCollection + * @var ?TypedMoneyDraftCollection */ private $money; /** - *Money values in different currencies. + *
Money values provided either in cent precision or high precision for different currencies. * A fixed Cart Discount will only match a price if this array contains a value with the same currency. If it contains 10€ and 15$, the matching € price will be discounted by 10€ and the matching $ price will be discounted to 15$.
* - * @return null|MoneyCollection + * @return null|TypedMoneyDraftCollection */ public function getMoney() { @@ -40,10 +40,10 @@ public function getMoney() } /** - * @param ?MoneyCollection $money + * @param ?TypedMoneyDraftCollection $money * @return $this */ - public function withMoney(?MoneyCollection $money) + public function withMoney(?TypedMoneyDraftCollection $money) { $this->money = $money; diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedDraftModel.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedDraftModel.php index cd893f9826f..fa5f11f2af1 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedDraftModel.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedDraftModel.php @@ -8,7 +8,7 @@ namespace Commercetools\Api\Models\CartDiscount; -use Commercetools\Api\Models\Common\MoneyCollection; +use Commercetools\Api\Models\Common\TypedMoneyDraftCollection; use Commercetools\Base\DateTimeImmutableCollection; use Commercetools\Base\JsonObject; use Commercetools\Base\JsonObjectModel; @@ -29,7 +29,7 @@ final class CartDiscountValueFixedDraftModel extends JsonObjectModel implements /** * - * @var ?MoneyCollection + * @var ?TypedMoneyDraftCollection */ protected $money; @@ -38,7 +38,7 @@ final class CartDiscountValueFixedDraftModel extends JsonObjectModel implements * @psalm-suppress MissingParamType */ public function __construct( - ?MoneyCollection $money = null, + ?TypedMoneyDraftCollection $money = null, ?string $type = null ) { $this->money = $money; @@ -64,11 +64,11 @@ public function getType() } /** - *Money values in different currencies. + *
Money values provided either in cent precision or high precision for different currencies. * A fixed Cart Discount will only match a price if this array contains a value with the same currency. If it contains 10€ and 15$, the matching € price will be discounted by 10€ and the matching $ price will be discounted to 15$.
* * - * @return null|MoneyCollection + * @return null|TypedMoneyDraftCollection */ public function getMoney() { @@ -78,7 +78,7 @@ public function getMoney() if (is_null($data)) { return null; } - $this->money = MoneyCollection::fromArray($data); + $this->money = TypedMoneyDraftCollection::fromArray($data); } return $this->money; @@ -86,9 +86,9 @@ public function getMoney() /** - * @param ?MoneyCollection $money + * @param ?TypedMoneyDraftCollection $money */ - public function setMoney(?MoneyCollection $money): void + public function setMoney(?TypedMoneyDraftCollection $money): void { $this->money = $money; } diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedModel.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedModel.php index 4fa4dbc17aa..d6661486540 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedModel.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueFixedModel.php @@ -8,7 +8,7 @@ namespace Commercetools\Api\Models\CartDiscount; -use Commercetools\Api\Models\Common\CentPrecisionMoneyCollection; +use Commercetools\Api\Models\Common\TypedMoneyCollection; use Commercetools\Base\DateTimeImmutableCollection; use Commercetools\Base\JsonObject; use Commercetools\Base\JsonObjectModel; @@ -29,7 +29,7 @@ final class CartDiscountValueFixedModel extends JsonObjectModel implements CartD /** * - * @var ?CentPrecisionMoneyCollection + * @var ?TypedMoneyCollection */ protected $money; @@ -38,7 +38,7 @@ final class CartDiscountValueFixedModel extends JsonObjectModel implements CartD * @psalm-suppress MissingParamType */ public function __construct( - ?CentPrecisionMoneyCollection $money = null, + ?TypedMoneyCollection $money = null, ?string $type = null ) { $this->money = $money; @@ -64,10 +64,10 @@ public function getType() } /** - *Cent precision money values in different currencies.
+ *Money values in cent precision or high precision of different currencies.
* * - * @return null|CentPrecisionMoneyCollection + * @return null|TypedMoneyCollection */ public function getMoney() { @@ -77,7 +77,7 @@ public function getMoney() if (is_null($data)) { return null; } - $this->money = CentPrecisionMoneyCollection::fromArray($data); + $this->money = TypedMoneyCollection::fromArray($data); } return $this->money; @@ -85,9 +85,9 @@ public function getMoney() /** - * @param ?CentPrecisionMoneyCollection $money + * @param ?TypedMoneyCollection $money */ - public function setMoney(?CentPrecisionMoneyCollection $money): void + public function setMoney(?TypedMoneyCollection $money): void { $this->money = $money; } diff --git a/lib/commercetools-api/src/Models/Common/CentPrecisionMoneyDraftBuilder.php b/lib/commercetools-api/src/Models/Common/CentPrecisionMoneyDraftBuilder.php index dedddb991e8..9dff448f7a1 100644 --- a/lib/commercetools-api/src/Models/Common/CentPrecisionMoneyDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Common/CentPrecisionMoneyDraftBuilder.php @@ -39,11 +39,7 @@ final class CentPrecisionMoneyDraftBuilder implements Builder private $fractionDigits; /** - *Amount in the smallest indivisible unit of a currency, such as:
- *500
).5
).Amount in the smallest indivisible unit of a currency.
* * @return null|int diff --git a/lib/commercetools-api/src/Models/Common/CentPrecisionMoneyDraftModel.php b/lib/commercetools-api/src/Models/Common/CentPrecisionMoneyDraftModel.php index 4de6f0eaf99..329fe3aa469 100644 --- a/lib/commercetools-api/src/Models/Common/CentPrecisionMoneyDraftModel.php +++ b/lib/commercetools-api/src/Models/Common/CentPrecisionMoneyDraftModel.php @@ -61,11 +61,7 @@ public function __construct( } /** - *Amount in the smallest indivisible unit of a currency, such as:
- *500
).5
).Amount in the smallest indivisible unit of a currency.
* * * @return null|int @@ -105,6 +101,8 @@ public function getCurrencyCode() } /** + *Determines the type of money used.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Common/CentPrecisionMoneyModel.php b/lib/commercetools-api/src/Models/Common/CentPrecisionMoneyModel.php index fb5cf371060..64eacd14784 100644 --- a/lib/commercetools-api/src/Models/Common/CentPrecisionMoneyModel.php +++ b/lib/commercetools-api/src/Models/Common/CentPrecisionMoneyModel.php @@ -105,7 +105,7 @@ public function getCurrencyCode() } /** - *MoneyType supports two different values, one for amounts in cent precision and another one for sub-cent amounts up to 20 fraction digits.
+ *Type of money used.
* * * @return null|string diff --git a/lib/commercetools-api/src/Models/Common/HighPrecisionMoneyDraftModel.php b/lib/commercetools-api/src/Models/Common/HighPrecisionMoneyDraftModel.php index 478987282aa..f1baf31d736 100644 --- a/lib/commercetools-api/src/Models/Common/HighPrecisionMoneyDraftModel.php +++ b/lib/commercetools-api/src/Models/Common/HighPrecisionMoneyDraftModel.php @@ -111,6 +111,8 @@ public function getCurrencyCode() } /** + *Determines the type of money used.
+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Common/HighPrecisionMoneyModel.php b/lib/commercetools-api/src/Models/Common/HighPrecisionMoneyModel.php index dae8697e48e..1fa0fa39fc3 100644 --- a/lib/commercetools-api/src/Models/Common/HighPrecisionMoneyModel.php +++ b/lib/commercetools-api/src/Models/Common/HighPrecisionMoneyModel.php @@ -113,7 +113,7 @@ public function getCurrencyCode() } /** - *MoneyType supports two different values, one for amounts in cent precision and another one for sub-cent amounts up to 20 fraction digits.
+ *Type of money used.
* * * @return null|string diff --git a/lib/commercetools-api/src/Models/Common/TypedMoney.php b/lib/commercetools-api/src/Models/Common/TypedMoney.php index 40e767bdbaf..6cba53896c0 100644 --- a/lib/commercetools-api/src/Models/Common/TypedMoney.php +++ b/lib/commercetools-api/src/Models/Common/TypedMoney.php @@ -18,7 +18,7 @@ interface TypedMoney extends Money public const FIELD_FRACTION_DIGITS = 'fractionDigits'; /** - *MoneyType supports two different values, one for amounts in cent precision and another one for sub-cent amounts up to 20 fraction digits.
+ *Type of money used.
* * @return null|string @@ -26,10 +26,10 @@ interface TypedMoney extends Money public function getType(); /** - *Number of digits after the decimal separator:
+ *Number of digits after the decimal separator.
*Number of digits after the decimal separator:
+ *Number of digits after the decimal separator.
*Determines the type of money used.
+ * * @return null|string */ public function getType(); /** - *Must be equal to the default number of fraction digits for the specified currency.
+ *Number of fraction digits for a specified money.
* * @return null|int */ public function getFractionDigits(); + /** + *Amount in the smallest indivisible unit of a currency.
+ * + + * @return null|int + */ + public function getCentAmount(); + /** * @param ?int $fractionDigits */ public function setFractionDigits(?int $fractionDigits): void; + + /** + * @param ?int $centAmount + */ + public function setCentAmount(?int $centAmount): void; } diff --git a/lib/commercetools-api/src/Models/Common/TypedMoneyDraftBuilder.php b/lib/commercetools-api/src/Models/Common/TypedMoneyDraftBuilder.php index 67770da0e14..74da319a7a2 100644 --- a/lib/commercetools-api/src/Models/Common/TypedMoneyDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Common/TypedMoneyDraftBuilder.php @@ -39,11 +39,7 @@ final class TypedMoneyDraftBuilder implements Builder private $fractionDigits; /** - *Amount in the smallest indivisible unit of a currency, such as:
- *500
).5
).Amount in the smallest indivisible unit of a currency.
* * @return null|int @@ -65,7 +61,7 @@ public function getCurrencyCode() } /** - *Must be equal to the default number of fraction digits for the specified currency.
+ *Number of fraction digits for a specified money.
* * @return null|int diff --git a/lib/commercetools-api/src/Models/Common/TypedMoneyDraftModel.php b/lib/commercetools-api/src/Models/Common/TypedMoneyDraftModel.php index 371190240d4..3c3d65bf242 100644 --- a/lib/commercetools-api/src/Models/Common/TypedMoneyDraftModel.php +++ b/lib/commercetools-api/src/Models/Common/TypedMoneyDraftModel.php @@ -69,11 +69,7 @@ public function __construct( } /** - *Amount in the smallest indivisible unit of a currency, such as:
- *500
).5
).Amount in the smallest indivisible unit of a currency.
* * * @return null|int @@ -113,6 +109,8 @@ public function getCurrencyCode() } /** + *Determines the type of money used.
+ * * * @return null|string */ @@ -131,7 +129,7 @@ public function getType() } /** - *Must be equal to the default number of fraction digits for the specified currency.
+ *Number of fraction digits for a specified money.
* * * @return null|int diff --git a/lib/commercetools-api/src/Models/Common/TypedMoneyModel.php b/lib/commercetools-api/src/Models/Common/TypedMoneyModel.php index eb44aebac3a..27ed99c41bf 100644 --- a/lib/commercetools-api/src/Models/Common/TypedMoneyModel.php +++ b/lib/commercetools-api/src/Models/Common/TypedMoneyModel.php @@ -113,7 +113,7 @@ public function getCurrencyCode() } /** - *MoneyType supports two different values, one for amounts in cent precision and another one for sub-cent amounts up to 20 fraction digits.
+ *Type of money used.
* * * @return null|string @@ -133,10 +133,10 @@ public function getType() } /** - *Number of digits after the decimal separator:
+ *Number of digits after the decimal separator.
*User-defined unique identifier of the CustomLineItemReturnItem.
+ * + + * @return null|string + */ + public function getKey(); + /** *id
of the returned CustomLineItem.
User-defined unique identifier of the CustomLineItemReturnItem.
+ * + + * @return null|string + */ + public function getKey() + { + return $this->key; + } + /** *Number of Custom Line Items returned.
* @@ -191,6 +208,17 @@ public function withId(?string $id) return $this; } + /** + * @param ?string $key + * @return $this + */ + public function withKey(?string $key) + { + $this->key = $key; + + return $this; + } + /** * @param ?int $quantity * @return $this @@ -294,6 +322,7 @@ public function build(): CustomLineItemReturnItem { return new CustomLineItemReturnItemModel( $this->id, + $this->key, $this->quantity, $this->comment, $this->shipmentState, diff --git a/lib/commercetools-api/src/Models/Order/CustomLineItemReturnItemModel.php b/lib/commercetools-api/src/Models/Order/CustomLineItemReturnItemModel.php index dc948c38485..cd53e829878 100644 --- a/lib/commercetools-api/src/Models/Order/CustomLineItemReturnItemModel.php +++ b/lib/commercetools-api/src/Models/Order/CustomLineItemReturnItemModel.php @@ -29,6 +29,12 @@ final class CustomLineItemReturnItemModel extends JsonObjectModel implements Cus */ protected $id; + /** + * + * @var ?string + */ + protected $key; + /** * * @var ?int @@ -89,6 +95,7 @@ final class CustomLineItemReturnItemModel extends JsonObjectModel implements Cus */ public function __construct( ?string $id = null, + ?string $key = null, ?int $quantity = null, ?string $comment = null, ?string $shipmentState = null, @@ -100,6 +107,7 @@ public function __construct( ?string $type = null ) { $this->id = $id; + $this->key = $key; $this->quantity = $quantity; $this->comment = $comment; $this->shipmentState = $shipmentState; @@ -131,6 +139,26 @@ public function getId() return $this->id; } + /** + *User-defined unique identifier of the CustomLineItemReturnItem.
+ * + * + * @return null|string + */ + public function getKey() + { + if (is_null($this->key)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_KEY); + if (is_null($data)) { + return null; + } + $this->key = (string) $data; + } + + return $this->key; + } + /** *Number of Custom Line Items returned.
* @@ -331,6 +359,14 @@ public function setId(?string $id): void $this->id = $id; } + /** + * @param ?string $key + */ + public function setKey(?string $key): void + { + $this->key = $key; + } + /** * @param ?int $quantity */ diff --git a/lib/commercetools-api/src/Models/Order/LineItemReturnItem.php b/lib/commercetools-api/src/Models/Order/LineItemReturnItem.php index 15885ab9042..92da0f38b1e 100644 --- a/lib/commercetools-api/src/Models/Order/LineItemReturnItem.php +++ b/lib/commercetools-api/src/Models/Order/LineItemReturnItem.php @@ -15,6 +15,14 @@ interface LineItemReturnItem extends ReturnItem { public const FIELD_LINE_ITEM_ID = 'lineItemId'; + /** + *User-defined unique identifier of the LineItemReturnItem.
+ * + + * @return null|string + */ + public function getKey(); + /** *id
of the returned LineItem.
User-defined unique identifier of the LineItemReturnItem.
+ * + + * @return null|string + */ + public function getKey() + { + return $this->key; + } + /** *Number of Line Items returned.
* @@ -191,6 +208,17 @@ public function withId(?string $id) return $this; } + /** + * @param ?string $key + * @return $this + */ + public function withKey(?string $key) + { + $this->key = $key; + + return $this; + } + /** * @param ?int $quantity * @return $this @@ -294,6 +322,7 @@ public function build(): LineItemReturnItem { return new LineItemReturnItemModel( $this->id, + $this->key, $this->quantity, $this->comment, $this->shipmentState, diff --git a/lib/commercetools-api/src/Models/Order/LineItemReturnItemModel.php b/lib/commercetools-api/src/Models/Order/LineItemReturnItemModel.php index babd26bf3b9..498ee6ec085 100644 --- a/lib/commercetools-api/src/Models/Order/LineItemReturnItemModel.php +++ b/lib/commercetools-api/src/Models/Order/LineItemReturnItemModel.php @@ -29,6 +29,12 @@ final class LineItemReturnItemModel extends JsonObjectModel implements LineItemR */ protected $id; + /** + * + * @var ?string + */ + protected $key; + /** * * @var ?int @@ -89,6 +95,7 @@ final class LineItemReturnItemModel extends JsonObjectModel implements LineItemR */ public function __construct( ?string $id = null, + ?string $key = null, ?int $quantity = null, ?string $comment = null, ?string $shipmentState = null, @@ -100,6 +107,7 @@ public function __construct( ?string $type = null ) { $this->id = $id; + $this->key = $key; $this->quantity = $quantity; $this->comment = $comment; $this->shipmentState = $shipmentState; @@ -131,6 +139,26 @@ public function getId() return $this->id; } + /** + *User-defined unique identifier of the LineItemReturnItem.
+ * + * + * @return null|string + */ + public function getKey() + { + if (is_null($this->key)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_KEY); + if (is_null($data)) { + return null; + } + $this->key = (string) $data; + } + + return $this->key; + } + /** *Number of Line Items returned.
* @@ -331,6 +359,14 @@ public function setId(?string $id): void $this->id = $id; } + /** + * @param ?string $key + */ + public function setKey(?string $key): void + { + $this->key = $key; + } + /** * @param ?int $quantity */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldAction.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldAction.php index 980ef4a5e2d..4243baa3ba3 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldAction.php @@ -14,17 +14,26 @@ interface OrderSetReturnItemCustomFieldAction extends OrderUpdateAction { public const FIELD_RETURN_ITEM_ID = 'returnItemId'; + public const FIELD_RETURN_ITEM_KEY = 'returnItemKey'; public const FIELD_NAME = 'name'; public const FIELD_VALUE = 'value'; /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
Name of the Custom Field.
* @@ -48,6 +57,11 @@ public function getValue(); */ public function setReturnItemId(?string $returnItemId): void; + /** + * @param ?string $returnItemKey + */ + public function setReturnItemKey(?string $returnItemKey): void; + /** * @param ?string $name */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldActionBuilder.php index 26773ac5de0..0ae50a104b7 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldActionBuilder.php @@ -26,6 +26,12 @@ final class OrderSetReturnItemCustomFieldActionBuilder implements Builder */ private $returnItemId; + /** + + * @var ?string + */ + private $returnItemKey; + /** * @var ?string @@ -39,7 +45,7 @@ final class OrderSetReturnItemCustomFieldActionBuilder implements Builder private $value; /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
Name of the Custom Field.
* @@ -84,6 +101,17 @@ public function withReturnItemId(?string $returnItemId) return $this; } + /** + * @param ?string $returnItemKey + * @return $this + */ + public function withReturnItemKey(?string $returnItemKey) + { + $this->returnItemKey = $returnItemKey; + + return $this; + } + /** * @param ?string $name * @return $this @@ -111,6 +139,7 @@ public function build(): OrderSetReturnItemCustomFieldAction { return new OrderSetReturnItemCustomFieldActionModel( $this->returnItemId, + $this->returnItemKey, $this->name, $this->value ); diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldActionModel.php index dcf5346ee6e..a323d4915b3 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldActionModel.php @@ -32,6 +32,12 @@ final class OrderSetReturnItemCustomFieldActionModel extends JsonObjectModel imp */ protected $returnItemId; + /** + * + * @var ?string + */ + protected $returnItemKey; + /** * * @var ?string @@ -50,11 +56,13 @@ final class OrderSetReturnItemCustomFieldActionModel extends JsonObjectModel imp */ public function __construct( ?string $returnItemId = null, + ?string $returnItemKey = null, ?string $name = null, $value = null, ?string $action = null ) { $this->returnItemId = $returnItemId; + $this->returnItemKey = $returnItemKey; $this->name = $name; $this->value = $value; $this->action = $action ?? self::DISCRIMINATOR_VALUE; @@ -79,7 +87,7 @@ public function getAction() } /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
Name of the Custom Field.
* @@ -149,6 +177,14 @@ public function setReturnItemId(?string $returnItemId): void $this->returnItemId = $returnItemId; } + /** + * @param ?string $returnItemKey + */ + public function setReturnItemKey(?string $returnItemKey): void + { + $this->returnItemKey = $returnItemKey; + } + /** * @param ?string $name */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeAction.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeAction.php index 2eed3a5778d..d761af57644 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeAction.php @@ -16,17 +16,26 @@ interface OrderSetReturnItemCustomTypeAction extends OrderUpdateAction { public const FIELD_RETURN_ITEM_ID = 'returnItemId'; + public const FIELD_RETURN_ITEM_KEY = 'returnItemKey'; public const FIELD_TYPE = 'type'; public const FIELD_FIELDS = 'fields'; /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
Defines the Type that extends the Return Item with Custom Fields. * If absent, any existing Type and Custom Fields are removed from the Return Item.
@@ -49,6 +58,11 @@ public function getFields(); */ public function setReturnItemId(?string $returnItemId): void; + /** + * @param ?string $returnItemKey + */ + public function setReturnItemKey(?string $returnItemKey): void; + /** * @param ?TypeResourceIdentifier $type */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeActionBuilder.php index bfeb53ab507..2c628daa40c 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeActionBuilder.php @@ -30,6 +30,12 @@ final class OrderSetReturnItemCustomTypeActionBuilder implements Builder */ private $returnItemId; + /** + + * @var ?string + */ + private $returnItemKey; + /** * @var null|TypeResourceIdentifier|TypeResourceIdentifierBuilder @@ -43,7 +49,7 @@ final class OrderSetReturnItemCustomTypeActionBuilder implements Builder private $fields; /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
Defines the Type that extends the Return Item with Custom Fields. * If absent, any existing Type and Custom Fields are removed from the Return Item.
@@ -87,6 +104,17 @@ public function withReturnItemId(?string $returnItemId) return $this; } + /** + * @param ?string $returnItemKey + * @return $this + */ + public function withReturnItemKey(?string $returnItemKey) + { + $this->returnItemKey = $returnItemKey; + + return $this; + } + /** * @param ?TypeResourceIdentifier $type * @return $this @@ -135,6 +163,7 @@ public function build(): OrderSetReturnItemCustomTypeAction { return new OrderSetReturnItemCustomTypeActionModel( $this->returnItemId, + $this->returnItemKey, $this->type instanceof TypeResourceIdentifierBuilder ? $this->type->build() : $this->type, $this->fields instanceof FieldContainerBuilder ? $this->fields->build() : $this->fields ); diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeActionModel.php index ff010648f0a..12c23203e78 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomTypeActionModel.php @@ -36,6 +36,12 @@ final class OrderSetReturnItemCustomTypeActionModel extends JsonObjectModel impl */ protected $returnItemId; + /** + * + * @var ?string + */ + protected $returnItemKey; + /** * * @var ?TypeResourceIdentifier @@ -54,11 +60,13 @@ final class OrderSetReturnItemCustomTypeActionModel extends JsonObjectModel impl */ public function __construct( ?string $returnItemId = null, + ?string $returnItemKey = null, ?TypeResourceIdentifier $type = null, ?FieldContainer $fields = null, ?string $action = null ) { $this->returnItemId = $returnItemId; + $this->returnItemKey = $returnItemKey; $this->type = $type; $this->fields = $fields; $this->action = $action ?? self::DISCRIMINATOR_VALUE; @@ -83,7 +91,7 @@ public function getAction() } /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
Defines the Type that extends the Return Item with Custom Fields. * If absent, any existing Type and Custom Fields are removed from the Return Item.
@@ -154,6 +182,14 @@ public function setReturnItemId(?string $returnItemId): void $this->returnItemId = $returnItemId; } + /** + * @param ?string $returnItemKey + */ + public function setReturnItemKey(?string $returnItemKey): void + { + $this->returnItemKey = $returnItemKey; + } + /** * @param ?TypeResourceIdentifier $type */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateAction.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateAction.php index 6ae54daa461..9f2abca9067 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateAction.php @@ -14,16 +14,25 @@ interface OrderSetReturnPaymentStateAction extends OrderUpdateAction { public const FIELD_RETURN_ITEM_ID = 'returnItemId'; + public const FIELD_RETURN_ITEM_KEY = 'returnItemKey'; public const FIELD_PAYMENT_STATE = 'paymentState'; /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
New Payment status of the ReturnItem.
* @@ -37,6 +46,11 @@ public function getPaymentState(); */ public function setReturnItemId(?string $returnItemId): void; + /** + * @param ?string $returnItemKey + */ + public function setReturnItemKey(?string $returnItemKey): void; + /** * @param ?string $paymentState */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateActionBuilder.php index 6d127eb73c9..a05274f53f6 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateActionBuilder.php @@ -26,6 +26,12 @@ final class OrderSetReturnPaymentStateActionBuilder implements Builder */ private $returnItemId; + /** + + * @var ?string + */ + private $returnItemKey; + /** * @var ?string @@ -33,7 +39,7 @@ final class OrderSetReturnPaymentStateActionBuilder implements Builder private $paymentState; /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
New Payment status of the ReturnItem.
* @@ -65,6 +82,17 @@ public function withReturnItemId(?string $returnItemId) return $this; } + /** + * @param ?string $returnItemKey + * @return $this + */ + public function withReturnItemKey(?string $returnItemKey) + { + $this->returnItemKey = $returnItemKey; + + return $this; + } + /** * @param ?string $paymentState * @return $this @@ -81,6 +109,7 @@ public function build(): OrderSetReturnPaymentStateAction { return new OrderSetReturnPaymentStateActionModel( $this->returnItemId, + $this->returnItemKey, $this->paymentState ); } diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateActionModel.php index 73a13bfe884..e587175a1a9 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnPaymentStateActionModel.php @@ -32,6 +32,12 @@ final class OrderSetReturnPaymentStateActionModel extends JsonObjectModel implem */ protected $returnItemId; + /** + * + * @var ?string + */ + protected $returnItemKey; + /** * * @var ?string @@ -44,10 +50,12 @@ final class OrderSetReturnPaymentStateActionModel extends JsonObjectModel implem */ public function __construct( ?string $returnItemId = null, + ?string $returnItemKey = null, ?string $paymentState = null, ?string $action = null ) { $this->returnItemId = $returnItemId; + $this->returnItemKey = $returnItemKey; $this->paymentState = $paymentState; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -71,7 +79,7 @@ public function getAction() } /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
New Payment status of the ReturnItem.
* @@ -119,6 +147,14 @@ public function setReturnItemId(?string $returnItemId): void $this->returnItemId = $returnItemId; } + /** + * @param ?string $returnItemKey + */ + public function setReturnItemKey(?string $returnItemKey): void + { + $this->returnItemKey = $returnItemKey; + } + /** * @param ?string $paymentState */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateAction.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateAction.php index e912725f511..b92282eed92 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateAction.php @@ -14,16 +14,25 @@ interface OrderSetReturnShipmentStateAction extends OrderUpdateAction { public const FIELD_RETURN_ITEM_ID = 'returnItemId'; + public const FIELD_RETURN_ITEM_KEY = 'returnItemKey'; public const FIELD_SHIPMENT_STATE = 'shipmentState'; /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
New shipment state of the ReturnItem.
* @@ -37,6 +46,11 @@ public function getShipmentState(); */ public function setReturnItemId(?string $returnItemId): void; + /** + * @param ?string $returnItemKey + */ + public function setReturnItemKey(?string $returnItemKey): void; + /** * @param ?string $shipmentState */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateActionBuilder.php index e3519b76b87..48a1f2c2b16 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateActionBuilder.php @@ -26,6 +26,12 @@ final class OrderSetReturnShipmentStateActionBuilder implements Builder */ private $returnItemId; + /** + + * @var ?string + */ + private $returnItemKey; + /** * @var ?string @@ -33,7 +39,7 @@ final class OrderSetReturnShipmentStateActionBuilder implements Builder private $shipmentState; /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
New shipment state of the ReturnItem.
* @@ -65,6 +82,17 @@ public function withReturnItemId(?string $returnItemId) return $this; } + /** + * @param ?string $returnItemKey + * @return $this + */ + public function withReturnItemKey(?string $returnItemKey) + { + $this->returnItemKey = $returnItemKey; + + return $this; + } + /** * @param ?string $shipmentState * @return $this @@ -81,6 +109,7 @@ public function build(): OrderSetReturnShipmentStateAction { return new OrderSetReturnShipmentStateActionModel( $this->returnItemId, + $this->returnItemKey, $this->shipmentState ); } diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateActionModel.php index d30c771c915..1f2fd6d3608 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnShipmentStateActionModel.php @@ -32,6 +32,12 @@ final class OrderSetReturnShipmentStateActionModel extends JsonObjectModel imple */ protected $returnItemId; + /** + * + * @var ?string + */ + protected $returnItemKey; + /** * * @var ?string @@ -44,10 +50,12 @@ final class OrderSetReturnShipmentStateActionModel extends JsonObjectModel imple */ public function __construct( ?string $returnItemId = null, + ?string $returnItemKey = null, ?string $shipmentState = null, ?string $action = null ) { $this->returnItemId = $returnItemId; + $this->returnItemKey = $returnItemKey; $this->shipmentState = $shipmentState; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -71,7 +79,7 @@ public function getAction() } /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
New shipment state of the ReturnItem.
* @@ -119,6 +147,14 @@ public function setReturnItemId(?string $returnItemId): void $this->returnItemId = $returnItemId; } + /** + * @param ?string $returnItemKey + */ + public function setReturnItemKey(?string $returnItemKey): void + { + $this->returnItemKey = $returnItemKey; + } + /** * @param ?string $shipmentState */ diff --git a/lib/commercetools-api/src/Models/Order/ReturnItem.php b/lib/commercetools-api/src/Models/Order/ReturnItem.php index 50dbb7afe51..12e2ac692c0 100644 --- a/lib/commercetools-api/src/Models/Order/ReturnItem.php +++ b/lib/commercetools-api/src/Models/Order/ReturnItem.php @@ -17,6 +17,7 @@ interface ReturnItem extends JsonObject { public const DISCRIMINATOR_FIELD = 'type'; public const FIELD_ID = 'id'; + public const FIELD_KEY = 'key'; public const FIELD_QUANTITY = 'quantity'; public const FIELD_TYPE = 'type'; public const FIELD_COMMENT = 'comment'; @@ -34,6 +35,14 @@ interface ReturnItem extends JsonObject */ public function getId(); + /** + *User-defined unique identifier of the Return Item.
+ * + + * @return null|string + */ + public function getKey(); + /** *Number of Line Items or Custom Line Items returned.
* @@ -105,6 +114,11 @@ public function getCreatedAt(); */ public function setId(?string $id): void; + /** + * @param ?string $key + */ + public function setKey(?string $key): void; + /** * @param ?int $quantity */ diff --git a/lib/commercetools-api/src/Models/Order/ReturnItemBuilder.php b/lib/commercetools-api/src/Models/Order/ReturnItemBuilder.php index 7c62da26167..e796b2acb86 100644 --- a/lib/commercetools-api/src/Models/Order/ReturnItemBuilder.php +++ b/lib/commercetools-api/src/Models/Order/ReturnItemBuilder.php @@ -29,6 +29,12 @@ final class ReturnItemBuilder implements Builder */ private $id; + /** + + * @var ?string + */ + private $key; + /** * @var ?int @@ -82,6 +88,17 @@ public function getId() return $this->id; } + /** + *User-defined unique identifier of the Return Item.
+ * + + * @return null|string + */ + public function getKey() + { + return $this->key; + } + /** *Number of Line Items or Custom Line Items returned.
* @@ -174,6 +191,17 @@ public function withId(?string $id) return $this; } + /** + * @param ?string $key + * @return $this + */ + public function withKey(?string $key) + { + $this->key = $key; + + return $this; + } + /** * @param ?int $quantity * @return $this @@ -266,6 +294,7 @@ public function build(): ReturnItem { return new ReturnItemModel( $this->id, + $this->key, $this->quantity, $this->comment, $this->shipmentState, diff --git a/lib/commercetools-api/src/Models/Order/ReturnItemDraft.php b/lib/commercetools-api/src/Models/Order/ReturnItemDraft.php index ddb55011e6c..03ec28939a4 100644 --- a/lib/commercetools-api/src/Models/Order/ReturnItemDraft.php +++ b/lib/commercetools-api/src/Models/Order/ReturnItemDraft.php @@ -14,6 +14,7 @@ interface ReturnItemDraft extends JsonObject { + public const FIELD_KEY = 'key'; public const FIELD_QUANTITY = 'quantity'; public const FIELD_LINE_ITEM_ID = 'lineItemId'; public const FIELD_CUSTOM_LINE_ITEM_ID = 'customLineItemId'; @@ -21,6 +22,14 @@ interface ReturnItemDraft extends JsonObject public const FIELD_SHIPMENT_STATE = 'shipmentState'; public const FIELD_CUSTOM = 'custom'; + /** + *User-defined unique identifier of the Return Item.
+ * + + * @return null|string + */ + public function getKey(); + /** *Number of Line Items or Custom Line Items to return.
* @@ -72,6 +81,11 @@ public function getShipmentState(); */ public function getCustom(); + /** + * @param ?string $key + */ + public function setKey(?string $key): void; + /** * @param ?int $quantity */ diff --git a/lib/commercetools-api/src/Models/Order/ReturnItemDraftBuilder.php b/lib/commercetools-api/src/Models/Order/ReturnItemDraftBuilder.php index 016ab8d501f..b538f6a375a 100644 --- a/lib/commercetools-api/src/Models/Order/ReturnItemDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Order/ReturnItemDraftBuilder.php @@ -22,6 +22,12 @@ */ final class ReturnItemDraftBuilder implements Builder { + /** + + * @var ?string + */ + private $key; + /** * @var ?int @@ -58,6 +64,17 @@ final class ReturnItemDraftBuilder implements Builder */ private $custom; + /** + *User-defined unique identifier of the Return Item.
+ * + + * @return null|string + */ + public function getKey() + { + return $this->key; + } + /** *Number of Line Items or Custom Line Items to return.
* @@ -127,6 +144,17 @@ public function getCustom() return $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom; } + /** + * @param ?string $key + * @return $this + */ + public function withKey(?string $key) + { + $this->key = $key; + + return $this; + } + /** * @param ?int $quantity * @return $this @@ -207,6 +235,7 @@ public function withCustomBuilder(?CustomFieldsDraftBuilder $custom) public function build(): ReturnItemDraft { return new ReturnItemDraftModel( + $this->key, $this->quantity, $this->lineItemId, $this->customLineItemId, diff --git a/lib/commercetools-api/src/Models/Order/ReturnItemDraftModel.php b/lib/commercetools-api/src/Models/Order/ReturnItemDraftModel.php index ec67b8662b1..7cc6b215fa8 100644 --- a/lib/commercetools-api/src/Models/Order/ReturnItemDraftModel.php +++ b/lib/commercetools-api/src/Models/Order/ReturnItemDraftModel.php @@ -21,6 +21,12 @@ */ final class ReturnItemDraftModel extends JsonObjectModel implements ReturnItemDraft { + /** + * + * @var ?string + */ + protected $key; + /** * * @var ?int @@ -62,6 +68,7 @@ final class ReturnItemDraftModel extends JsonObjectModel implements ReturnItemDr * @psalm-suppress MissingParamType */ public function __construct( + ?string $key = null, ?int $quantity = null, ?string $lineItemId = null, ?string $customLineItemId = null, @@ -69,6 +76,7 @@ public function __construct( ?string $shipmentState = null, ?CustomFieldsDraft $custom = null ) { + $this->key = $key; $this->quantity = $quantity; $this->lineItemId = $lineItemId; $this->customLineItemId = $customLineItemId; @@ -77,6 +85,26 @@ public function __construct( $this->custom = $custom; } + /** + *User-defined unique identifier of the Return Item.
+ * + * + * @return null|string + */ + public function getKey() + { + if (is_null($this->key)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_KEY); + if (is_null($data)) { + return null; + } + $this->key = (string) $data; + } + + return $this->key; + } + /** *Number of Line Items or Custom Line Items to return.
* @@ -202,6 +230,14 @@ public function getCustom() } + /** + * @param ?string $key + */ + public function setKey(?string $key): void + { + $this->key = $key; + } + /** * @param ?int $quantity */ diff --git a/lib/commercetools-api/src/Models/Order/ReturnItemModel.php b/lib/commercetools-api/src/Models/Order/ReturnItemModel.php index 96906c99c1a..4a9ffcb7b23 100644 --- a/lib/commercetools-api/src/Models/Order/ReturnItemModel.php +++ b/lib/commercetools-api/src/Models/Order/ReturnItemModel.php @@ -29,6 +29,12 @@ final class ReturnItemModel extends JsonObjectModel implements ReturnItem */ protected $id; + /** + * + * @var ?string + */ + protected $key; + /** * * @var ?int @@ -91,6 +97,7 @@ final class ReturnItemModel extends JsonObjectModel implements ReturnItem */ public function __construct( ?string $id = null, + ?string $key = null, ?int $quantity = null, ?string $comment = null, ?string $shipmentState = null, @@ -101,6 +108,7 @@ public function __construct( ?string $type = null ) { $this->id = $id; + $this->key = $key; $this->quantity = $quantity; $this->comment = $comment; $this->shipmentState = $shipmentState; @@ -131,6 +139,26 @@ public function getId() return $this->id; } + /** + *User-defined unique identifier of the Return Item.
+ * + * + * @return null|string + */ + public function getKey() + { + if (is_null($this->key)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_KEY); + if (is_null($data)) { + return null; + } + $this->key = (string) $data; + } + + return $this->key; + } + /** *Number of Line Items or Custom Line Items returned.
* @@ -311,6 +339,14 @@ public function setId(?string $id): void $this->id = $id; } + /** + * @param ?string $key + */ + public function setKey(?string $key): void + { + $this->key = $key; + } + /** * @param ?int $quantity */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldAction.php index 67d7b9a5cd2..e41ea9c3e6d 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldAction.php @@ -15,17 +15,26 @@ interface StagedOrderSetReturnItemCustomFieldAction extends StagedOrderUpdateAction { public const FIELD_RETURN_ITEM_ID = 'returnItemId'; + public const FIELD_RETURN_ITEM_KEY = 'returnItemKey'; public const FIELD_NAME = 'name'; public const FIELD_VALUE = 'value'; /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
Name of the Custom Field.
* @@ -49,6 +58,11 @@ public function getValue(); */ public function setReturnItemId(?string $returnItemId): void; + /** + * @param ?string $returnItemKey + */ + public function setReturnItemKey(?string $returnItemKey): void; + /** * @param ?string $name */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldActionBuilder.php index 5779c6f2be1..4f03a6621c5 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldActionBuilder.php @@ -28,6 +28,12 @@ final class StagedOrderSetReturnItemCustomFieldActionBuilder implements Builder */ private $returnItemId; + /** + + * @var ?string + */ + private $returnItemKey; + /** * @var ?string @@ -41,7 +47,7 @@ final class StagedOrderSetReturnItemCustomFieldActionBuilder implements Builder private $value; /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
Name of the Custom Field.
* @@ -86,6 +103,17 @@ public function withReturnItemId(?string $returnItemId) return $this; } + /** + * @param ?string $returnItemKey + * @return $this + */ + public function withReturnItemKey(?string $returnItemKey) + { + $this->returnItemKey = $returnItemKey; + + return $this; + } + /** * @param ?string $name * @return $this @@ -113,6 +141,7 @@ public function build(): StagedOrderSetReturnItemCustomFieldAction { return new StagedOrderSetReturnItemCustomFieldActionModel( $this->returnItemId, + $this->returnItemKey, $this->name, $this->value ); diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldActionModel.php index bba2597baa3..dc6d132769e 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldActionModel.php @@ -34,6 +34,12 @@ final class StagedOrderSetReturnItemCustomFieldActionModel extends JsonObjectMod */ protected $returnItemId; + /** + * + * @var ?string + */ + protected $returnItemKey; + /** * * @var ?string @@ -52,11 +58,13 @@ final class StagedOrderSetReturnItemCustomFieldActionModel extends JsonObjectMod */ public function __construct( ?string $returnItemId = null, + ?string $returnItemKey = null, ?string $name = null, $value = null, ?string $action = null ) { $this->returnItemId = $returnItemId; + $this->returnItemKey = $returnItemKey; $this->name = $name; $this->value = $value; $this->action = $action ?? self::DISCRIMINATOR_VALUE; @@ -81,7 +89,7 @@ public function getAction() } /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
Name of the Custom Field.
* @@ -151,6 +179,14 @@ public function setReturnItemId(?string $returnItemId): void $this->returnItemId = $returnItemId; } + /** + * @param ?string $returnItemKey + */ + public function setReturnItemKey(?string $returnItemKey): void + { + $this->returnItemKey = $returnItemKey; + } + /** * @param ?string $name */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeAction.php index 1a4df2e5de8..0db2f0ce816 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeAction.php @@ -17,17 +17,26 @@ interface StagedOrderSetReturnItemCustomTypeAction extends StagedOrderUpdateAction { public const FIELD_RETURN_ITEM_ID = 'returnItemId'; + public const FIELD_RETURN_ITEM_KEY = 'returnItemKey'; public const FIELD_TYPE = 'type'; public const FIELD_FIELDS = 'fields'; /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
Defines the Type that extends the Return Item with Custom Fields. * If absent, any existing Type and Custom Fields are removed from the Return Item.
@@ -50,6 +59,11 @@ public function getFields(); */ public function setReturnItemId(?string $returnItemId): void; + /** + * @param ?string $returnItemKey + */ + public function setReturnItemKey(?string $returnItemKey): void; + /** * @param ?TypeResourceIdentifier $type */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeActionBuilder.php index ad86a1675bf..514ebeb9acc 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeActionBuilder.php @@ -32,6 +32,12 @@ final class StagedOrderSetReturnItemCustomTypeActionBuilder implements Builder */ private $returnItemId; + /** + + * @var ?string + */ + private $returnItemKey; + /** * @var null|TypeResourceIdentifier|TypeResourceIdentifierBuilder @@ -45,7 +51,7 @@ final class StagedOrderSetReturnItemCustomTypeActionBuilder implements Builder private $fields; /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
Defines the Type that extends the Return Item with Custom Fields. * If absent, any existing Type and Custom Fields are removed from the Return Item.
@@ -89,6 +106,17 @@ public function withReturnItemId(?string $returnItemId) return $this; } + /** + * @param ?string $returnItemKey + * @return $this + */ + public function withReturnItemKey(?string $returnItemKey) + { + $this->returnItemKey = $returnItemKey; + + return $this; + } + /** * @param ?TypeResourceIdentifier $type * @return $this @@ -137,6 +165,7 @@ public function build(): StagedOrderSetReturnItemCustomTypeAction { return new StagedOrderSetReturnItemCustomTypeActionModel( $this->returnItemId, + $this->returnItemKey, $this->type instanceof TypeResourceIdentifierBuilder ? $this->type->build() : $this->type, $this->fields instanceof FieldContainerBuilder ? $this->fields->build() : $this->fields ); diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeActionModel.php index fdb675b1508..b2b23c9cb82 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomTypeActionModel.php @@ -38,6 +38,12 @@ final class StagedOrderSetReturnItemCustomTypeActionModel extends JsonObjectMode */ protected $returnItemId; + /** + * + * @var ?string + */ + protected $returnItemKey; + /** * * @var ?TypeResourceIdentifier @@ -56,11 +62,13 @@ final class StagedOrderSetReturnItemCustomTypeActionModel extends JsonObjectMode */ public function __construct( ?string $returnItemId = null, + ?string $returnItemKey = null, ?TypeResourceIdentifier $type = null, ?FieldContainer $fields = null, ?string $action = null ) { $this->returnItemId = $returnItemId; + $this->returnItemKey = $returnItemKey; $this->type = $type; $this->fields = $fields; $this->action = $action ?? self::DISCRIMINATOR_VALUE; @@ -85,7 +93,7 @@ public function getAction() } /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
Defines the Type that extends the Return Item with Custom Fields. * If absent, any existing Type and Custom Fields are removed from the Return Item.
@@ -156,6 +184,14 @@ public function setReturnItemId(?string $returnItemId): void $this->returnItemId = $returnItemId; } + /** + * @param ?string $returnItemKey + */ + public function setReturnItemKey(?string $returnItemKey): void + { + $this->returnItemKey = $returnItemKey; + } + /** * @param ?TypeResourceIdentifier $type */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateAction.php index 6958328c908..60c06832545 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateAction.php @@ -15,16 +15,25 @@ interface StagedOrderSetReturnPaymentStateAction extends StagedOrderUpdateAction { public const FIELD_RETURN_ITEM_ID = 'returnItemId'; + public const FIELD_RETURN_ITEM_KEY = 'returnItemKey'; public const FIELD_PAYMENT_STATE = 'paymentState'; /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
New Payment status of the ReturnItem.
* @@ -38,6 +47,11 @@ public function getPaymentState(); */ public function setReturnItemId(?string $returnItemId): void; + /** + * @param ?string $returnItemKey + */ + public function setReturnItemKey(?string $returnItemKey): void; + /** * @param ?string $paymentState */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateActionBuilder.php index 7711ea8e6bb..3c868a24d4d 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateActionBuilder.php @@ -28,6 +28,12 @@ final class StagedOrderSetReturnPaymentStateActionBuilder implements Builder */ private $returnItemId; + /** + + * @var ?string + */ + private $returnItemKey; + /** * @var ?string @@ -35,7 +41,7 @@ final class StagedOrderSetReturnPaymentStateActionBuilder implements Builder private $paymentState; /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
New Payment status of the ReturnItem.
* @@ -67,6 +84,17 @@ public function withReturnItemId(?string $returnItemId) return $this; } + /** + * @param ?string $returnItemKey + * @return $this + */ + public function withReturnItemKey(?string $returnItemKey) + { + $this->returnItemKey = $returnItemKey; + + return $this; + } + /** * @param ?string $paymentState * @return $this @@ -83,6 +111,7 @@ public function build(): StagedOrderSetReturnPaymentStateAction { return new StagedOrderSetReturnPaymentStateActionModel( $this->returnItemId, + $this->returnItemKey, $this->paymentState ); } diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateActionModel.php index 0a03d35e5b3..0c46a7e13ec 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnPaymentStateActionModel.php @@ -34,6 +34,12 @@ final class StagedOrderSetReturnPaymentStateActionModel extends JsonObjectModel */ protected $returnItemId; + /** + * + * @var ?string + */ + protected $returnItemKey; + /** * * @var ?string @@ -46,10 +52,12 @@ final class StagedOrderSetReturnPaymentStateActionModel extends JsonObjectModel */ public function __construct( ?string $returnItemId = null, + ?string $returnItemKey = null, ?string $paymentState = null, ?string $action = null ) { $this->returnItemId = $returnItemId; + $this->returnItemKey = $returnItemKey; $this->paymentState = $paymentState; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -73,7 +81,7 @@ public function getAction() } /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
New Payment status of the ReturnItem.
* @@ -121,6 +149,14 @@ public function setReturnItemId(?string $returnItemId): void $this->returnItemId = $returnItemId; } + /** + * @param ?string $returnItemKey + */ + public function setReturnItemKey(?string $returnItemKey): void + { + $this->returnItemKey = $returnItemKey; + } + /** * @param ?string $paymentState */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateAction.php index 116fa85ce19..792c29fc63b 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateAction.php @@ -15,16 +15,25 @@ interface StagedOrderSetReturnShipmentStateAction extends StagedOrderUpdateAction { public const FIELD_RETURN_ITEM_ID = 'returnItemId'; + public const FIELD_RETURN_ITEM_KEY = 'returnItemKey'; public const FIELD_SHIPMENT_STATE = 'shipmentState'; /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
New shipment state of the ReturnItem.
* @@ -38,6 +47,11 @@ public function getShipmentState(); */ public function setReturnItemId(?string $returnItemId): void; + /** + * @param ?string $returnItemKey + */ + public function setReturnItemKey(?string $returnItemKey): void; + /** * @param ?string $shipmentState */ diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateActionBuilder.php index cdd41d2e5d1..df7cf4c4dfc 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateActionBuilder.php @@ -28,6 +28,12 @@ final class StagedOrderSetReturnShipmentStateActionBuilder implements Builder */ private $returnItemId; + /** + + * @var ?string + */ + private $returnItemKey; + /** * @var ?string @@ -35,7 +41,7 @@ final class StagedOrderSetReturnShipmentStateActionBuilder implements Builder private $shipmentState; /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
New shipment state of the ReturnItem.
* @@ -67,6 +84,17 @@ public function withReturnItemId(?string $returnItemId) return $this; } + /** + * @param ?string $returnItemKey + * @return $this + */ + public function withReturnItemKey(?string $returnItemKey) + { + $this->returnItemKey = $returnItemKey; + + return $this; + } + /** * @param ?string $shipmentState * @return $this @@ -83,6 +111,7 @@ public function build(): StagedOrderSetReturnShipmentStateAction { return new StagedOrderSetReturnShipmentStateActionModel( $this->returnItemId, + $this->returnItemKey, $this->shipmentState ); } diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateActionModel.php index 0e445f1b12d..5e65fdfe2ed 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnShipmentStateActionModel.php @@ -34,6 +34,12 @@ final class StagedOrderSetReturnShipmentStateActionModel extends JsonObjectModel */ protected $returnItemId; + /** + * + * @var ?string + */ + protected $returnItemKey; + /** * * @var ?string @@ -46,10 +52,12 @@ final class StagedOrderSetReturnShipmentStateActionModel extends JsonObjectModel */ public function __construct( ?string $returnItemId = null, + ?string $returnItemKey = null, ?string $shipmentState = null, ?string $action = null ) { $this->returnItemId = $returnItemId; + $this->returnItemKey = $returnItemKey; $this->shipmentState = $shipmentState; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -73,7 +81,7 @@ public function getAction() } /** - *id
of the ReturnItem to update.
id
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
key
of the ReturnItem to update. Either returnItemId
or returnItemKey
is required.
New shipment state of the ReturnItem.
* @@ -121,6 +149,14 @@ public function setReturnItemId(?string $returnItemId): void $this->returnItemId = $returnItemId; } + /** + * @param ?string $returnItemKey + */ + public function setReturnItemKey(?string $returnItemKey): void + { + $this->returnItemKey = $returnItemKey; + } + /** * @param ?string $shipmentState */ diff --git a/references.txt b/references.txt index 640902498fe..0865a70d833 100644 --- a/references.txt +++ b/references.txt @@ -91,3 +91,4 @@ f15664352ad27ec193e2ca1140e7dbeae4fa3167 43ec24cb27d83029991ae44c2c5af31fa2e6bebc b47352c3ed66fd9ad8e6b14402217fec39941d06 16f42e68e7e48c4ea35ca3791f0d412bdc4d44c8 +c497e6c324870e2e3d2c39d1196a329b71f3752e From 2010bbbe5ea4d8dee6f35b7db06dac8e851cb152 Mon Sep 17 00:00:00 2001 From: Auto Mation"Content too large."
+ *
+
+ * @return null|string
+ */
+ public function getMessage();
+
+ /**
+ * @param ?string $message
+ */
+ public function setMessage(?string $message): void;
+}
diff --git a/lib/commercetools-api/src/Models/Error/ContentTooLargeErrorBuilder.php b/lib/commercetools-api/src/Models/Error/ContentTooLargeErrorBuilder.php
new file mode 100644
index 00000000000..0d3ff2534ff
--- /dev/null
+++ b/lib/commercetools-api/src/Models/Error/ContentTooLargeErrorBuilder.php
@@ -0,0 +1,63 @@
+
+ */
+final class ContentTooLargeErrorBuilder implements Builder
+{
+ /**
+
+ * @var ?string
+ */
+ private $message;
+
+ /**
+ * "Content too large."
"Content too large."
Roles assigned to the new Associate within a Business Unit.
+ *Roles assigned to the new Associate within a Business Unit. Can only contain AssociateRoles with the buyerAssignable
property set to true
.
Roles assigned to the new Associate within a Business Unit.
+ *Roles assigned to the new Associate within a Business Unit. Can only contain AssociateRoles with the buyerAssignable
property set to true
.
Roles assigned to the new Associate within a Business Unit.
+ *Roles assigned to the new Associate within a Business Unit. Can only contain AssociateRoles with the buyerAssignable
property set to true
.
The added CustomFieldValue based on the FieldType.
+ * + + * @return null|mixed + */ + public function getValue(); + + /** + * @param ?string $name + */ + public function setName(?string $name): void; + + /** + * @param mixed $value + */ + public function setValue($value): void; +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessageBuilder.php b/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessageBuilder.php new file mode 100644 index 00000000000..f8ce5b29d34 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessageBuilder.php @@ -0,0 +1,433 @@ + + */ +final class OrderCustomFieldAddedMessageBuilder implements Builder +{ + /** + + * @var ?string + */ + private $id; + + /** + + * @var ?int + */ + private $version; + + /** + + * @var ?DateTimeImmutable + */ + private $createdAt; + + /** + + * @var ?DateTimeImmutable + */ + private $lastModifiedAt; + + /** + + * @var null|LastModifiedBy|LastModifiedByBuilder + */ + private $lastModifiedBy; + + /** + + * @var null|CreatedBy|CreatedByBuilder + */ + private $createdBy; + + /** + + * @var ?int + */ + private $sequenceNumber; + + /** + + * @var null|Reference|ReferenceBuilder + */ + private $resource; + + /** + + * @var ?int + */ + private $resourceVersion; + + /** + + * @var null|UserProvidedIdentifiers|UserProvidedIdentifiersBuilder + */ + private $resourceUserProvidedIdentifiers; + + /** + + * @var ?string + */ + private $name; + + /** + + * @var null|mixed|mixed + */ + private $value; + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + + * @return null|string + */ + public function getId() + { + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + + * @return null|Reference + */ + public function getResource() + { + return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * + + * @return null|int + */ + public function getResourceVersion() + { + return $this->resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Name of the Custom Field that has been added.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + *The added CustomFieldValue based on the FieldType.
+ * + + * @return null|mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * @param ?string $id + * @return $this + */ + public function withId(?string $id) + { + $this->id = $id; + + return $this; + } + + /** + * @param ?int $version + * @return $this + */ + public function withVersion(?int $version) + { + $this->version = $version; + + return $this; + } + + /** + * @param ?DateTimeImmutable $createdAt + * @return $this + */ + public function withCreatedAt(?DateTimeImmutable $createdAt) + { + $this->createdAt = $createdAt; + + return $this; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + * @return $this + */ + public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt) + { + $this->lastModifiedAt = $lastModifiedAt; + + return $this; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + * @return $this + */ + public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @param ?CreatedBy $createdBy + * @return $this + */ + public function withCreatedBy(?CreatedBy $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @param ?int $sequenceNumber + * @return $this + */ + public function withSequenceNumber(?int $sequenceNumber) + { + $this->sequenceNumber = $sequenceNumber; + + return $this; + } + + /** + * @param ?Reference $resource + * @return $this + */ + public function withResource(?Reference $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @param ?int $resourceVersion + * @return $this + */ + public function withResourceVersion(?int $resourceVersion) + { + $this->resourceVersion = $resourceVersion; + + return $this; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + * @return $this + */ + public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + /** + * @param ?string $name + * @return $this + */ + public function withName(?string $name) + { + $this->name = $name; + + return $this; + } + + /** + * @param mixed $value + * @return $this + */ + public function withValue($value) + { + $this->value = $value; + + return $this; + } + + /** + * @deprecated use withLastModifiedBy() instead + * @return $this + */ + public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @deprecated use withCreatedBy() instead + * @return $this + */ + public function withCreatedByBuilder(?CreatedByBuilder $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @deprecated use withResource() instead + * @return $this + */ + public function withResourceBuilder(?ReferenceBuilder $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @deprecated use withResourceUserProvidedIdentifiers() instead + * @return $this + */ + public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + public function build(): OrderCustomFieldAddedMessage + { + return new OrderCustomFieldAddedMessageModel( + $this->id, + $this->version, + $this->createdAt, + $this->lastModifiedAt, + $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, + $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy, + $this->sequenceNumber, + $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource, + $this->resourceVersion, + $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, + $this->name, + $this->value + ); + } + + public static function of(): OrderCustomFieldAddedMessageBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessageCollection.php b/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessageCollection.php new file mode 100644 index 00000000000..63f66e5b638 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessageCollection.php @@ -0,0 +1,56 @@ + + * @method OrderCustomFieldAddedMessage current() + * @method OrderCustomFieldAddedMessage end() + * @method OrderCustomFieldAddedMessage at($offset) + */ +class OrderCustomFieldAddedMessageCollection extends OrderMessageCollection +{ + /** + * @psalm-assert OrderCustomFieldAddedMessage $value + * @psalm-param OrderCustomFieldAddedMessage|stdClass $value + * @throws InvalidArgumentException + * + * @return OrderCustomFieldAddedMessageCollection + */ + public function add($value) + { + if (!$value instanceof OrderCustomFieldAddedMessage) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?OrderCustomFieldAddedMessage + */ + protected function mapper() + { + return function (?int $index): ?OrderCustomFieldAddedMessage { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var OrderCustomFieldAddedMessage $data */ + $data = OrderCustomFieldAddedMessageModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessageModel.php b/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessageModel.php new file mode 100644 index 00000000000..1d718ff4518 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessageModel.php @@ -0,0 +1,526 @@ +id = $id; + $this->version = $version; + $this->createdAt = $createdAt; + $this->lastModifiedAt = $lastModifiedAt; + $this->lastModifiedBy = $lastModifiedBy; + $this->createdBy = $createdBy; + $this->sequenceNumber = $sequenceNumber; + $this->resource = $resource; + $this->resourceVersion = $resourceVersion; + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + $this->name = $name; + $this->value = $value; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + * + * @return null|string + */ + public function getId() + { + if (is_null($this->id)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ID); + if (is_null($data)) { + return null; + } + $this->id = (string) $data; + } + + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + * + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + if (is_null($this->createdAt)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CREATED_AT); + if (is_null($data)) { + return null; + } + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->createdAt = $data; + } + + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayMessage number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + * + * @return null|Reference + */ + public function getResource() + { + if (is_null($this->resource)) { + /** @psalm-var stdClass|arrayVersion of the resource on which the change or action was performed.
+ * + * + * @return null|int + */ + public function getResourceVersion() + { + if (is_null($this->resourceVersion)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_RESOURCE_VERSION); + if (is_null($data)) { + return null; + } + $this->resourceVersion = (int) $data; + } + + return $this->resourceVersion; + } + + /** + *Message Type of the Message.
+ * + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Name of the Custom Field that has been added.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + /** + *The added CustomFieldValue based on the FieldType.
+ * + * + * @return null|mixed + */ + public function getValue() + { + if (is_null($this->value)) { + /** @psalm-var mixed $data */ + $data = $this->raw(self::FIELD_VALUE); + if (is_null($data)) { + return null; + } + $this->value = $data; + } + + return $this->value; + } + + + /** + * @param ?string $id + */ + public function setId(?string $id): void + { + $this->id = $id; + } + + /** + * @param ?int $version + */ + public function setVersion(?int $version): void + { + $this->version = $version; + } + + /** + * @param ?DateTimeImmutable $createdAt + */ + public function setCreatedAt(?DateTimeImmutable $createdAt): void + { + $this->createdAt = $createdAt; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + */ + public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void + { + $this->lastModifiedAt = $lastModifiedAt; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + */ + public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void + { + $this->lastModifiedBy = $lastModifiedBy; + } + + /** + * @param ?CreatedBy $createdBy + */ + public function setCreatedBy(?CreatedBy $createdBy): void + { + $this->createdBy = $createdBy; + } + + /** + * @param ?int $sequenceNumber + */ + public function setSequenceNumber(?int $sequenceNumber): void + { + $this->sequenceNumber = $sequenceNumber; + } + + /** + * @param ?Reference $resource + */ + public function setResource(?Reference $resource): void + { + $this->resource = $resource; + } + + /** + * @param ?int $resourceVersion + */ + public function setResourceVersion(?int $resourceVersion): void + { + $this->resourceVersion = $resourceVersion; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + */ + public function setResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers): void + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + } + + /** + * @param ?string $name + */ + public function setName(?string $name): void + { + $this->name = $name; + } + + /** + * @param mixed $value + */ + public function setValue($value): void + { + $this->value = $value; + } + + + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + $data = $this->toArray(); + if (isset($data[Message::FIELD_CREATED_AT]) && $data[Message::FIELD_CREATED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_CREATED_AT] = $data[Message::FIELD_CREATED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + + if (isset($data[Message::FIELD_LAST_MODIFIED_AT]) && $data[Message::FIELD_LAST_MODIFIED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_LAST_MODIFIED_AT] = $data[Message::FIELD_LAST_MODIFIED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + return (object) $data; + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessagePayload.php b/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessagePayload.php new file mode 100644 index 00000000000..3f241f94630 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessagePayload.php @@ -0,0 +1,44 @@ +Name of the Custom Field that has been added. + * + + * @return null|string + */ + public function getName(); + + /** + *The added CustomFieldValue based on the FieldType.
+ * + + * @return null|mixed + */ + public function getValue(); + + /** + * @param ?string $name + */ + public function setName(?string $name): void; + + /** + * @param mixed $value + */ + public function setValue($value): void; +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessagePayloadBuilder.php new file mode 100644 index 00000000000..dd93bba7346 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessagePayloadBuilder.php @@ -0,0 +1,92 @@ + + */ +final class OrderCustomFieldAddedMessagePayloadBuilder implements Builder +{ + /** + + * @var ?string + */ + private $name; + + /** + + * @var null|mixed|mixed + */ + private $value; + + /** + *Name of the Custom Field that has been added.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + *The added CustomFieldValue based on the FieldType.
+ * + + * @return null|mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * @param ?string $name + * @return $this + */ + public function withName(?string $name) + { + $this->name = $name; + + return $this; + } + + /** + * @param mixed $value + * @return $this + */ + public function withValue($value) + { + $this->value = $value; + + return $this; + } + + + public function build(): OrderCustomFieldAddedMessagePayload + { + return new OrderCustomFieldAddedMessagePayloadModel( + $this->name, + $this->value + ); + } + + public static function of(): OrderCustomFieldAddedMessagePayloadBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessagePayloadCollection.php b/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessagePayloadCollection.php new file mode 100644 index 00000000000..f6c351ce720 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessagePayloadCollection.php @@ -0,0 +1,56 @@ + + * @method OrderCustomFieldAddedMessagePayload current() + * @method OrderCustomFieldAddedMessagePayload end() + * @method OrderCustomFieldAddedMessagePayload at($offset) + */ +class OrderCustomFieldAddedMessagePayloadCollection extends OrderMessagePayloadCollection +{ + /** + * @psalm-assert OrderCustomFieldAddedMessagePayload $value + * @psalm-param OrderCustomFieldAddedMessagePayload|stdClass $value + * @throws InvalidArgumentException + * + * @return OrderCustomFieldAddedMessagePayloadCollection + */ + public function add($value) + { + if (!$value instanceof OrderCustomFieldAddedMessagePayload) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?OrderCustomFieldAddedMessagePayload + */ + protected function mapper() + { + return function (?int $index): ?OrderCustomFieldAddedMessagePayload { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var OrderCustomFieldAddedMessagePayload $data */ + $data = OrderCustomFieldAddedMessagePayloadModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessagePayloadModel.php new file mode 100644 index 00000000000..c1fc72d6430 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomFieldAddedMessagePayloadModel.php @@ -0,0 +1,129 @@ +name = $name; + $this->value = $value; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *Name of the Custom Field that has been added.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + /** + *The added CustomFieldValue based on the FieldType.
+ * + * + * @return null|mixed + */ + public function getValue() + { + if (is_null($this->value)) { + /** @psalm-var mixed $data */ + $data = $this->raw(self::FIELD_VALUE); + if (is_null($data)) { + return null; + } + $this->value = $data; + } + + return $this->value; + } + + + /** + * @param ?string $name + */ + public function setName(?string $name): void + { + $this->name = $name; + } + + /** + * @param mixed $value + */ + public function setValue($value): void + { + $this->value = $value; + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomFieldChangedMessage.php b/lib/commercetools-api/src/Models/Message/OrderCustomFieldChangedMessage.php new file mode 100644 index 00000000000..1ff6cc3e130 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomFieldChangedMessage.php @@ -0,0 +1,59 @@ +Name of the Custom Field that has been changed. + * + + * @return null|string + */ + public function getName(); + + /** + *CustomFieldValue based on the FieldType after the Set Custom Field update action.
+ * + + * @return null|mixed + */ + public function getValue(); + + /** + *CustomFieldValue based on the FieldType before the Set CustomField update action.
+ * When there has not been a Custom Field with the name
on the Order before, an Order Custom Field Added Message is generated instead.
Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + + * @return null|string + */ + public function getId() + { + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + + * @return null|Reference + */ + public function getResource() + { + return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * + + * @return null|int + */ + public function getResourceVersion() + { + return $this->resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Name of the Custom Field that has been changed.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + *CustomFieldValue based on the FieldType after the Set Custom Field update action.
+ * + + * @return null|mixed + */ + public function getValue() + { + return $this->value; + } + + /** + *CustomFieldValue based on the FieldType before the Set CustomField update action.
+ * When there has not been a Custom Field with the name
on the Order before, an Order Custom Field Added Message is generated instead.
Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + * + * @return null|string + */ + public function getId() + { + if (is_null($this->id)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ID); + if (is_null($data)) { + return null; + } + $this->id = (string) $data; + } + + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + * + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + if (is_null($this->createdAt)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CREATED_AT); + if (is_null($data)) { + return null; + } + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->createdAt = $data; + } + + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayMessage number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + * + * @return null|Reference + */ + public function getResource() + { + if (is_null($this->resource)) { + /** @psalm-var stdClass|arrayVersion of the resource on which the change or action was performed.
+ * + * + * @return null|int + */ + public function getResourceVersion() + { + if (is_null($this->resourceVersion)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_RESOURCE_VERSION); + if (is_null($data)) { + return null; + } + $this->resourceVersion = (int) $data; + } + + return $this->resourceVersion; + } + + /** + *Message Type of the Message.
+ * + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Name of the Custom Field that has been changed.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + /** + *CustomFieldValue based on the FieldType after the Set Custom Field update action.
+ * + * + * @return null|mixed + */ + public function getValue() + { + if (is_null($this->value)) { + /** @psalm-var mixed $data */ + $data = $this->raw(self::FIELD_VALUE); + if (is_null($data)) { + return null; + } + $this->value = $data; + } + + return $this->value; + } + + /** + *CustomFieldValue based on the FieldType before the Set CustomField update action.
+ * When there has not been a Custom Field with the name
on the Order before, an Order Custom Field Added Message is generated instead.
CustomFieldValue based on the FieldType after the Set Custom Field update action.
+ * + + * @return null|mixed + */ + public function getValue(); + + /** + *CustomFieldValue based on the FieldType before the Set CustomField update action.
+ * When there has not been a Custom Field with the name
on the Order before, an Order Custom Field Added Message is generated instead.
Name of the Custom Field that has been changed.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + *CustomFieldValue based on the FieldType after the Set Custom Field update action.
+ * + + * @return null|mixed + */ + public function getValue() + { + return $this->value; + } + + /** + *CustomFieldValue based on the FieldType before the Set CustomField update action.
+ * When there has not been a Custom Field with the name
on the Order before, an Order Custom Field Added Message is generated instead.
Name of the Custom Field that has been changed.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + /** + *CustomFieldValue based on the FieldType after the Set Custom Field update action.
+ * + * + * @return null|mixed + */ + public function getValue() + { + if (is_null($this->value)) { + /** @psalm-var mixed $data */ + $data = $this->raw(self::FIELD_VALUE); + if (is_null($data)) { + return null; + } + $this->value = $data; + } + + return $this->value; + } + + /** + *CustomFieldValue based on the FieldType before the Set CustomField update action.
+ * When there has not been a Custom Field with the name
on the Order before, an Order Custom Field Added Message is generated instead.
Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + + * @return null|string + */ + public function getId() + { + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + + * @return null|Reference + */ + public function getResource() + { + return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * + + * @return null|int + */ + public function getResourceVersion() + { + return $this->resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Name of the Custom Field that has been removed.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + * @param ?string $id + * @return $this + */ + public function withId(?string $id) + { + $this->id = $id; + + return $this; + } + + /** + * @param ?int $version + * @return $this + */ + public function withVersion(?int $version) + { + $this->version = $version; + + return $this; + } + + /** + * @param ?DateTimeImmutable $createdAt + * @return $this + */ + public function withCreatedAt(?DateTimeImmutable $createdAt) + { + $this->createdAt = $createdAt; + + return $this; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + * @return $this + */ + public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt) + { + $this->lastModifiedAt = $lastModifiedAt; + + return $this; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + * @return $this + */ + public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @param ?CreatedBy $createdBy + * @return $this + */ + public function withCreatedBy(?CreatedBy $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @param ?int $sequenceNumber + * @return $this + */ + public function withSequenceNumber(?int $sequenceNumber) + { + $this->sequenceNumber = $sequenceNumber; + + return $this; + } + + /** + * @param ?Reference $resource + * @return $this + */ + public function withResource(?Reference $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @param ?int $resourceVersion + * @return $this + */ + public function withResourceVersion(?int $resourceVersion) + { + $this->resourceVersion = $resourceVersion; + + return $this; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + * @return $this + */ + public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + /** + * @param ?string $name + * @return $this + */ + public function withName(?string $name) + { + $this->name = $name; + + return $this; + } + + /** + * @deprecated use withLastModifiedBy() instead + * @return $this + */ + public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @deprecated use withCreatedBy() instead + * @return $this + */ + public function withCreatedByBuilder(?CreatedByBuilder $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @deprecated use withResource() instead + * @return $this + */ + public function withResourceBuilder(?ReferenceBuilder $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @deprecated use withResourceUserProvidedIdentifiers() instead + * @return $this + */ + public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + public function build(): OrderCustomFieldRemovedMessage + { + return new OrderCustomFieldRemovedMessageModel( + $this->id, + $this->version, + $this->createdAt, + $this->lastModifiedAt, + $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, + $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy, + $this->sequenceNumber, + $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource, + $this->resourceVersion, + $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, + $this->name + ); + } + + public static function of(): OrderCustomFieldRemovedMessageBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomFieldRemovedMessageCollection.php b/lib/commercetools-api/src/Models/Message/OrderCustomFieldRemovedMessageCollection.php new file mode 100644 index 00000000000..0959d32bec0 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomFieldRemovedMessageCollection.php @@ -0,0 +1,56 @@ + + * @method OrderCustomFieldRemovedMessage current() + * @method OrderCustomFieldRemovedMessage end() + * @method OrderCustomFieldRemovedMessage at($offset) + */ +class OrderCustomFieldRemovedMessageCollection extends OrderMessageCollection +{ + /** + * @psalm-assert OrderCustomFieldRemovedMessage $value + * @psalm-param OrderCustomFieldRemovedMessage|stdClass $value + * @throws InvalidArgumentException + * + * @return OrderCustomFieldRemovedMessageCollection + */ + public function add($value) + { + if (!$value instanceof OrderCustomFieldRemovedMessage) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?OrderCustomFieldRemovedMessage + */ + protected function mapper() + { + return function (?int $index): ?OrderCustomFieldRemovedMessage { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var OrderCustomFieldRemovedMessage $data */ + $data = OrderCustomFieldRemovedMessageModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomFieldRemovedMessageModel.php b/lib/commercetools-api/src/Models/Message/OrderCustomFieldRemovedMessageModel.php new file mode 100644 index 00000000000..23529e417f4 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomFieldRemovedMessageModel.php @@ -0,0 +1,490 @@ +id = $id; + $this->version = $version; + $this->createdAt = $createdAt; + $this->lastModifiedAt = $lastModifiedAt; + $this->lastModifiedBy = $lastModifiedBy; + $this->createdBy = $createdBy; + $this->sequenceNumber = $sequenceNumber; + $this->resource = $resource; + $this->resourceVersion = $resourceVersion; + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + $this->name = $name; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + * + * @return null|string + */ + public function getId() + { + if (is_null($this->id)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ID); + if (is_null($data)) { + return null; + } + $this->id = (string) $data; + } + + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + * + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + if (is_null($this->createdAt)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CREATED_AT); + if (is_null($data)) { + return null; + } + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->createdAt = $data; + } + + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayMessage number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + * + * @return null|Reference + */ + public function getResource() + { + if (is_null($this->resource)) { + /** @psalm-var stdClass|arrayVersion of the resource on which the change or action was performed.
+ * + * + * @return null|int + */ + public function getResourceVersion() + { + if (is_null($this->resourceVersion)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_RESOURCE_VERSION); + if (is_null($data)) { + return null; + } + $this->resourceVersion = (int) $data; + } + + return $this->resourceVersion; + } + + /** + *Message Type of the Message.
+ * + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Name of the Custom Field that has been removed.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + + /** + * @param ?string $id + */ + public function setId(?string $id): void + { + $this->id = $id; + } + + /** + * @param ?int $version + */ + public function setVersion(?int $version): void + { + $this->version = $version; + } + + /** + * @param ?DateTimeImmutable $createdAt + */ + public function setCreatedAt(?DateTimeImmutable $createdAt): void + { + $this->createdAt = $createdAt; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + */ + public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void + { + $this->lastModifiedAt = $lastModifiedAt; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + */ + public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void + { + $this->lastModifiedBy = $lastModifiedBy; + } + + /** + * @param ?CreatedBy $createdBy + */ + public function setCreatedBy(?CreatedBy $createdBy): void + { + $this->createdBy = $createdBy; + } + + /** + * @param ?int $sequenceNumber + */ + public function setSequenceNumber(?int $sequenceNumber): void + { + $this->sequenceNumber = $sequenceNumber; + } + + /** + * @param ?Reference $resource + */ + public function setResource(?Reference $resource): void + { + $this->resource = $resource; + } + + /** + * @param ?int $resourceVersion + */ + public function setResourceVersion(?int $resourceVersion): void + { + $this->resourceVersion = $resourceVersion; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + */ + public function setResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers): void + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + } + + /** + * @param ?string $name + */ + public function setName(?string $name): void + { + $this->name = $name; + } + + + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + $data = $this->toArray(); + if (isset($data[Message::FIELD_CREATED_AT]) && $data[Message::FIELD_CREATED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_CREATED_AT] = $data[Message::FIELD_CREATED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + + if (isset($data[Message::FIELD_LAST_MODIFIED_AT]) && $data[Message::FIELD_LAST_MODIFIED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_LAST_MODIFIED_AT] = $data[Message::FIELD_LAST_MODIFIED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + return (object) $data; + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomFieldRemovedMessagePayload.php b/lib/commercetools-api/src/Models/Message/OrderCustomFieldRemovedMessagePayload.php new file mode 100644 index 00000000000..f8292e0e1a8 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomFieldRemovedMessagePayload.php @@ -0,0 +1,30 @@ +Name of the Custom Field that has been removed. + * + + * @return null|string + */ + public function getName(); + + /** + * @param ?string $name + */ + public function setName(?string $name): void; +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomFieldRemovedMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/OrderCustomFieldRemovedMessagePayloadBuilder.php new file mode 100644 index 00000000000..7ee1c0748fa --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomFieldRemovedMessagePayloadBuilder.php @@ -0,0 +1,63 @@ + + */ +final class OrderCustomFieldRemovedMessagePayloadBuilder implements Builder +{ + /** + + * @var ?string + */ + private $name; + + /** + *Name of the Custom Field that has been removed.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + * @param ?string $name + * @return $this + */ + public function withName(?string $name) + { + $this->name = $name; + + return $this; + } + + + public function build(): OrderCustomFieldRemovedMessagePayload + { + return new OrderCustomFieldRemovedMessagePayloadModel( + $this->name + ); + } + + public static function of(): OrderCustomFieldRemovedMessagePayloadBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomFieldRemovedMessagePayloadCollection.php b/lib/commercetools-api/src/Models/Message/OrderCustomFieldRemovedMessagePayloadCollection.php new file mode 100644 index 00000000000..f394dab0c51 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomFieldRemovedMessagePayloadCollection.php @@ -0,0 +1,56 @@ + + * @method OrderCustomFieldRemovedMessagePayload current() + * @method OrderCustomFieldRemovedMessagePayload end() + * @method OrderCustomFieldRemovedMessagePayload at($offset) + */ +class OrderCustomFieldRemovedMessagePayloadCollection extends OrderMessagePayloadCollection +{ + /** + * @psalm-assert OrderCustomFieldRemovedMessagePayload $value + * @psalm-param OrderCustomFieldRemovedMessagePayload|stdClass $value + * @throws InvalidArgumentException + * + * @return OrderCustomFieldRemovedMessagePayloadCollection + */ + public function add($value) + { + if (!$value instanceof OrderCustomFieldRemovedMessagePayload) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?OrderCustomFieldRemovedMessagePayload + */ + protected function mapper() + { + return function (?int $index): ?OrderCustomFieldRemovedMessagePayload { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var OrderCustomFieldRemovedMessagePayload $data */ + $data = OrderCustomFieldRemovedMessagePayloadModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomFieldRemovedMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/OrderCustomFieldRemovedMessagePayloadModel.php new file mode 100644 index 00000000000..d54c4498099 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomFieldRemovedMessagePayloadModel.php @@ -0,0 +1,93 @@ +name = $name; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *Name of the Custom Field that has been removed.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + + /** + * @param ?string $name + */ + public function setName(?string $name): void + { + $this->name = $name; + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessage.php b/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessage.php new file mode 100644 index 00000000000..0bab94fa82c --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessage.php @@ -0,0 +1,31 @@ +id
of the Custom Type that has been removed.
+ * Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId(); + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void; +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessageBuilder.php b/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessageBuilder.php new file mode 100644 index 00000000000..0df280d2e70 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessageBuilder.php @@ -0,0 +1,405 @@ + + */ +final class OrderCustomTypeRemovedMessageBuilder implements Builder +{ + /** + + * @var ?string + */ + private $id; + + /** + + * @var ?int + */ + private $version; + + /** + + * @var ?DateTimeImmutable + */ + private $createdAt; + + /** + + * @var ?DateTimeImmutable + */ + private $lastModifiedAt; + + /** + + * @var null|LastModifiedBy|LastModifiedByBuilder + */ + private $lastModifiedBy; + + /** + + * @var null|CreatedBy|CreatedByBuilder + */ + private $createdBy; + + /** + + * @var ?int + */ + private $sequenceNumber; + + /** + + * @var null|Reference|ReferenceBuilder + */ + private $resource; + + /** + + * @var ?int + */ + private $resourceVersion; + + /** + + * @var null|UserProvidedIdentifiers|UserProvidedIdentifiersBuilder + */ + private $resourceUserProvidedIdentifiers; + + /** + + * @var ?string + */ + private $previousTypeId; + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + + * @return null|string + */ + public function getId() + { + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + + * @return null|Reference + */ + public function getResource() + { + return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * + + * @return null|int + */ + public function getResourceVersion() + { + return $this->resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
id
of the Custom Type that has been removed.
Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId() + { + return $this->previousTypeId; + } + + /** + * @param ?string $id + * @return $this + */ + public function withId(?string $id) + { + $this->id = $id; + + return $this; + } + + /** + * @param ?int $version + * @return $this + */ + public function withVersion(?int $version) + { + $this->version = $version; + + return $this; + } + + /** + * @param ?DateTimeImmutable $createdAt + * @return $this + */ + public function withCreatedAt(?DateTimeImmutable $createdAt) + { + $this->createdAt = $createdAt; + + return $this; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + * @return $this + */ + public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt) + { + $this->lastModifiedAt = $lastModifiedAt; + + return $this; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + * @return $this + */ + public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @param ?CreatedBy $createdBy + * @return $this + */ + public function withCreatedBy(?CreatedBy $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @param ?int $sequenceNumber + * @return $this + */ + public function withSequenceNumber(?int $sequenceNumber) + { + $this->sequenceNumber = $sequenceNumber; + + return $this; + } + + /** + * @param ?Reference $resource + * @return $this + */ + public function withResource(?Reference $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @param ?int $resourceVersion + * @return $this + */ + public function withResourceVersion(?int $resourceVersion) + { + $this->resourceVersion = $resourceVersion; + + return $this; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + * @return $this + */ + public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + /** + * @param ?string $previousTypeId + * @return $this + */ + public function withPreviousTypeId(?string $previousTypeId) + { + $this->previousTypeId = $previousTypeId; + + return $this; + } + + /** + * @deprecated use withLastModifiedBy() instead + * @return $this + */ + public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @deprecated use withCreatedBy() instead + * @return $this + */ + public function withCreatedByBuilder(?CreatedByBuilder $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @deprecated use withResource() instead + * @return $this + */ + public function withResourceBuilder(?ReferenceBuilder $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @deprecated use withResourceUserProvidedIdentifiers() instead + * @return $this + */ + public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + public function build(): OrderCustomTypeRemovedMessage + { + return new OrderCustomTypeRemovedMessageModel( + $this->id, + $this->version, + $this->createdAt, + $this->lastModifiedAt, + $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, + $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy, + $this->sequenceNumber, + $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource, + $this->resourceVersion, + $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, + $this->previousTypeId + ); + } + + public static function of(): OrderCustomTypeRemovedMessageBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessageCollection.php b/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessageCollection.php new file mode 100644 index 00000000000..22528111faa --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessageCollection.php @@ -0,0 +1,56 @@ + + * @method OrderCustomTypeRemovedMessage current() + * @method OrderCustomTypeRemovedMessage end() + * @method OrderCustomTypeRemovedMessage at($offset) + */ +class OrderCustomTypeRemovedMessageCollection extends OrderMessageCollection +{ + /** + * @psalm-assert OrderCustomTypeRemovedMessage $value + * @psalm-param OrderCustomTypeRemovedMessage|stdClass $value + * @throws InvalidArgumentException + * + * @return OrderCustomTypeRemovedMessageCollection + */ + public function add($value) + { + if (!$value instanceof OrderCustomTypeRemovedMessage) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?OrderCustomTypeRemovedMessage + */ + protected function mapper() + { + return function (?int $index): ?OrderCustomTypeRemovedMessage { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var OrderCustomTypeRemovedMessage $data */ + $data = OrderCustomTypeRemovedMessageModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessageModel.php b/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessageModel.php new file mode 100644 index 00000000000..7b9091fb75d --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessageModel.php @@ -0,0 +1,491 @@ +id = $id; + $this->version = $version; + $this->createdAt = $createdAt; + $this->lastModifiedAt = $lastModifiedAt; + $this->lastModifiedBy = $lastModifiedBy; + $this->createdBy = $createdBy; + $this->sequenceNumber = $sequenceNumber; + $this->resource = $resource; + $this->resourceVersion = $resourceVersion; + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + $this->previousTypeId = $previousTypeId; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + * + * @return null|string + */ + public function getId() + { + if (is_null($this->id)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ID); + if (is_null($data)) { + return null; + } + $this->id = (string) $data; + } + + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + * + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + if (is_null($this->createdAt)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CREATED_AT); + if (is_null($data)) { + return null; + } + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->createdAt = $data; + } + + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayMessage number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + * + * @return null|Reference + */ + public function getResource() + { + if (is_null($this->resource)) { + /** @psalm-var stdClass|arrayVersion of the resource on which the change or action was performed.
+ * + * + * @return null|int + */ + public function getResourceVersion() + { + if (is_null($this->resourceVersion)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_RESOURCE_VERSION); + if (is_null($data)) { + return null; + } + $this->resourceVersion = (int) $data; + } + + return $this->resourceVersion; + } + + /** + *Message Type of the Message.
+ * + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
id
of the Custom Type that has been removed.
Absent when there has not been a Custom Type before.
+ * + * + * @return null|string + */ + public function getPreviousTypeId() + { + if (is_null($this->previousTypeId)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_PREVIOUS_TYPE_ID); + if (is_null($data)) { + return null; + } + $this->previousTypeId = (string) $data; + } + + return $this->previousTypeId; + } + + + /** + * @param ?string $id + */ + public function setId(?string $id): void + { + $this->id = $id; + } + + /** + * @param ?int $version + */ + public function setVersion(?int $version): void + { + $this->version = $version; + } + + /** + * @param ?DateTimeImmutable $createdAt + */ + public function setCreatedAt(?DateTimeImmutable $createdAt): void + { + $this->createdAt = $createdAt; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + */ + public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void + { + $this->lastModifiedAt = $lastModifiedAt; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + */ + public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void + { + $this->lastModifiedBy = $lastModifiedBy; + } + + /** + * @param ?CreatedBy $createdBy + */ + public function setCreatedBy(?CreatedBy $createdBy): void + { + $this->createdBy = $createdBy; + } + + /** + * @param ?int $sequenceNumber + */ + public function setSequenceNumber(?int $sequenceNumber): void + { + $this->sequenceNumber = $sequenceNumber; + } + + /** + * @param ?Reference $resource + */ + public function setResource(?Reference $resource): void + { + $this->resource = $resource; + } + + /** + * @param ?int $resourceVersion + */ + public function setResourceVersion(?int $resourceVersion): void + { + $this->resourceVersion = $resourceVersion; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + */ + public function setResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers): void + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + } + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void + { + $this->previousTypeId = $previousTypeId; + } + + + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + $data = $this->toArray(); + if (isset($data[Message::FIELD_CREATED_AT]) && $data[Message::FIELD_CREATED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_CREATED_AT] = $data[Message::FIELD_CREATED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + + if (isset($data[Message::FIELD_LAST_MODIFIED_AT]) && $data[Message::FIELD_LAST_MODIFIED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_LAST_MODIFIED_AT] = $data[Message::FIELD_LAST_MODIFIED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + return (object) $data; + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessagePayload.php b/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessagePayload.php new file mode 100644 index 00000000000..557023fe09f --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessagePayload.php @@ -0,0 +1,31 @@ +id
of the Custom Type that has been removed.
+ * Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId(); + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void; +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessagePayloadBuilder.php new file mode 100644 index 00000000000..c6907e53602 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessagePayloadBuilder.php @@ -0,0 +1,64 @@ + + */ +final class OrderCustomTypeRemovedMessagePayloadBuilder implements Builder +{ + /** + + * @var ?string + */ + private $previousTypeId; + + /** + *id
of the Custom Type that has been removed.
Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId() + { + return $this->previousTypeId; + } + + /** + * @param ?string $previousTypeId + * @return $this + */ + public function withPreviousTypeId(?string $previousTypeId) + { + $this->previousTypeId = $previousTypeId; + + return $this; + } + + + public function build(): OrderCustomTypeRemovedMessagePayload + { + return new OrderCustomTypeRemovedMessagePayloadModel( + $this->previousTypeId + ); + } + + public static function of(): OrderCustomTypeRemovedMessagePayloadBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessagePayloadCollection.php b/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessagePayloadCollection.php new file mode 100644 index 00000000000..c19b1ba091c --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessagePayloadCollection.php @@ -0,0 +1,56 @@ + + * @method OrderCustomTypeRemovedMessagePayload current() + * @method OrderCustomTypeRemovedMessagePayload end() + * @method OrderCustomTypeRemovedMessagePayload at($offset) + */ +class OrderCustomTypeRemovedMessagePayloadCollection extends OrderMessagePayloadCollection +{ + /** + * @psalm-assert OrderCustomTypeRemovedMessagePayload $value + * @psalm-param OrderCustomTypeRemovedMessagePayload|stdClass $value + * @throws InvalidArgumentException + * + * @return OrderCustomTypeRemovedMessagePayloadCollection + */ + public function add($value) + { + if (!$value instanceof OrderCustomTypeRemovedMessagePayload) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?OrderCustomTypeRemovedMessagePayload + */ + protected function mapper() + { + return function (?int $index): ?OrderCustomTypeRemovedMessagePayload { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var OrderCustomTypeRemovedMessagePayload $data */ + $data = OrderCustomTypeRemovedMessagePayloadModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessagePayloadModel.php new file mode 100644 index 00000000000..b5c816de228 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomTypeRemovedMessagePayloadModel.php @@ -0,0 +1,94 @@ +previousTypeId = $previousTypeId; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *id
of the Custom Type that has been removed.
Absent when there has not been a Custom Type before.
+ * + * + * @return null|string + */ + public function getPreviousTypeId() + { + if (is_null($this->previousTypeId)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_PREVIOUS_TYPE_ID); + if (is_null($data)) { + return null; + } + $this->previousTypeId = (string) $data; + } + + return $this->previousTypeId; + } + + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void + { + $this->previousTypeId = $previousTypeId; + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessage.php b/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessage.php new file mode 100644 index 00000000000..717e83ab2b8 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessage.php @@ -0,0 +1,46 @@ +The Custom Fields that have been set. + * + + * @return null|CustomFields + */ + public function getCustomFields(); + + /** + *id
of the previous Custom Type.
Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId(); + + /** + * @param ?CustomFields $customFields + */ + public function setCustomFields(?CustomFields $customFields): void; + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void; +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessageBuilder.php b/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessageBuilder.php new file mode 100644 index 00000000000..ff2fa6cac3e --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessageBuilder.php @@ -0,0 +1,447 @@ + + */ +final class OrderCustomTypeSetMessageBuilder implements Builder +{ + /** + + * @var ?string + */ + private $id; + + /** + + * @var ?int + */ + private $version; + + /** + + * @var ?DateTimeImmutable + */ + private $createdAt; + + /** + + * @var ?DateTimeImmutable + */ + private $lastModifiedAt; + + /** + + * @var null|LastModifiedBy|LastModifiedByBuilder + */ + private $lastModifiedBy; + + /** + + * @var null|CreatedBy|CreatedByBuilder + */ + private $createdBy; + + /** + + * @var ?int + */ + private $sequenceNumber; + + /** + + * @var null|Reference|ReferenceBuilder + */ + private $resource; + + /** + + * @var ?int + */ + private $resourceVersion; + + /** + + * @var null|UserProvidedIdentifiers|UserProvidedIdentifiersBuilder + */ + private $resourceUserProvidedIdentifiers; + + /** + + * @var null|CustomFields|CustomFieldsBuilder + */ + private $customFields; + + /** + + * @var ?string + */ + private $previousTypeId; + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + + * @return null|string + */ + public function getId() + { + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + + * @return null|Reference + */ + public function getResource() + { + return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * + + * @return null|int + */ + public function getResourceVersion() + { + return $this->resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
The Custom Fields that have been set.
+ * + + * @return null|CustomFields + */ + public function getCustomFields() + { + return $this->customFields instanceof CustomFieldsBuilder ? $this->customFields->build() : $this->customFields; + } + + /** + *id
of the previous Custom Type.
Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId() + { + return $this->previousTypeId; + } + + /** + * @param ?string $id + * @return $this + */ + public function withId(?string $id) + { + $this->id = $id; + + return $this; + } + + /** + * @param ?int $version + * @return $this + */ + public function withVersion(?int $version) + { + $this->version = $version; + + return $this; + } + + /** + * @param ?DateTimeImmutable $createdAt + * @return $this + */ + public function withCreatedAt(?DateTimeImmutable $createdAt) + { + $this->createdAt = $createdAt; + + return $this; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + * @return $this + */ + public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt) + { + $this->lastModifiedAt = $lastModifiedAt; + + return $this; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + * @return $this + */ + public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @param ?CreatedBy $createdBy + * @return $this + */ + public function withCreatedBy(?CreatedBy $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @param ?int $sequenceNumber + * @return $this + */ + public function withSequenceNumber(?int $sequenceNumber) + { + $this->sequenceNumber = $sequenceNumber; + + return $this; + } + + /** + * @param ?Reference $resource + * @return $this + */ + public function withResource(?Reference $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @param ?int $resourceVersion + * @return $this + */ + public function withResourceVersion(?int $resourceVersion) + { + $this->resourceVersion = $resourceVersion; + + return $this; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + * @return $this + */ + public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + /** + * @param ?CustomFields $customFields + * @return $this + */ + public function withCustomFields(?CustomFields $customFields) + { + $this->customFields = $customFields; + + return $this; + } + + /** + * @param ?string $previousTypeId + * @return $this + */ + public function withPreviousTypeId(?string $previousTypeId) + { + $this->previousTypeId = $previousTypeId; + + return $this; + } + + /** + * @deprecated use withLastModifiedBy() instead + * @return $this + */ + public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @deprecated use withCreatedBy() instead + * @return $this + */ + public function withCreatedByBuilder(?CreatedByBuilder $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @deprecated use withResource() instead + * @return $this + */ + public function withResourceBuilder(?ReferenceBuilder $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @deprecated use withResourceUserProvidedIdentifiers() instead + * @return $this + */ + public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + /** + * @deprecated use withCustomFields() instead + * @return $this + */ + public function withCustomFieldsBuilder(?CustomFieldsBuilder $customFields) + { + $this->customFields = $customFields; + + return $this; + } + + public function build(): OrderCustomTypeSetMessage + { + return new OrderCustomTypeSetMessageModel( + $this->id, + $this->version, + $this->createdAt, + $this->lastModifiedAt, + $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, + $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy, + $this->sequenceNumber, + $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource, + $this->resourceVersion, + $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, + $this->customFields instanceof CustomFieldsBuilder ? $this->customFields->build() : $this->customFields, + $this->previousTypeId + ); + } + + public static function of(): OrderCustomTypeSetMessageBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessageCollection.php b/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessageCollection.php new file mode 100644 index 00000000000..97237125fc0 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessageCollection.php @@ -0,0 +1,56 @@ + + * @method OrderCustomTypeSetMessage current() + * @method OrderCustomTypeSetMessage end() + * @method OrderCustomTypeSetMessage at($offset) + */ +class OrderCustomTypeSetMessageCollection extends OrderMessageCollection +{ + /** + * @psalm-assert OrderCustomTypeSetMessage $value + * @psalm-param OrderCustomTypeSetMessage|stdClass $value + * @throws InvalidArgumentException + * + * @return OrderCustomTypeSetMessageCollection + */ + public function add($value) + { + if (!$value instanceof OrderCustomTypeSetMessage) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?OrderCustomTypeSetMessage + */ + protected function mapper() + { + return function (?int $index): ?OrderCustomTypeSetMessage { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var OrderCustomTypeSetMessage $data */ + $data = OrderCustomTypeSetMessageModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessageModel.php b/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessageModel.php new file mode 100644 index 00000000000..7dbdb8191f6 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessageModel.php @@ -0,0 +1,530 @@ +id = $id; + $this->version = $version; + $this->createdAt = $createdAt; + $this->lastModifiedAt = $lastModifiedAt; + $this->lastModifiedBy = $lastModifiedBy; + $this->createdBy = $createdBy; + $this->sequenceNumber = $sequenceNumber; + $this->resource = $resource; + $this->resourceVersion = $resourceVersion; + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + $this->customFields = $customFields; + $this->previousTypeId = $previousTypeId; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + * + * @return null|string + */ + public function getId() + { + if (is_null($this->id)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ID); + if (is_null($data)) { + return null; + } + $this->id = (string) $data; + } + + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + * + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + if (is_null($this->createdAt)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CREATED_AT); + if (is_null($data)) { + return null; + } + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->createdAt = $data; + } + + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayMessage number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + * + * @return null|Reference + */ + public function getResource() + { + if (is_null($this->resource)) { + /** @psalm-var stdClass|arrayVersion of the resource on which the change or action was performed.
+ * + * + * @return null|int + */ + public function getResourceVersion() + { + if (is_null($this->resourceVersion)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_RESOURCE_VERSION); + if (is_null($data)) { + return null; + } + $this->resourceVersion = (int) $data; + } + + return $this->resourceVersion; + } + + /** + *Message Type of the Message.
+ * + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
The Custom Fields that have been set.
+ * + * + * @return null|CustomFields + */ + public function getCustomFields() + { + if (is_null($this->customFields)) { + /** @psalm-var stdClass|arrayid
of the previous Custom Type.
Absent when there has not been a Custom Type before.
+ * + * + * @return null|string + */ + public function getPreviousTypeId() + { + if (is_null($this->previousTypeId)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_PREVIOUS_TYPE_ID); + if (is_null($data)) { + return null; + } + $this->previousTypeId = (string) $data; + } + + return $this->previousTypeId; + } + + + /** + * @param ?string $id + */ + public function setId(?string $id): void + { + $this->id = $id; + } + + /** + * @param ?int $version + */ + public function setVersion(?int $version): void + { + $this->version = $version; + } + + /** + * @param ?DateTimeImmutable $createdAt + */ + public function setCreatedAt(?DateTimeImmutable $createdAt): void + { + $this->createdAt = $createdAt; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + */ + public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void + { + $this->lastModifiedAt = $lastModifiedAt; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + */ + public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void + { + $this->lastModifiedBy = $lastModifiedBy; + } + + /** + * @param ?CreatedBy $createdBy + */ + public function setCreatedBy(?CreatedBy $createdBy): void + { + $this->createdBy = $createdBy; + } + + /** + * @param ?int $sequenceNumber + */ + public function setSequenceNumber(?int $sequenceNumber): void + { + $this->sequenceNumber = $sequenceNumber; + } + + /** + * @param ?Reference $resource + */ + public function setResource(?Reference $resource): void + { + $this->resource = $resource; + } + + /** + * @param ?int $resourceVersion + */ + public function setResourceVersion(?int $resourceVersion): void + { + $this->resourceVersion = $resourceVersion; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + */ + public function setResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers): void + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + } + + /** + * @param ?CustomFields $customFields + */ + public function setCustomFields(?CustomFields $customFields): void + { + $this->customFields = $customFields; + } + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void + { + $this->previousTypeId = $previousTypeId; + } + + + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + $data = $this->toArray(); + if (isset($data[Message::FIELD_CREATED_AT]) && $data[Message::FIELD_CREATED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_CREATED_AT] = $data[Message::FIELD_CREATED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + + if (isset($data[Message::FIELD_LAST_MODIFIED_AT]) && $data[Message::FIELD_LAST_MODIFIED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_LAST_MODIFIED_AT] = $data[Message::FIELD_LAST_MODIFIED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + return (object) $data; + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessagePayload.php b/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessagePayload.php new file mode 100644 index 00000000000..6e617674ec4 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessagePayload.php @@ -0,0 +1,46 @@ +The Custom Fields that have been set. + * + + * @return null|CustomFields + */ + public function getCustomFields(); + + /** + *id
of the previous Custom Type.
Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId(); + + /** + * @param ?CustomFields $customFields + */ + public function setCustomFields(?CustomFields $customFields): void; + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void; +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessagePayloadBuilder.php new file mode 100644 index 00000000000..c7a3481a076 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessagePayloadBuilder.php @@ -0,0 +1,105 @@ + + */ +final class OrderCustomTypeSetMessagePayloadBuilder implements Builder +{ + /** + + * @var null|CustomFields|CustomFieldsBuilder + */ + private $customFields; + + /** + + * @var ?string + */ + private $previousTypeId; + + /** + *The Custom Fields that have been set.
+ * + + * @return null|CustomFields + */ + public function getCustomFields() + { + return $this->customFields instanceof CustomFieldsBuilder ? $this->customFields->build() : $this->customFields; + } + + /** + *id
of the previous Custom Type.
Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId() + { + return $this->previousTypeId; + } + + /** + * @param ?CustomFields $customFields + * @return $this + */ + public function withCustomFields(?CustomFields $customFields) + { + $this->customFields = $customFields; + + return $this; + } + + /** + * @param ?string $previousTypeId + * @return $this + */ + public function withPreviousTypeId(?string $previousTypeId) + { + $this->previousTypeId = $previousTypeId; + + return $this; + } + + /** + * @deprecated use withCustomFields() instead + * @return $this + */ + public function withCustomFieldsBuilder(?CustomFieldsBuilder $customFields) + { + $this->customFields = $customFields; + + return $this; + } + + public function build(): OrderCustomTypeSetMessagePayload + { + return new OrderCustomTypeSetMessagePayloadModel( + $this->customFields instanceof CustomFieldsBuilder ? $this->customFields->build() : $this->customFields, + $this->previousTypeId + ); + } + + public static function of(): OrderCustomTypeSetMessagePayloadBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessagePayloadCollection.php b/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessagePayloadCollection.php new file mode 100644 index 00000000000..8a4a422fa69 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessagePayloadCollection.php @@ -0,0 +1,56 @@ + + * @method OrderCustomTypeSetMessagePayload current() + * @method OrderCustomTypeSetMessagePayload end() + * @method OrderCustomTypeSetMessagePayload at($offset) + */ +class OrderCustomTypeSetMessagePayloadCollection extends OrderMessagePayloadCollection +{ + /** + * @psalm-assert OrderCustomTypeSetMessagePayload $value + * @psalm-param OrderCustomTypeSetMessagePayload|stdClass $value + * @throws InvalidArgumentException + * + * @return OrderCustomTypeSetMessagePayloadCollection + */ + public function add($value) + { + if (!$value instanceof OrderCustomTypeSetMessagePayload) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?OrderCustomTypeSetMessagePayload + */ + protected function mapper() + { + return function (?int $index): ?OrderCustomTypeSetMessagePayload { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var OrderCustomTypeSetMessagePayload $data */ + $data = OrderCustomTypeSetMessagePayloadModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessagePayloadModel.php new file mode 100644 index 00000000000..724a8708766 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/OrderCustomTypeSetMessagePayloadModel.php @@ -0,0 +1,133 @@ +customFields = $customFields; + $this->previousTypeId = $previousTypeId; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *The Custom Fields that have been set.
+ * + * + * @return null|CustomFields + */ + public function getCustomFields() + { + if (is_null($this->customFields)) { + /** @psalm-var stdClass|arrayid
of the previous Custom Type.
Absent when there has not been a Custom Type before.
+ * + * + * @return null|string + */ + public function getPreviousTypeId() + { + if (is_null($this->previousTypeId)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_PREVIOUS_TYPE_ID); + if (is_null($data)) { + return null; + } + $this->previousTypeId = (string) $data; + } + + return $this->previousTypeId; + } + + + /** + * @param ?CustomFields $customFields + */ + public function setCustomFields(?CustomFields $customFields): void + { + $this->customFields = $customFields; + } + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void + { + $this->previousTypeId = $previousTypeId; + } +} diff --git a/references.txt b/references.txt index 2d3b73a3514..cbca7a7e7a9 100644 --- a/references.txt +++ b/references.txt @@ -94,3 +94,4 @@ b47352c3ed66fd9ad8e6b14402217fec39941d06 c497e6c324870e2e3d2c39d1196a329b71f3752e 661857d6a78af850d990d9408d4193192c169afb 4d5cb623c03b9be3d9ad491c2918ba03343f8323 +25f0dfe7f3d3887530495d18f88a04eaa5d8d1c8 From 76a5d77f3fb72d1fc98f28bd58a0a015d8a6c075 Mon Sep 17 00:00:00 2001 From: Auto MationDeprecated type. Use associateRoleAssignment
instead.
Deprecated type. Use associateRoleAssignment
instead.
Deprecated type. Use associateRoleAssignment
instead.
Deprecated type. Use associateRoleAssignment
instead.
Deprecated type. Use associateRoleAssignment
instead.
Deprecated type. Use associateRoleAssignment
instead.
The name of the ProductSelection which is recommended to be unique.
- * - - * @return null|LocalizedString - */ - public function getName() - { - return $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name; - } - - /** - * @param ?LocalizedString $name - * @return $this - */ - public function withName(?LocalizedString $name) - { - $this->name = $name; - - return $this; - } - - /** - * @deprecated use withName() instead - * @return $this - */ - public function withNameBuilder(?LocalizedStringBuilder $name) - { - $this->name = $name; - - return $this; - } - - public function build(): IndividualExclusionProductSelectionType - { - return new IndividualExclusionProductSelectionTypeModel( - $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name - ); - } - - public static function of(): IndividualExclusionProductSelectionTypeBuilder - { - return new self(); - } -} diff --git a/lib/commercetools-api/src/Models/ProductSelection/IndividualExclusionProductSelectionTypeCollection.php b/lib/commercetools-api/src/Models/ProductSelection/IndividualExclusionProductSelectionTypeCollection.php deleted file mode 100644 index 287eab51881..00000000000 --- a/lib/commercetools-api/src/Models/ProductSelection/IndividualExclusionProductSelectionTypeCollection.php +++ /dev/null @@ -1,56 +0,0 @@ - - * @method IndividualExclusionProductSelectionType current() - * @method IndividualExclusionProductSelectionType end() - * @method IndividualExclusionProductSelectionType at($offset) - */ -class IndividualExclusionProductSelectionTypeCollection extends ProductSelectionTypeCollection -{ - /** - * @psalm-assert IndividualExclusionProductSelectionType $value - * @psalm-param IndividualExclusionProductSelectionType|stdClass $value - * @throws InvalidArgumentException - * - * @return IndividualExclusionProductSelectionTypeCollection - */ - public function add($value) - { - if (!$value instanceof IndividualExclusionProductSelectionType) { - throw new InvalidArgumentException(); - } - $this->store($value); - - return $this; - } - - /** - * @psalm-return callable(int):?IndividualExclusionProductSelectionType - */ - protected function mapper() - { - return function (?int $index): ?IndividualExclusionProductSelectionType { - $data = $this->get($index); - if ($data instanceof stdClass) { - /** @var IndividualExclusionProductSelectionType $data */ - $data = IndividualExclusionProductSelectionTypeModel::of($data); - $this->set($data, $index); - } - - return $data; - }; - } -} diff --git a/lib/commercetools-api/src/Models/ProductSelection/IndividualExclusionProductSelectionTypeModel.php b/lib/commercetools-api/src/Models/ProductSelection/IndividualExclusionProductSelectionTypeModel.php deleted file mode 100644 index 0841dbb1417..00000000000 --- a/lib/commercetools-api/src/Models/ProductSelection/IndividualExclusionProductSelectionTypeModel.php +++ /dev/null @@ -1,98 +0,0 @@ -name = $name; - $this->type = $type ?? self::DISCRIMINATOR_VALUE; - } - - /** - *The following types of Product Selections are supported:
- * - * @deprecated - * @return null|string - */ - public function getType() - { - if (is_null($this->type)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_TYPE); - if (is_null($data)) { - return null; - } - $this->type = (string) $data; - } - - return $this->type; - } - - /** - *The name of the ProductSelection which is recommended to be unique.
- * - * - * @return null|LocalizedString - */ - public function getName() - { - if (is_null($this->name)) { - /** @psalm-var stdClass|arrayThe name of the ProductSelection which is recommended to be unique.
- * - - * @return null|LocalizedString - */ - public function getName() - { - return $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name; - } - - /** - * @param ?LocalizedString $name - * @return $this - */ - public function withName(?LocalizedString $name) - { - $this->name = $name; - - return $this; - } - - /** - * @deprecated use withName() instead - * @return $this - */ - public function withNameBuilder(?LocalizedStringBuilder $name) - { - $this->name = $name; - - return $this; - } - - public function build(): IndividualProductSelectionType - { - return new IndividualProductSelectionTypeModel( - $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name - ); - } - - public static function of(): IndividualProductSelectionTypeBuilder - { - return new self(); - } -} diff --git a/lib/commercetools-api/src/Models/ProductSelection/IndividualProductSelectionTypeCollection.php b/lib/commercetools-api/src/Models/ProductSelection/IndividualProductSelectionTypeCollection.php deleted file mode 100644 index 17985f3113a..00000000000 --- a/lib/commercetools-api/src/Models/ProductSelection/IndividualProductSelectionTypeCollection.php +++ /dev/null @@ -1,56 +0,0 @@ - - * @method IndividualProductSelectionType current() - * @method IndividualProductSelectionType end() - * @method IndividualProductSelectionType at($offset) - */ -class IndividualProductSelectionTypeCollection extends ProductSelectionTypeCollection -{ - /** - * @psalm-assert IndividualProductSelectionType $value - * @psalm-param IndividualProductSelectionType|stdClass $value - * @throws InvalidArgumentException - * - * @return IndividualProductSelectionTypeCollection - */ - public function add($value) - { - if (!$value instanceof IndividualProductSelectionType) { - throw new InvalidArgumentException(); - } - $this->store($value); - - return $this; - } - - /** - * @psalm-return callable(int):?IndividualProductSelectionType - */ - protected function mapper() - { - return function (?int $index): ?IndividualProductSelectionType { - $data = $this->get($index); - if ($data instanceof stdClass) { - /** @var IndividualProductSelectionType $data */ - $data = IndividualProductSelectionTypeModel::of($data); - $this->set($data, $index); - } - - return $data; - }; - } -} diff --git a/lib/commercetools-api/src/Models/ProductSelection/IndividualProductSelectionTypeModel.php b/lib/commercetools-api/src/Models/ProductSelection/IndividualProductSelectionTypeModel.php deleted file mode 100644 index f179163d201..00000000000 --- a/lib/commercetools-api/src/Models/ProductSelection/IndividualProductSelectionTypeModel.php +++ /dev/null @@ -1,98 +0,0 @@ -name = $name; - $this->type = $type ?? self::DISCRIMINATOR_VALUE; - } - - /** - *The following types of Product Selections are supported:
- * - * @deprecated - * @return null|string - */ - public function getType() - { - if (is_null($this->type)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_TYPE); - if (is_null($data)) { - return null; - } - $this->type = (string) $data; - } - - return $this->type; - } - - /** - *The name of the ProductSelection which is recommended to be unique.
- * - * - * @return null|LocalizedString - */ - public function getName() - { - if (is_null($this->name)) { - /** @psalm-var stdClass|arraySpecifies in which way the Products are assigned to the ProductSelection. * Currently, the only way of doing this is to specify each Product individually, either by including or excluding them explicitly.
* - * @deprecated + * @return null|string */ public function getType(); diff --git a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionBuilder.php b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionBuilder.php index f4cfe5e339f..d3a62bea90c 100644 --- a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionBuilder.php +++ b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionBuilder.php @@ -86,7 +86,7 @@ final class ProductSelectionBuilder implements Builder private $productCount; /** - * @deprecated + * @var ?string */ private $type; @@ -206,7 +206,7 @@ public function getProductCount() *Specifies in which way the Products are assigned to the ProductSelection. * Currently, the only way of doing this is to specify each Product individually, either by including or excluding them explicitly.
* - * @deprecated + * @return null|string */ public function getType() diff --git a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraft.php b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraft.php index 4467dc23a3e..1def18f156f 100644 --- a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraft.php +++ b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraft.php @@ -48,7 +48,7 @@ public function getCustom(); /** *Type of the Product Selection.
* - * @deprecated + * @return null|string */ public function getType(); diff --git a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraftBuilder.php b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraftBuilder.php index 13de72d5262..ca4c0070f35 100644 --- a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraftBuilder.php +++ b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraftBuilder.php @@ -43,7 +43,7 @@ final class ProductSelectionDraftBuilder implements Builder private $custom; /** - * @deprecated + * @var ?string */ private $type; @@ -90,7 +90,7 @@ public function getCustom() /** *Type of the Product Selection.
* - * @deprecated + * @return null|string */ public function getType() diff --git a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraftModel.php b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraftModel.php index 84c34337482..19edcd085ef 100644 --- a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraftModel.php +++ b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraftModel.php @@ -42,7 +42,7 @@ final class ProductSelectionDraftModel extends JsonObjectModel implements Produc protected $custom; /** - * @deprecated + * * @var ?string */ protected $type; @@ -136,7 +136,7 @@ public function getCustom() /** *Type of the Product Selection.
* - * @deprecated + * * @return null|string */ public function getType() diff --git a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionModel.php b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionModel.php index de29b94d45a..c2a34257802 100644 --- a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionModel.php +++ b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionModel.php @@ -85,7 +85,7 @@ final class ProductSelectionModel extends JsonObjectModel implements ProductSele protected $productCount; /** - * @deprecated + * * @var ?string */ protected $type; @@ -329,7 +329,7 @@ public function getProductCount() *Specifies in which way the Products are assigned to the ProductSelection. * Currently, the only way of doing this is to specify each Product individually, either by including or excluding them explicitly.
* - * @deprecated + * * @return null|string */ public function getType() diff --git a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionType.php b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionType.php index 9f80a0361a3..0c275fac2ce 100644 --- a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionType.php +++ b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionType.php @@ -19,7 +19,7 @@ interface ProductSelectionType extends JsonObject /** *The following types of Product Selections are supported:
* - * @deprecated + * @return null|string */ public function getType(); diff --git a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionTypeModel.php b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionTypeModel.php index 9bbb38625e7..bc6ded06ac5 100644 --- a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionTypeModel.php +++ b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionTypeModel.php @@ -21,7 +21,7 @@ final class ProductSelectionTypeModel extends JsonObjectModel implements Product { public const DISCRIMINATOR_VALUE = ''; /** - * @deprecated + * * @var ?string */ protected $type; @@ -31,8 +31,6 @@ final class ProductSelectionTypeModel extends JsonObjectModel implements Product * */ private static $discriminatorClasses = [ - 'individual' => IndividualProductSelectionTypeModel::class, - 'individualExclusion' => IndividualExclusionProductSelectionTypeModel::class, ]; /** @@ -47,7 +45,7 @@ public function __construct( /** *The following types of Product Selections are supported:
* - * @deprecated + * * @return null|string */ public function getType() diff --git a/references.txt b/references.txt index 37b04c2191b..b7ceed277cc 100644 --- a/references.txt +++ b/references.txt @@ -97,3 +97,4 @@ c497e6c324870e2e3d2c39d1196a329b71f3752e 25f0dfe7f3d3887530495d18f88a04eaa5d8d1c8 4b5adb8760c0f8e20541b4c7da8445f89bed5bb4 3a530eba3854922a79388a1400f06b18b48f12f7 +859aa057d141373a076b2d8468114db7d99f20c4 From d2772f1ff00b090901c733621540a166e48bcc66 Mon Sep 17 00:00:00 2001 From: Auto Mationid
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the ShippingMethod used for this Custom Line Item.
+ * This is required for Carts with Multiple
ShippingMode.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the ShippingMethod used for this Custom Line Item.
+ * This is required for Carts with Multiple
ShippingMode.
key
of the ShippingMethod used for this Custom Line Item.
+ * This is required for Carts with Multiple
ShippingMode.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the ShippingMethod used for this Custom Line Item.
+ * This is required for Carts with Multiple
ShippingMode.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the ShippingMethod used for this Custom Line Item.
+ * This is required for Carts with Multiple
ShippingMode.
key
of the ShippingMethod used for this Custom Line Item.
+ * This is required for Carts with Multiple
ShippingMode.
Taxed price of the Shipping Method that is automatically set after perMethodTaxRate
is set.
Total price of the Custom Line Item (money
multiplied by quantity
).
* If the Custom Line Item is discounted, the total price is discountedPricePerQuantity
multiplied by quantity
.
Taxed price of the Shipping Method that is automatically set after perMethodTaxRate
is set.
Total price of the Custom Line Item (money
multiplied by quantity
).
* If the Custom Line Item is discounted, the total price is discountedPricePerQuantity
multiplied by quantity
.
Taxed price of the Shipping Method that is automatically set after perMethodTaxRate
is set.
Total price of the Custom Line Item (money
multiplied by quantity
).
* If the Custom Line Item is discounted, the total price is discountedPricePerQuantity
multiplied by quantity
.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the ShippingMethod used for this Custom Line Item.
+ * This is required for Carts with Multiple
ShippingMode.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the ShippingMethod used for this Custom Line Item.
+ * This is required for Carts with Multiple
ShippingMode.
key
of the ShippingMethod used for this Custom Line Item.
+ * This is required for Carts with Multiple
ShippingMode.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the ShippingMethod used for this Custom Line Item.
+ * This is required for Carts with Multiple
ShippingMode.
id
of the CustomLineItem to update. Either customLineItemId
or customLineItemKey
is required.
key
of the ShippingMethod used for this Custom Line Item.
+ * This is required for Carts with Multiple
ShippingMode.
key
of the ShippingMethod used for this Custom Line Item.
+ * This is required for Carts with Multiple
ShippingMode.
Deprecated type. Use associateRoleAssignment
instead.
The Customer that acts as an Associate in the Business Unit.
* @@ -47,11 +38,6 @@ public function getCustomer(); */ public function setAssociateRoleAssignments(?AssociateRoleAssignmentCollection $associateRoleAssignments): void; - /** - * @param ?array $roles - */ - public function setRoles(?array $roles): void; - /** * @param ?CustomerReference $customer */ diff --git a/lib/commercetools-api/src/Models/BusinessUnit/AssociateBuilder.php b/lib/commercetools-api/src/Models/BusinessUnit/AssociateBuilder.php index 57830987d4f..96e09adb6e3 100644 --- a/lib/commercetools-api/src/Models/BusinessUnit/AssociateBuilder.php +++ b/lib/commercetools-api/src/Models/BusinessUnit/AssociateBuilder.php @@ -28,12 +28,6 @@ final class AssociateBuilder implements Builder */ private $associateRoleAssignments; - /** - - * @var ?array - */ - private $roles; - /** * @var null|CustomerReference|CustomerReferenceBuilder @@ -51,17 +45,6 @@ public function getAssociateRoleAssignments() return $this->associateRoleAssignments; } - /** - *Deprecated type. Use associateRoleAssignment
instead.
The Customer that acts as an Associate in the Business Unit.
* @@ -84,17 +67,6 @@ public function withAssociateRoleAssignments(?AssociateRoleAssignmentCollection return $this; } - /** - * @param ?array $roles - * @return $this - */ - public function withRoles(?array $roles) - { - $this->roles = $roles; - - return $this; - } - /** * @param ?CustomerReference $customer * @return $this @@ -121,7 +93,6 @@ public function build(): Associate { return new AssociateModel( $this->associateRoleAssignments, - $this->roles, $this->customer instanceof CustomerReferenceBuilder ? $this->customer->build() : $this->customer ); } diff --git a/lib/commercetools-api/src/Models/BusinessUnit/AssociateDraft.php b/lib/commercetools-api/src/Models/BusinessUnit/AssociateDraft.php index 5290ddda1de..0d2a462e4bb 100644 --- a/lib/commercetools-api/src/Models/BusinessUnit/AssociateDraft.php +++ b/lib/commercetools-api/src/Models/BusinessUnit/AssociateDraft.php @@ -15,7 +15,6 @@ interface AssociateDraft extends JsonObject { public const FIELD_ASSOCIATE_ROLE_ASSIGNMENTS = 'associateRoleAssignments'; - public const FIELD_ROLES = 'roles'; public const FIELD_CUSTOMER = 'customer'; /** @@ -26,14 +25,6 @@ interface AssociateDraft extends JsonObject */ public function getAssociateRoleAssignments(); - /** - *Deprecated type. Use associateRoleAssignment
instead.
The Customer to be part of the Business Unit.
* @@ -47,11 +38,6 @@ public function getCustomer(); */ public function setAssociateRoleAssignments(?AssociateRoleAssignmentDraftCollection $associateRoleAssignments): void; - /** - * @param ?array $roles - */ - public function setRoles(?array $roles): void; - /** * @param ?CustomerResourceIdentifier $customer */ diff --git a/lib/commercetools-api/src/Models/BusinessUnit/AssociateDraftBuilder.php b/lib/commercetools-api/src/Models/BusinessUnit/AssociateDraftBuilder.php index 92ee24bf70b..59a39c0bcfe 100644 --- a/lib/commercetools-api/src/Models/BusinessUnit/AssociateDraftBuilder.php +++ b/lib/commercetools-api/src/Models/BusinessUnit/AssociateDraftBuilder.php @@ -28,12 +28,6 @@ final class AssociateDraftBuilder implements Builder */ private $associateRoleAssignments; - /** - - * @var ?array - */ - private $roles; - /** * @var null|CustomerResourceIdentifier|CustomerResourceIdentifierBuilder @@ -51,17 +45,6 @@ public function getAssociateRoleAssignments() return $this->associateRoleAssignments; } - /** - *Deprecated type. Use associateRoleAssignment
instead.
The Customer to be part of the Business Unit.
* @@ -84,17 +67,6 @@ public function withAssociateRoleAssignments(?AssociateRoleAssignmentDraftCollec return $this; } - /** - * @param ?array $roles - * @return $this - */ - public function withRoles(?array $roles) - { - $this->roles = $roles; - - return $this; - } - /** * @param ?CustomerResourceIdentifier $customer * @return $this @@ -121,7 +93,6 @@ public function build(): AssociateDraft { return new AssociateDraftModel( $this->associateRoleAssignments, - $this->roles, $this->customer instanceof CustomerResourceIdentifierBuilder ? $this->customer->build() : $this->customer ); } diff --git a/lib/commercetools-api/src/Models/BusinessUnit/AssociateDraftModel.php b/lib/commercetools-api/src/Models/BusinessUnit/AssociateDraftModel.php index 4c70cd7a2ed..edc468ede04 100644 --- a/lib/commercetools-api/src/Models/BusinessUnit/AssociateDraftModel.php +++ b/lib/commercetools-api/src/Models/BusinessUnit/AssociateDraftModel.php @@ -27,12 +27,6 @@ final class AssociateDraftModel extends JsonObjectModel implements AssociateDraf */ protected $associateRoleAssignments; - /** - * - * @var ?array - */ - protected $roles; - /** * * @var ?CustomerResourceIdentifier @@ -45,11 +39,9 @@ final class AssociateDraftModel extends JsonObjectModel implements AssociateDraf */ public function __construct( ?AssociateRoleAssignmentDraftCollection $associateRoleAssignments = null, - ?array $roles = null, ?CustomerResourceIdentifier $customer = null ) { $this->associateRoleAssignments = $associateRoleAssignments; - $this->roles = $roles; $this->customer = $customer; } @@ -73,26 +65,6 @@ public function getAssociateRoleAssignments() return $this->associateRoleAssignments; } - /** - *Deprecated type. Use associateRoleAssignment
instead.
The Customer to be part of the Business Unit.
* @@ -123,14 +95,6 @@ public function setAssociateRoleAssignments(?AssociateRoleAssignmentDraftCollect $this->associateRoleAssignments = $associateRoleAssignments; } - /** - * @param ?array $roles - */ - public function setRoles(?array $roles): void - { - $this->roles = $roles; - } - /** * @param ?CustomerResourceIdentifier $customer */ diff --git a/lib/commercetools-api/src/Models/BusinessUnit/AssociateModel.php b/lib/commercetools-api/src/Models/BusinessUnit/AssociateModel.php index c28f9abb33c..6c82c59cdbc 100644 --- a/lib/commercetools-api/src/Models/BusinessUnit/AssociateModel.php +++ b/lib/commercetools-api/src/Models/BusinessUnit/AssociateModel.php @@ -27,12 +27,6 @@ final class AssociateModel extends JsonObjectModel implements Associate */ protected $associateRoleAssignments; - /** - * - * @var ?array - */ - protected $roles; - /** * * @var ?CustomerReference @@ -45,11 +39,9 @@ final class AssociateModel extends JsonObjectModel implements Associate */ public function __construct( ?AssociateRoleAssignmentCollection $associateRoleAssignments = null, - ?array $roles = null, ?CustomerReference $customer = null ) { $this->associateRoleAssignments = $associateRoleAssignments; - $this->roles = $roles; $this->customer = $customer; } @@ -73,26 +65,6 @@ public function getAssociateRoleAssignments() return $this->associateRoleAssignments; } - /** - *Deprecated type. Use associateRoleAssignment
instead.
The Customer that acts as an Associate in the Business Unit.
* @@ -123,14 +95,6 @@ public function setAssociateRoleAssignments(?AssociateRoleAssignmentCollection $ $this->associateRoleAssignments = $associateRoleAssignments; } - /** - * @param ?array $roles - */ - public function setRoles(?array $roles): void - { - $this->roles = $roles; - } - /** * @param ?CustomerReference $customer */ diff --git a/lib/commercetools-api/src/Models/Cart/LineItemDraft.php b/lib/commercetools-api/src/Models/Cart/LineItemDraft.php index 240894fe142..79a6a8563be 100644 --- a/lib/commercetools-api/src/Models/Cart/LineItemDraft.php +++ b/lib/commercetools-api/src/Models/Cart/LineItemDraft.php @@ -28,6 +28,7 @@ interface LineItemDraft extends JsonObject public const FIELD_EXTERNAL_PRICE = 'externalPrice'; public const FIELD_EXTERNAL_TOTAL_PRICE = 'externalTotalPrice'; public const FIELD_EXTERNAL_TAX_RATE = 'externalTaxRate'; + public const FIELD_PER_METHOD_EXTERNAL_TAX_RATE = 'perMethodExternalTaxRate'; public const FIELD_INVENTORY_MODE = 'inventoryMode'; public const FIELD_SHIPPING_DETAILS = 'shippingDetails'; public const FIELD_CUSTOM = 'custom'; @@ -120,13 +121,21 @@ public function getExternalPrice(); public function getExternalTotalPrice(); /** - *External Tax Rate for the Line Item if the Cart has the External
TaxMode.
Sets the external Tax Rate for the Line Item, if the Cart has the External
TaxMode.
Sets the external Tax Rates for individual Shipping Methods, if the Cart has the External
TaxMode and Multiple
ShippingMode.
Inventory mode specific to the Line Item only, and valid for the entire quantity
of the Line Item.
* Set only if the inventory mode should be different from the inventoryMode
specified on the Cart.
External Tax Rate for the Line Item if the Cart has the External
TaxMode.
Sets the external Tax Rate for the Line Item, if the Cart has the External
TaxMode.
Sets the external Tax Rates for individual Shipping Methods, if the Cart has the External
TaxMode and Multiple
ShippingMode.
Inventory mode specific to the Line Item only, and valid for the entire quantity
of the Line Item.
* Set only if the inventory mode should be different from the inventoryMode
specified on the Cart.
External Tax Rate for the Line Item if the Cart has the External
TaxMode.
Sets the external Tax Rate for the Line Item, if the Cart has the External
TaxMode.
Sets the external Tax Rates for individual Shipping Methods, if the Cart has the External
TaxMode and Multiple
ShippingMode.
Inventory mode specific to the Line Item only, and valid for the entire quantity
of the Line Item.
* Set only if the inventory mode should be different from the inventoryMode
specified on the Cart.
Multiple
ShippingMode.
+ *
+
+ * @return null|string
+ */
+ public function getShippingMethodKey();
+
+ /**
+ * External Tax Rate for the Shipping Method, if the Cart has External
TaxMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
External Tax Rate for the Shipping Method, if the Cart has External
TaxMode.
User-defined unique identifier of the Shipping Method in a Cart with Multiple
ShippingMode.
External Tax Rate for the Shipping Method, if the Cart has External
TaxMode.
User-defined unique identifier of the Asset.
+ *User-defined identifier of the Asset. It is unique per Category or ProductVariant.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/Common/AssetBuilder.php b/lib/commercetools-api/src/Models/Common/AssetBuilder.php index ed57074d5c5..9b152b3f96d 100644 --- a/lib/commercetools-api/src/Models/Common/AssetBuilder.php +++ b/lib/commercetools-api/src/Models/Common/AssetBuilder.php @@ -129,7 +129,7 @@ public function getCustom() } /** - *User-defined unique identifier of the Asset.
+ *User-defined identifier of the Asset. It is unique per Category or ProductVariant.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/Common/AssetDraft.php b/lib/commercetools-api/src/Models/Common/AssetDraft.php index e9cbdc9cbb2..b929aad9c75 100644 --- a/lib/commercetools-api/src/Models/Common/AssetDraft.php +++ b/lib/commercetools-api/src/Models/Common/AssetDraft.php @@ -60,7 +60,7 @@ public function getTags(); public function getCustom(); /** - *User-defined unique identifier for the Asset.
+ *User-defined identifier for the Asset. Must be unique per Category or ProductVariant.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/Common/AssetDraftBuilder.php b/lib/commercetools-api/src/Models/Common/AssetDraftBuilder.php index 4c8d8799ae9..ea986b68b14 100644 --- a/lib/commercetools-api/src/Models/Common/AssetDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Common/AssetDraftBuilder.php @@ -112,7 +112,7 @@ public function getCustom() } /** - *User-defined unique identifier for the Asset.
+ *User-defined identifier for the Asset. Must be unique per Category or ProductVariant.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/Common/AssetDraftModel.php b/lib/commercetools-api/src/Models/Common/AssetDraftModel.php index e61e9242b45..19dce9165c3 100644 --- a/lib/commercetools-api/src/Models/Common/AssetDraftModel.php +++ b/lib/commercetools-api/src/Models/Common/AssetDraftModel.php @@ -179,7 +179,7 @@ public function getCustom() } /** - *User-defined unique identifier for the Asset.
+ *User-defined identifier for the Asset. Must be unique per Category or ProductVariant.
* * * @return null|string diff --git a/lib/commercetools-api/src/Models/Common/AssetModel.php b/lib/commercetools-api/src/Models/Common/AssetModel.php index 0b4e8d9ee28..f4e55b68a49 100644 --- a/lib/commercetools-api/src/Models/Common/AssetModel.php +++ b/lib/commercetools-api/src/Models/Common/AssetModel.php @@ -207,7 +207,7 @@ public function getCustom() } /** - *User-defined unique identifier of the Asset.
+ *User-defined identifier of the Asset. It is unique per Category or ProductVariant.
* * * @return null|string diff --git a/lib/commercetools-api/src/Models/Common/AssetSource.php b/lib/commercetools-api/src/Models/Common/AssetSource.php index e438482cdb6..ec593b78583 100644 --- a/lib/commercetools-api/src/Models/Common/AssetSource.php +++ b/lib/commercetools-api/src/Models/Common/AssetSource.php @@ -27,7 +27,7 @@ interface AssetSource extends JsonObject public function getUri(); /** - *User-defined unique identifier of the AssetSource.
+ *User-defined identifier of the AssetSource. Must be unique per Asset.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/Common/AssetSourceBuilder.php b/lib/commercetools-api/src/Models/Common/AssetSourceBuilder.php index e7ec770137c..5dc9458d3cc 100644 --- a/lib/commercetools-api/src/Models/Common/AssetSourceBuilder.php +++ b/lib/commercetools-api/src/Models/Common/AssetSourceBuilder.php @@ -56,7 +56,7 @@ public function getUri() } /** - *User-defined unique identifier of the AssetSource.
+ *User-defined identifier of the AssetSource. Must be unique per Asset.
* * @return null|string diff --git a/lib/commercetools-api/src/Models/Common/AssetSourceModel.php b/lib/commercetools-api/src/Models/Common/AssetSourceModel.php index 3349e2961a6..37e90c7e08f 100644 --- a/lib/commercetools-api/src/Models/Common/AssetSourceModel.php +++ b/lib/commercetools-api/src/Models/Common/AssetSourceModel.php @@ -80,7 +80,7 @@ public function getUri() } /** - *User-defined unique identifier of the AssetSource.
+ *User-defined identifier of the AssetSource. Must be unique per Asset.
* * * @return null|string diff --git a/lib/commercetools-api/src/Models/Common/BaseResource.php b/lib/commercetools-api/src/Models/Common/BaseResource.php index 884a6d7db35..07ac3845fce 100644 --- a/lib/commercetools-api/src/Models/Common/BaseResource.php +++ b/lib/commercetools-api/src/Models/Common/BaseResource.php @@ -58,9 +58,19 @@ use Commercetools\Api\Models\Message\CategorySlugChangedMessage; use Commercetools\Api\Models\Message\CustomerAddressAddedMessage; use Commercetools\Api\Models\Message\CustomerAddressChangedMessage; +use Commercetools\Api\Models\Message\CustomerAddressCustomFieldAddedMessage; +use Commercetools\Api\Models\Message\CustomerAddressCustomFieldChangedMessage; +use Commercetools\Api\Models\Message\CustomerAddressCustomFieldRemovedMessage; +use Commercetools\Api\Models\Message\CustomerAddressCustomTypeRemovedMessage; +use Commercetools\Api\Models\Message\CustomerAddressCustomTypeSetMessage; use Commercetools\Api\Models\Message\CustomerAddressRemovedMessage; use Commercetools\Api\Models\Message\CustomerCompanyNameSetMessage; use Commercetools\Api\Models\Message\CustomerCreatedMessage; +use Commercetools\Api\Models\Message\CustomerCustomFieldAddedMessage; +use Commercetools\Api\Models\Message\CustomerCustomFieldChangedMessage; +use Commercetools\Api\Models\Message\CustomerCustomFieldRemovedMessage; +use Commercetools\Api\Models\Message\CustomerCustomTypeRemovedMessage; +use Commercetools\Api\Models\Message\CustomerCustomTypeSetMessage; use Commercetools\Api\Models\Message\CustomerDateOfBirthSetMessage; use Commercetools\Api\Models\Message\CustomerDeletedMessage; use Commercetools\Api\Models\Message\CustomerEmailChangedMessage; @@ -112,6 +122,7 @@ use Commercetools\Api\Models\Message\QuoteCreatedMessage; use Commercetools\Api\Models\Message\QuoteCustomerChangedMessage; use Commercetools\Api\Models\Message\QuoteDeletedMessage; +use Commercetools\Api\Models\Message\QuoteRenegotiationRequestedMessage; use Commercetools\Api\Models\Message\QuoteRequestCreatedMessage; use Commercetools\Api\Models\Message\QuoteRequestCustomerChangedMessage; use Commercetools\Api\Models\Message\QuoteRequestDeletedMessage; @@ -135,6 +146,7 @@ use Commercetools\Api\Models\Message\StandalonePriceExternalDiscountSetMessage; use Commercetools\Api\Models\Message\StandalonePriceKeySetMessage; use Commercetools\Api\Models\Message\StandalonePriceStagedChangesAppliedMessage; +use Commercetools\Api\Models\Message\StandalonePriceStagedChangesRemovedMessage; use Commercetools\Api\Models\Message\StandalonePriceTierAddedMessage; use Commercetools\Api\Models\Message\StandalonePriceTierRemovedMessage; use Commercetools\Api\Models\Message\StandalonePriceTiersSetMessage; diff --git a/lib/commercetools-api/src/Models/Common/BaseResourceBuilder.php b/lib/commercetools-api/src/Models/Common/BaseResourceBuilder.php index 674652a3149..ac8de93d205 100644 --- a/lib/commercetools-api/src/Models/Common/BaseResourceBuilder.php +++ b/lib/commercetools-api/src/Models/Common/BaseResourceBuilder.php @@ -108,12 +108,32 @@ use Commercetools\Api\Models\Message\CustomerAddressAddedMessageBuilder; use Commercetools\Api\Models\Message\CustomerAddressChangedMessage; use Commercetools\Api\Models\Message\CustomerAddressChangedMessageBuilder; +use Commercetools\Api\Models\Message\CustomerAddressCustomFieldAddedMessage; +use Commercetools\Api\Models\Message\CustomerAddressCustomFieldAddedMessageBuilder; +use Commercetools\Api\Models\Message\CustomerAddressCustomFieldChangedMessage; +use Commercetools\Api\Models\Message\CustomerAddressCustomFieldChangedMessageBuilder; +use Commercetools\Api\Models\Message\CustomerAddressCustomFieldRemovedMessage; +use Commercetools\Api\Models\Message\CustomerAddressCustomFieldRemovedMessageBuilder; +use Commercetools\Api\Models\Message\CustomerAddressCustomTypeRemovedMessage; +use Commercetools\Api\Models\Message\CustomerAddressCustomTypeRemovedMessageBuilder; +use Commercetools\Api\Models\Message\CustomerAddressCustomTypeSetMessage; +use Commercetools\Api\Models\Message\CustomerAddressCustomTypeSetMessageBuilder; use Commercetools\Api\Models\Message\CustomerAddressRemovedMessage; use Commercetools\Api\Models\Message\CustomerAddressRemovedMessageBuilder; use Commercetools\Api\Models\Message\CustomerCompanyNameSetMessage; use Commercetools\Api\Models\Message\CustomerCompanyNameSetMessageBuilder; use Commercetools\Api\Models\Message\CustomerCreatedMessage; use Commercetools\Api\Models\Message\CustomerCreatedMessageBuilder; +use Commercetools\Api\Models\Message\CustomerCustomFieldAddedMessage; +use Commercetools\Api\Models\Message\CustomerCustomFieldAddedMessageBuilder; +use Commercetools\Api\Models\Message\CustomerCustomFieldChangedMessage; +use Commercetools\Api\Models\Message\CustomerCustomFieldChangedMessageBuilder; +use Commercetools\Api\Models\Message\CustomerCustomFieldRemovedMessage; +use Commercetools\Api\Models\Message\CustomerCustomFieldRemovedMessageBuilder; +use Commercetools\Api\Models\Message\CustomerCustomTypeRemovedMessage; +use Commercetools\Api\Models\Message\CustomerCustomTypeRemovedMessageBuilder; +use Commercetools\Api\Models\Message\CustomerCustomTypeSetMessage; +use Commercetools\Api\Models\Message\CustomerCustomTypeSetMessageBuilder; use Commercetools\Api\Models\Message\CustomerDateOfBirthSetMessage; use Commercetools\Api\Models\Message\CustomerDateOfBirthSetMessageBuilder; use Commercetools\Api\Models\Message\CustomerDeletedMessage; @@ -216,6 +236,8 @@ use Commercetools\Api\Models\Message\QuoteCustomerChangedMessageBuilder; use Commercetools\Api\Models\Message\QuoteDeletedMessage; use Commercetools\Api\Models\Message\QuoteDeletedMessageBuilder; +use Commercetools\Api\Models\Message\QuoteRenegotiationRequestedMessage; +use Commercetools\Api\Models\Message\QuoteRenegotiationRequestedMessageBuilder; use Commercetools\Api\Models\Message\QuoteRequestCreatedMessage; use Commercetools\Api\Models\Message\QuoteRequestCreatedMessageBuilder; use Commercetools\Api\Models\Message\QuoteRequestCustomerChangedMessage; @@ -262,6 +284,8 @@ use Commercetools\Api\Models\Message\StandalonePriceKeySetMessageBuilder; use Commercetools\Api\Models\Message\StandalonePriceStagedChangesAppliedMessage; use Commercetools\Api\Models\Message\StandalonePriceStagedChangesAppliedMessageBuilder; +use Commercetools\Api\Models\Message\StandalonePriceStagedChangesRemovedMessage; +use Commercetools\Api\Models\Message\StandalonePriceStagedChangesRemovedMessageBuilder; use Commercetools\Api\Models\Message\StandalonePriceTierAddedMessage; use Commercetools\Api\Models\Message\StandalonePriceTierAddedMessageBuilder; use Commercetools\Api\Models\Message\StandalonePriceTierRemovedMessage; diff --git a/lib/commercetools-api/src/Models/Common/BaseResourceModel.php b/lib/commercetools-api/src/Models/Common/BaseResourceModel.php index 97588a2251a..eb70b5b5d14 100644 --- a/lib/commercetools-api/src/Models/Common/BaseResourceModel.php +++ b/lib/commercetools-api/src/Models/Common/BaseResourceModel.php @@ -108,12 +108,32 @@ use Commercetools\Api\Models\Message\CustomerAddressAddedMessageModel; use Commercetools\Api\Models\Message\CustomerAddressChangedMessage; use Commercetools\Api\Models\Message\CustomerAddressChangedMessageModel; +use Commercetools\Api\Models\Message\CustomerAddressCustomFieldAddedMessage; +use Commercetools\Api\Models\Message\CustomerAddressCustomFieldAddedMessageModel; +use Commercetools\Api\Models\Message\CustomerAddressCustomFieldChangedMessage; +use Commercetools\Api\Models\Message\CustomerAddressCustomFieldChangedMessageModel; +use Commercetools\Api\Models\Message\CustomerAddressCustomFieldRemovedMessage; +use Commercetools\Api\Models\Message\CustomerAddressCustomFieldRemovedMessageModel; +use Commercetools\Api\Models\Message\CustomerAddressCustomTypeRemovedMessage; +use Commercetools\Api\Models\Message\CustomerAddressCustomTypeRemovedMessageModel; +use Commercetools\Api\Models\Message\CustomerAddressCustomTypeSetMessage; +use Commercetools\Api\Models\Message\CustomerAddressCustomTypeSetMessageModel; use Commercetools\Api\Models\Message\CustomerAddressRemovedMessage; use Commercetools\Api\Models\Message\CustomerAddressRemovedMessageModel; use Commercetools\Api\Models\Message\CustomerCompanyNameSetMessage; use Commercetools\Api\Models\Message\CustomerCompanyNameSetMessageModel; use Commercetools\Api\Models\Message\CustomerCreatedMessage; use Commercetools\Api\Models\Message\CustomerCreatedMessageModel; +use Commercetools\Api\Models\Message\CustomerCustomFieldAddedMessage; +use Commercetools\Api\Models\Message\CustomerCustomFieldAddedMessageModel; +use Commercetools\Api\Models\Message\CustomerCustomFieldChangedMessage; +use Commercetools\Api\Models\Message\CustomerCustomFieldChangedMessageModel; +use Commercetools\Api\Models\Message\CustomerCustomFieldRemovedMessage; +use Commercetools\Api\Models\Message\CustomerCustomFieldRemovedMessageModel; +use Commercetools\Api\Models\Message\CustomerCustomTypeRemovedMessage; +use Commercetools\Api\Models\Message\CustomerCustomTypeRemovedMessageModel; +use Commercetools\Api\Models\Message\CustomerCustomTypeSetMessage; +use Commercetools\Api\Models\Message\CustomerCustomTypeSetMessageModel; use Commercetools\Api\Models\Message\CustomerDateOfBirthSetMessage; use Commercetools\Api\Models\Message\CustomerDateOfBirthSetMessageModel; use Commercetools\Api\Models\Message\CustomerDeletedMessage; @@ -216,6 +236,8 @@ use Commercetools\Api\Models\Message\QuoteCustomerChangedMessageModel; use Commercetools\Api\Models\Message\QuoteDeletedMessage; use Commercetools\Api\Models\Message\QuoteDeletedMessageModel; +use Commercetools\Api\Models\Message\QuoteRenegotiationRequestedMessage; +use Commercetools\Api\Models\Message\QuoteRenegotiationRequestedMessageModel; use Commercetools\Api\Models\Message\QuoteRequestCreatedMessage; use Commercetools\Api\Models\Message\QuoteRequestCreatedMessageModel; use Commercetools\Api\Models\Message\QuoteRequestCustomerChangedMessage; @@ -262,6 +284,8 @@ use Commercetools\Api\Models\Message\StandalonePriceKeySetMessageModel; use Commercetools\Api\Models\Message\StandalonePriceStagedChangesAppliedMessage; use Commercetools\Api\Models\Message\StandalonePriceStagedChangesAppliedMessageModel; +use Commercetools\Api\Models\Message\StandalonePriceStagedChangesRemovedMessage; +use Commercetools\Api\Models\Message\StandalonePriceStagedChangesRemovedMessageModel; use Commercetools\Api\Models\Message\StandalonePriceTierAddedMessage; use Commercetools\Api\Models\Message\StandalonePriceTierAddedMessageModel; use Commercetools\Api\Models\Message\StandalonePriceTierRemovedMessage; diff --git a/lib/commercetools-api/src/Models/Me/MyCartChangeLineItemQuantityAction.php b/lib/commercetools-api/src/Models/Me/MyCartChangeLineItemQuantityAction.php index 86c52ea89d7..0c79f64d0b8 100644 --- a/lib/commercetools-api/src/Models/Me/MyCartChangeLineItemQuantityAction.php +++ b/lib/commercetools-api/src/Models/Me/MyCartChangeLineItemQuantityAction.php @@ -18,8 +18,6 @@ interface MyCartChangeLineItemQuantityAction extends MyCartUpdateAction public const FIELD_LINE_ITEM_ID = 'lineItemId'; public const FIELD_LINE_ITEM_KEY = 'lineItemKey'; public const FIELD_QUANTITY = 'quantity'; - public const FIELD_EXTERNAL_PRICE = 'externalPrice'; - public const FIELD_EXTERNAL_TOTAL_PRICE = 'externalTotalPrice'; /** *id
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
Deprecated. Will be ignored.
- * - - * @return null|Money - */ - public function getExternalPrice(); - - /** - *Deprecated. Will be ignored.
- * - - * @return null|ExternalLineItemTotalPrice - */ - public function getExternalTotalPrice(); - /** * @param ?string $lineItemId */ @@ -76,14 +58,4 @@ public function setLineItemKey(?string $lineItemKey): void; * @param ?int $quantity */ public function setQuantity(?int $quantity): void; - - /** - * @param ?Money $externalPrice - */ - public function setExternalPrice(?Money $externalPrice): void; - - /** - * @param ?ExternalLineItemTotalPrice $externalTotalPrice - */ - public function setExternalTotalPrice(?ExternalLineItemTotalPrice $externalTotalPrice): void; } diff --git a/lib/commercetools-api/src/Models/Me/MyCartChangeLineItemQuantityActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyCartChangeLineItemQuantityActionBuilder.php index 488c3e71850..48e5591294c 100644 --- a/lib/commercetools-api/src/Models/Me/MyCartChangeLineItemQuantityActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyCartChangeLineItemQuantityActionBuilder.php @@ -9,9 +9,7 @@ namespace Commercetools\Api\Models\Me; use Commercetools\Api\Models\Cart\ExternalLineItemTotalPrice; -use Commercetools\Api\Models\Cart\ExternalLineItemTotalPriceBuilder; use Commercetools\Api\Models\Common\Money; -use Commercetools\Api\Models\Common\MoneyBuilder; use Commercetools\Base\Builder; use Commercetools\Base\DateTimeImmutableCollection; use Commercetools\Base\JsonObject; @@ -42,18 +40,6 @@ final class MyCartChangeLineItemQuantityActionBuilder implements Builder */ private $quantity; - /** - - * @var null|Money|MoneyBuilder - */ - private $externalPrice; - - /** - - * @var null|ExternalLineItemTotalPrice|ExternalLineItemTotalPriceBuilder - */ - private $externalTotalPrice; - /** *id
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
Deprecated. Will be ignored.
- * - - * @return null|Money - */ - public function getExternalPrice() - { - return $this->externalPrice instanceof MoneyBuilder ? $this->externalPrice->build() : $this->externalPrice; - } - - /** - *Deprecated. Will be ignored.
- * - - * @return null|ExternalLineItemTotalPrice - */ - public function getExternalTotalPrice() - { - return $this->externalTotalPrice instanceof ExternalLineItemTotalPriceBuilder ? $this->externalTotalPrice->build() : $this->externalTotalPrice; - } - /** * @param ?string $lineItemId * @return $this @@ -143,58 +107,13 @@ public function withQuantity(?int $quantity) return $this; } - /** - * @param ?Money $externalPrice - * @return $this - */ - public function withExternalPrice(?Money $externalPrice) - { - $this->externalPrice = $externalPrice; - - return $this; - } - - /** - * @param ?ExternalLineItemTotalPrice $externalTotalPrice - * @return $this - */ - public function withExternalTotalPrice(?ExternalLineItemTotalPrice $externalTotalPrice) - { - $this->externalTotalPrice = $externalTotalPrice; - - return $this; - } - - /** - * @deprecated use withExternalPrice() instead - * @return $this - */ - public function withExternalPriceBuilder(?MoneyBuilder $externalPrice) - { - $this->externalPrice = $externalPrice; - - return $this; - } - - /** - * @deprecated use withExternalTotalPrice() instead - * @return $this - */ - public function withExternalTotalPriceBuilder(?ExternalLineItemTotalPriceBuilder $externalTotalPrice) - { - $this->externalTotalPrice = $externalTotalPrice; - - return $this; - } public function build(): MyCartChangeLineItemQuantityAction { return new MyCartChangeLineItemQuantityActionModel( $this->lineItemId, $this->lineItemKey, - $this->quantity, - $this->externalPrice instanceof MoneyBuilder ? $this->externalPrice->build() : $this->externalPrice, - $this->externalTotalPrice instanceof ExternalLineItemTotalPriceBuilder ? $this->externalTotalPrice->build() : $this->externalTotalPrice + $this->quantity ); } diff --git a/lib/commercetools-api/src/Models/Me/MyCartChangeLineItemQuantityActionModel.php b/lib/commercetools-api/src/Models/Me/MyCartChangeLineItemQuantityActionModel.php index 551a010c8d5..4f118776cf4 100644 --- a/lib/commercetools-api/src/Models/Me/MyCartChangeLineItemQuantityActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyCartChangeLineItemQuantityActionModel.php @@ -48,18 +48,6 @@ final class MyCartChangeLineItemQuantityActionModel extends JsonObjectModel impl */ protected $quantity; - /** - * - * @var ?Money - */ - protected $externalPrice; - - /** - * - * @var ?ExternalLineItemTotalPrice - */ - protected $externalTotalPrice; - /** * @psalm-suppress MissingParamType @@ -68,15 +56,11 @@ public function __construct( ?string $lineItemId = null, ?string $lineItemKey = null, ?int $quantity = null, - ?Money $externalPrice = null, - ?ExternalLineItemTotalPrice $externalTotalPrice = null, ?string $action = null ) { $this->lineItemId = $lineItemId; $this->lineItemKey = $lineItemKey; $this->quantity = $quantity; - $this->externalPrice = $externalPrice; - $this->externalTotalPrice = $externalTotalPrice; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -159,48 +143,6 @@ public function getQuantity() return $this->quantity; } - /** - *Deprecated. Will be ignored.
- * - * - * @return null|Money - */ - public function getExternalPrice() - { - if (is_null($this->externalPrice)) { - /** @psalm-var stdClass|arrayDeprecated. Will be ignored.
- * - * - * @return null|ExternalLineItemTotalPrice - */ - public function getExternalTotalPrice() - { - if (is_null($this->externalTotalPrice)) { - /** @psalm-var stdClass|arrayUser-defined identifier of the ShoppingListLineItem. Must be unique per ShoppingList.
+ * + + * @return null|string + */ + public function getKey(); + /** *sku
of the ProductVariant.
User-defined identifier of the ShoppingListLineItem. Must be unique per ShoppingList.
+ * + + * @return null|string + */ + public function getKey() + { + return $this->key; + } + /** *sku
of the ProductVariant.
User-defined identifier of the ShoppingListLineItem. Must be unique per ShoppingList.
+ * + * + * @return null|string + */ + public function getKey() + { + if (is_null($this->key)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_KEY); + if (is_null($data)) { + return null; + } + $this->key = (string) $data; + } + + return $this->key; + } + /** *sku
of the ProductVariant.
User-defined identifier of the TextLineItem. Must be unique per ShoppingList.
+ * + + * @return null|string + */ + public function getKey(); + /** *Description of the TextLineItem.
* @@ -67,6 +76,11 @@ public function getCustom(); */ public function setName(?LocalizedString $name): void; + /** + * @param ?string $key + */ + public function setKey(?string $key): void; + /** * @param ?LocalizedString $description */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemActionBuilder.php index 4a9a153efc3..3d53df2f20e 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemActionBuilder.php @@ -31,6 +31,12 @@ final class MyShoppingListAddTextLineItemActionBuilder implements Builder */ private $name; + /** + + * @var ?string + */ + private $key; + /** * @var null|LocalizedString|LocalizedStringBuilder @@ -66,6 +72,17 @@ public function getName() return $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name; } + /** + *User-defined identifier of the TextLineItem. Must be unique per ShoppingList.
+ * + + * @return null|string + */ + public function getKey() + { + return $this->key; + } + /** *Description of the TextLineItem.
* @@ -121,6 +138,17 @@ public function withName(?LocalizedString $name) return $this; } + /** + * @param ?string $key + * @return $this + */ + public function withKey(?string $key) + { + $this->key = $key; + + return $this; + } + /** * @param ?LocalizedString $description * @return $this @@ -202,6 +230,7 @@ public function build(): MyShoppingListAddTextLineItemAction { return new MyShoppingListAddTextLineItemActionModel( $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name, + $this->key, $this->description instanceof LocalizedStringBuilder ? $this->description->build() : $this->description, $this->quantity, $this->addedAt, diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemActionModel.php index 5a94cfc1c0b..98d7af30d54 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemActionModel.php @@ -37,6 +37,12 @@ final class MyShoppingListAddTextLineItemActionModel extends JsonObjectModel imp */ protected $name; + /** + * + * @var ?string + */ + protected $key; + /** * * @var ?LocalizedString @@ -67,6 +73,7 @@ final class MyShoppingListAddTextLineItemActionModel extends JsonObjectModel imp */ public function __construct( ?LocalizedString $name = null, + ?string $key = null, ?LocalizedString $description = null, ?int $quantity = null, ?DateTimeImmutable $addedAt = null, @@ -74,6 +81,7 @@ public function __construct( ?string $action = null ) { $this->name = $name; + $this->key = $key; $this->description = $description; $this->quantity = $quantity; $this->addedAt = $addedAt; @@ -120,6 +128,26 @@ public function getName() return $this->name; } + /** + *User-defined identifier of the TextLineItem. Must be unique per ShoppingList.
+ * + * + * @return null|string + */ + public function getKey() + { + if (is_null($this->key)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_KEY); + if (is_null($data)) { + return null; + } + $this->key = (string) $data; + } + + return $this->key; + } + /** *Description of the TextLineItem.
* @@ -215,6 +243,14 @@ public function setName(?LocalizedString $name): void $this->name = $name; } + /** + * @param ?string $key + */ + public function setKey(?string $key): void + { + $this->key = $key; + } + /** * @param ?LocalizedString $description */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemQuantityAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemQuantityAction.php index 6c9a87bd399..023ba06470f 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemQuantityAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemQuantityAction.php @@ -18,7 +18,7 @@ interface MyShoppingListChangeLineItemQuantityAction extends MyShoppingListUpdat public const FIELD_QUANTITY = 'quantity'; /** - *id
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
id
of the ShoppingListLineItem to update. Either lineItemId
or lineItemKey
is required.
key
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
key
of the ShoppingListLineItem to update. Either lineItemId
or lineItemKey
is required.
id
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
id
of the ShoppingListLineItem to update. Either lineItemId
or lineItemKey
is required.
key
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
key
of the ShoppingListLineItem to update. Either lineItemId
or lineItemKey
is required.
id
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
id
of the ShoppingListLineItem to update. Either lineItemId
or lineItemKey
is required.
key
of the LineItem to update. Either lineItemId
or lineItemKey
is required.
key
of the ShoppingListLineItem to update. Either lineItemId
or lineItemKey
is required.
The id
of the TextLineItem to update.
The id
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
New value to set. Must not be empty.
* @@ -38,6 +47,11 @@ public function getName(); */ public function setTextLineItemId(?string $textLineItemId): void; + /** + * @param ?string $textLineItemKey + */ + public function setTextLineItemKey(?string $textLineItemKey): void; + /** * @param ?LocalizedString $name */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameActionBuilder.php index 85b7ceefdd5..d6920be6ec2 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameActionBuilder.php @@ -28,6 +28,12 @@ final class MyShoppingListChangeTextLineItemNameActionBuilder implements Builder */ private $textLineItemId; + /** + + * @var ?string + */ + private $textLineItemKey; + /** * @var null|LocalizedString|LocalizedStringBuilder @@ -35,7 +41,7 @@ final class MyShoppingListChangeTextLineItemNameActionBuilder implements Builder private $name; /** - *The id
of the TextLineItem to update.
The id
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
New value to set. Must not be empty.
* @@ -67,6 +84,17 @@ public function withTextLineItemId(?string $textLineItemId) return $this; } + /** + * @param ?string $textLineItemKey + * @return $this + */ + public function withTextLineItemKey(?string $textLineItemKey) + { + $this->textLineItemKey = $textLineItemKey; + + return $this; + } + /** * @param ?LocalizedString $name * @return $this @@ -93,6 +121,7 @@ public function build(): MyShoppingListChangeTextLineItemNameAction { return new MyShoppingListChangeTextLineItemNameActionModel( $this->textLineItemId, + $this->textLineItemKey, $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name ); } diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameActionModel.php index 8ef910790b5..8615f6d3f15 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameActionModel.php @@ -34,6 +34,12 @@ final class MyShoppingListChangeTextLineItemNameActionModel extends JsonObjectMo */ protected $textLineItemId; + /** + * + * @var ?string + */ + protected $textLineItemKey; + /** * * @var ?LocalizedString @@ -46,10 +52,12 @@ final class MyShoppingListChangeTextLineItemNameActionModel extends JsonObjectMo */ public function __construct( ?string $textLineItemId = null, + ?string $textLineItemKey = null, ?LocalizedString $name = null, ?string $action = null ) { $this->textLineItemId = $textLineItemId; + $this->textLineItemKey = $textLineItemKey; $this->name = $name; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -73,7 +81,7 @@ public function getAction() } /** - *The id
of the TextLineItem to update.
The id
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
New value to set. Must not be empty.
* @@ -122,6 +150,14 @@ public function setTextLineItemId(?string $textLineItemId): void $this->textLineItemId = $textLineItemId; } + /** + * @param ?string $textLineItemKey + */ + public function setTextLineItemKey(?string $textLineItemKey): void + { + $this->textLineItemKey = $textLineItemKey; + } + /** * @param ?LocalizedString $name */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemQuantityAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemQuantityAction.php index a91ed4a2e89..b2669cb63b1 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemQuantityAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemQuantityAction.php @@ -14,16 +14,25 @@ interface MyShoppingListChangeTextLineItemQuantityAction extends MyShoppingListUpdateAction { public const FIELD_TEXT_LINE_ITEM_ID = 'textLineItemId'; + public const FIELD_TEXT_LINE_ITEM_KEY = 'textLineItemKey'; public const FIELD_QUANTITY = 'quantity'; /** - *The id
of the TextLineItem to update.
The id
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
New value to set. If 0
, the TextLineItem is removed from the ShoppingList.
The id
of the TextLineItem to update.
The id
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
New value to set. If 0
, the TextLineItem is removed from the ShoppingList.
The id
of the TextLineItem to update.
The id
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
New value to set. If 0
, the TextLineItem is removed from the ShoppingList.
The id
of the ShoppingListLineItem to update.
The id
of the ShoppingListLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the ShoppingListLineItem to update. Either lineItemId
or lineItemKey
is required.
Amount to remove from the quantity
of the ShoppingListLineItem. If not set, the ShoppingListLineItem is removed from the ShoppingList. If this value matches or exceeds the current quantity
of the ShoppingListLineItem, the ShoppingListLineItem is removed from the ShoppingList.
The id
of the ShoppingListLineItem to update.
The id
of the ShoppingListLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the ShoppingListLineItem to update. Either lineItemId
or lineItemKey
is required.
Amount to remove from the quantity
of the ShoppingListLineItem. If not set, the ShoppingListLineItem is removed from the ShoppingList. If this value matches or exceeds the current quantity
of the ShoppingListLineItem, the ShoppingListLineItem is removed from the ShoppingList.
The id
of the ShoppingListLineItem to update.
The id
of the ShoppingListLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the ShoppingListLineItem to update. Either lineItemId
or lineItemKey
is required.
Amount to remove from the quantity
of the ShoppingListLineItem. If not set, the ShoppingListLineItem is removed from the ShoppingList. If this value matches or exceeds the current quantity
of the ShoppingListLineItem, the ShoppingListLineItem is removed from the ShoppingList.
The id
of the TextLineItem to update.
The id
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
Amount to remove from the quantity
of the TextLineItem. If not set, the TextLineItem is removed from the ShoppingList. If this value matches or exceeds the current quantity
of the TextLineItem, the TextLineItem is removed from the ShoppingList.
The id
of the TextLineItem to update.
The id
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
Amount to remove from the quantity
of the TextLineItem. If not set, the TextLineItem is removed from the ShoppingList. If this value matches or exceeds the current quantity
of the TextLineItem, the TextLineItem is removed from the ShoppingList.
The id
of the TextLineItem to update.
The id
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
Amount to remove from the quantity
of the TextLineItem. If not set, the TextLineItem is removed from the ShoppingList. If this value matches or exceeds the current quantity
of the TextLineItem, the TextLineItem is removed from the ShoppingList.
Unique identifier of an existing ShoppingListLineItem in the ShoppingList.
+ *Unique identifier of an the ShoppingListLineItem. Either lineItemId
or lineItemKey
is required.
The key
of the ShoppingListLineItem to update. Either lineItemId
or lineItemKey
is required.
Name of the Custom Field.
* @@ -48,6 +57,11 @@ public function getValue(); */ public function setLineItemId(?string $lineItemId): void; + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void; + /** * @param ?string $name */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionBuilder.php index 45593ffac6d..0fed9e81831 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionBuilder.php @@ -26,6 +26,12 @@ final class MyShoppingListSetLineItemCustomFieldActionBuilder implements Builder */ private $lineItemId; + /** + + * @var ?string + */ + private $lineItemKey; + /** * @var ?string @@ -39,7 +45,7 @@ final class MyShoppingListSetLineItemCustomFieldActionBuilder implements Builder private $value; /** - *Unique identifier of an existing ShoppingListLineItem in the ShoppingList.
+ *Unique identifier of an the ShoppingListLineItem. Either lineItemId
or lineItemKey
is required.
The key
of the ShoppingListLineItem to update. Either lineItemId
or lineItemKey
is required.
Name of the Custom Field.
* @@ -84,6 +101,17 @@ public function withLineItemId(?string $lineItemId) return $this; } + /** + * @param ?string $lineItemKey + * @return $this + */ + public function withLineItemKey(?string $lineItemKey) + { + $this->lineItemKey = $lineItemKey; + + return $this; + } + /** * @param ?string $name * @return $this @@ -111,6 +139,7 @@ public function build(): MyShoppingListSetLineItemCustomFieldAction { return new MyShoppingListSetLineItemCustomFieldActionModel( $this->lineItemId, + $this->lineItemKey, $this->name, $this->value ); diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionModel.php index 5a67607a971..645088d4a80 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionModel.php @@ -32,6 +32,12 @@ final class MyShoppingListSetLineItemCustomFieldActionModel extends JsonObjectMo */ protected $lineItemId; + /** + * + * @var ?string + */ + protected $lineItemKey; + /** * * @var ?string @@ -50,11 +56,13 @@ final class MyShoppingListSetLineItemCustomFieldActionModel extends JsonObjectMo */ public function __construct( ?string $lineItemId = null, + ?string $lineItemKey = null, ?string $name = null, $value = null, ?string $action = null ) { $this->lineItemId = $lineItemId; + $this->lineItemKey = $lineItemKey; $this->name = $name; $this->value = $value; $this->action = $action ?? self::DISCRIMINATOR_VALUE; @@ -79,7 +87,7 @@ public function getAction() } /** - *Unique identifier of an existing ShoppingListLineItem in the ShoppingList.
+ *Unique identifier of an the ShoppingListLineItem. Either lineItemId
or lineItemKey
is required.
The key
of the ShoppingListLineItem to update. Either lineItemId
or lineItemKey
is required.
Name of the Custom Field.
* @@ -149,6 +177,14 @@ public function setLineItemId(?string $lineItemId): void $this->lineItemId = $lineItemId; } + /** + * @param ?string $lineItemKey + */ + public function setLineItemKey(?string $lineItemKey): void + { + $this->lineItemKey = $lineItemKey; + } + /** * @param ?string $name */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldAction.php index 36cd871083e..bd525f86db5 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldAction.php @@ -14,17 +14,26 @@ interface MyShoppingListSetTextLineItemCustomFieldAction extends MyShoppingListUpdateAction { public const FIELD_TEXT_LINE_ITEM_ID = 'textLineItemId'; + public const FIELD_TEXT_LINE_ITEM_KEY = 'textLineItemKey'; public const FIELD_NAME = 'name'; public const FIELD_VALUE = 'value'; /** - *The id
of the TextLineItem to update.
The id
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
Name of the Custom Field.
* @@ -48,6 +57,11 @@ public function getValue(); */ public function setTextLineItemId(?string $textLineItemId): void; + /** + * @param ?string $textLineItemKey + */ + public function setTextLineItemKey(?string $textLineItemKey): void; + /** * @param ?string $name */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionBuilder.php index 6acd6c920a3..3dca07b6abf 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionBuilder.php @@ -26,6 +26,12 @@ final class MyShoppingListSetTextLineItemCustomFieldActionBuilder implements Bui */ private $textLineItemId; + /** + + * @var ?string + */ + private $textLineItemKey; + /** * @var ?string @@ -39,7 +45,7 @@ final class MyShoppingListSetTextLineItemCustomFieldActionBuilder implements Bui private $value; /** - *The id
of the TextLineItem to update.
The id
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
Name of the Custom Field.
* @@ -84,6 +101,17 @@ public function withTextLineItemId(?string $textLineItemId) return $this; } + /** + * @param ?string $textLineItemKey + * @return $this + */ + public function withTextLineItemKey(?string $textLineItemKey) + { + $this->textLineItemKey = $textLineItemKey; + + return $this; + } + /** * @param ?string $name * @return $this @@ -111,6 +139,7 @@ public function build(): MyShoppingListSetTextLineItemCustomFieldAction { return new MyShoppingListSetTextLineItemCustomFieldActionModel( $this->textLineItemId, + $this->textLineItemKey, $this->name, $this->value ); diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionModel.php index ba1fff0bd46..75726e56931 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionModel.php @@ -32,6 +32,12 @@ final class MyShoppingListSetTextLineItemCustomFieldActionModel extends JsonObje */ protected $textLineItemId; + /** + * + * @var ?string + */ + protected $textLineItemKey; + /** * * @var ?string @@ -50,11 +56,13 @@ final class MyShoppingListSetTextLineItemCustomFieldActionModel extends JsonObje */ public function __construct( ?string $textLineItemId = null, + ?string $textLineItemKey = null, ?string $name = null, $value = null, ?string $action = null ) { $this->textLineItemId = $textLineItemId; + $this->textLineItemKey = $textLineItemKey; $this->name = $name; $this->value = $value; $this->action = $action ?? self::DISCRIMINATOR_VALUE; @@ -79,7 +87,7 @@ public function getAction() } /** - *The id
of the TextLineItem to update.
The id
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
Name of the Custom Field.
* @@ -149,6 +177,14 @@ public function setTextLineItemId(?string $textLineItemId): void $this->textLineItemId = $textLineItemId; } + /** + * @param ?string $textLineItemKey + */ + public function setTextLineItemKey(?string $textLineItemKey): void + { + $this->textLineItemKey = $textLineItemKey; + } + /** * @param ?string $name */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeAction.php index 81201fdbd4b..cd3424b12d0 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeAction.php @@ -16,17 +16,26 @@ interface MyShoppingListSetTextLineItemCustomTypeAction extends MyShoppingListUpdateAction { public const FIELD_TEXT_LINE_ITEM_ID = 'textLineItemId'; + public const FIELD_TEXT_LINE_ITEM_KEY = 'textLineItemKey'; public const FIELD_TYPE = 'type'; public const FIELD_FIELDS = 'fields'; /** - *The id
of the TextLineItem to update.
The id
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
Defines the Type that extends the TextLineItem with Custom Fields. * If absent, any existing Type and Custom Fields are removed from the TextLineItem.
@@ -49,6 +58,11 @@ public function getFields(); */ public function setTextLineItemId(?string $textLineItemId): void; + /** + * @param ?string $textLineItemKey + */ + public function setTextLineItemKey(?string $textLineItemKey): void; + /** * @param ?TypeResourceIdentifier $type */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeActionBuilder.php index 1207bf0530e..5a840ed4c3b 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeActionBuilder.php @@ -30,6 +30,12 @@ final class MyShoppingListSetTextLineItemCustomTypeActionBuilder implements Buil */ private $textLineItemId; + /** + + * @var ?string + */ + private $textLineItemKey; + /** * @var null|TypeResourceIdentifier|TypeResourceIdentifierBuilder @@ -43,7 +49,7 @@ final class MyShoppingListSetTextLineItemCustomTypeActionBuilder implements Buil private $fields; /** - *The id
of the TextLineItem to update.
The id
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
Defines the Type that extends the TextLineItem with Custom Fields. * If absent, any existing Type and Custom Fields are removed from the TextLineItem.
@@ -87,6 +104,17 @@ public function withTextLineItemId(?string $textLineItemId) return $this; } + /** + * @param ?string $textLineItemKey + * @return $this + */ + public function withTextLineItemKey(?string $textLineItemKey) + { + $this->textLineItemKey = $textLineItemKey; + + return $this; + } + /** * @param ?TypeResourceIdentifier $type * @return $this @@ -135,6 +163,7 @@ public function build(): MyShoppingListSetTextLineItemCustomTypeAction { return new MyShoppingListSetTextLineItemCustomTypeActionModel( $this->textLineItemId, + $this->textLineItemKey, $this->type instanceof TypeResourceIdentifierBuilder ? $this->type->build() : $this->type, $this->fields instanceof FieldContainerBuilder ? $this->fields->build() : $this->fields ); diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeActionModel.php index ab8efdbc003..f9cd976d627 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeActionModel.php @@ -36,6 +36,12 @@ final class MyShoppingListSetTextLineItemCustomTypeActionModel extends JsonObjec */ protected $textLineItemId; + /** + * + * @var ?string + */ + protected $textLineItemKey; + /** * * @var ?TypeResourceIdentifier @@ -54,11 +60,13 @@ final class MyShoppingListSetTextLineItemCustomTypeActionModel extends JsonObjec */ public function __construct( ?string $textLineItemId = null, + ?string $textLineItemKey = null, ?TypeResourceIdentifier $type = null, ?FieldContainer $fields = null, ?string $action = null ) { $this->textLineItemId = $textLineItemId; + $this->textLineItemKey = $textLineItemKey; $this->type = $type; $this->fields = $fields; $this->action = $action ?? self::DISCRIMINATOR_VALUE; @@ -83,7 +91,7 @@ public function getAction() } /** - *The id
of the TextLineItem to update.
The id
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
Defines the Type that extends the TextLineItem with Custom Fields. * If absent, any existing Type and Custom Fields are removed from the TextLineItem.
@@ -154,6 +182,14 @@ public function setTextLineItemId(?string $textLineItemId): void $this->textLineItemId = $textLineItemId; } + /** + * @param ?string $textLineItemKey + */ + public function setTextLineItemKey(?string $textLineItemKey): void + { + $this->textLineItemKey = $textLineItemKey; + } + /** * @param ?TypeResourceIdentifier $type */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionAction.php index 61a9468220e..955eb668c0b 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionAction.php @@ -15,16 +15,25 @@ interface MyShoppingListSetTextLineItemDescriptionAction extends MyShoppingListUpdateAction { public const FIELD_TEXT_LINE_ITEM_ID = 'textLineItemId'; + public const FIELD_TEXT_LINE_ITEM_KEY = 'textLineItemKey'; public const FIELD_DESCRIPTION = 'description'; /** - *The id
of the TextLineItem to update.
The id
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
Value to set. If empty, any existing value will be removed.
* @@ -38,6 +47,11 @@ public function getDescription(); */ public function setTextLineItemId(?string $textLineItemId): void; + /** + * @param ?string $textLineItemKey + */ + public function setTextLineItemKey(?string $textLineItemKey): void; + /** * @param ?LocalizedString $description */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionActionBuilder.php index 346b5c94083..458c7b7c02a 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionActionBuilder.php @@ -28,6 +28,12 @@ final class MyShoppingListSetTextLineItemDescriptionActionBuilder implements Bui */ private $textLineItemId; + /** + + * @var ?string + */ + private $textLineItemKey; + /** * @var null|LocalizedString|LocalizedStringBuilder @@ -35,7 +41,7 @@ final class MyShoppingListSetTextLineItemDescriptionActionBuilder implements Bui private $description; /** - *The id
of the TextLineItem to update.
The id
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
Value to set. If empty, any existing value will be removed.
* @@ -67,6 +84,17 @@ public function withTextLineItemId(?string $textLineItemId) return $this; } + /** + * @param ?string $textLineItemKey + * @return $this + */ + public function withTextLineItemKey(?string $textLineItemKey) + { + $this->textLineItemKey = $textLineItemKey; + + return $this; + } + /** * @param ?LocalizedString $description * @return $this @@ -93,6 +121,7 @@ public function build(): MyShoppingListSetTextLineItemDescriptionAction { return new MyShoppingListSetTextLineItemDescriptionActionModel( $this->textLineItemId, + $this->textLineItemKey, $this->description instanceof LocalizedStringBuilder ? $this->description->build() : $this->description ); } diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionActionModel.php index cb219db368f..e666d6c8039 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionActionModel.php @@ -34,6 +34,12 @@ final class MyShoppingListSetTextLineItemDescriptionActionModel extends JsonObje */ protected $textLineItemId; + /** + * + * @var ?string + */ + protected $textLineItemKey; + /** * * @var ?LocalizedString @@ -46,10 +52,12 @@ final class MyShoppingListSetTextLineItemDescriptionActionModel extends JsonObje */ public function __construct( ?string $textLineItemId = null, + ?string $textLineItemKey = null, ?LocalizedString $description = null, ?string $action = null ) { $this->textLineItemId = $textLineItemId; + $this->textLineItemKey = $textLineItemKey; $this->description = $description; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -73,7 +81,7 @@ public function getAction() } /** - *The id
of the TextLineItem to update.
The id
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
The key
of the TextLineItem to update. Either lineItemId
or lineItemKey
is required.
Value to set. If empty, any existing value will be removed.
* @@ -122,6 +150,14 @@ public function setTextLineItemId(?string $textLineItemId): void $this->textLineItemId = $textLineItemId; } + /** + * @param ?string $textLineItemKey + */ + public function setTextLineItemKey(?string $textLineItemKey): void + { + $this->textLineItemKey = $textLineItemKey; + } + /** * @param ?LocalizedString $description */ diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessage.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessage.php new file mode 100644 index 00000000000..ee33600fe7a --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessage.php @@ -0,0 +1,44 @@ +Name of the Custom Field that has been added. + * + + * @return null|string + */ + public function getName(); + + /** + *The added CustomFieldValue based on the FieldType.
+ * + + * @return null|mixed + */ + public function getValue(); + + /** + * @param ?string $name + */ + public function setName(?string $name): void; + + /** + * @param mixed $value + */ + public function setValue($value): void; +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessageBuilder.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessageBuilder.php new file mode 100644 index 00000000000..2e7feef57ef --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessageBuilder.php @@ -0,0 +1,433 @@ + + */ +final class CustomerAddressCustomFieldAddedMessageBuilder implements Builder +{ + /** + + * @var ?string + */ + private $id; + + /** + + * @var ?int + */ + private $version; + + /** + + * @var ?DateTimeImmutable + */ + private $createdAt; + + /** + + * @var ?DateTimeImmutable + */ + private $lastModifiedAt; + + /** + + * @var null|LastModifiedBy|LastModifiedByBuilder + */ + private $lastModifiedBy; + + /** + + * @var null|CreatedBy|CreatedByBuilder + */ + private $createdBy; + + /** + + * @var ?int + */ + private $sequenceNumber; + + /** + + * @var null|Reference|ReferenceBuilder + */ + private $resource; + + /** + + * @var ?int + */ + private $resourceVersion; + + /** + + * @var null|UserProvidedIdentifiers|UserProvidedIdentifiersBuilder + */ + private $resourceUserProvidedIdentifiers; + + /** + + * @var ?string + */ + private $name; + + /** + + * @var null|mixed|mixed + */ + private $value; + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + + * @return null|string + */ + public function getId() + { + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + + * @return null|Reference + */ + public function getResource() + { + return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * + + * @return null|int + */ + public function getResourceVersion() + { + return $this->resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Name of the Custom Field that has been added.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + *The added CustomFieldValue based on the FieldType.
+ * + + * @return null|mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * @param ?string $id + * @return $this + */ + public function withId(?string $id) + { + $this->id = $id; + + return $this; + } + + /** + * @param ?int $version + * @return $this + */ + public function withVersion(?int $version) + { + $this->version = $version; + + return $this; + } + + /** + * @param ?DateTimeImmutable $createdAt + * @return $this + */ + public function withCreatedAt(?DateTimeImmutable $createdAt) + { + $this->createdAt = $createdAt; + + return $this; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + * @return $this + */ + public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt) + { + $this->lastModifiedAt = $lastModifiedAt; + + return $this; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + * @return $this + */ + public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @param ?CreatedBy $createdBy + * @return $this + */ + public function withCreatedBy(?CreatedBy $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @param ?int $sequenceNumber + * @return $this + */ + public function withSequenceNumber(?int $sequenceNumber) + { + $this->sequenceNumber = $sequenceNumber; + + return $this; + } + + /** + * @param ?Reference $resource + * @return $this + */ + public function withResource(?Reference $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @param ?int $resourceVersion + * @return $this + */ + public function withResourceVersion(?int $resourceVersion) + { + $this->resourceVersion = $resourceVersion; + + return $this; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + * @return $this + */ + public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + /** + * @param ?string $name + * @return $this + */ + public function withName(?string $name) + { + $this->name = $name; + + return $this; + } + + /** + * @param mixed $value + * @return $this + */ + public function withValue($value) + { + $this->value = $value; + + return $this; + } + + /** + * @deprecated use withLastModifiedBy() instead + * @return $this + */ + public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @deprecated use withCreatedBy() instead + * @return $this + */ + public function withCreatedByBuilder(?CreatedByBuilder $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @deprecated use withResource() instead + * @return $this + */ + public function withResourceBuilder(?ReferenceBuilder $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @deprecated use withResourceUserProvidedIdentifiers() instead + * @return $this + */ + public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + public function build(): CustomerAddressCustomFieldAddedMessage + { + return new CustomerAddressCustomFieldAddedMessageModel( + $this->id, + $this->version, + $this->createdAt, + $this->lastModifiedAt, + $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, + $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy, + $this->sequenceNumber, + $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource, + $this->resourceVersion, + $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, + $this->name, + $this->value + ); + } + + public static function of(): CustomerAddressCustomFieldAddedMessageBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessageCollection.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessageCollection.php new file mode 100644 index 00000000000..c8c3d92a027 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessageCollection.php @@ -0,0 +1,56 @@ + + * @method CustomerAddressCustomFieldAddedMessage current() + * @method CustomerAddressCustomFieldAddedMessage end() + * @method CustomerAddressCustomFieldAddedMessage at($offset) + */ +class CustomerAddressCustomFieldAddedMessageCollection extends MessageCollection +{ + /** + * @psalm-assert CustomerAddressCustomFieldAddedMessage $value + * @psalm-param CustomerAddressCustomFieldAddedMessage|stdClass $value + * @throws InvalidArgumentException + * + * @return CustomerAddressCustomFieldAddedMessageCollection + */ + public function add($value) + { + if (!$value instanceof CustomerAddressCustomFieldAddedMessage) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?CustomerAddressCustomFieldAddedMessage + */ + protected function mapper() + { + return function (?int $index): ?CustomerAddressCustomFieldAddedMessage { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var CustomerAddressCustomFieldAddedMessage $data */ + $data = CustomerAddressCustomFieldAddedMessageModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessageModel.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessageModel.php new file mode 100644 index 00000000000..67d7d1d2168 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessageModel.php @@ -0,0 +1,526 @@ +id = $id; + $this->version = $version; + $this->createdAt = $createdAt; + $this->lastModifiedAt = $lastModifiedAt; + $this->lastModifiedBy = $lastModifiedBy; + $this->createdBy = $createdBy; + $this->sequenceNumber = $sequenceNumber; + $this->resource = $resource; + $this->resourceVersion = $resourceVersion; + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + $this->name = $name; + $this->value = $value; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + * + * @return null|string + */ + public function getId() + { + if (is_null($this->id)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ID); + if (is_null($data)) { + return null; + } + $this->id = (string) $data; + } + + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + * + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + if (is_null($this->createdAt)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CREATED_AT); + if (is_null($data)) { + return null; + } + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->createdAt = $data; + } + + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayMessage number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + * + * @return null|Reference + */ + public function getResource() + { + if (is_null($this->resource)) { + /** @psalm-var stdClass|arrayVersion of the resource on which the change or action was performed.
+ * + * + * @return null|int + */ + public function getResourceVersion() + { + if (is_null($this->resourceVersion)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_RESOURCE_VERSION); + if (is_null($data)) { + return null; + } + $this->resourceVersion = (int) $data; + } + + return $this->resourceVersion; + } + + /** + *Message Type of the Message.
+ * + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Name of the Custom Field that has been added.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + /** + *The added CustomFieldValue based on the FieldType.
+ * + * + * @return null|mixed + */ + public function getValue() + { + if (is_null($this->value)) { + /** @psalm-var mixed $data */ + $data = $this->raw(self::FIELD_VALUE); + if (is_null($data)) { + return null; + } + $this->value = $data; + } + + return $this->value; + } + + + /** + * @param ?string $id + */ + public function setId(?string $id): void + { + $this->id = $id; + } + + /** + * @param ?int $version + */ + public function setVersion(?int $version): void + { + $this->version = $version; + } + + /** + * @param ?DateTimeImmutable $createdAt + */ + public function setCreatedAt(?DateTimeImmutable $createdAt): void + { + $this->createdAt = $createdAt; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + */ + public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void + { + $this->lastModifiedAt = $lastModifiedAt; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + */ + public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void + { + $this->lastModifiedBy = $lastModifiedBy; + } + + /** + * @param ?CreatedBy $createdBy + */ + public function setCreatedBy(?CreatedBy $createdBy): void + { + $this->createdBy = $createdBy; + } + + /** + * @param ?int $sequenceNumber + */ + public function setSequenceNumber(?int $sequenceNumber): void + { + $this->sequenceNumber = $sequenceNumber; + } + + /** + * @param ?Reference $resource + */ + public function setResource(?Reference $resource): void + { + $this->resource = $resource; + } + + /** + * @param ?int $resourceVersion + */ + public function setResourceVersion(?int $resourceVersion): void + { + $this->resourceVersion = $resourceVersion; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + */ + public function setResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers): void + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + } + + /** + * @param ?string $name + */ + public function setName(?string $name): void + { + $this->name = $name; + } + + /** + * @param mixed $value + */ + public function setValue($value): void + { + $this->value = $value; + } + + + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + $data = $this->toArray(); + if (isset($data[Message::FIELD_CREATED_AT]) && $data[Message::FIELD_CREATED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_CREATED_AT] = $data[Message::FIELD_CREATED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + + if (isset($data[Message::FIELD_LAST_MODIFIED_AT]) && $data[Message::FIELD_LAST_MODIFIED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_LAST_MODIFIED_AT] = $data[Message::FIELD_LAST_MODIFIED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + return (object) $data; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessagePayload.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessagePayload.php new file mode 100644 index 00000000000..1f589546f9f --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessagePayload.php @@ -0,0 +1,44 @@ +Name of the Custom Field that has been added. + * + + * @return null|string + */ + public function getName(); + + /** + *The added CustomFieldValue based on the FieldType.
+ * + + * @return null|mixed + */ + public function getValue(); + + /** + * @param ?string $name + */ + public function setName(?string $name): void; + + /** + * @param mixed $value + */ + public function setValue($value): void; +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessagePayloadBuilder.php new file mode 100644 index 00000000000..29df6b5ea65 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessagePayloadBuilder.php @@ -0,0 +1,92 @@ + + */ +final class CustomerAddressCustomFieldAddedMessagePayloadBuilder implements Builder +{ + /** + + * @var ?string + */ + private $name; + + /** + + * @var null|mixed|mixed + */ + private $value; + + /** + *Name of the Custom Field that has been added.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + *The added CustomFieldValue based on the FieldType.
+ * + + * @return null|mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * @param ?string $name + * @return $this + */ + public function withName(?string $name) + { + $this->name = $name; + + return $this; + } + + /** + * @param mixed $value + * @return $this + */ + public function withValue($value) + { + $this->value = $value; + + return $this; + } + + + public function build(): CustomerAddressCustomFieldAddedMessagePayload + { + return new CustomerAddressCustomFieldAddedMessagePayloadModel( + $this->name, + $this->value + ); + } + + public static function of(): CustomerAddressCustomFieldAddedMessagePayloadBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessagePayloadCollection.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessagePayloadCollection.php new file mode 100644 index 00000000000..6f1a52d05c4 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessagePayloadCollection.php @@ -0,0 +1,56 @@ + + * @method CustomerAddressCustomFieldAddedMessagePayload current() + * @method CustomerAddressCustomFieldAddedMessagePayload end() + * @method CustomerAddressCustomFieldAddedMessagePayload at($offset) + */ +class CustomerAddressCustomFieldAddedMessagePayloadCollection extends MessagePayloadCollection +{ + /** + * @psalm-assert CustomerAddressCustomFieldAddedMessagePayload $value + * @psalm-param CustomerAddressCustomFieldAddedMessagePayload|stdClass $value + * @throws InvalidArgumentException + * + * @return CustomerAddressCustomFieldAddedMessagePayloadCollection + */ + public function add($value) + { + if (!$value instanceof CustomerAddressCustomFieldAddedMessagePayload) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?CustomerAddressCustomFieldAddedMessagePayload + */ + protected function mapper() + { + return function (?int $index): ?CustomerAddressCustomFieldAddedMessagePayload { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var CustomerAddressCustomFieldAddedMessagePayload $data */ + $data = CustomerAddressCustomFieldAddedMessagePayloadModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessagePayloadModel.php new file mode 100644 index 00000000000..9a39563bd7e --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldAddedMessagePayloadModel.php @@ -0,0 +1,129 @@ +name = $name; + $this->value = $value; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *Name of the Custom Field that has been added.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + /** + *The added CustomFieldValue based on the FieldType.
+ * + * + * @return null|mixed + */ + public function getValue() + { + if (is_null($this->value)) { + /** @psalm-var mixed $data */ + $data = $this->raw(self::FIELD_VALUE); + if (is_null($data)) { + return null; + } + $this->value = $data; + } + + return $this->value; + } + + + /** + * @param ?string $name + */ + public function setName(?string $name): void + { + $this->name = $name; + } + + /** + * @param mixed $value + */ + public function setValue($value): void + { + $this->value = $value; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldChangedMessage.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldChangedMessage.php new file mode 100644 index 00000000000..1ef830da01b --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldChangedMessage.php @@ -0,0 +1,59 @@ +Name of the Custom Field that has been changed. + * + + * @return null|string + */ + public function getName(); + + /** + *CustomFieldValue based on the FieldType after the Set Custom Field update action.
+ * + + * @return null|mixed + */ + public function getValue(); + + /** + *CustomFieldValue based on the FieldType before the Set CustomField update action.
+ * When there has not been a Custom Field with the name
on the Customer Address before, a Customer Address Custom Field Added Message is generated instead.
Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + + * @return null|string + */ + public function getId() + { + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + + * @return null|Reference + */ + public function getResource() + { + return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * + + * @return null|int + */ + public function getResourceVersion() + { + return $this->resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Name of the Custom Field that has been changed.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + *CustomFieldValue based on the FieldType after the Set Custom Field update action.
+ * + + * @return null|mixed + */ + public function getValue() + { + return $this->value; + } + + /** + *CustomFieldValue based on the FieldType before the Set CustomField update action.
+ * When there has not been a Custom Field with the name
on the Customer Address before, a Customer Address Custom Field Added Message is generated instead.
Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + * + * @return null|string + */ + public function getId() + { + if (is_null($this->id)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ID); + if (is_null($data)) { + return null; + } + $this->id = (string) $data; + } + + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + * + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + if (is_null($this->createdAt)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CREATED_AT); + if (is_null($data)) { + return null; + } + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->createdAt = $data; + } + + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayMessage number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + * + * @return null|Reference + */ + public function getResource() + { + if (is_null($this->resource)) { + /** @psalm-var stdClass|arrayVersion of the resource on which the change or action was performed.
+ * + * + * @return null|int + */ + public function getResourceVersion() + { + if (is_null($this->resourceVersion)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_RESOURCE_VERSION); + if (is_null($data)) { + return null; + } + $this->resourceVersion = (int) $data; + } + + return $this->resourceVersion; + } + + /** + *Message Type of the Message.
+ * + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Name of the Custom Field that has been changed.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + /** + *CustomFieldValue based on the FieldType after the Set Custom Field update action.
+ * + * + * @return null|mixed + */ + public function getValue() + { + if (is_null($this->value)) { + /** @psalm-var mixed $data */ + $data = $this->raw(self::FIELD_VALUE); + if (is_null($data)) { + return null; + } + $this->value = $data; + } + + return $this->value; + } + + /** + *CustomFieldValue based on the FieldType before the Set CustomField update action.
+ * When there has not been a Custom Field with the name
on the Customer Address before, a Customer Address Custom Field Added Message is generated instead.
CustomFieldValue based on the FieldType after the Set Custom Field update action.
+ * + + * @return null|mixed + */ + public function getValue(); + + /** + *CustomFieldValue based on the FieldType before the Set CustomField update action.
+ * When there has not been a Custom Field with the name
on the Customer Address before, a Customer Address Custom Field Added Message is generated instead.
Name of the Custom Field that has been changed.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + *CustomFieldValue based on the FieldType after the Set Custom Field update action.
+ * + + * @return null|mixed + */ + public function getValue() + { + return $this->value; + } + + /** + *CustomFieldValue based on the FieldType before the Set CustomField update action.
+ * When there has not been a Custom Field with the name
on the Customer Address before, a Customer Address Custom Field Added Message is generated instead.
Name of the Custom Field that has been changed.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + /** + *CustomFieldValue based on the FieldType after the Set Custom Field update action.
+ * + * + * @return null|mixed + */ + public function getValue() + { + if (is_null($this->value)) { + /** @psalm-var mixed $data */ + $data = $this->raw(self::FIELD_VALUE); + if (is_null($data)) { + return null; + } + $this->value = $data; + } + + return $this->value; + } + + /** + *CustomFieldValue based on the FieldType before the Set CustomField update action.
+ * When there has not been a Custom Field with the name
on the Customer Address before, a Customer Address Custom Field Added Message is generated instead.
Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + + * @return null|string + */ + public function getId() + { + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + + * @return null|Reference + */ + public function getResource() + { + return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * + + * @return null|int + */ + public function getResourceVersion() + { + return $this->resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Name of the Custom Field that has been removed.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + * @param ?string $id + * @return $this + */ + public function withId(?string $id) + { + $this->id = $id; + + return $this; + } + + /** + * @param ?int $version + * @return $this + */ + public function withVersion(?int $version) + { + $this->version = $version; + + return $this; + } + + /** + * @param ?DateTimeImmutable $createdAt + * @return $this + */ + public function withCreatedAt(?DateTimeImmutable $createdAt) + { + $this->createdAt = $createdAt; + + return $this; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + * @return $this + */ + public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt) + { + $this->lastModifiedAt = $lastModifiedAt; + + return $this; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + * @return $this + */ + public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @param ?CreatedBy $createdBy + * @return $this + */ + public function withCreatedBy(?CreatedBy $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @param ?int $sequenceNumber + * @return $this + */ + public function withSequenceNumber(?int $sequenceNumber) + { + $this->sequenceNumber = $sequenceNumber; + + return $this; + } + + /** + * @param ?Reference $resource + * @return $this + */ + public function withResource(?Reference $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @param ?int $resourceVersion + * @return $this + */ + public function withResourceVersion(?int $resourceVersion) + { + $this->resourceVersion = $resourceVersion; + + return $this; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + * @return $this + */ + public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + /** + * @param ?string $name + * @return $this + */ + public function withName(?string $name) + { + $this->name = $name; + + return $this; + } + + /** + * @deprecated use withLastModifiedBy() instead + * @return $this + */ + public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @deprecated use withCreatedBy() instead + * @return $this + */ + public function withCreatedByBuilder(?CreatedByBuilder $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @deprecated use withResource() instead + * @return $this + */ + public function withResourceBuilder(?ReferenceBuilder $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @deprecated use withResourceUserProvidedIdentifiers() instead + * @return $this + */ + public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + public function build(): CustomerAddressCustomFieldRemovedMessage + { + return new CustomerAddressCustomFieldRemovedMessageModel( + $this->id, + $this->version, + $this->createdAt, + $this->lastModifiedAt, + $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, + $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy, + $this->sequenceNumber, + $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource, + $this->resourceVersion, + $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, + $this->name + ); + } + + public static function of(): CustomerAddressCustomFieldRemovedMessageBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldRemovedMessageCollection.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldRemovedMessageCollection.php new file mode 100644 index 00000000000..412096fec82 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldRemovedMessageCollection.php @@ -0,0 +1,56 @@ + + * @method CustomerAddressCustomFieldRemovedMessage current() + * @method CustomerAddressCustomFieldRemovedMessage end() + * @method CustomerAddressCustomFieldRemovedMessage at($offset) + */ +class CustomerAddressCustomFieldRemovedMessageCollection extends MessageCollection +{ + /** + * @psalm-assert CustomerAddressCustomFieldRemovedMessage $value + * @psalm-param CustomerAddressCustomFieldRemovedMessage|stdClass $value + * @throws InvalidArgumentException + * + * @return CustomerAddressCustomFieldRemovedMessageCollection + */ + public function add($value) + { + if (!$value instanceof CustomerAddressCustomFieldRemovedMessage) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?CustomerAddressCustomFieldRemovedMessage + */ + protected function mapper() + { + return function (?int $index): ?CustomerAddressCustomFieldRemovedMessage { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var CustomerAddressCustomFieldRemovedMessage $data */ + $data = CustomerAddressCustomFieldRemovedMessageModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldRemovedMessageModel.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldRemovedMessageModel.php new file mode 100644 index 00000000000..082fe4b0ae0 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldRemovedMessageModel.php @@ -0,0 +1,490 @@ +id = $id; + $this->version = $version; + $this->createdAt = $createdAt; + $this->lastModifiedAt = $lastModifiedAt; + $this->lastModifiedBy = $lastModifiedBy; + $this->createdBy = $createdBy; + $this->sequenceNumber = $sequenceNumber; + $this->resource = $resource; + $this->resourceVersion = $resourceVersion; + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + $this->name = $name; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + * + * @return null|string + */ + public function getId() + { + if (is_null($this->id)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ID); + if (is_null($data)) { + return null; + } + $this->id = (string) $data; + } + + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + * + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + if (is_null($this->createdAt)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CREATED_AT); + if (is_null($data)) { + return null; + } + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->createdAt = $data; + } + + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayMessage number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + * + * @return null|Reference + */ + public function getResource() + { + if (is_null($this->resource)) { + /** @psalm-var stdClass|arrayVersion of the resource on which the change or action was performed.
+ * + * + * @return null|int + */ + public function getResourceVersion() + { + if (is_null($this->resourceVersion)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_RESOURCE_VERSION); + if (is_null($data)) { + return null; + } + $this->resourceVersion = (int) $data; + } + + return $this->resourceVersion; + } + + /** + *Message Type of the Message.
+ * + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Name of the Custom Field that has been removed.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + + /** + * @param ?string $id + */ + public function setId(?string $id): void + { + $this->id = $id; + } + + /** + * @param ?int $version + */ + public function setVersion(?int $version): void + { + $this->version = $version; + } + + /** + * @param ?DateTimeImmutable $createdAt + */ + public function setCreatedAt(?DateTimeImmutable $createdAt): void + { + $this->createdAt = $createdAt; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + */ + public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void + { + $this->lastModifiedAt = $lastModifiedAt; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + */ + public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void + { + $this->lastModifiedBy = $lastModifiedBy; + } + + /** + * @param ?CreatedBy $createdBy + */ + public function setCreatedBy(?CreatedBy $createdBy): void + { + $this->createdBy = $createdBy; + } + + /** + * @param ?int $sequenceNumber + */ + public function setSequenceNumber(?int $sequenceNumber): void + { + $this->sequenceNumber = $sequenceNumber; + } + + /** + * @param ?Reference $resource + */ + public function setResource(?Reference $resource): void + { + $this->resource = $resource; + } + + /** + * @param ?int $resourceVersion + */ + public function setResourceVersion(?int $resourceVersion): void + { + $this->resourceVersion = $resourceVersion; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + */ + public function setResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers): void + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + } + + /** + * @param ?string $name + */ + public function setName(?string $name): void + { + $this->name = $name; + } + + + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + $data = $this->toArray(); + if (isset($data[Message::FIELD_CREATED_AT]) && $data[Message::FIELD_CREATED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_CREATED_AT] = $data[Message::FIELD_CREATED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + + if (isset($data[Message::FIELD_LAST_MODIFIED_AT]) && $data[Message::FIELD_LAST_MODIFIED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_LAST_MODIFIED_AT] = $data[Message::FIELD_LAST_MODIFIED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + return (object) $data; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldRemovedMessagePayload.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldRemovedMessagePayload.php new file mode 100644 index 00000000000..f0f359e047e --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldRemovedMessagePayload.php @@ -0,0 +1,30 @@ +Name of the Custom Field that has been removed. + * + + * @return null|string + */ + public function getName(); + + /** + * @param ?string $name + */ + public function setName(?string $name): void; +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldRemovedMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldRemovedMessagePayloadBuilder.php new file mode 100644 index 00000000000..ea19a8023b6 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldRemovedMessagePayloadBuilder.php @@ -0,0 +1,63 @@ + + */ +final class CustomerAddressCustomFieldRemovedMessagePayloadBuilder implements Builder +{ + /** + + * @var ?string + */ + private $name; + + /** + *Name of the Custom Field that has been removed.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + * @param ?string $name + * @return $this + */ + public function withName(?string $name) + { + $this->name = $name; + + return $this; + } + + + public function build(): CustomerAddressCustomFieldRemovedMessagePayload + { + return new CustomerAddressCustomFieldRemovedMessagePayloadModel( + $this->name + ); + } + + public static function of(): CustomerAddressCustomFieldRemovedMessagePayloadBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldRemovedMessagePayloadCollection.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldRemovedMessagePayloadCollection.php new file mode 100644 index 00000000000..b0b585590eb --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldRemovedMessagePayloadCollection.php @@ -0,0 +1,56 @@ + + * @method CustomerAddressCustomFieldRemovedMessagePayload current() + * @method CustomerAddressCustomFieldRemovedMessagePayload end() + * @method CustomerAddressCustomFieldRemovedMessagePayload at($offset) + */ +class CustomerAddressCustomFieldRemovedMessagePayloadCollection extends MessagePayloadCollection +{ + /** + * @psalm-assert CustomerAddressCustomFieldRemovedMessagePayload $value + * @psalm-param CustomerAddressCustomFieldRemovedMessagePayload|stdClass $value + * @throws InvalidArgumentException + * + * @return CustomerAddressCustomFieldRemovedMessagePayloadCollection + */ + public function add($value) + { + if (!$value instanceof CustomerAddressCustomFieldRemovedMessagePayload) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?CustomerAddressCustomFieldRemovedMessagePayload + */ + protected function mapper() + { + return function (?int $index): ?CustomerAddressCustomFieldRemovedMessagePayload { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var CustomerAddressCustomFieldRemovedMessagePayload $data */ + $data = CustomerAddressCustomFieldRemovedMessagePayloadModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldRemovedMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldRemovedMessagePayloadModel.php new file mode 100644 index 00000000000..028df937fed --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomFieldRemovedMessagePayloadModel.php @@ -0,0 +1,93 @@ +name = $name; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *Name of the Custom Field that has been removed.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + + /** + * @param ?string $name + */ + public function setName(?string $name): void + { + $this->name = $name; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessage.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessage.php new file mode 100644 index 00000000000..9379f6127ad --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessage.php @@ -0,0 +1,31 @@ +id
of the Custom Type that has been removed.
+ * Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId(); + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void; +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessageBuilder.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessageBuilder.php new file mode 100644 index 00000000000..250a8f2a510 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessageBuilder.php @@ -0,0 +1,405 @@ + + */ +final class CustomerAddressCustomTypeRemovedMessageBuilder implements Builder +{ + /** + + * @var ?string + */ + private $id; + + /** + + * @var ?int + */ + private $version; + + /** + + * @var ?DateTimeImmutable + */ + private $createdAt; + + /** + + * @var ?DateTimeImmutable + */ + private $lastModifiedAt; + + /** + + * @var null|LastModifiedBy|LastModifiedByBuilder + */ + private $lastModifiedBy; + + /** + + * @var null|CreatedBy|CreatedByBuilder + */ + private $createdBy; + + /** + + * @var ?int + */ + private $sequenceNumber; + + /** + + * @var null|Reference|ReferenceBuilder + */ + private $resource; + + /** + + * @var ?int + */ + private $resourceVersion; + + /** + + * @var null|UserProvidedIdentifiers|UserProvidedIdentifiersBuilder + */ + private $resourceUserProvidedIdentifiers; + + /** + + * @var ?string + */ + private $previousTypeId; + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + + * @return null|string + */ + public function getId() + { + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + + * @return null|Reference + */ + public function getResource() + { + return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * + + * @return null|int + */ + public function getResourceVersion() + { + return $this->resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
id
of the Custom Type that has been removed.
Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId() + { + return $this->previousTypeId; + } + + /** + * @param ?string $id + * @return $this + */ + public function withId(?string $id) + { + $this->id = $id; + + return $this; + } + + /** + * @param ?int $version + * @return $this + */ + public function withVersion(?int $version) + { + $this->version = $version; + + return $this; + } + + /** + * @param ?DateTimeImmutable $createdAt + * @return $this + */ + public function withCreatedAt(?DateTimeImmutable $createdAt) + { + $this->createdAt = $createdAt; + + return $this; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + * @return $this + */ + public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt) + { + $this->lastModifiedAt = $lastModifiedAt; + + return $this; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + * @return $this + */ + public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @param ?CreatedBy $createdBy + * @return $this + */ + public function withCreatedBy(?CreatedBy $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @param ?int $sequenceNumber + * @return $this + */ + public function withSequenceNumber(?int $sequenceNumber) + { + $this->sequenceNumber = $sequenceNumber; + + return $this; + } + + /** + * @param ?Reference $resource + * @return $this + */ + public function withResource(?Reference $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @param ?int $resourceVersion + * @return $this + */ + public function withResourceVersion(?int $resourceVersion) + { + $this->resourceVersion = $resourceVersion; + + return $this; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + * @return $this + */ + public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + /** + * @param ?string $previousTypeId + * @return $this + */ + public function withPreviousTypeId(?string $previousTypeId) + { + $this->previousTypeId = $previousTypeId; + + return $this; + } + + /** + * @deprecated use withLastModifiedBy() instead + * @return $this + */ + public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @deprecated use withCreatedBy() instead + * @return $this + */ + public function withCreatedByBuilder(?CreatedByBuilder $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @deprecated use withResource() instead + * @return $this + */ + public function withResourceBuilder(?ReferenceBuilder $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @deprecated use withResourceUserProvidedIdentifiers() instead + * @return $this + */ + public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + public function build(): CustomerAddressCustomTypeRemovedMessage + { + return new CustomerAddressCustomTypeRemovedMessageModel( + $this->id, + $this->version, + $this->createdAt, + $this->lastModifiedAt, + $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, + $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy, + $this->sequenceNumber, + $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource, + $this->resourceVersion, + $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, + $this->previousTypeId + ); + } + + public static function of(): CustomerAddressCustomTypeRemovedMessageBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessageCollection.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessageCollection.php new file mode 100644 index 00000000000..b4811b65dde --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessageCollection.php @@ -0,0 +1,56 @@ + + * @method CustomerAddressCustomTypeRemovedMessage current() + * @method CustomerAddressCustomTypeRemovedMessage end() + * @method CustomerAddressCustomTypeRemovedMessage at($offset) + */ +class CustomerAddressCustomTypeRemovedMessageCollection extends MessageCollection +{ + /** + * @psalm-assert CustomerAddressCustomTypeRemovedMessage $value + * @psalm-param CustomerAddressCustomTypeRemovedMessage|stdClass $value + * @throws InvalidArgumentException + * + * @return CustomerAddressCustomTypeRemovedMessageCollection + */ + public function add($value) + { + if (!$value instanceof CustomerAddressCustomTypeRemovedMessage) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?CustomerAddressCustomTypeRemovedMessage + */ + protected function mapper() + { + return function (?int $index): ?CustomerAddressCustomTypeRemovedMessage { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var CustomerAddressCustomTypeRemovedMessage $data */ + $data = CustomerAddressCustomTypeRemovedMessageModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessageModel.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessageModel.php new file mode 100644 index 00000000000..f9df631b51a --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessageModel.php @@ -0,0 +1,491 @@ +id = $id; + $this->version = $version; + $this->createdAt = $createdAt; + $this->lastModifiedAt = $lastModifiedAt; + $this->lastModifiedBy = $lastModifiedBy; + $this->createdBy = $createdBy; + $this->sequenceNumber = $sequenceNumber; + $this->resource = $resource; + $this->resourceVersion = $resourceVersion; + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + $this->previousTypeId = $previousTypeId; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + * + * @return null|string + */ + public function getId() + { + if (is_null($this->id)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ID); + if (is_null($data)) { + return null; + } + $this->id = (string) $data; + } + + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + * + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + if (is_null($this->createdAt)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CREATED_AT); + if (is_null($data)) { + return null; + } + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->createdAt = $data; + } + + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayMessage number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + * + * @return null|Reference + */ + public function getResource() + { + if (is_null($this->resource)) { + /** @psalm-var stdClass|arrayVersion of the resource on which the change or action was performed.
+ * + * + * @return null|int + */ + public function getResourceVersion() + { + if (is_null($this->resourceVersion)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_RESOURCE_VERSION); + if (is_null($data)) { + return null; + } + $this->resourceVersion = (int) $data; + } + + return $this->resourceVersion; + } + + /** + *Message Type of the Message.
+ * + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
id
of the Custom Type that has been removed.
Absent when there has not been a Custom Type before.
+ * + * + * @return null|string + */ + public function getPreviousTypeId() + { + if (is_null($this->previousTypeId)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_PREVIOUS_TYPE_ID); + if (is_null($data)) { + return null; + } + $this->previousTypeId = (string) $data; + } + + return $this->previousTypeId; + } + + + /** + * @param ?string $id + */ + public function setId(?string $id): void + { + $this->id = $id; + } + + /** + * @param ?int $version + */ + public function setVersion(?int $version): void + { + $this->version = $version; + } + + /** + * @param ?DateTimeImmutable $createdAt + */ + public function setCreatedAt(?DateTimeImmutable $createdAt): void + { + $this->createdAt = $createdAt; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + */ + public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void + { + $this->lastModifiedAt = $lastModifiedAt; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + */ + public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void + { + $this->lastModifiedBy = $lastModifiedBy; + } + + /** + * @param ?CreatedBy $createdBy + */ + public function setCreatedBy(?CreatedBy $createdBy): void + { + $this->createdBy = $createdBy; + } + + /** + * @param ?int $sequenceNumber + */ + public function setSequenceNumber(?int $sequenceNumber): void + { + $this->sequenceNumber = $sequenceNumber; + } + + /** + * @param ?Reference $resource + */ + public function setResource(?Reference $resource): void + { + $this->resource = $resource; + } + + /** + * @param ?int $resourceVersion + */ + public function setResourceVersion(?int $resourceVersion): void + { + $this->resourceVersion = $resourceVersion; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + */ + public function setResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers): void + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + } + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void + { + $this->previousTypeId = $previousTypeId; + } + + + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + $data = $this->toArray(); + if (isset($data[Message::FIELD_CREATED_AT]) && $data[Message::FIELD_CREATED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_CREATED_AT] = $data[Message::FIELD_CREATED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + + if (isset($data[Message::FIELD_LAST_MODIFIED_AT]) && $data[Message::FIELD_LAST_MODIFIED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_LAST_MODIFIED_AT] = $data[Message::FIELD_LAST_MODIFIED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + return (object) $data; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessagePayload.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessagePayload.php new file mode 100644 index 00000000000..9cd69b3bb53 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessagePayload.php @@ -0,0 +1,31 @@ +id
of the Custom Type that has been removed.
+ * Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId(); + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void; +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessagePayloadBuilder.php new file mode 100644 index 00000000000..05269fa9d4c --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessagePayloadBuilder.php @@ -0,0 +1,64 @@ + + */ +final class CustomerAddressCustomTypeRemovedMessagePayloadBuilder implements Builder +{ + /** + + * @var ?string + */ + private $previousTypeId; + + /** + *id
of the Custom Type that has been removed.
Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId() + { + return $this->previousTypeId; + } + + /** + * @param ?string $previousTypeId + * @return $this + */ + public function withPreviousTypeId(?string $previousTypeId) + { + $this->previousTypeId = $previousTypeId; + + return $this; + } + + + public function build(): CustomerAddressCustomTypeRemovedMessagePayload + { + return new CustomerAddressCustomTypeRemovedMessagePayloadModel( + $this->previousTypeId + ); + } + + public static function of(): CustomerAddressCustomTypeRemovedMessagePayloadBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessagePayloadCollection.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessagePayloadCollection.php new file mode 100644 index 00000000000..2507fecfc92 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessagePayloadCollection.php @@ -0,0 +1,56 @@ + + * @method CustomerAddressCustomTypeRemovedMessagePayload current() + * @method CustomerAddressCustomTypeRemovedMessagePayload end() + * @method CustomerAddressCustomTypeRemovedMessagePayload at($offset) + */ +class CustomerAddressCustomTypeRemovedMessagePayloadCollection extends MessagePayloadCollection +{ + /** + * @psalm-assert CustomerAddressCustomTypeRemovedMessagePayload $value + * @psalm-param CustomerAddressCustomTypeRemovedMessagePayload|stdClass $value + * @throws InvalidArgumentException + * + * @return CustomerAddressCustomTypeRemovedMessagePayloadCollection + */ + public function add($value) + { + if (!$value instanceof CustomerAddressCustomTypeRemovedMessagePayload) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?CustomerAddressCustomTypeRemovedMessagePayload + */ + protected function mapper() + { + return function (?int $index): ?CustomerAddressCustomTypeRemovedMessagePayload { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var CustomerAddressCustomTypeRemovedMessagePayload $data */ + $data = CustomerAddressCustomTypeRemovedMessagePayloadModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessagePayloadModel.php new file mode 100644 index 00000000000..a7c1503ec11 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeRemovedMessagePayloadModel.php @@ -0,0 +1,94 @@ +previousTypeId = $previousTypeId; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *id
of the Custom Type that has been removed.
Absent when there has not been a Custom Type before.
+ * + * + * @return null|string + */ + public function getPreviousTypeId() + { + if (is_null($this->previousTypeId)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_PREVIOUS_TYPE_ID); + if (is_null($data)) { + return null; + } + $this->previousTypeId = (string) $data; + } + + return $this->previousTypeId; + } + + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void + { + $this->previousTypeId = $previousTypeId; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessage.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessage.php new file mode 100644 index 00000000000..cc33a3b23b5 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessage.php @@ -0,0 +1,46 @@ +The Custom Fields that have been set. + * + + * @return null|CustomFields + */ + public function getCustomFields(); + + /** + *id
of the previous Custom Type.
Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId(); + + /** + * @param ?CustomFields $customFields + */ + public function setCustomFields(?CustomFields $customFields): void; + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void; +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessageBuilder.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessageBuilder.php new file mode 100644 index 00000000000..f06f1e286c1 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessageBuilder.php @@ -0,0 +1,447 @@ + + */ +final class CustomerAddressCustomTypeSetMessageBuilder implements Builder +{ + /** + + * @var ?string + */ + private $id; + + /** + + * @var ?int + */ + private $version; + + /** + + * @var ?DateTimeImmutable + */ + private $createdAt; + + /** + + * @var ?DateTimeImmutable + */ + private $lastModifiedAt; + + /** + + * @var null|LastModifiedBy|LastModifiedByBuilder + */ + private $lastModifiedBy; + + /** + + * @var null|CreatedBy|CreatedByBuilder + */ + private $createdBy; + + /** + + * @var ?int + */ + private $sequenceNumber; + + /** + + * @var null|Reference|ReferenceBuilder + */ + private $resource; + + /** + + * @var ?int + */ + private $resourceVersion; + + /** + + * @var null|UserProvidedIdentifiers|UserProvidedIdentifiersBuilder + */ + private $resourceUserProvidedIdentifiers; + + /** + + * @var null|CustomFields|CustomFieldsBuilder + */ + private $customFields; + + /** + + * @var ?string + */ + private $previousTypeId; + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + + * @return null|string + */ + public function getId() + { + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + + * @return null|Reference + */ + public function getResource() + { + return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * + + * @return null|int + */ + public function getResourceVersion() + { + return $this->resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
The Custom Fields that have been set.
+ * + + * @return null|CustomFields + */ + public function getCustomFields() + { + return $this->customFields instanceof CustomFieldsBuilder ? $this->customFields->build() : $this->customFields; + } + + /** + *id
of the previous Custom Type.
Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId() + { + return $this->previousTypeId; + } + + /** + * @param ?string $id + * @return $this + */ + public function withId(?string $id) + { + $this->id = $id; + + return $this; + } + + /** + * @param ?int $version + * @return $this + */ + public function withVersion(?int $version) + { + $this->version = $version; + + return $this; + } + + /** + * @param ?DateTimeImmutable $createdAt + * @return $this + */ + public function withCreatedAt(?DateTimeImmutable $createdAt) + { + $this->createdAt = $createdAt; + + return $this; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + * @return $this + */ + public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt) + { + $this->lastModifiedAt = $lastModifiedAt; + + return $this; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + * @return $this + */ + public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @param ?CreatedBy $createdBy + * @return $this + */ + public function withCreatedBy(?CreatedBy $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @param ?int $sequenceNumber + * @return $this + */ + public function withSequenceNumber(?int $sequenceNumber) + { + $this->sequenceNumber = $sequenceNumber; + + return $this; + } + + /** + * @param ?Reference $resource + * @return $this + */ + public function withResource(?Reference $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @param ?int $resourceVersion + * @return $this + */ + public function withResourceVersion(?int $resourceVersion) + { + $this->resourceVersion = $resourceVersion; + + return $this; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + * @return $this + */ + public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + /** + * @param ?CustomFields $customFields + * @return $this + */ + public function withCustomFields(?CustomFields $customFields) + { + $this->customFields = $customFields; + + return $this; + } + + /** + * @param ?string $previousTypeId + * @return $this + */ + public function withPreviousTypeId(?string $previousTypeId) + { + $this->previousTypeId = $previousTypeId; + + return $this; + } + + /** + * @deprecated use withLastModifiedBy() instead + * @return $this + */ + public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @deprecated use withCreatedBy() instead + * @return $this + */ + public function withCreatedByBuilder(?CreatedByBuilder $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @deprecated use withResource() instead + * @return $this + */ + public function withResourceBuilder(?ReferenceBuilder $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @deprecated use withResourceUserProvidedIdentifiers() instead + * @return $this + */ + public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + /** + * @deprecated use withCustomFields() instead + * @return $this + */ + public function withCustomFieldsBuilder(?CustomFieldsBuilder $customFields) + { + $this->customFields = $customFields; + + return $this; + } + + public function build(): CustomerAddressCustomTypeSetMessage + { + return new CustomerAddressCustomTypeSetMessageModel( + $this->id, + $this->version, + $this->createdAt, + $this->lastModifiedAt, + $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, + $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy, + $this->sequenceNumber, + $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource, + $this->resourceVersion, + $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, + $this->customFields instanceof CustomFieldsBuilder ? $this->customFields->build() : $this->customFields, + $this->previousTypeId + ); + } + + public static function of(): CustomerAddressCustomTypeSetMessageBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessageCollection.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessageCollection.php new file mode 100644 index 00000000000..7e207e1014a --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessageCollection.php @@ -0,0 +1,56 @@ + + * @method CustomerAddressCustomTypeSetMessage current() + * @method CustomerAddressCustomTypeSetMessage end() + * @method CustomerAddressCustomTypeSetMessage at($offset) + */ +class CustomerAddressCustomTypeSetMessageCollection extends MessageCollection +{ + /** + * @psalm-assert CustomerAddressCustomTypeSetMessage $value + * @psalm-param CustomerAddressCustomTypeSetMessage|stdClass $value + * @throws InvalidArgumentException + * + * @return CustomerAddressCustomTypeSetMessageCollection + */ + public function add($value) + { + if (!$value instanceof CustomerAddressCustomTypeSetMessage) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?CustomerAddressCustomTypeSetMessage + */ + protected function mapper() + { + return function (?int $index): ?CustomerAddressCustomTypeSetMessage { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var CustomerAddressCustomTypeSetMessage $data */ + $data = CustomerAddressCustomTypeSetMessageModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessageModel.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessageModel.php new file mode 100644 index 00000000000..cb96ea51429 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessageModel.php @@ -0,0 +1,530 @@ +id = $id; + $this->version = $version; + $this->createdAt = $createdAt; + $this->lastModifiedAt = $lastModifiedAt; + $this->lastModifiedBy = $lastModifiedBy; + $this->createdBy = $createdBy; + $this->sequenceNumber = $sequenceNumber; + $this->resource = $resource; + $this->resourceVersion = $resourceVersion; + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + $this->customFields = $customFields; + $this->previousTypeId = $previousTypeId; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + * + * @return null|string + */ + public function getId() + { + if (is_null($this->id)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ID); + if (is_null($data)) { + return null; + } + $this->id = (string) $data; + } + + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + * + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + if (is_null($this->createdAt)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CREATED_AT); + if (is_null($data)) { + return null; + } + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->createdAt = $data; + } + + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayMessage number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + * + * @return null|Reference + */ + public function getResource() + { + if (is_null($this->resource)) { + /** @psalm-var stdClass|arrayVersion of the resource on which the change or action was performed.
+ * + * + * @return null|int + */ + public function getResourceVersion() + { + if (is_null($this->resourceVersion)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_RESOURCE_VERSION); + if (is_null($data)) { + return null; + } + $this->resourceVersion = (int) $data; + } + + return $this->resourceVersion; + } + + /** + *Message Type of the Message.
+ * + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
The Custom Fields that have been set.
+ * + * + * @return null|CustomFields + */ + public function getCustomFields() + { + if (is_null($this->customFields)) { + /** @psalm-var stdClass|arrayid
of the previous Custom Type.
Absent when there has not been a Custom Type before.
+ * + * + * @return null|string + */ + public function getPreviousTypeId() + { + if (is_null($this->previousTypeId)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_PREVIOUS_TYPE_ID); + if (is_null($data)) { + return null; + } + $this->previousTypeId = (string) $data; + } + + return $this->previousTypeId; + } + + + /** + * @param ?string $id + */ + public function setId(?string $id): void + { + $this->id = $id; + } + + /** + * @param ?int $version + */ + public function setVersion(?int $version): void + { + $this->version = $version; + } + + /** + * @param ?DateTimeImmutable $createdAt + */ + public function setCreatedAt(?DateTimeImmutable $createdAt): void + { + $this->createdAt = $createdAt; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + */ + public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void + { + $this->lastModifiedAt = $lastModifiedAt; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + */ + public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void + { + $this->lastModifiedBy = $lastModifiedBy; + } + + /** + * @param ?CreatedBy $createdBy + */ + public function setCreatedBy(?CreatedBy $createdBy): void + { + $this->createdBy = $createdBy; + } + + /** + * @param ?int $sequenceNumber + */ + public function setSequenceNumber(?int $sequenceNumber): void + { + $this->sequenceNumber = $sequenceNumber; + } + + /** + * @param ?Reference $resource + */ + public function setResource(?Reference $resource): void + { + $this->resource = $resource; + } + + /** + * @param ?int $resourceVersion + */ + public function setResourceVersion(?int $resourceVersion): void + { + $this->resourceVersion = $resourceVersion; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + */ + public function setResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers): void + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + } + + /** + * @param ?CustomFields $customFields + */ + public function setCustomFields(?CustomFields $customFields): void + { + $this->customFields = $customFields; + } + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void + { + $this->previousTypeId = $previousTypeId; + } + + + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + $data = $this->toArray(); + if (isset($data[Message::FIELD_CREATED_AT]) && $data[Message::FIELD_CREATED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_CREATED_AT] = $data[Message::FIELD_CREATED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + + if (isset($data[Message::FIELD_LAST_MODIFIED_AT]) && $data[Message::FIELD_LAST_MODIFIED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_LAST_MODIFIED_AT] = $data[Message::FIELD_LAST_MODIFIED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + return (object) $data; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessagePayload.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessagePayload.php new file mode 100644 index 00000000000..38ecdfbcf8c --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessagePayload.php @@ -0,0 +1,46 @@ +The Custom Fields that have been set. + * + + * @return null|CustomFields + */ + public function getCustomFields(); + + /** + *id
of the previous Custom Type.
Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId(); + + /** + * @param ?CustomFields $customFields + */ + public function setCustomFields(?CustomFields $customFields): void; + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void; +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessagePayloadBuilder.php new file mode 100644 index 00000000000..8ba497f3a0a --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessagePayloadBuilder.php @@ -0,0 +1,105 @@ + + */ +final class CustomerAddressCustomTypeSetMessagePayloadBuilder implements Builder +{ + /** + + * @var null|CustomFields|CustomFieldsBuilder + */ + private $customFields; + + /** + + * @var ?string + */ + private $previousTypeId; + + /** + *The Custom Fields that have been set.
+ * + + * @return null|CustomFields + */ + public function getCustomFields() + { + return $this->customFields instanceof CustomFieldsBuilder ? $this->customFields->build() : $this->customFields; + } + + /** + *id
of the previous Custom Type.
Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId() + { + return $this->previousTypeId; + } + + /** + * @param ?CustomFields $customFields + * @return $this + */ + public function withCustomFields(?CustomFields $customFields) + { + $this->customFields = $customFields; + + return $this; + } + + /** + * @param ?string $previousTypeId + * @return $this + */ + public function withPreviousTypeId(?string $previousTypeId) + { + $this->previousTypeId = $previousTypeId; + + return $this; + } + + /** + * @deprecated use withCustomFields() instead + * @return $this + */ + public function withCustomFieldsBuilder(?CustomFieldsBuilder $customFields) + { + $this->customFields = $customFields; + + return $this; + } + + public function build(): CustomerAddressCustomTypeSetMessagePayload + { + return new CustomerAddressCustomTypeSetMessagePayloadModel( + $this->customFields instanceof CustomFieldsBuilder ? $this->customFields->build() : $this->customFields, + $this->previousTypeId + ); + } + + public static function of(): CustomerAddressCustomTypeSetMessagePayloadBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessagePayloadCollection.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessagePayloadCollection.php new file mode 100644 index 00000000000..546e7fd269d --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessagePayloadCollection.php @@ -0,0 +1,56 @@ + + * @method CustomerAddressCustomTypeSetMessagePayload current() + * @method CustomerAddressCustomTypeSetMessagePayload end() + * @method CustomerAddressCustomTypeSetMessagePayload at($offset) + */ +class CustomerAddressCustomTypeSetMessagePayloadCollection extends MessagePayloadCollection +{ + /** + * @psalm-assert CustomerAddressCustomTypeSetMessagePayload $value + * @psalm-param CustomerAddressCustomTypeSetMessagePayload|stdClass $value + * @throws InvalidArgumentException + * + * @return CustomerAddressCustomTypeSetMessagePayloadCollection + */ + public function add($value) + { + if (!$value instanceof CustomerAddressCustomTypeSetMessagePayload) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?CustomerAddressCustomTypeSetMessagePayload + */ + protected function mapper() + { + return function (?int $index): ?CustomerAddressCustomTypeSetMessagePayload { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var CustomerAddressCustomTypeSetMessagePayload $data */ + $data = CustomerAddressCustomTypeSetMessagePayloadModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessagePayloadModel.php new file mode 100644 index 00000000000..b4403e0cd14 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerAddressCustomTypeSetMessagePayloadModel.php @@ -0,0 +1,133 @@ +customFields = $customFields; + $this->previousTypeId = $previousTypeId; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *The Custom Fields that have been set.
+ * + * + * @return null|CustomFields + */ + public function getCustomFields() + { + if (is_null($this->customFields)) { + /** @psalm-var stdClass|arrayid
of the previous Custom Type.
Absent when there has not been a Custom Type before.
+ * + * + * @return null|string + */ + public function getPreviousTypeId() + { + if (is_null($this->previousTypeId)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_PREVIOUS_TYPE_ID); + if (is_null($data)) { + return null; + } + $this->previousTypeId = (string) $data; + } + + return $this->previousTypeId; + } + + + /** + * @param ?CustomFields $customFields + */ + public function setCustomFields(?CustomFields $customFields): void + { + $this->customFields = $customFields; + } + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void + { + $this->previousTypeId = $previousTypeId; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessage.php b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessage.php new file mode 100644 index 00000000000..42fbcc561ca --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessage.php @@ -0,0 +1,44 @@ +Name of the Custom Field that has been added. + * + + * @return null|string + */ + public function getName(); + + /** + *The added CustomFieldValue based on the FieldType.
+ * + + * @return null|mixed + */ + public function getValue(); + + /** + * @param ?string $name + */ + public function setName(?string $name): void; + + /** + * @param mixed $value + */ + public function setValue($value): void; +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessageBuilder.php b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessageBuilder.php new file mode 100644 index 00000000000..2d27e6a06f7 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessageBuilder.php @@ -0,0 +1,433 @@ + + */ +final class CustomerCustomFieldAddedMessageBuilder implements Builder +{ + /** + + * @var ?string + */ + private $id; + + /** + + * @var ?int + */ + private $version; + + /** + + * @var ?DateTimeImmutable + */ + private $createdAt; + + /** + + * @var ?DateTimeImmutable + */ + private $lastModifiedAt; + + /** + + * @var null|LastModifiedBy|LastModifiedByBuilder + */ + private $lastModifiedBy; + + /** + + * @var null|CreatedBy|CreatedByBuilder + */ + private $createdBy; + + /** + + * @var ?int + */ + private $sequenceNumber; + + /** + + * @var null|Reference|ReferenceBuilder + */ + private $resource; + + /** + + * @var ?int + */ + private $resourceVersion; + + /** + + * @var null|UserProvidedIdentifiers|UserProvidedIdentifiersBuilder + */ + private $resourceUserProvidedIdentifiers; + + /** + + * @var ?string + */ + private $name; + + /** + + * @var null|mixed|mixed + */ + private $value; + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + + * @return null|string + */ + public function getId() + { + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + + * @return null|Reference + */ + public function getResource() + { + return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * + + * @return null|int + */ + public function getResourceVersion() + { + return $this->resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Name of the Custom Field that has been added.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + *The added CustomFieldValue based on the FieldType.
+ * + + * @return null|mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * @param ?string $id + * @return $this + */ + public function withId(?string $id) + { + $this->id = $id; + + return $this; + } + + /** + * @param ?int $version + * @return $this + */ + public function withVersion(?int $version) + { + $this->version = $version; + + return $this; + } + + /** + * @param ?DateTimeImmutable $createdAt + * @return $this + */ + public function withCreatedAt(?DateTimeImmutable $createdAt) + { + $this->createdAt = $createdAt; + + return $this; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + * @return $this + */ + public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt) + { + $this->lastModifiedAt = $lastModifiedAt; + + return $this; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + * @return $this + */ + public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @param ?CreatedBy $createdBy + * @return $this + */ + public function withCreatedBy(?CreatedBy $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @param ?int $sequenceNumber + * @return $this + */ + public function withSequenceNumber(?int $sequenceNumber) + { + $this->sequenceNumber = $sequenceNumber; + + return $this; + } + + /** + * @param ?Reference $resource + * @return $this + */ + public function withResource(?Reference $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @param ?int $resourceVersion + * @return $this + */ + public function withResourceVersion(?int $resourceVersion) + { + $this->resourceVersion = $resourceVersion; + + return $this; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + * @return $this + */ + public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + /** + * @param ?string $name + * @return $this + */ + public function withName(?string $name) + { + $this->name = $name; + + return $this; + } + + /** + * @param mixed $value + * @return $this + */ + public function withValue($value) + { + $this->value = $value; + + return $this; + } + + /** + * @deprecated use withLastModifiedBy() instead + * @return $this + */ + public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @deprecated use withCreatedBy() instead + * @return $this + */ + public function withCreatedByBuilder(?CreatedByBuilder $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @deprecated use withResource() instead + * @return $this + */ + public function withResourceBuilder(?ReferenceBuilder $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @deprecated use withResourceUserProvidedIdentifiers() instead + * @return $this + */ + public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + public function build(): CustomerCustomFieldAddedMessage + { + return new CustomerCustomFieldAddedMessageModel( + $this->id, + $this->version, + $this->createdAt, + $this->lastModifiedAt, + $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, + $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy, + $this->sequenceNumber, + $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource, + $this->resourceVersion, + $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, + $this->name, + $this->value + ); + } + + public static function of(): CustomerCustomFieldAddedMessageBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessageCollection.php b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessageCollection.php new file mode 100644 index 00000000000..9a332d375b6 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessageCollection.php @@ -0,0 +1,56 @@ + + * @method CustomerCustomFieldAddedMessage current() + * @method CustomerCustomFieldAddedMessage end() + * @method CustomerCustomFieldAddedMessage at($offset) + */ +class CustomerCustomFieldAddedMessageCollection extends MessageCollection +{ + /** + * @psalm-assert CustomerCustomFieldAddedMessage $value + * @psalm-param CustomerCustomFieldAddedMessage|stdClass $value + * @throws InvalidArgumentException + * + * @return CustomerCustomFieldAddedMessageCollection + */ + public function add($value) + { + if (!$value instanceof CustomerCustomFieldAddedMessage) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?CustomerCustomFieldAddedMessage + */ + protected function mapper() + { + return function (?int $index): ?CustomerCustomFieldAddedMessage { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var CustomerCustomFieldAddedMessage $data */ + $data = CustomerCustomFieldAddedMessageModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessageModel.php b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessageModel.php new file mode 100644 index 00000000000..0bd78c36c98 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessageModel.php @@ -0,0 +1,526 @@ +id = $id; + $this->version = $version; + $this->createdAt = $createdAt; + $this->lastModifiedAt = $lastModifiedAt; + $this->lastModifiedBy = $lastModifiedBy; + $this->createdBy = $createdBy; + $this->sequenceNumber = $sequenceNumber; + $this->resource = $resource; + $this->resourceVersion = $resourceVersion; + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + $this->name = $name; + $this->value = $value; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + * + * @return null|string + */ + public function getId() + { + if (is_null($this->id)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ID); + if (is_null($data)) { + return null; + } + $this->id = (string) $data; + } + + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + * + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + if (is_null($this->createdAt)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CREATED_AT); + if (is_null($data)) { + return null; + } + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->createdAt = $data; + } + + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayMessage number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + * + * @return null|Reference + */ + public function getResource() + { + if (is_null($this->resource)) { + /** @psalm-var stdClass|arrayVersion of the resource on which the change or action was performed.
+ * + * + * @return null|int + */ + public function getResourceVersion() + { + if (is_null($this->resourceVersion)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_RESOURCE_VERSION); + if (is_null($data)) { + return null; + } + $this->resourceVersion = (int) $data; + } + + return $this->resourceVersion; + } + + /** + *Message Type of the Message.
+ * + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Name of the Custom Field that has been added.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + /** + *The added CustomFieldValue based on the FieldType.
+ * + * + * @return null|mixed + */ + public function getValue() + { + if (is_null($this->value)) { + /** @psalm-var mixed $data */ + $data = $this->raw(self::FIELD_VALUE); + if (is_null($data)) { + return null; + } + $this->value = $data; + } + + return $this->value; + } + + + /** + * @param ?string $id + */ + public function setId(?string $id): void + { + $this->id = $id; + } + + /** + * @param ?int $version + */ + public function setVersion(?int $version): void + { + $this->version = $version; + } + + /** + * @param ?DateTimeImmutable $createdAt + */ + public function setCreatedAt(?DateTimeImmutable $createdAt): void + { + $this->createdAt = $createdAt; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + */ + public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void + { + $this->lastModifiedAt = $lastModifiedAt; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + */ + public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void + { + $this->lastModifiedBy = $lastModifiedBy; + } + + /** + * @param ?CreatedBy $createdBy + */ + public function setCreatedBy(?CreatedBy $createdBy): void + { + $this->createdBy = $createdBy; + } + + /** + * @param ?int $sequenceNumber + */ + public function setSequenceNumber(?int $sequenceNumber): void + { + $this->sequenceNumber = $sequenceNumber; + } + + /** + * @param ?Reference $resource + */ + public function setResource(?Reference $resource): void + { + $this->resource = $resource; + } + + /** + * @param ?int $resourceVersion + */ + public function setResourceVersion(?int $resourceVersion): void + { + $this->resourceVersion = $resourceVersion; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + */ + public function setResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers): void + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + } + + /** + * @param ?string $name + */ + public function setName(?string $name): void + { + $this->name = $name; + } + + /** + * @param mixed $value + */ + public function setValue($value): void + { + $this->value = $value; + } + + + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + $data = $this->toArray(); + if (isset($data[Message::FIELD_CREATED_AT]) && $data[Message::FIELD_CREATED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_CREATED_AT] = $data[Message::FIELD_CREATED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + + if (isset($data[Message::FIELD_LAST_MODIFIED_AT]) && $data[Message::FIELD_LAST_MODIFIED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_LAST_MODIFIED_AT] = $data[Message::FIELD_LAST_MODIFIED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + return (object) $data; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessagePayload.php b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessagePayload.php new file mode 100644 index 00000000000..7ccc663ea19 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessagePayload.php @@ -0,0 +1,44 @@ +Name of the Custom Field that has been added. + * + + * @return null|string + */ + public function getName(); + + /** + *The added CustomFieldValue based on the FieldType.
+ * + + * @return null|mixed + */ + public function getValue(); + + /** + * @param ?string $name + */ + public function setName(?string $name): void; + + /** + * @param mixed $value + */ + public function setValue($value): void; +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessagePayloadBuilder.php new file mode 100644 index 00000000000..8307c2f7ca0 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessagePayloadBuilder.php @@ -0,0 +1,92 @@ + + */ +final class CustomerCustomFieldAddedMessagePayloadBuilder implements Builder +{ + /** + + * @var ?string + */ + private $name; + + /** + + * @var null|mixed|mixed + */ + private $value; + + /** + *Name of the Custom Field that has been added.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + *The added CustomFieldValue based on the FieldType.
+ * + + * @return null|mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * @param ?string $name + * @return $this + */ + public function withName(?string $name) + { + $this->name = $name; + + return $this; + } + + /** + * @param mixed $value + * @return $this + */ + public function withValue($value) + { + $this->value = $value; + + return $this; + } + + + public function build(): CustomerCustomFieldAddedMessagePayload + { + return new CustomerCustomFieldAddedMessagePayloadModel( + $this->name, + $this->value + ); + } + + public static function of(): CustomerCustomFieldAddedMessagePayloadBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessagePayloadCollection.php b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessagePayloadCollection.php new file mode 100644 index 00000000000..fa9c0707d85 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessagePayloadCollection.php @@ -0,0 +1,56 @@ + + * @method CustomerCustomFieldAddedMessagePayload current() + * @method CustomerCustomFieldAddedMessagePayload end() + * @method CustomerCustomFieldAddedMessagePayload at($offset) + */ +class CustomerCustomFieldAddedMessagePayloadCollection extends MessagePayloadCollection +{ + /** + * @psalm-assert CustomerCustomFieldAddedMessagePayload $value + * @psalm-param CustomerCustomFieldAddedMessagePayload|stdClass $value + * @throws InvalidArgumentException + * + * @return CustomerCustomFieldAddedMessagePayloadCollection + */ + public function add($value) + { + if (!$value instanceof CustomerCustomFieldAddedMessagePayload) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?CustomerCustomFieldAddedMessagePayload + */ + protected function mapper() + { + return function (?int $index): ?CustomerCustomFieldAddedMessagePayload { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var CustomerCustomFieldAddedMessagePayload $data */ + $data = CustomerCustomFieldAddedMessagePayloadModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessagePayloadModel.php new file mode 100644 index 00000000000..66d02f2f25e --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldAddedMessagePayloadModel.php @@ -0,0 +1,129 @@ +name = $name; + $this->value = $value; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *Name of the Custom Field that has been added.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + /** + *The added CustomFieldValue based on the FieldType.
+ * + * + * @return null|mixed + */ + public function getValue() + { + if (is_null($this->value)) { + /** @psalm-var mixed $data */ + $data = $this->raw(self::FIELD_VALUE); + if (is_null($data)) { + return null; + } + $this->value = $data; + } + + return $this->value; + } + + + /** + * @param ?string $name + */ + public function setName(?string $name): void + { + $this->name = $name; + } + + /** + * @param mixed $value + */ + public function setValue($value): void + { + $this->value = $value; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomFieldChangedMessage.php b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldChangedMessage.php new file mode 100644 index 00000000000..6ae01abd8f9 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldChangedMessage.php @@ -0,0 +1,59 @@ +Name of the Custom Field that has been changed. + * + + * @return null|string + */ + public function getName(); + + /** + *CustomFieldValue based on the FieldType after the Set Custom Field update action.
+ * + + * @return null|mixed + */ + public function getValue(); + + /** + *CustomFieldValue based on the FieldType before the Set CustomField update action.
+ * When there has not been a Custom Field with the name
on the Customer before, a Customer Custom Field Added Message is generated instead.
Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + + * @return null|string + */ + public function getId() + { + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + + * @return null|Reference + */ + public function getResource() + { + return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * + + * @return null|int + */ + public function getResourceVersion() + { + return $this->resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Name of the Custom Field that has been changed.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + *CustomFieldValue based on the FieldType after the Set Custom Field update action.
+ * + + * @return null|mixed + */ + public function getValue() + { + return $this->value; + } + + /** + *CustomFieldValue based on the FieldType before the Set CustomField update action.
+ * When there has not been a Custom Field with the name
on the Customer before, a Customer Custom Field Added Message is generated instead.
Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + * + * @return null|string + */ + public function getId() + { + if (is_null($this->id)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ID); + if (is_null($data)) { + return null; + } + $this->id = (string) $data; + } + + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + * + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + if (is_null($this->createdAt)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CREATED_AT); + if (is_null($data)) { + return null; + } + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->createdAt = $data; + } + + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayMessage number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + * + * @return null|Reference + */ + public function getResource() + { + if (is_null($this->resource)) { + /** @psalm-var stdClass|arrayVersion of the resource on which the change or action was performed.
+ * + * + * @return null|int + */ + public function getResourceVersion() + { + if (is_null($this->resourceVersion)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_RESOURCE_VERSION); + if (is_null($data)) { + return null; + } + $this->resourceVersion = (int) $data; + } + + return $this->resourceVersion; + } + + /** + *Message Type of the Message.
+ * + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Name of the Custom Field that has been changed.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + /** + *CustomFieldValue based on the FieldType after the Set Custom Field update action.
+ * + * + * @return null|mixed + */ + public function getValue() + { + if (is_null($this->value)) { + /** @psalm-var mixed $data */ + $data = $this->raw(self::FIELD_VALUE); + if (is_null($data)) { + return null; + } + $this->value = $data; + } + + return $this->value; + } + + /** + *CustomFieldValue based on the FieldType before the Set CustomField update action.
+ * When there has not been a Custom Field with the name
on the Customer before, a Customer Custom Field Added Message is generated instead.
CustomFieldValue based on the FieldType after the Set Custom Field update action.
+ * + + * @return null|mixed + */ + public function getValue(); + + /** + *CustomFieldValue based on the FieldType before the Set CustomField update action.
+ * When there has not been a Custom Field with the name
on the Customer before, a Customer Custom Field Added Message is generated instead.
Name of the Custom Field that has been changed.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + *CustomFieldValue based on the FieldType after the Set Custom Field update action.
+ * + + * @return null|mixed + */ + public function getValue() + { + return $this->value; + } + + /** + *CustomFieldValue based on the FieldType before the Set CustomField update action.
+ * When there has not been a Custom Field with the name
on the Customer before, a Customer Custom Field Added Message is generated instead.
Name of the Custom Field that has been changed.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + /** + *CustomFieldValue based on the FieldType after the Set Custom Field update action.
+ * + * + * @return null|mixed + */ + public function getValue() + { + if (is_null($this->value)) { + /** @psalm-var mixed $data */ + $data = $this->raw(self::FIELD_VALUE); + if (is_null($data)) { + return null; + } + $this->value = $data; + } + + return $this->value; + } + + /** + *CustomFieldValue based on the FieldType before the Set CustomField update action.
+ * When there has not been a Custom Field with the name
on the Customer before, a Customer Custom Field Added Message is generated instead.
Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + + * @return null|string + */ + public function getId() + { + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + + * @return null|Reference + */ + public function getResource() + { + return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * + + * @return null|int + */ + public function getResourceVersion() + { + return $this->resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Name of the Custom Field that has been removed.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + * @param ?string $id + * @return $this + */ + public function withId(?string $id) + { + $this->id = $id; + + return $this; + } + + /** + * @param ?int $version + * @return $this + */ + public function withVersion(?int $version) + { + $this->version = $version; + + return $this; + } + + /** + * @param ?DateTimeImmutable $createdAt + * @return $this + */ + public function withCreatedAt(?DateTimeImmutable $createdAt) + { + $this->createdAt = $createdAt; + + return $this; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + * @return $this + */ + public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt) + { + $this->lastModifiedAt = $lastModifiedAt; + + return $this; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + * @return $this + */ + public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @param ?CreatedBy $createdBy + * @return $this + */ + public function withCreatedBy(?CreatedBy $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @param ?int $sequenceNumber + * @return $this + */ + public function withSequenceNumber(?int $sequenceNumber) + { + $this->sequenceNumber = $sequenceNumber; + + return $this; + } + + /** + * @param ?Reference $resource + * @return $this + */ + public function withResource(?Reference $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @param ?int $resourceVersion + * @return $this + */ + public function withResourceVersion(?int $resourceVersion) + { + $this->resourceVersion = $resourceVersion; + + return $this; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + * @return $this + */ + public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + /** + * @param ?string $name + * @return $this + */ + public function withName(?string $name) + { + $this->name = $name; + + return $this; + } + + /** + * @deprecated use withLastModifiedBy() instead + * @return $this + */ + public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @deprecated use withCreatedBy() instead + * @return $this + */ + public function withCreatedByBuilder(?CreatedByBuilder $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @deprecated use withResource() instead + * @return $this + */ + public function withResourceBuilder(?ReferenceBuilder $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @deprecated use withResourceUserProvidedIdentifiers() instead + * @return $this + */ + public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + public function build(): CustomerCustomFieldRemovedMessage + { + return new CustomerCustomFieldRemovedMessageModel( + $this->id, + $this->version, + $this->createdAt, + $this->lastModifiedAt, + $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, + $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy, + $this->sequenceNumber, + $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource, + $this->resourceVersion, + $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, + $this->name + ); + } + + public static function of(): CustomerCustomFieldRemovedMessageBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomFieldRemovedMessageCollection.php b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldRemovedMessageCollection.php new file mode 100644 index 00000000000..183d595ee5d --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldRemovedMessageCollection.php @@ -0,0 +1,56 @@ + + * @method CustomerCustomFieldRemovedMessage current() + * @method CustomerCustomFieldRemovedMessage end() + * @method CustomerCustomFieldRemovedMessage at($offset) + */ +class CustomerCustomFieldRemovedMessageCollection extends MessageCollection +{ + /** + * @psalm-assert CustomerCustomFieldRemovedMessage $value + * @psalm-param CustomerCustomFieldRemovedMessage|stdClass $value + * @throws InvalidArgumentException + * + * @return CustomerCustomFieldRemovedMessageCollection + */ + public function add($value) + { + if (!$value instanceof CustomerCustomFieldRemovedMessage) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?CustomerCustomFieldRemovedMessage + */ + protected function mapper() + { + return function (?int $index): ?CustomerCustomFieldRemovedMessage { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var CustomerCustomFieldRemovedMessage $data */ + $data = CustomerCustomFieldRemovedMessageModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomFieldRemovedMessageModel.php b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldRemovedMessageModel.php new file mode 100644 index 00000000000..bb932b41df3 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldRemovedMessageModel.php @@ -0,0 +1,490 @@ +id = $id; + $this->version = $version; + $this->createdAt = $createdAt; + $this->lastModifiedAt = $lastModifiedAt; + $this->lastModifiedBy = $lastModifiedBy; + $this->createdBy = $createdBy; + $this->sequenceNumber = $sequenceNumber; + $this->resource = $resource; + $this->resourceVersion = $resourceVersion; + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + $this->name = $name; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + * + * @return null|string + */ + public function getId() + { + if (is_null($this->id)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ID); + if (is_null($data)) { + return null; + } + $this->id = (string) $data; + } + + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + * + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + if (is_null($this->createdAt)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CREATED_AT); + if (is_null($data)) { + return null; + } + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->createdAt = $data; + } + + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayMessage number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + * + * @return null|Reference + */ + public function getResource() + { + if (is_null($this->resource)) { + /** @psalm-var stdClass|arrayVersion of the resource on which the change or action was performed.
+ * + * + * @return null|int + */ + public function getResourceVersion() + { + if (is_null($this->resourceVersion)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_RESOURCE_VERSION); + if (is_null($data)) { + return null; + } + $this->resourceVersion = (int) $data; + } + + return $this->resourceVersion; + } + + /** + *Message Type of the Message.
+ * + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Name of the Custom Field that has been removed.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + + /** + * @param ?string $id + */ + public function setId(?string $id): void + { + $this->id = $id; + } + + /** + * @param ?int $version + */ + public function setVersion(?int $version): void + { + $this->version = $version; + } + + /** + * @param ?DateTimeImmutable $createdAt + */ + public function setCreatedAt(?DateTimeImmutable $createdAt): void + { + $this->createdAt = $createdAt; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + */ + public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void + { + $this->lastModifiedAt = $lastModifiedAt; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + */ + public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void + { + $this->lastModifiedBy = $lastModifiedBy; + } + + /** + * @param ?CreatedBy $createdBy + */ + public function setCreatedBy(?CreatedBy $createdBy): void + { + $this->createdBy = $createdBy; + } + + /** + * @param ?int $sequenceNumber + */ + public function setSequenceNumber(?int $sequenceNumber): void + { + $this->sequenceNumber = $sequenceNumber; + } + + /** + * @param ?Reference $resource + */ + public function setResource(?Reference $resource): void + { + $this->resource = $resource; + } + + /** + * @param ?int $resourceVersion + */ + public function setResourceVersion(?int $resourceVersion): void + { + $this->resourceVersion = $resourceVersion; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + */ + public function setResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers): void + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + } + + /** + * @param ?string $name + */ + public function setName(?string $name): void + { + $this->name = $name; + } + + + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + $data = $this->toArray(); + if (isset($data[Message::FIELD_CREATED_AT]) && $data[Message::FIELD_CREATED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_CREATED_AT] = $data[Message::FIELD_CREATED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + + if (isset($data[Message::FIELD_LAST_MODIFIED_AT]) && $data[Message::FIELD_LAST_MODIFIED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_LAST_MODIFIED_AT] = $data[Message::FIELD_LAST_MODIFIED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + return (object) $data; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomFieldRemovedMessagePayload.php b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldRemovedMessagePayload.php new file mode 100644 index 00000000000..189977210ac --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldRemovedMessagePayload.php @@ -0,0 +1,30 @@ +Name of the Custom Field that has been removed. + * + + * @return null|string + */ + public function getName(); + + /** + * @param ?string $name + */ + public function setName(?string $name): void; +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomFieldRemovedMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldRemovedMessagePayloadBuilder.php new file mode 100644 index 00000000000..91377b77e87 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldRemovedMessagePayloadBuilder.php @@ -0,0 +1,63 @@ + + */ +final class CustomerCustomFieldRemovedMessagePayloadBuilder implements Builder +{ + /** + + * @var ?string + */ + private $name; + + /** + *Name of the Custom Field that has been removed.
+ * + + * @return null|string + */ + public function getName() + { + return $this->name; + } + + /** + * @param ?string $name + * @return $this + */ + public function withName(?string $name) + { + $this->name = $name; + + return $this; + } + + + public function build(): CustomerCustomFieldRemovedMessagePayload + { + return new CustomerCustomFieldRemovedMessagePayloadModel( + $this->name + ); + } + + public static function of(): CustomerCustomFieldRemovedMessagePayloadBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomFieldRemovedMessagePayloadCollection.php b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldRemovedMessagePayloadCollection.php new file mode 100644 index 00000000000..5b26d8bf3cb --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldRemovedMessagePayloadCollection.php @@ -0,0 +1,56 @@ + + * @method CustomerCustomFieldRemovedMessagePayload current() + * @method CustomerCustomFieldRemovedMessagePayload end() + * @method CustomerCustomFieldRemovedMessagePayload at($offset) + */ +class CustomerCustomFieldRemovedMessagePayloadCollection extends MessagePayloadCollection +{ + /** + * @psalm-assert CustomerCustomFieldRemovedMessagePayload $value + * @psalm-param CustomerCustomFieldRemovedMessagePayload|stdClass $value + * @throws InvalidArgumentException + * + * @return CustomerCustomFieldRemovedMessagePayloadCollection + */ + public function add($value) + { + if (!$value instanceof CustomerCustomFieldRemovedMessagePayload) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?CustomerCustomFieldRemovedMessagePayload + */ + protected function mapper() + { + return function (?int $index): ?CustomerCustomFieldRemovedMessagePayload { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var CustomerCustomFieldRemovedMessagePayload $data */ + $data = CustomerCustomFieldRemovedMessagePayloadModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomFieldRemovedMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldRemovedMessagePayloadModel.php new file mode 100644 index 00000000000..eb44992c1f9 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomFieldRemovedMessagePayloadModel.php @@ -0,0 +1,93 @@ +name = $name; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *Name of the Custom Field that has been removed.
+ * + * + * @return null|string + */ + public function getName() + { + if (is_null($this->name)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_NAME); + if (is_null($data)) { + return null; + } + $this->name = (string) $data; + } + + return $this->name; + } + + + /** + * @param ?string $name + */ + public function setName(?string $name): void + { + $this->name = $name; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessage.php b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessage.php new file mode 100644 index 00000000000..77c48dae8ff --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessage.php @@ -0,0 +1,31 @@ +id
of the Custom Type that has been removed.
+ * Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId(); + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void; +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessageBuilder.php b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessageBuilder.php new file mode 100644 index 00000000000..5b1df620c3c --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessageBuilder.php @@ -0,0 +1,405 @@ + + */ +final class CustomerCustomTypeRemovedMessageBuilder implements Builder +{ + /** + + * @var ?string + */ + private $id; + + /** + + * @var ?int + */ + private $version; + + /** + + * @var ?DateTimeImmutable + */ + private $createdAt; + + /** + + * @var ?DateTimeImmutable + */ + private $lastModifiedAt; + + /** + + * @var null|LastModifiedBy|LastModifiedByBuilder + */ + private $lastModifiedBy; + + /** + + * @var null|CreatedBy|CreatedByBuilder + */ + private $createdBy; + + /** + + * @var ?int + */ + private $sequenceNumber; + + /** + + * @var null|Reference|ReferenceBuilder + */ + private $resource; + + /** + + * @var ?int + */ + private $resourceVersion; + + /** + + * @var null|UserProvidedIdentifiers|UserProvidedIdentifiersBuilder + */ + private $resourceUserProvidedIdentifiers; + + /** + + * @var ?string + */ + private $previousTypeId; + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + + * @return null|string + */ + public function getId() + { + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + + * @return null|Reference + */ + public function getResource() + { + return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * + + * @return null|int + */ + public function getResourceVersion() + { + return $this->resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
id
of the Custom Type that has been removed.
Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId() + { + return $this->previousTypeId; + } + + /** + * @param ?string $id + * @return $this + */ + public function withId(?string $id) + { + $this->id = $id; + + return $this; + } + + /** + * @param ?int $version + * @return $this + */ + public function withVersion(?int $version) + { + $this->version = $version; + + return $this; + } + + /** + * @param ?DateTimeImmutable $createdAt + * @return $this + */ + public function withCreatedAt(?DateTimeImmutable $createdAt) + { + $this->createdAt = $createdAt; + + return $this; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + * @return $this + */ + public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt) + { + $this->lastModifiedAt = $lastModifiedAt; + + return $this; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + * @return $this + */ + public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @param ?CreatedBy $createdBy + * @return $this + */ + public function withCreatedBy(?CreatedBy $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @param ?int $sequenceNumber + * @return $this + */ + public function withSequenceNumber(?int $sequenceNumber) + { + $this->sequenceNumber = $sequenceNumber; + + return $this; + } + + /** + * @param ?Reference $resource + * @return $this + */ + public function withResource(?Reference $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @param ?int $resourceVersion + * @return $this + */ + public function withResourceVersion(?int $resourceVersion) + { + $this->resourceVersion = $resourceVersion; + + return $this; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + * @return $this + */ + public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + /** + * @param ?string $previousTypeId + * @return $this + */ + public function withPreviousTypeId(?string $previousTypeId) + { + $this->previousTypeId = $previousTypeId; + + return $this; + } + + /** + * @deprecated use withLastModifiedBy() instead + * @return $this + */ + public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @deprecated use withCreatedBy() instead + * @return $this + */ + public function withCreatedByBuilder(?CreatedByBuilder $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @deprecated use withResource() instead + * @return $this + */ + public function withResourceBuilder(?ReferenceBuilder $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @deprecated use withResourceUserProvidedIdentifiers() instead + * @return $this + */ + public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + public function build(): CustomerCustomTypeRemovedMessage + { + return new CustomerCustomTypeRemovedMessageModel( + $this->id, + $this->version, + $this->createdAt, + $this->lastModifiedAt, + $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, + $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy, + $this->sequenceNumber, + $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource, + $this->resourceVersion, + $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, + $this->previousTypeId + ); + } + + public static function of(): CustomerCustomTypeRemovedMessageBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessageCollection.php b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessageCollection.php new file mode 100644 index 00000000000..8b004e10ef0 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessageCollection.php @@ -0,0 +1,56 @@ + + * @method CustomerCustomTypeRemovedMessage current() + * @method CustomerCustomTypeRemovedMessage end() + * @method CustomerCustomTypeRemovedMessage at($offset) + */ +class CustomerCustomTypeRemovedMessageCollection extends MessageCollection +{ + /** + * @psalm-assert CustomerCustomTypeRemovedMessage $value + * @psalm-param CustomerCustomTypeRemovedMessage|stdClass $value + * @throws InvalidArgumentException + * + * @return CustomerCustomTypeRemovedMessageCollection + */ + public function add($value) + { + if (!$value instanceof CustomerCustomTypeRemovedMessage) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?CustomerCustomTypeRemovedMessage + */ + protected function mapper() + { + return function (?int $index): ?CustomerCustomTypeRemovedMessage { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var CustomerCustomTypeRemovedMessage $data */ + $data = CustomerCustomTypeRemovedMessageModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessageModel.php b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessageModel.php new file mode 100644 index 00000000000..03d71d3399e --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessageModel.php @@ -0,0 +1,491 @@ +id = $id; + $this->version = $version; + $this->createdAt = $createdAt; + $this->lastModifiedAt = $lastModifiedAt; + $this->lastModifiedBy = $lastModifiedBy; + $this->createdBy = $createdBy; + $this->sequenceNumber = $sequenceNumber; + $this->resource = $resource; + $this->resourceVersion = $resourceVersion; + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + $this->previousTypeId = $previousTypeId; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + * + * @return null|string + */ + public function getId() + { + if (is_null($this->id)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ID); + if (is_null($data)) { + return null; + } + $this->id = (string) $data; + } + + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + * + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + if (is_null($this->createdAt)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CREATED_AT); + if (is_null($data)) { + return null; + } + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->createdAt = $data; + } + + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayMessage number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + * + * @return null|Reference + */ + public function getResource() + { + if (is_null($this->resource)) { + /** @psalm-var stdClass|arrayVersion of the resource on which the change or action was performed.
+ * + * + * @return null|int + */ + public function getResourceVersion() + { + if (is_null($this->resourceVersion)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_RESOURCE_VERSION); + if (is_null($data)) { + return null; + } + $this->resourceVersion = (int) $data; + } + + return $this->resourceVersion; + } + + /** + *Message Type of the Message.
+ * + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
id
of the Custom Type that has been removed.
Absent when there has not been a Custom Type before.
+ * + * + * @return null|string + */ + public function getPreviousTypeId() + { + if (is_null($this->previousTypeId)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_PREVIOUS_TYPE_ID); + if (is_null($data)) { + return null; + } + $this->previousTypeId = (string) $data; + } + + return $this->previousTypeId; + } + + + /** + * @param ?string $id + */ + public function setId(?string $id): void + { + $this->id = $id; + } + + /** + * @param ?int $version + */ + public function setVersion(?int $version): void + { + $this->version = $version; + } + + /** + * @param ?DateTimeImmutable $createdAt + */ + public function setCreatedAt(?DateTimeImmutable $createdAt): void + { + $this->createdAt = $createdAt; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + */ + public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void + { + $this->lastModifiedAt = $lastModifiedAt; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + */ + public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void + { + $this->lastModifiedBy = $lastModifiedBy; + } + + /** + * @param ?CreatedBy $createdBy + */ + public function setCreatedBy(?CreatedBy $createdBy): void + { + $this->createdBy = $createdBy; + } + + /** + * @param ?int $sequenceNumber + */ + public function setSequenceNumber(?int $sequenceNumber): void + { + $this->sequenceNumber = $sequenceNumber; + } + + /** + * @param ?Reference $resource + */ + public function setResource(?Reference $resource): void + { + $this->resource = $resource; + } + + /** + * @param ?int $resourceVersion + */ + public function setResourceVersion(?int $resourceVersion): void + { + $this->resourceVersion = $resourceVersion; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + */ + public function setResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers): void + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + } + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void + { + $this->previousTypeId = $previousTypeId; + } + + + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + $data = $this->toArray(); + if (isset($data[Message::FIELD_CREATED_AT]) && $data[Message::FIELD_CREATED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_CREATED_AT] = $data[Message::FIELD_CREATED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + + if (isset($data[Message::FIELD_LAST_MODIFIED_AT]) && $data[Message::FIELD_LAST_MODIFIED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_LAST_MODIFIED_AT] = $data[Message::FIELD_LAST_MODIFIED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + return (object) $data; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessagePayload.php b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessagePayload.php new file mode 100644 index 00000000000..9a1e6c8dc3e --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessagePayload.php @@ -0,0 +1,31 @@ +id
of the Custom Type that has been removed.
+ * Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId(); + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void; +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessagePayloadBuilder.php new file mode 100644 index 00000000000..0ed38e334b4 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessagePayloadBuilder.php @@ -0,0 +1,64 @@ + + */ +final class CustomerCustomTypeRemovedMessagePayloadBuilder implements Builder +{ + /** + + * @var ?string + */ + private $previousTypeId; + + /** + *id
of the Custom Type that has been removed.
Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId() + { + return $this->previousTypeId; + } + + /** + * @param ?string $previousTypeId + * @return $this + */ + public function withPreviousTypeId(?string $previousTypeId) + { + $this->previousTypeId = $previousTypeId; + + return $this; + } + + + public function build(): CustomerCustomTypeRemovedMessagePayload + { + return new CustomerCustomTypeRemovedMessagePayloadModel( + $this->previousTypeId + ); + } + + public static function of(): CustomerCustomTypeRemovedMessagePayloadBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessagePayloadCollection.php b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessagePayloadCollection.php new file mode 100644 index 00000000000..048f9c25c44 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessagePayloadCollection.php @@ -0,0 +1,56 @@ + + * @method CustomerCustomTypeRemovedMessagePayload current() + * @method CustomerCustomTypeRemovedMessagePayload end() + * @method CustomerCustomTypeRemovedMessagePayload at($offset) + */ +class CustomerCustomTypeRemovedMessagePayloadCollection extends MessagePayloadCollection +{ + /** + * @psalm-assert CustomerCustomTypeRemovedMessagePayload $value + * @psalm-param CustomerCustomTypeRemovedMessagePayload|stdClass $value + * @throws InvalidArgumentException + * + * @return CustomerCustomTypeRemovedMessagePayloadCollection + */ + public function add($value) + { + if (!$value instanceof CustomerCustomTypeRemovedMessagePayload) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?CustomerCustomTypeRemovedMessagePayload + */ + protected function mapper() + { + return function (?int $index): ?CustomerCustomTypeRemovedMessagePayload { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var CustomerCustomTypeRemovedMessagePayload $data */ + $data = CustomerCustomTypeRemovedMessagePayloadModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessagePayloadModel.php new file mode 100644 index 00000000000..659faf7b845 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeRemovedMessagePayloadModel.php @@ -0,0 +1,94 @@ +previousTypeId = $previousTypeId; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *id
of the Custom Type that has been removed.
Absent when there has not been a Custom Type before.
+ * + * + * @return null|string + */ + public function getPreviousTypeId() + { + if (is_null($this->previousTypeId)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_PREVIOUS_TYPE_ID); + if (is_null($data)) { + return null; + } + $this->previousTypeId = (string) $data; + } + + return $this->previousTypeId; + } + + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void + { + $this->previousTypeId = $previousTypeId; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessage.php b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessage.php new file mode 100644 index 00000000000..fbad39af590 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessage.php @@ -0,0 +1,46 @@ +The Custom Fields that have been set. + * + + * @return null|CustomFields + */ + public function getCustomFields(); + + /** + *id
of the previous Custom Type.
Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId(); + + /** + * @param ?CustomFields $customFields + */ + public function setCustomFields(?CustomFields $customFields): void; + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void; +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessageBuilder.php b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessageBuilder.php new file mode 100644 index 00000000000..72488a41bfd --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessageBuilder.php @@ -0,0 +1,447 @@ + + */ +final class CustomerCustomTypeSetMessageBuilder implements Builder +{ + /** + + * @var ?string + */ + private $id; + + /** + + * @var ?int + */ + private $version; + + /** + + * @var ?DateTimeImmutable + */ + private $createdAt; + + /** + + * @var ?DateTimeImmutable + */ + private $lastModifiedAt; + + /** + + * @var null|LastModifiedBy|LastModifiedByBuilder + */ + private $lastModifiedBy; + + /** + + * @var null|CreatedBy|CreatedByBuilder + */ + private $createdBy; + + /** + + * @var ?int + */ + private $sequenceNumber; + + /** + + * @var null|Reference|ReferenceBuilder + */ + private $resource; + + /** + + * @var ?int + */ + private $resourceVersion; + + /** + + * @var null|UserProvidedIdentifiers|UserProvidedIdentifiersBuilder + */ + private $resourceUserProvidedIdentifiers; + + /** + + * @var null|CustomFields|CustomFieldsBuilder + */ + private $customFields; + + /** + + * @var ?string + */ + private $previousTypeId; + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + + * @return null|string + */ + public function getId() + { + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + + * @return null|Reference + */ + public function getResource() + { + return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * + + * @return null|int + */ + public function getResourceVersion() + { + return $this->resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
The Custom Fields that have been set.
+ * + + * @return null|CustomFields + */ + public function getCustomFields() + { + return $this->customFields instanceof CustomFieldsBuilder ? $this->customFields->build() : $this->customFields; + } + + /** + *id
of the previous Custom Type.
Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId() + { + return $this->previousTypeId; + } + + /** + * @param ?string $id + * @return $this + */ + public function withId(?string $id) + { + $this->id = $id; + + return $this; + } + + /** + * @param ?int $version + * @return $this + */ + public function withVersion(?int $version) + { + $this->version = $version; + + return $this; + } + + /** + * @param ?DateTimeImmutable $createdAt + * @return $this + */ + public function withCreatedAt(?DateTimeImmutable $createdAt) + { + $this->createdAt = $createdAt; + + return $this; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + * @return $this + */ + public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt) + { + $this->lastModifiedAt = $lastModifiedAt; + + return $this; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + * @return $this + */ + public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @param ?CreatedBy $createdBy + * @return $this + */ + public function withCreatedBy(?CreatedBy $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @param ?int $sequenceNumber + * @return $this + */ + public function withSequenceNumber(?int $sequenceNumber) + { + $this->sequenceNumber = $sequenceNumber; + + return $this; + } + + /** + * @param ?Reference $resource + * @return $this + */ + public function withResource(?Reference $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @param ?int $resourceVersion + * @return $this + */ + public function withResourceVersion(?int $resourceVersion) + { + $this->resourceVersion = $resourceVersion; + + return $this; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + * @return $this + */ + public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + /** + * @param ?CustomFields $customFields + * @return $this + */ + public function withCustomFields(?CustomFields $customFields) + { + $this->customFields = $customFields; + + return $this; + } + + /** + * @param ?string $previousTypeId + * @return $this + */ + public function withPreviousTypeId(?string $previousTypeId) + { + $this->previousTypeId = $previousTypeId; + + return $this; + } + + /** + * @deprecated use withLastModifiedBy() instead + * @return $this + */ + public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @deprecated use withCreatedBy() instead + * @return $this + */ + public function withCreatedByBuilder(?CreatedByBuilder $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @deprecated use withResource() instead + * @return $this + */ + public function withResourceBuilder(?ReferenceBuilder $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @deprecated use withResourceUserProvidedIdentifiers() instead + * @return $this + */ + public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + /** + * @deprecated use withCustomFields() instead + * @return $this + */ + public function withCustomFieldsBuilder(?CustomFieldsBuilder $customFields) + { + $this->customFields = $customFields; + + return $this; + } + + public function build(): CustomerCustomTypeSetMessage + { + return new CustomerCustomTypeSetMessageModel( + $this->id, + $this->version, + $this->createdAt, + $this->lastModifiedAt, + $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, + $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy, + $this->sequenceNumber, + $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource, + $this->resourceVersion, + $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, + $this->customFields instanceof CustomFieldsBuilder ? $this->customFields->build() : $this->customFields, + $this->previousTypeId + ); + } + + public static function of(): CustomerCustomTypeSetMessageBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessageCollection.php b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessageCollection.php new file mode 100644 index 00000000000..89f8811a53f --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessageCollection.php @@ -0,0 +1,56 @@ + + * @method CustomerCustomTypeSetMessage current() + * @method CustomerCustomTypeSetMessage end() + * @method CustomerCustomTypeSetMessage at($offset) + */ +class CustomerCustomTypeSetMessageCollection extends MessageCollection +{ + /** + * @psalm-assert CustomerCustomTypeSetMessage $value + * @psalm-param CustomerCustomTypeSetMessage|stdClass $value + * @throws InvalidArgumentException + * + * @return CustomerCustomTypeSetMessageCollection + */ + public function add($value) + { + if (!$value instanceof CustomerCustomTypeSetMessage) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?CustomerCustomTypeSetMessage + */ + protected function mapper() + { + return function (?int $index): ?CustomerCustomTypeSetMessage { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var CustomerCustomTypeSetMessage $data */ + $data = CustomerCustomTypeSetMessageModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessageModel.php b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessageModel.php new file mode 100644 index 00000000000..d4774e7db3a --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessageModel.php @@ -0,0 +1,530 @@ +id = $id; + $this->version = $version; + $this->createdAt = $createdAt; + $this->lastModifiedAt = $lastModifiedAt; + $this->lastModifiedBy = $lastModifiedBy; + $this->createdBy = $createdBy; + $this->sequenceNumber = $sequenceNumber; + $this->resource = $resource; + $this->resourceVersion = $resourceVersion; + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + $this->customFields = $customFields; + $this->previousTypeId = $previousTypeId; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + * + * @return null|string + */ + public function getId() + { + if (is_null($this->id)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ID); + if (is_null($data)) { + return null; + } + $this->id = (string) $data; + } + + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + * + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + if (is_null($this->createdAt)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CREATED_AT); + if (is_null($data)) { + return null; + } + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->createdAt = $data; + } + + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayMessage number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + * + * @return null|Reference + */ + public function getResource() + { + if (is_null($this->resource)) { + /** @psalm-var stdClass|arrayVersion of the resource on which the change or action was performed.
+ * + * + * @return null|int + */ + public function getResourceVersion() + { + if (is_null($this->resourceVersion)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_RESOURCE_VERSION); + if (is_null($data)) { + return null; + } + $this->resourceVersion = (int) $data; + } + + return $this->resourceVersion; + } + + /** + *Message Type of the Message.
+ * + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
The Custom Fields that have been set.
+ * + * + * @return null|CustomFields + */ + public function getCustomFields() + { + if (is_null($this->customFields)) { + /** @psalm-var stdClass|arrayid
of the previous Custom Type.
Absent when there has not been a Custom Type before.
+ * + * + * @return null|string + */ + public function getPreviousTypeId() + { + if (is_null($this->previousTypeId)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_PREVIOUS_TYPE_ID); + if (is_null($data)) { + return null; + } + $this->previousTypeId = (string) $data; + } + + return $this->previousTypeId; + } + + + /** + * @param ?string $id + */ + public function setId(?string $id): void + { + $this->id = $id; + } + + /** + * @param ?int $version + */ + public function setVersion(?int $version): void + { + $this->version = $version; + } + + /** + * @param ?DateTimeImmutable $createdAt + */ + public function setCreatedAt(?DateTimeImmutable $createdAt): void + { + $this->createdAt = $createdAt; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + */ + public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void + { + $this->lastModifiedAt = $lastModifiedAt; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + */ + public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void + { + $this->lastModifiedBy = $lastModifiedBy; + } + + /** + * @param ?CreatedBy $createdBy + */ + public function setCreatedBy(?CreatedBy $createdBy): void + { + $this->createdBy = $createdBy; + } + + /** + * @param ?int $sequenceNumber + */ + public function setSequenceNumber(?int $sequenceNumber): void + { + $this->sequenceNumber = $sequenceNumber; + } + + /** + * @param ?Reference $resource + */ + public function setResource(?Reference $resource): void + { + $this->resource = $resource; + } + + /** + * @param ?int $resourceVersion + */ + public function setResourceVersion(?int $resourceVersion): void + { + $this->resourceVersion = $resourceVersion; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + */ + public function setResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers): void + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + } + + /** + * @param ?CustomFields $customFields + */ + public function setCustomFields(?CustomFields $customFields): void + { + $this->customFields = $customFields; + } + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void + { + $this->previousTypeId = $previousTypeId; + } + + + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + $data = $this->toArray(); + if (isset($data[Message::FIELD_CREATED_AT]) && $data[Message::FIELD_CREATED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_CREATED_AT] = $data[Message::FIELD_CREATED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + + if (isset($data[Message::FIELD_LAST_MODIFIED_AT]) && $data[Message::FIELD_LAST_MODIFIED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_LAST_MODIFIED_AT] = $data[Message::FIELD_LAST_MODIFIED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + return (object) $data; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessagePayload.php b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessagePayload.php new file mode 100644 index 00000000000..acb520b858d --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessagePayload.php @@ -0,0 +1,46 @@ +The Custom Fields that have been set. + * + + * @return null|CustomFields + */ + public function getCustomFields(); + + /** + *id
of the previous Custom Type.
Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId(); + + /** + * @param ?CustomFields $customFields + */ + public function setCustomFields(?CustomFields $customFields): void; + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void; +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessagePayloadBuilder.php new file mode 100644 index 00000000000..fcc6ba12716 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessagePayloadBuilder.php @@ -0,0 +1,105 @@ + + */ +final class CustomerCustomTypeSetMessagePayloadBuilder implements Builder +{ + /** + + * @var null|CustomFields|CustomFieldsBuilder + */ + private $customFields; + + /** + + * @var ?string + */ + private $previousTypeId; + + /** + *The Custom Fields that have been set.
+ * + + * @return null|CustomFields + */ + public function getCustomFields() + { + return $this->customFields instanceof CustomFieldsBuilder ? $this->customFields->build() : $this->customFields; + } + + /** + *id
of the previous Custom Type.
Absent when there has not been a Custom Type before.
+ * + + * @return null|string + */ + public function getPreviousTypeId() + { + return $this->previousTypeId; + } + + /** + * @param ?CustomFields $customFields + * @return $this + */ + public function withCustomFields(?CustomFields $customFields) + { + $this->customFields = $customFields; + + return $this; + } + + /** + * @param ?string $previousTypeId + * @return $this + */ + public function withPreviousTypeId(?string $previousTypeId) + { + $this->previousTypeId = $previousTypeId; + + return $this; + } + + /** + * @deprecated use withCustomFields() instead + * @return $this + */ + public function withCustomFieldsBuilder(?CustomFieldsBuilder $customFields) + { + $this->customFields = $customFields; + + return $this; + } + + public function build(): CustomerCustomTypeSetMessagePayload + { + return new CustomerCustomTypeSetMessagePayloadModel( + $this->customFields instanceof CustomFieldsBuilder ? $this->customFields->build() : $this->customFields, + $this->previousTypeId + ); + } + + public static function of(): CustomerCustomTypeSetMessagePayloadBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessagePayloadCollection.php b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessagePayloadCollection.php new file mode 100644 index 00000000000..bfa992b9135 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessagePayloadCollection.php @@ -0,0 +1,56 @@ + + * @method CustomerCustomTypeSetMessagePayload current() + * @method CustomerCustomTypeSetMessagePayload end() + * @method CustomerCustomTypeSetMessagePayload at($offset) + */ +class CustomerCustomTypeSetMessagePayloadCollection extends MessagePayloadCollection +{ + /** + * @psalm-assert CustomerCustomTypeSetMessagePayload $value + * @psalm-param CustomerCustomTypeSetMessagePayload|stdClass $value + * @throws InvalidArgumentException + * + * @return CustomerCustomTypeSetMessagePayloadCollection + */ + public function add($value) + { + if (!$value instanceof CustomerCustomTypeSetMessagePayload) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?CustomerCustomTypeSetMessagePayload + */ + protected function mapper() + { + return function (?int $index): ?CustomerCustomTypeSetMessagePayload { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var CustomerCustomTypeSetMessagePayload $data */ + $data = CustomerCustomTypeSetMessagePayloadModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessagePayloadModel.php new file mode 100644 index 00000000000..23197f210f2 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerCustomTypeSetMessagePayloadModel.php @@ -0,0 +1,133 @@ +customFields = $customFields; + $this->previousTypeId = $previousTypeId; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *The Custom Fields that have been set.
+ * + * + * @return null|CustomFields + */ + public function getCustomFields() + { + if (is_null($this->customFields)) { + /** @psalm-var stdClass|arrayid
of the previous Custom Type.
Absent when there has not been a Custom Type before.
+ * + * + * @return null|string + */ + public function getPreviousTypeId() + { + if (is_null($this->previousTypeId)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_PREVIOUS_TYPE_ID); + if (is_null($data)) { + return null; + } + $this->previousTypeId = (string) $data; + } + + return $this->previousTypeId; + } + + + /** + * @param ?CustomFields $customFields + */ + public function setCustomFields(?CustomFields $customFields): void + { + $this->customFields = $customFields; + } + + /** + * @param ?string $previousTypeId + */ + public function setPreviousTypeId(?string $previousTypeId): void + { + $this->previousTypeId = $previousTypeId; + } +} diff --git a/lib/commercetools-api/src/Models/Message/CustomerMessagePayload.php b/lib/commercetools-api/src/Models/Message/CustomerMessagePayload.php new file mode 100644 index 00000000000..6ef8b56570a --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/CustomerMessagePayload.php @@ -0,0 +1,16 @@ + + * @implements BuilderUnique identifier for the Payment for which the Set StatusInterfaceCode update action was applied.
- * - - * @return null|string - */ - public function getPaymentId(); - /** *The interfaceCode
that was set during the Set StatusInterfaceCode update action.
Unique identifier for the Payment for which the Set StatusInterfaceCode update action was applied.
- * - - * @return null|string - */ - public function getPaymentId() - { - return $this->paymentId; - } - /** *The interfaceCode
that was set during the Set StatusInterfaceCode update action.
Unique identifier for the Payment for which the Set StatusInterfaceCode update action was applied.
- * - * - * @return null|string - */ - public function getPaymentId() - { - if (is_null($this->paymentId)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_PAYMENT_ID); - if (is_null($data)) { - return null; - } - $this->paymentId = (string) $data; - } - - return $this->paymentId; - } - /** *The interfaceCode
that was set during the Set StatusInterfaceCode update action.
Unique identifier for the Payment for which the Set StatusInterfaceCode update action was applied.
- * - - * @return null|string - */ - public function getPaymentId(); - /** *The interfaceCode
that was set during the Set StatusInterfaceCode update action.
Unique identifier for the Payment for which the Set StatusInterfaceCode update action was applied.
- * - - * @return null|string - */ - public function getPaymentId() - { - return $this->paymentId; - } - /** *The interfaceCode
that was set during the Set StatusInterfaceCode update action.
Unique identifier for the Payment for which the Set StatusInterfaceCode update action was applied.
- * - * - * @return null|string - */ - public function getPaymentId() - { - if (is_null($this->paymentId)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_PAYMENT_ID); - if (is_null($data)) { - return null; - } - $this->paymentId = (string) $data; - } - - return $this->paymentId; - } - /** *The interfaceCode
that was set during the Set StatusInterfaceCode update action.
Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + + * @return null|string + */ + public function getId() + { + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + + * @return null|Reference + */ + public function getResource() + { + return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * + + * @return null|int + */ + public function getResourceVersion() + { + return $this->resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Message from the Buyer regarding the Quote renegotiation request.
+ * + + * @return null|string + */ + public function getBuyerComment() + { + return $this->buyerComment; + } + + /** + * @param ?string $id + * @return $this + */ + public function withId(?string $id) + { + $this->id = $id; + + return $this; + } + + /** + * @param ?int $version + * @return $this + */ + public function withVersion(?int $version) + { + $this->version = $version; + + return $this; + } + + /** + * @param ?DateTimeImmutable $createdAt + * @return $this + */ + public function withCreatedAt(?DateTimeImmutable $createdAt) + { + $this->createdAt = $createdAt; + + return $this; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + * @return $this + */ + public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt) + { + $this->lastModifiedAt = $lastModifiedAt; + + return $this; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + * @return $this + */ + public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @param ?CreatedBy $createdBy + * @return $this + */ + public function withCreatedBy(?CreatedBy $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @param ?int $sequenceNumber + * @return $this + */ + public function withSequenceNumber(?int $sequenceNumber) + { + $this->sequenceNumber = $sequenceNumber; + + return $this; + } + + /** + * @param ?Reference $resource + * @return $this + */ + public function withResource(?Reference $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @param ?int $resourceVersion + * @return $this + */ + public function withResourceVersion(?int $resourceVersion) + { + $this->resourceVersion = $resourceVersion; + + return $this; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + * @return $this + */ + public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + /** + * @param ?string $buyerComment + * @return $this + */ + public function withBuyerComment(?string $buyerComment) + { + $this->buyerComment = $buyerComment; + + return $this; + } + + /** + * @deprecated use withLastModifiedBy() instead + * @return $this + */ + public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @deprecated use withCreatedBy() instead + * @return $this + */ + public function withCreatedByBuilder(?CreatedByBuilder $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @deprecated use withResource() instead + * @return $this + */ + public function withResourceBuilder(?ReferenceBuilder $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @deprecated use withResourceUserProvidedIdentifiers() instead + * @return $this + */ + public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + public function build(): QuoteRenegotiationRequestedMessage + { + return new QuoteRenegotiationRequestedMessageModel( + $this->id, + $this->version, + $this->createdAt, + $this->lastModifiedAt, + $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, + $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy, + $this->sequenceNumber, + $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource, + $this->resourceVersion, + $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, + $this->buyerComment + ); + } + + public static function of(): QuoteRenegotiationRequestedMessageBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/QuoteRenegotiationRequestedMessageCollection.php b/lib/commercetools-api/src/Models/Message/QuoteRenegotiationRequestedMessageCollection.php new file mode 100644 index 00000000000..fce92dd95e5 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/QuoteRenegotiationRequestedMessageCollection.php @@ -0,0 +1,56 @@ + + * @method QuoteRenegotiationRequestedMessage current() + * @method QuoteRenegotiationRequestedMessage end() + * @method QuoteRenegotiationRequestedMessage at($offset) + */ +class QuoteRenegotiationRequestedMessageCollection extends MessageCollection +{ + /** + * @psalm-assert QuoteRenegotiationRequestedMessage $value + * @psalm-param QuoteRenegotiationRequestedMessage|stdClass $value + * @throws InvalidArgumentException + * + * @return QuoteRenegotiationRequestedMessageCollection + */ + public function add($value) + { + if (!$value instanceof QuoteRenegotiationRequestedMessage) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?QuoteRenegotiationRequestedMessage + */ + protected function mapper() + { + return function (?int $index): ?QuoteRenegotiationRequestedMessage { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var QuoteRenegotiationRequestedMessage $data */ + $data = QuoteRenegotiationRequestedMessageModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/QuoteRenegotiationRequestedMessageModel.php b/lib/commercetools-api/src/Models/Message/QuoteRenegotiationRequestedMessageModel.php new file mode 100644 index 00000000000..8ce79a3809e --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/QuoteRenegotiationRequestedMessageModel.php @@ -0,0 +1,490 @@ +id = $id; + $this->version = $version; + $this->createdAt = $createdAt; + $this->lastModifiedAt = $lastModifiedAt; + $this->lastModifiedBy = $lastModifiedBy; + $this->createdBy = $createdBy; + $this->sequenceNumber = $sequenceNumber; + $this->resource = $resource; + $this->resourceVersion = $resourceVersion; + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + $this->buyerComment = $buyerComment; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + * + * @return null|string + */ + public function getId() + { + if (is_null($this->id)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ID); + if (is_null($data)) { + return null; + } + $this->id = (string) $data; + } + + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + * + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + if (is_null($this->createdAt)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CREATED_AT); + if (is_null($data)) { + return null; + } + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->createdAt = $data; + } + + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayMessage number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + * + * @return null|Reference + */ + public function getResource() + { + if (is_null($this->resource)) { + /** @psalm-var stdClass|arrayVersion of the resource on which the change or action was performed.
+ * + * + * @return null|int + */ + public function getResourceVersion() + { + if (is_null($this->resourceVersion)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_RESOURCE_VERSION); + if (is_null($data)) { + return null; + } + $this->resourceVersion = (int) $data; + } + + return $this->resourceVersion; + } + + /** + *Message Type of the Message.
+ * + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Message from the Buyer regarding the Quote renegotiation request.
+ * + * + * @return null|string + */ + public function getBuyerComment() + { + if (is_null($this->buyerComment)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_BUYER_COMMENT); + if (is_null($data)) { + return null; + } + $this->buyerComment = (string) $data; + } + + return $this->buyerComment; + } + + + /** + * @param ?string $id + */ + public function setId(?string $id): void + { + $this->id = $id; + } + + /** + * @param ?int $version + */ + public function setVersion(?int $version): void + { + $this->version = $version; + } + + /** + * @param ?DateTimeImmutable $createdAt + */ + public function setCreatedAt(?DateTimeImmutable $createdAt): void + { + $this->createdAt = $createdAt; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + */ + public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void + { + $this->lastModifiedAt = $lastModifiedAt; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + */ + public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void + { + $this->lastModifiedBy = $lastModifiedBy; + } + + /** + * @param ?CreatedBy $createdBy + */ + public function setCreatedBy(?CreatedBy $createdBy): void + { + $this->createdBy = $createdBy; + } + + /** + * @param ?int $sequenceNumber + */ + public function setSequenceNumber(?int $sequenceNumber): void + { + $this->sequenceNumber = $sequenceNumber; + } + + /** + * @param ?Reference $resource + */ + public function setResource(?Reference $resource): void + { + $this->resource = $resource; + } + + /** + * @param ?int $resourceVersion + */ + public function setResourceVersion(?int $resourceVersion): void + { + $this->resourceVersion = $resourceVersion; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + */ + public function setResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers): void + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + } + + /** + * @param ?string $buyerComment + */ + public function setBuyerComment(?string $buyerComment): void + { + $this->buyerComment = $buyerComment; + } + + + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + $data = $this->toArray(); + if (isset($data[Message::FIELD_CREATED_AT]) && $data[Message::FIELD_CREATED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_CREATED_AT] = $data[Message::FIELD_CREATED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + + if (isset($data[Message::FIELD_LAST_MODIFIED_AT]) && $data[Message::FIELD_LAST_MODIFIED_AT] instanceof \DateTimeImmutable) { + $data[Message::FIELD_LAST_MODIFIED_AT] = $data[Message::FIELD_LAST_MODIFIED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + } + return (object) $data; + } +} diff --git a/lib/commercetools-api/src/Models/Message/QuoteRenegotiationRequestedMessagePayload.php b/lib/commercetools-api/src/Models/Message/QuoteRenegotiationRequestedMessagePayload.php new file mode 100644 index 00000000000..ce9c41eda97 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/QuoteRenegotiationRequestedMessagePayload.php @@ -0,0 +1,30 @@ +Message from the Buyer regarding the Quote renegotiation request. + * + + * @return null|string + */ + public function getBuyerComment(); + + /** + * @param ?string $buyerComment + */ + public function setBuyerComment(?string $buyerComment): void; +} diff --git a/lib/commercetools-api/src/Models/Message/QuoteRenegotiationRequestedMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/QuoteRenegotiationRequestedMessagePayloadBuilder.php new file mode 100644 index 00000000000..7641aed6344 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/QuoteRenegotiationRequestedMessagePayloadBuilder.php @@ -0,0 +1,63 @@ + + */ +final class QuoteRenegotiationRequestedMessagePayloadBuilder implements Builder +{ + /** + + * @var ?string + */ + private $buyerComment; + + /** + *Message from the Buyer regarding the Quote renegotiation request.
+ * + + * @return null|string + */ + public function getBuyerComment() + { + return $this->buyerComment; + } + + /** + * @param ?string $buyerComment + * @return $this + */ + public function withBuyerComment(?string $buyerComment) + { + $this->buyerComment = $buyerComment; + + return $this; + } + + + public function build(): QuoteRenegotiationRequestedMessagePayload + { + return new QuoteRenegotiationRequestedMessagePayloadModel( + $this->buyerComment + ); + } + + public static function of(): QuoteRenegotiationRequestedMessagePayloadBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/QuoteRenegotiationRequestedMessagePayloadCollection.php b/lib/commercetools-api/src/Models/Message/QuoteRenegotiationRequestedMessagePayloadCollection.php new file mode 100644 index 00000000000..f5b4cb07951 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/QuoteRenegotiationRequestedMessagePayloadCollection.php @@ -0,0 +1,56 @@ + + * @method QuoteRenegotiationRequestedMessagePayload current() + * @method QuoteRenegotiationRequestedMessagePayload end() + * @method QuoteRenegotiationRequestedMessagePayload at($offset) + */ +class QuoteRenegotiationRequestedMessagePayloadCollection extends MessagePayloadCollection +{ + /** + * @psalm-assert QuoteRenegotiationRequestedMessagePayload $value + * @psalm-param QuoteRenegotiationRequestedMessagePayload|stdClass $value + * @throws InvalidArgumentException + * + * @return QuoteRenegotiationRequestedMessagePayloadCollection + */ + public function add($value) + { + if (!$value instanceof QuoteRenegotiationRequestedMessagePayload) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?QuoteRenegotiationRequestedMessagePayload + */ + protected function mapper() + { + return function (?int $index): ?QuoteRenegotiationRequestedMessagePayload { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var QuoteRenegotiationRequestedMessagePayload $data */ + $data = QuoteRenegotiationRequestedMessagePayloadModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/QuoteRenegotiationRequestedMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/QuoteRenegotiationRequestedMessagePayloadModel.php new file mode 100644 index 00000000000..f52f64a6cd5 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/QuoteRenegotiationRequestedMessagePayloadModel.php @@ -0,0 +1,93 @@ +buyerComment = $buyerComment; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *Message from the Buyer regarding the Quote renegotiation request.
+ * + * + * @return null|string + */ + public function getBuyerComment() + { + if (is_null($this->buyerComment)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_BUYER_COMMENT); + if (is_null($data)) { + return null; + } + $this->buyerComment = (string) $data; + } + + return $this->buyerComment; + } + + + /** + * @param ?string $buyerComment + */ + public function setBuyerComment(?string $buyerComment): void + { + $this->buyerComment = $buyerComment; + } +} diff --git a/lib/commercetools-api/src/Models/Message/StandalonePriceStagedChangesRemovedMessage.php b/lib/commercetools-api/src/Models/Message/StandalonePriceStagedChangesRemovedMessage.php new file mode 100644 index 00000000000..5dc56bb664a --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/StandalonePriceStagedChangesRemovedMessage.php @@ -0,0 +1,31 @@ +Removed changes of the StandalonePrice after the Remove Staged Changes update action. + * + + * @return null|StagedStandalonePrice + */ + public function getStagedChanges(); + + /** + * @param ?StagedStandalonePrice $stagedChanges + */ + public function setStagedChanges(?StagedStandalonePrice $stagedChanges): void; +} diff --git a/lib/commercetools-api/src/Models/Message/StandalonePriceStagedChangesRemovedMessageBuilder.php b/lib/commercetools-api/src/Models/Message/StandalonePriceStagedChangesRemovedMessageBuilder.php new file mode 100644 index 00000000000..cbd21f90991 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/StandalonePriceStagedChangesRemovedMessageBuilder.php @@ -0,0 +1,417 @@ + + */ +final class StandalonePriceStagedChangesRemovedMessageBuilder implements Builder +{ + /** + + * @var ?string + */ + private $id; + + /** + + * @var ?int + */ + private $version; + + /** + + * @var ?DateTimeImmutable + */ + private $createdAt; + + /** + + * @var ?DateTimeImmutable + */ + private $lastModifiedAt; + + /** + + * @var null|LastModifiedBy|LastModifiedByBuilder + */ + private $lastModifiedBy; + + /** + + * @var null|CreatedBy|CreatedByBuilder + */ + private $createdBy; + + /** + + * @var ?int + */ + private $sequenceNumber; + + /** + + * @var null|Reference|ReferenceBuilder + */ + private $resource; + + /** + + * @var ?int + */ + private $resourceVersion; + + /** + + * @var null|UserProvidedIdentifiers|UserProvidedIdentifiersBuilder + */ + private $resourceUserProvidedIdentifiers; + + /** + + * @var null|StagedStandalonePrice|StagedStandalonePriceBuilder + */ + private $stagedChanges; + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + + * @return null|string + */ + public function getId() + { + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + + * @return null|CreatedBy + */ + public function getCreatedBy() + { + return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + + * @return null|Reference + */ + public function getResource() + { + return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * + + * @return null|int + */ + public function getResourceVersion() + { + return $this->resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Removed changes of the StandalonePrice after the Remove Staged Changes update action.
+ * + + * @return null|StagedStandalonePrice + */ + public function getStagedChanges() + { + return $this->stagedChanges instanceof StagedStandalonePriceBuilder ? $this->stagedChanges->build() : $this->stagedChanges; + } + + /** + * @param ?string $id + * @return $this + */ + public function withId(?string $id) + { + $this->id = $id; + + return $this; + } + + /** + * @param ?int $version + * @return $this + */ + public function withVersion(?int $version) + { + $this->version = $version; + + return $this; + } + + /** + * @param ?DateTimeImmutable $createdAt + * @return $this + */ + public function withCreatedAt(?DateTimeImmutable $createdAt) + { + $this->createdAt = $createdAt; + + return $this; + } + + /** + * @param ?DateTimeImmutable $lastModifiedAt + * @return $this + */ + public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt) + { + $this->lastModifiedAt = $lastModifiedAt; + + return $this; + } + + /** + * @param ?LastModifiedBy $lastModifiedBy + * @return $this + */ + public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @param ?CreatedBy $createdBy + * @return $this + */ + public function withCreatedBy(?CreatedBy $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @param ?int $sequenceNumber + * @return $this + */ + public function withSequenceNumber(?int $sequenceNumber) + { + $this->sequenceNumber = $sequenceNumber; + + return $this; + } + + /** + * @param ?Reference $resource + * @return $this + */ + public function withResource(?Reference $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @param ?int $resourceVersion + * @return $this + */ + public function withResourceVersion(?int $resourceVersion) + { + $this->resourceVersion = $resourceVersion; + + return $this; + } + + /** + * @param ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers + * @return $this + */ + public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + /** + * @param ?StagedStandalonePrice $stagedChanges + * @return $this + */ + public function withStagedChanges(?StagedStandalonePrice $stagedChanges) + { + $this->stagedChanges = $stagedChanges; + + return $this; + } + + /** + * @deprecated use withLastModifiedBy() instead + * @return $this + */ + public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) + { + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @deprecated use withCreatedBy() instead + * @return $this + */ + public function withCreatedByBuilder(?CreatedByBuilder $createdBy) + { + $this->createdBy = $createdBy; + + return $this; + } + + /** + * @deprecated use withResource() instead + * @return $this + */ + public function withResourceBuilder(?ReferenceBuilder $resource) + { + $this->resource = $resource; + + return $this; + } + + /** + * @deprecated use withResourceUserProvidedIdentifiers() instead + * @return $this + */ + public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers) + { + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + + return $this; + } + + /** + * @deprecated use withStagedChanges() instead + * @return $this + */ + public function withStagedChangesBuilder(?StagedStandalonePriceBuilder $stagedChanges) + { + $this->stagedChanges = $stagedChanges; + + return $this; + } + + public function build(): StandalonePriceStagedChangesRemovedMessage + { + return new StandalonePriceStagedChangesRemovedMessageModel( + $this->id, + $this->version, + $this->createdAt, + $this->lastModifiedAt, + $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy, + $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy, + $this->sequenceNumber, + $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource, + $this->resourceVersion, + $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, + $this->stagedChanges instanceof StagedStandalonePriceBuilder ? $this->stagedChanges->build() : $this->stagedChanges + ); + } + + public static function of(): StandalonePriceStagedChangesRemovedMessageBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/StandalonePriceStagedChangesRemovedMessageCollection.php b/lib/commercetools-api/src/Models/Message/StandalonePriceStagedChangesRemovedMessageCollection.php new file mode 100644 index 00000000000..f25bd83fec9 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/StandalonePriceStagedChangesRemovedMessageCollection.php @@ -0,0 +1,56 @@ + + * @method StandalonePriceStagedChangesRemovedMessage current() + * @method StandalonePriceStagedChangesRemovedMessage end() + * @method StandalonePriceStagedChangesRemovedMessage at($offset) + */ +class StandalonePriceStagedChangesRemovedMessageCollection extends MessageCollection +{ + /** + * @psalm-assert StandalonePriceStagedChangesRemovedMessage $value + * @psalm-param StandalonePriceStagedChangesRemovedMessage|stdClass $value + * @throws InvalidArgumentException + * + * @return StandalonePriceStagedChangesRemovedMessageCollection + */ + public function add($value) + { + if (!$value instanceof StandalonePriceStagedChangesRemovedMessage) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?StandalonePriceStagedChangesRemovedMessage + */ + protected function mapper() + { + return function (?int $index): ?StandalonePriceStagedChangesRemovedMessage { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var StandalonePriceStagedChangesRemovedMessage $data */ + $data = StandalonePriceStagedChangesRemovedMessageModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/StandalonePriceStagedChangesRemovedMessageModel.php b/lib/commercetools-api/src/Models/Message/StandalonePriceStagedChangesRemovedMessageModel.php new file mode 100644 index 00000000000..0b2864fd001 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/StandalonePriceStagedChangesRemovedMessageModel.php @@ -0,0 +1,493 @@ +id = $id; + $this->version = $version; + $this->createdAt = $createdAt; + $this->lastModifiedAt = $lastModifiedAt; + $this->lastModifiedBy = $lastModifiedBy; + $this->createdBy = $createdBy; + $this->sequenceNumber = $sequenceNumber; + $this->resource = $resource; + $this->resourceVersion = $resourceVersion; + $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; + $this->stagedChanges = $stagedChanges; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * + * + * @return null|string + */ + public function getId() + { + if (is_null($this->id)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ID); + if (is_null($data)) { + return null; + } + $this->id = (string) $data; + } + + return $this->id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * + * + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + if (is_null($this->createdAt)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_CREATED_AT); + if (is_null($data)) { + return null; + } + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->createdAt = $data; + } + + return $this->createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * + * + * @return null|CreatedBy + */ + public function getCreatedBy() + { + if (is_null($this->createdBy)) { + /** @psalm-var stdClass|arrayMessage number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1.
+ * sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * + * + * @return null|Reference + */ + public function getResource() + { + if (is_null($this->resource)) { + /** @psalm-var stdClass|arrayVersion of the resource on which the change or action was performed.
+ * + * + * @return null|int + */ + public function getResourceVersion() + { + if (is_null($this->resourceVersion)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_RESOURCE_VERSION); + if (is_null($data)) { + return null; + } + $this->resourceVersion = (int) $data; + } + + return $this->resourceVersion; + } + + /** + *Message Type of the Message.
+ * + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Removed changes of the StandalonePrice after the Remove Staged Changes update action.
+ * + * + * @return null|StagedStandalonePrice + */ + public function getStagedChanges() + { + if (is_null($this->stagedChanges)) { + /** @psalm-var stdClass|arrayRemoved changes of the StandalonePrice after the Remove Staged Changes update action.
+ * + + * @return null|StagedStandalonePrice + */ + public function getStagedChanges() + { + return $this->stagedChanges instanceof StagedStandalonePriceBuilder ? $this->stagedChanges->build() : $this->stagedChanges; + } + + /** + * @param ?StagedStandalonePrice $stagedChanges + * @return $this + */ + public function withStagedChanges(?StagedStandalonePrice $stagedChanges) + { + $this->stagedChanges = $stagedChanges; + + return $this; + } + + /** + * @deprecated use withStagedChanges() instead + * @return $this + */ + public function withStagedChangesBuilder(?StagedStandalonePriceBuilder $stagedChanges) + { + $this->stagedChanges = $stagedChanges; + + return $this; + } + + public function build(): StandalonePriceStagedChangesRemovedMessagePayload + { + return new StandalonePriceStagedChangesRemovedMessagePayloadModel( + $this->stagedChanges instanceof StagedStandalonePriceBuilder ? $this->stagedChanges->build() : $this->stagedChanges + ); + } + + public static function of(): StandalonePriceStagedChangesRemovedMessagePayloadBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/StandalonePriceStagedChangesRemovedMessagePayloadCollection.php b/lib/commercetools-api/src/Models/Message/StandalonePriceStagedChangesRemovedMessagePayloadCollection.php new file mode 100644 index 00000000000..bc4c40c9a44 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/StandalonePriceStagedChangesRemovedMessagePayloadCollection.php @@ -0,0 +1,56 @@ + + * @method StandalonePriceStagedChangesRemovedMessagePayload current() + * @method StandalonePriceStagedChangesRemovedMessagePayload end() + * @method StandalonePriceStagedChangesRemovedMessagePayload at($offset) + */ +class StandalonePriceStagedChangesRemovedMessagePayloadCollection extends MessagePayloadCollection +{ + /** + * @psalm-assert StandalonePriceStagedChangesRemovedMessagePayload $value + * @psalm-param StandalonePriceStagedChangesRemovedMessagePayload|stdClass $value + * @throws InvalidArgumentException + * + * @return StandalonePriceStagedChangesRemovedMessagePayloadCollection + */ + public function add($value) + { + if (!$value instanceof StandalonePriceStagedChangesRemovedMessagePayload) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?StandalonePriceStagedChangesRemovedMessagePayload + */ + protected function mapper() + { + return function (?int $index): ?StandalonePriceStagedChangesRemovedMessagePayload { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var StandalonePriceStagedChangesRemovedMessagePayload $data */ + $data = StandalonePriceStagedChangesRemovedMessagePayloadModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/StandalonePriceStagedChangesRemovedMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/StandalonePriceStagedChangesRemovedMessagePayloadModel.php new file mode 100644 index 00000000000..52d0b6851ea --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/StandalonePriceStagedChangesRemovedMessagePayloadModel.php @@ -0,0 +1,96 @@ +stagedChanges = $stagedChanges; + $this->type = $type ?? self::DISCRIMINATOR_VALUE; + } + + /** + * + * @return null|string + */ + public function getType() + { + if (is_null($this->type)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_TYPE); + if (is_null($data)) { + return null; + } + $this->type = (string) $data; + } + + return $this->type; + } + + /** + *Removed changes of the StandalonePrice after the Remove Staged Changes update action.
+ * + * + * @return null|StagedStandalonePrice + */ + public function getStagedChanges() + { + if (is_null($this->stagedChanges)) { + /** @psalm-var stdClass|arrayAdditional identifier for external systems like Customer Relationship Management (CRM) or Enterprise Resource Planning (ERP).
- * - - * @return null|string - */ - public function getExternalId(); - /** *Identifier used by the payment service that processes the Payment (for example, a PSP).
* The combination of interfaceId
and the paymentInterface
field on PaymentMethodInfo must be unique.
Deprecated because its value can be calculated from the total amounts saved in the Transactions.
- * - - * @return null|TypedMoney - */ - public function getAmountAuthorized(); - - /** - *Deprecated because this field is of little practical value, as it is either not reliably known, or the authorization time is fixed for a PSP.
- * - - * @return null|string - */ - public function getAuthorizedUntil(); - - /** - *Deprecated because its value can be calculated from the total amounts saved in the Transactions.
- * - - * @return null|TypedMoney - */ - public function getAmountPaid(); - - /** - *Deprecated because its value can be calculated from the total amounts saved in the Transactions.
- * - - * @return null|TypedMoney - */ - public function getAmountRefunded(); - /** *Information regarding the payment interface (for example, a PSP), and the specific payment method used.
* @@ -250,11 +205,6 @@ public function setCustomer(?CustomerReference $customer): void; */ public function setAnonymousId(?string $anonymousId): void; - /** - * @param ?string $externalId - */ - public function setExternalId(?string $externalId): void; - /** * @param ?string $interfaceId */ @@ -265,26 +215,6 @@ public function setInterfaceId(?string $interfaceId): void; */ public function setAmountPlanned(?CentPrecisionMoney $amountPlanned): void; - /** - * @param ?TypedMoney $amountAuthorized - */ - public function setAmountAuthorized(?TypedMoney $amountAuthorized): void; - - /** - * @param ?string $authorizedUntil - */ - public function setAuthorizedUntil(?string $authorizedUntil): void; - - /** - * @param ?TypedMoney $amountPaid - */ - public function setAmountPaid(?TypedMoney $amountPaid): void; - - /** - * @param ?TypedMoney $amountRefunded - */ - public function setAmountRefunded(?TypedMoney $amountRefunded): void; - /** * @param ?PaymentMethodInfo $paymentMethodInfo */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentBuilder.php index 87be4262642..5915d2b6c43 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentBuilder.php @@ -17,7 +17,6 @@ use Commercetools\Api\Models\Common\LastModifiedBy; use Commercetools\Api\Models\Common\LastModifiedByBuilder; use Commercetools\Api\Models\Common\TypedMoney; -use Commercetools\Api\Models\Common\TypedMoneyBuilder; use Commercetools\Api\Models\Customer\CustomerReference; use Commercetools\Api\Models\Customer\CustomerReferenceBuilder; use Commercetools\Api\Models\Type\CustomFields; @@ -84,12 +83,6 @@ final class PaymentBuilder implements Builder */ private $anonymousId; - /** - - * @var ?string - */ - private $externalId; - /** * @var ?string @@ -102,30 +95,6 @@ final class PaymentBuilder implements Builder */ private $amountPlanned; - /** - - * @var null|TypedMoney|TypedMoneyBuilder - */ - private $amountAuthorized; - - /** - - * @var ?string - */ - private $authorizedUntil; - - /** - - * @var null|TypedMoney|TypedMoneyBuilder - */ - private $amountPaid; - - /** - - * @var null|TypedMoney|TypedMoneyBuilder - */ - private $amountRefunded; - /** * @var null|PaymentMethodInfo|PaymentMethodInfoBuilder @@ -250,17 +219,6 @@ public function getAnonymousId() return $this->anonymousId; } - /** - *Additional identifier for external systems like Customer Relationship Management (CRM) or Enterprise Resource Planning (ERP).
- * - - * @return null|string - */ - public function getExternalId() - { - return $this->externalId; - } - /** *Identifier used by the payment service that processes the Payment (for example, a PSP).
* The combination of interfaceId
and the paymentInterface
field on PaymentMethodInfo must be unique.
Deprecated because its value can be calculated from the total amounts saved in the Transactions.
- * - - * @return null|TypedMoney - */ - public function getAmountAuthorized() - { - return $this->amountAuthorized instanceof TypedMoneyBuilder ? $this->amountAuthorized->build() : $this->amountAuthorized; - } - - /** - *Deprecated because this field is of little practical value, as it is either not reliably known, or the authorization time is fixed for a PSP.
- * - - * @return null|string - */ - public function getAuthorizedUntil() - { - return $this->authorizedUntil; - } - - /** - *Deprecated because its value can be calculated from the total amounts saved in the Transactions.
- * - - * @return null|TypedMoney - */ - public function getAmountPaid() - { - return $this->amountPaid instanceof TypedMoneyBuilder ? $this->amountPaid->build() : $this->amountPaid; - } - - /** - *Deprecated because its value can be calculated from the total amounts saved in the Transactions.
- * - - * @return null|TypedMoney - */ - public function getAmountRefunded() - { - return $this->amountRefunded instanceof TypedMoneyBuilder ? $this->amountRefunded->build() : $this->amountRefunded; - } - /** *Information regarding the payment interface (for example, a PSP), and the specific payment method used.
* @@ -483,17 +397,6 @@ public function withAnonymousId(?string $anonymousId) return $this; } - /** - * @param ?string $externalId - * @return $this - */ - public function withExternalId(?string $externalId) - { - $this->externalId = $externalId; - - return $this; - } - /** * @param ?string $interfaceId * @return $this @@ -516,50 +419,6 @@ public function withAmountPlanned(?CentPrecisionMoney $amountPlanned) return $this; } - /** - * @param ?TypedMoney $amountAuthorized - * @return $this - */ - public function withAmountAuthorized(?TypedMoney $amountAuthorized) - { - $this->amountAuthorized = $amountAuthorized; - - return $this; - } - - /** - * @param ?string $authorizedUntil - * @return $this - */ - public function withAuthorizedUntil(?string $authorizedUntil) - { - $this->authorizedUntil = $authorizedUntil; - - return $this; - } - - /** - * @param ?TypedMoney $amountPaid - * @return $this - */ - public function withAmountPaid(?TypedMoney $amountPaid) - { - $this->amountPaid = $amountPaid; - - return $this; - } - - /** - * @param ?TypedMoney $amountRefunded - * @return $this - */ - public function withAmountRefunded(?TypedMoney $amountRefunded) - { - $this->amountRefunded = $amountRefunded; - - return $this; - } - /** * @param ?PaymentMethodInfo $paymentMethodInfo * @return $this @@ -670,39 +529,6 @@ public function withAmountPlannedBuilder(?CentPrecisionMoneyBuilder $amountPlann return $this; } - /** - * @deprecated use withAmountAuthorized() instead - * @return $this - */ - public function withAmountAuthorizedBuilder(?TypedMoneyBuilder $amountAuthorized) - { - $this->amountAuthorized = $amountAuthorized; - - return $this; - } - - /** - * @deprecated use withAmountPaid() instead - * @return $this - */ - public function withAmountPaidBuilder(?TypedMoneyBuilder $amountPaid) - { - $this->amountPaid = $amountPaid; - - return $this; - } - - /** - * @deprecated use withAmountRefunded() instead - * @return $this - */ - public function withAmountRefundedBuilder(?TypedMoneyBuilder $amountRefunded) - { - $this->amountRefunded = $amountRefunded; - - return $this; - } - /** * @deprecated use withPaymentMethodInfo() instead * @return $this @@ -747,13 +573,8 @@ public function build(): Payment $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy, $this->customer instanceof CustomerReferenceBuilder ? $this->customer->build() : $this->customer, $this->anonymousId, - $this->externalId, $this->interfaceId, $this->amountPlanned instanceof CentPrecisionMoneyBuilder ? $this->amountPlanned->build() : $this->amountPlanned, - $this->amountAuthorized instanceof TypedMoneyBuilder ? $this->amountAuthorized->build() : $this->amountAuthorized, - $this->authorizedUntil, - $this->amountPaid instanceof TypedMoneyBuilder ? $this->amountPaid->build() : $this->amountPaid, - $this->amountRefunded instanceof TypedMoneyBuilder ? $this->amountRefunded->build() : $this->amountRefunded, $this->paymentMethodInfo instanceof PaymentMethodInfoBuilder ? $this->paymentMethodInfo->build() : $this->paymentMethodInfo, $this->paymentStatus instanceof PaymentStatusBuilder ? $this->paymentStatus->build() : $this->paymentStatus, $this->transactions, diff --git a/lib/commercetools-api/src/Models/Payment/PaymentDraft.php b/lib/commercetools-api/src/Models/Payment/PaymentDraft.php index e0c8fdfd2c0..ecdaab8fc5c 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentDraft.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentDraft.php @@ -19,13 +19,8 @@ interface PaymentDraft extends JsonObject { public const FIELD_CUSTOMER = 'customer'; public const FIELD_ANONYMOUS_ID = 'anonymousId'; - public const FIELD_EXTERNAL_ID = 'externalId'; public const FIELD_INTERFACE_ID = 'interfaceId'; public const FIELD_AMOUNT_PLANNED = 'amountPlanned'; - public const FIELD_AMOUNT_AUTHORIZED = 'amountAuthorized'; - public const FIELD_AUTHORIZED_UNTIL = 'authorizedUntil'; - public const FIELD_AMOUNT_PAID = 'amountPaid'; - public const FIELD_AMOUNT_REFUNDED = 'amountRefunded'; public const FIELD_PAYMENT_METHOD_INFO = 'paymentMethodInfo'; public const FIELD_PAYMENT_STATUS = 'paymentStatus'; public const FIELD_TRANSACTIONS = 'transactions'; @@ -49,14 +44,6 @@ public function getCustomer(); */ public function getAnonymousId(); - /** - *Additional identifier for external systems like Customer Relationship Management (CRM) or Enterprise Resource Planning (ERP).
- * - - * @return null|string - */ - public function getExternalId(); - /** *Identifier used by the payment service that processes the Payment (for example, a PSP).
* The combination of interfaceId
and the paymentInterface
field on PaymentMethodInfo must be unique.
@@ -76,38 +63,6 @@ public function getInterfaceId();
*/
public function getAmountPlanned();
- /**
- *
Deprecated because the value can be calculated from the total amounts saved in the Transactions.
- * - - * @return null|Money - */ - public function getAmountAuthorized(); - - /** - *Deprecated because this field is of little practical value, as it is either not reliably known, or the authorization time is fixed for a PSP.
- * - - * @return null|string - */ - public function getAuthorizedUntil(); - - /** - *Deprecated because the value can be calculated from the total amounts saved in the Transactions.
- * - - * @return null|Money - */ - public function getAmountPaid(); - - /** - *Deprecated because the value can be calculated from the total amounts saved in the Transactions.
- * - - * @return null|Money - */ - public function getAmountRefunded(); - /** *Information regarding the payment interface (for example, a PSP), and the specific payment method used.
* @@ -166,11 +121,6 @@ public function setCustomer(?CustomerResourceIdentifier $customer): void; */ public function setAnonymousId(?string $anonymousId): void; - /** - * @param ?string $externalId - */ - public function setExternalId(?string $externalId): void; - /** * @param ?string $interfaceId */ @@ -181,26 +131,6 @@ public function setInterfaceId(?string $interfaceId): void; */ public function setAmountPlanned(?Money $amountPlanned): void; - /** - * @param ?Money $amountAuthorized - */ - public function setAmountAuthorized(?Money $amountAuthorized): void; - - /** - * @param ?string $authorizedUntil - */ - public function setAuthorizedUntil(?string $authorizedUntil): void; - - /** - * @param ?Money $amountPaid - */ - public function setAmountPaid(?Money $amountPaid): void; - - /** - * @param ?Money $amountRefunded - */ - public function setAmountRefunded(?Money $amountRefunded): void; - /** * @param ?PaymentMethodInfo $paymentMethodInfo */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentDraftBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentDraftBuilder.php index afca348155e..a0307f4dc9c 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentDraftBuilder.php @@ -39,12 +39,6 @@ final class PaymentDraftBuilder implements Builder */ private $anonymousId; - /** - - * @var ?string - */ - private $externalId; - /** * @var ?string @@ -57,30 +51,6 @@ final class PaymentDraftBuilder implements Builder */ private $amountPlanned; - /** - - * @var null|Money|MoneyBuilder - */ - private $amountAuthorized; - - /** - - * @var ?string - */ - private $authorizedUntil; - - /** - - * @var null|Money|MoneyBuilder - */ - private $amountPaid; - - /** - - * @var null|Money|MoneyBuilder - */ - private $amountRefunded; - /** * @var null|PaymentMethodInfo|PaymentMethodInfoBuilder @@ -139,17 +109,6 @@ public function getAnonymousId() return $this->anonymousId; } - /** - *Additional identifier for external systems like Customer Relationship Management (CRM) or Enterprise Resource Planning (ERP).
- * - - * @return null|string - */ - public function getExternalId() - { - return $this->externalId; - } - /** *Identifier used by the payment service that processes the Payment (for example, a PSP).
* The combination of interfaceId
and the paymentInterface
field on PaymentMethodInfo must be unique.
@@ -175,50 +134,6 @@ public function getAmountPlanned()
return $this->amountPlanned instanceof MoneyBuilder ? $this->amountPlanned->build() : $this->amountPlanned;
}
- /**
- *
Deprecated because the value can be calculated from the total amounts saved in the Transactions.
- * - - * @return null|Money - */ - public function getAmountAuthorized() - { - return $this->amountAuthorized instanceof MoneyBuilder ? $this->amountAuthorized->build() : $this->amountAuthorized; - } - - /** - *Deprecated because this field is of little practical value, as it is either not reliably known, or the authorization time is fixed for a PSP.
- * - - * @return null|string - */ - public function getAuthorizedUntil() - { - return $this->authorizedUntil; - } - - /** - *Deprecated because the value can be calculated from the total amounts saved in the Transactions.
- * - - * @return null|Money - */ - public function getAmountPaid() - { - return $this->amountPaid instanceof MoneyBuilder ? $this->amountPaid->build() : $this->amountPaid; - } - - /** - *Deprecated because the value can be calculated from the total amounts saved in the Transactions.
- * - - * @return null|Money - */ - public function getAmountRefunded() - { - return $this->amountRefunded instanceof MoneyBuilder ? $this->amountRefunded->build() : $this->amountRefunded; - } - /** *Information regarding the payment interface (for example, a PSP), and the specific payment method used.
* @@ -307,17 +222,6 @@ public function withAnonymousId(?string $anonymousId) return $this; } - /** - * @param ?string $externalId - * @return $this - */ - public function withExternalId(?string $externalId) - { - $this->externalId = $externalId; - - return $this; - } - /** * @param ?string $interfaceId * @return $this @@ -340,50 +244,6 @@ public function withAmountPlanned(?Money $amountPlanned) return $this; } - /** - * @param ?Money $amountAuthorized - * @return $this - */ - public function withAmountAuthorized(?Money $amountAuthorized) - { - $this->amountAuthorized = $amountAuthorized; - - return $this; - } - - /** - * @param ?string $authorizedUntil - * @return $this - */ - public function withAuthorizedUntil(?string $authorizedUntil) - { - $this->authorizedUntil = $authorizedUntil; - - return $this; - } - - /** - * @param ?Money $amountPaid - * @return $this - */ - public function withAmountPaid(?Money $amountPaid) - { - $this->amountPaid = $amountPaid; - - return $this; - } - - /** - * @param ?Money $amountRefunded - * @return $this - */ - public function withAmountRefunded(?Money $amountRefunded) - { - $this->amountRefunded = $amountRefunded; - - return $this; - } - /** * @param ?PaymentMethodInfo $paymentMethodInfo * @return $this @@ -472,39 +332,6 @@ public function withAmountPlannedBuilder(?MoneyBuilder $amountPlanned) return $this; } - /** - * @deprecated use withAmountAuthorized() instead - * @return $this - */ - public function withAmountAuthorizedBuilder(?MoneyBuilder $amountAuthorized) - { - $this->amountAuthorized = $amountAuthorized; - - return $this; - } - - /** - * @deprecated use withAmountPaid() instead - * @return $this - */ - public function withAmountPaidBuilder(?MoneyBuilder $amountPaid) - { - $this->amountPaid = $amountPaid; - - return $this; - } - - /** - * @deprecated use withAmountRefunded() instead - * @return $this - */ - public function withAmountRefundedBuilder(?MoneyBuilder $amountRefunded) - { - $this->amountRefunded = $amountRefunded; - - return $this; - } - /** * @deprecated use withPaymentMethodInfo() instead * @return $this @@ -543,13 +370,8 @@ public function build(): PaymentDraft return new PaymentDraftModel( $this->customer instanceof CustomerResourceIdentifierBuilder ? $this->customer->build() : $this->customer, $this->anonymousId, - $this->externalId, $this->interfaceId, $this->amountPlanned instanceof MoneyBuilder ? $this->amountPlanned->build() : $this->amountPlanned, - $this->amountAuthorized instanceof MoneyBuilder ? $this->amountAuthorized->build() : $this->amountAuthorized, - $this->authorizedUntil, - $this->amountPaid instanceof MoneyBuilder ? $this->amountPaid->build() : $this->amountPaid, - $this->amountRefunded instanceof MoneyBuilder ? $this->amountRefunded->build() : $this->amountRefunded, $this->paymentMethodInfo instanceof PaymentMethodInfoBuilder ? $this->paymentMethodInfo->build() : $this->paymentMethodInfo, $this->paymentStatus instanceof PaymentStatusDraftBuilder ? $this->paymentStatus->build() : $this->paymentStatus, $this->transactions, diff --git a/lib/commercetools-api/src/Models/Payment/PaymentDraftModel.php b/lib/commercetools-api/src/Models/Payment/PaymentDraftModel.php index 367e847f380..9cdad764795 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentDraftModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentDraftModel.php @@ -38,12 +38,6 @@ final class PaymentDraftModel extends JsonObjectModel implements PaymentDraft */ protected $anonymousId; - /** - * - * @var ?string - */ - protected $externalId; - /** * * @var ?string @@ -56,30 +50,6 @@ final class PaymentDraftModel extends JsonObjectModel implements PaymentDraft */ protected $amountPlanned; - /** - * - * @var ?Money - */ - protected $amountAuthorized; - - /** - * - * @var ?string - */ - protected $authorizedUntil; - - /** - * - * @var ?Money - */ - protected $amountPaid; - - /** - * - * @var ?Money - */ - protected $amountRefunded; - /** * * @var ?PaymentMethodInfo @@ -123,13 +93,8 @@ final class PaymentDraftModel extends JsonObjectModel implements PaymentDraft public function __construct( ?CustomerResourceIdentifier $customer = null, ?string $anonymousId = null, - ?string $externalId = null, ?string $interfaceId = null, ?Money $amountPlanned = null, - ?Money $amountAuthorized = null, - ?string $authorizedUntil = null, - ?Money $amountPaid = null, - ?Money $amountRefunded = null, ?PaymentMethodInfo $paymentMethodInfo = null, ?PaymentStatusDraft $paymentStatus = null, ?TransactionDraftCollection $transactions = null, @@ -139,13 +104,8 @@ public function __construct( ) { $this->customer = $customer; $this->anonymousId = $anonymousId; - $this->externalId = $externalId; $this->interfaceId = $interfaceId; $this->amountPlanned = $amountPlanned; - $this->amountAuthorized = $amountAuthorized; - $this->authorizedUntil = $authorizedUntil; - $this->amountPaid = $amountPaid; - $this->amountRefunded = $amountRefunded; $this->paymentMethodInfo = $paymentMethodInfo; $this->paymentStatus = $paymentStatus; $this->transactions = $transactions; @@ -195,26 +155,6 @@ public function getAnonymousId() return $this->anonymousId; } - /** - *Additional identifier for external systems like Customer Relationship Management (CRM) or Enterprise Resource Planning (ERP).
- * - * - * @return null|string - */ - public function getExternalId() - { - if (is_null($this->externalId)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_EXTERNAL_ID); - if (is_null($data)) { - return null; - } - $this->externalId = (string) $data; - } - - return $this->externalId; - } - /** *Identifier used by the payment service that processes the Payment (for example, a PSP).
* The combination of interfaceId
and the paymentInterface
field on PaymentMethodInfo must be unique.
@@ -259,89 +199,6 @@ public function getAmountPlanned()
return $this->amountPlanned;
}
- /**
- *
Deprecated because the value can be calculated from the total amounts saved in the Transactions.
- * - * - * @return null|Money - */ - public function getAmountAuthorized() - { - if (is_null($this->amountAuthorized)) { - /** @psalm-var stdClass|arrayDeprecated because this field is of little practical value, as it is either not reliably known, or the authorization time is fixed for a PSP.
- * - * - * @return null|string - */ - public function getAuthorizedUntil() - { - if (is_null($this->authorizedUntil)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_AUTHORIZED_UNTIL); - if (is_null($data)) { - return null; - } - $this->authorizedUntil = (string) $data; - } - - return $this->authorizedUntil; - } - - /** - *Deprecated because the value can be calculated from the total amounts saved in the Transactions.
- * - * - * @return null|Money - */ - public function getAmountPaid() - { - if (is_null($this->amountPaid)) { - /** @psalm-var stdClass|arrayDeprecated because the value can be calculated from the total amounts saved in the Transactions.
- * - * - * @return null|Money - */ - public function getAmountRefunded() - { - if (is_null($this->amountRefunded)) { - /** @psalm-var stdClass|arrayInformation regarding the payment interface (for example, a PSP), and the specific payment method used.
* @@ -482,14 +339,6 @@ public function setAnonymousId(?string $anonymousId): void $this->anonymousId = $anonymousId; } - /** - * @param ?string $externalId - */ - public function setExternalId(?string $externalId): void - { - $this->externalId = $externalId; - } - /** * @param ?string $interfaceId */ @@ -506,38 +355,6 @@ public function setAmountPlanned(?Money $amountPlanned): void $this->amountPlanned = $amountPlanned; } - /** - * @param ?Money $amountAuthorized - */ - public function setAmountAuthorized(?Money $amountAuthorized): void - { - $this->amountAuthorized = $amountAuthorized; - } - - /** - * @param ?string $authorizedUntil - */ - public function setAuthorizedUntil(?string $authorizedUntil): void - { - $this->authorizedUntil = $authorizedUntil; - } - - /** - * @param ?Money $amountPaid - */ - public function setAmountPaid(?Money $amountPaid): void - { - $this->amountPaid = $amountPaid; - } - - /** - * @param ?Money $amountRefunded - */ - public function setAmountRefunded(?Money $amountRefunded): void - { - $this->amountRefunded = $amountRefunded; - } - /** * @param ?PaymentMethodInfo $paymentMethodInfo */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentModel.php b/lib/commercetools-api/src/Models/Payment/PaymentModel.php index 97994dac05c..d33e481601e 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentModel.php @@ -83,12 +83,6 @@ final class PaymentModel extends JsonObjectModel implements Payment */ protected $anonymousId; - /** - * - * @var ?string - */ - protected $externalId; - /** * * @var ?string @@ -101,30 +95,6 @@ final class PaymentModel extends JsonObjectModel implements Payment */ protected $amountPlanned; - /** - * - * @var ?TypedMoney - */ - protected $amountAuthorized; - - /** - * - * @var ?string - */ - protected $authorizedUntil; - - /** - * - * @var ?TypedMoney - */ - protected $amountPaid; - - /** - * - * @var ?TypedMoney - */ - protected $amountRefunded; - /** * * @var ?PaymentMethodInfo @@ -174,13 +144,8 @@ public function __construct( ?CreatedBy $createdBy = null, ?CustomerReference $customer = null, ?string $anonymousId = null, - ?string $externalId = null, ?string $interfaceId = null, ?CentPrecisionMoney $amountPlanned = null, - ?TypedMoney $amountAuthorized = null, - ?string $authorizedUntil = null, - ?TypedMoney $amountPaid = null, - ?TypedMoney $amountRefunded = null, ?PaymentMethodInfo $paymentMethodInfo = null, ?PaymentStatus $paymentStatus = null, ?TransactionCollection $transactions = null, @@ -196,13 +161,8 @@ public function __construct( $this->createdBy = $createdBy; $this->customer = $customer; $this->anonymousId = $anonymousId; - $this->externalId = $externalId; $this->interfaceId = $interfaceId; $this->amountPlanned = $amountPlanned; - $this->amountAuthorized = $amountAuthorized; - $this->authorizedUntil = $authorizedUntil; - $this->amountPaid = $amountPaid; - $this->amountRefunded = $amountRefunded; $this->paymentMethodInfo = $paymentMethodInfo; $this->paymentStatus = $paymentStatus; $this->transactions = $transactions; @@ -382,26 +342,6 @@ public function getAnonymousId() return $this->anonymousId; } - /** - *Additional identifier for external systems like Customer Relationship Management (CRM) or Enterprise Resource Planning (ERP).
- * - * - * @return null|string - */ - public function getExternalId() - { - if (is_null($this->externalId)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_EXTERNAL_ID); - if (is_null($data)) { - return null; - } - $this->externalId = (string) $data; - } - - return $this->externalId; - } - /** *Identifier used by the payment service that processes the Payment (for example, a PSP).
* The combination of interfaceId
and the paymentInterface
field on PaymentMethodInfo must be unique.
Deprecated because its value can be calculated from the total amounts saved in the Transactions.
- * - * - * @return null|TypedMoney - */ - public function getAmountAuthorized() - { - if (is_null($this->amountAuthorized)) { - /** @psalm-var stdClass|arrayDeprecated because this field is of little practical value, as it is either not reliably known, or the authorization time is fixed for a PSP.
- * - * - * @return null|string - */ - public function getAuthorizedUntil() - { - if (is_null($this->authorizedUntil)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_AUTHORIZED_UNTIL); - if (is_null($data)) { - return null; - } - $this->authorizedUntil = (string) $data; - } - - return $this->authorizedUntil; - } - - /** - *Deprecated because its value can be calculated from the total amounts saved in the Transactions.
- * - * - * @return null|TypedMoney - */ - public function getAmountPaid() - { - if (is_null($this->amountPaid)) { - /** @psalm-var stdClass|arrayDeprecated because its value can be calculated from the total amounts saved in the Transactions.
- * - * - * @return null|TypedMoney - */ - public function getAmountRefunded() - { - if (is_null($this->amountRefunded)) { - /** @psalm-var stdClass|arrayInformation regarding the payment interface (for example, a PSP), and the specific payment method used.
* @@ -716,14 +573,6 @@ public function setAnonymousId(?string $anonymousId): void $this->anonymousId = $anonymousId; } - /** - * @param ?string $externalId - */ - public function setExternalId(?string $externalId): void - { - $this->externalId = $externalId; - } - /** * @param ?string $interfaceId */ @@ -740,38 +589,6 @@ public function setAmountPlanned(?CentPrecisionMoney $amountPlanned): void $this->amountPlanned = $amountPlanned; } - /** - * @param ?TypedMoney $amountAuthorized - */ - public function setAmountAuthorized(?TypedMoney $amountAuthorized): void - { - $this->amountAuthorized = $amountAuthorized; - } - - /** - * @param ?string $authorizedUntil - */ - public function setAuthorizedUntil(?string $authorizedUntil): void - { - $this->authorizedUntil = $authorizedUntil; - } - - /** - * @param ?TypedMoney $amountPaid - */ - public function setAmountPaid(?TypedMoney $amountPaid): void - { - $this->amountPaid = $amountPaid; - } - - /** - * @param ?TypedMoney $amountRefunded - */ - public function setAmountRefunded(?TypedMoney $amountRefunded): void - { - $this->amountRefunded = $amountRefunded; - } - /** * @param ?PaymentMethodInfo $paymentMethodInfo */ diff --git a/lib/commercetools-api/src/Models/Product/ProductRemovePriceAction.php b/lib/commercetools-api/src/Models/Product/ProductRemovePriceAction.php index 2db85e0670c..cf429c29b8c 100644 --- a/lib/commercetools-api/src/Models/Product/ProductRemovePriceAction.php +++ b/lib/commercetools-api/src/Models/Product/ProductRemovePriceAction.php @@ -15,9 +15,6 @@ interface ProductRemovePriceAction extends ProductUpdateAction { public const FIELD_PRICE_ID = 'priceId'; - public const FIELD_SKU = 'sku'; - public const FIELD_VARIANT_ID = 'variantId'; - public const FIELD_PRICE = 'price'; public const FIELD_STAGED = 'staged'; /** @@ -28,35 +25,6 @@ interface ProductRemovePriceAction extends ProductUpdateAction */ public function getPriceId(); - /** - *The sku
of the ProductVariant the provided Price should be removed from.
- * Either 'variantId' or 'sku' is required" when priceId
is not provided.
- * This field is now deprecated, use 'priceId' instead.
The id
of the ProductVariant the provided Price should be removed from.
- * Either 'variantId' or 'sku' is required" when priceId
is not provided.
- * This field is now deprecated, use 'priceId' instead.
The Price identical to the one to be removed from the ProductVariant. - * This field is now deprecated, use 'priceId' instead.
- * - - * @return null|PriceDraft - */ - public function getPrice(); - /** *If true
, only the staged Embedded Price is removed. If false
, both the current and staged Embedded Price are removed.
The sku
of the ProductVariant the provided Price should be removed from.
- * Either 'variantId' or 'sku' is required" when priceId
is not provided.
- * This field is now deprecated, use 'priceId' instead.
The id
of the ProductVariant the provided Price should be removed from.
- * Either 'variantId' or 'sku' is required" when priceId
is not provided.
- * This field is now deprecated, use 'priceId' instead.
The Price identical to the one to be removed from the ProductVariant. - * This field is now deprecated, use 'priceId' instead.
- * - - * @return null|PriceDraft - */ - public function getPrice() - { - return $this->price instanceof PriceDraftBuilder ? $this->price->build() : $this->price; - } - /** *If true
, only the staged Embedded Price is removed. If false
, both the current and staged Embedded Price are removed.
The sku
of the ProductVariant the provided Price should be removed from.
- * Either 'variantId' or 'sku' is required" when priceId
is not provided.
- * This field is now deprecated, use 'priceId' instead.
The id
of the ProductVariant the provided Price should be removed from.
- * Either 'variantId' or 'sku' is required" when priceId
is not provided.
- * This field is now deprecated, use 'priceId' instead.
The Price identical to the one to be removed from the ProductVariant. - * This field is now deprecated, use 'priceId' instead.
- * - * - * @return null|PriceDraft - */ - public function getPrice() - { - if (is_null($this->price)) { - /** @psalm-var stdClass|arrayIf true
, only the staged Embedded Price is removed. If false
, both the current and staged Embedded Price are removed.
Specifies in which way the Products are assigned to the ProductSelection. - * Currently, the only way of doing this is to specify each Product individually, either by including or excluding them explicitly.
- * - - * @return null|string - */ - public function getType(); - /** *Specifies in which way the Products are assigned to the ProductSelection. * Currently, the only way of doing this is to specify each Product individually, either by including or excluding them explicitly.
@@ -171,11 +161,6 @@ public function setName(?LocalizedString $name): void; */ public function setProductCount(?int $productCount): void; - /** - * @param ?string $type - */ - public function setType(?string $type): void; - /** * @param ?string $mode */ diff --git a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionBuilder.php b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionBuilder.php index d3a62bea90c..1c95ca023de 100644 --- a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionBuilder.php +++ b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionBuilder.php @@ -85,12 +85,6 @@ final class ProductSelectionBuilder implements Builder */ private $productCount; - /** - - * @var ?string - */ - private $type; - /** * @var ?string @@ -202,18 +196,6 @@ public function getProductCount() return $this->productCount; } - /** - *Specifies in which way the Products are assigned to the ProductSelection. - * Currently, the only way of doing this is to specify each Product individually, either by including or excluding them explicitly.
- * - - * @return null|string - */ - public function getType() - { - return $this->type; - } - /** *Specifies in which way the Products are assigned to the ProductSelection. * Currently, the only way of doing this is to specify each Product individually, either by including or excluding them explicitly.
@@ -336,17 +318,6 @@ public function withProductCount(?int $productCount) return $this; } - /** - * @param ?string $type - * @return $this - */ - public function withType(?string $type) - { - $this->type = $type; - - return $this; - } - /** * @param ?string $mode * @return $this @@ -425,7 +396,6 @@ public function build(): ProductSelection $this->key, $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name, $this->productCount, - $this->type, $this->mode, $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom ); diff --git a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraft.php b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraft.php index 1def18f156f..60cd87d6638 100644 --- a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraft.php +++ b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraft.php @@ -18,7 +18,6 @@ interface ProductSelectionDraft extends JsonObject public const FIELD_KEY = 'key'; public const FIELD_NAME = 'name'; public const FIELD_CUSTOM = 'custom'; - public const FIELD_TYPE = 'type'; public const FIELD_MODE = 'mode'; /** @@ -45,14 +44,6 @@ public function getName(); */ public function getCustom(); - /** - *Type of the Product Selection.
- * - - * @return null|string - */ - public function getType(); - /** *Mode of the Product Selection.
* @@ -76,11 +67,6 @@ public function setName(?LocalizedString $name): void; */ public function setCustom(?CustomFieldsDraft $custom): void; - /** - * @param ?string $type - */ - public function setType(?string $type): void; - /** * @param ?string $mode */ diff --git a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraftBuilder.php b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraftBuilder.php index ca4c0070f35..85d2c846189 100644 --- a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraftBuilder.php +++ b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraftBuilder.php @@ -42,12 +42,6 @@ final class ProductSelectionDraftBuilder implements Builder */ private $custom; - /** - - * @var ?string - */ - private $type; - /** * @var ?string @@ -87,17 +81,6 @@ public function getCustom() return $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom; } - /** - *Type of the Product Selection.
- * - - * @return null|string - */ - public function getType() - { - return $this->type; - } - /** *Mode of the Product Selection.
* @@ -142,17 +125,6 @@ public function withCustom(?CustomFieldsDraft $custom) return $this; } - /** - * @param ?string $type - * @return $this - */ - public function withType(?string $type) - { - $this->type = $type; - - return $this; - } - /** * @param ?string $mode * @return $this @@ -192,7 +164,6 @@ public function build(): ProductSelectionDraft $this->key, $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name, $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom, - $this->type, $this->mode ); } diff --git a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraftModel.php b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraftModel.php index 19edcd085ef..0f3cc08911d 100644 --- a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraftModel.php +++ b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionDraftModel.php @@ -41,12 +41,6 @@ final class ProductSelectionDraftModel extends JsonObjectModel implements Produc */ protected $custom; - /** - * - * @var ?string - */ - protected $type; - /** * * @var ?string @@ -61,13 +55,11 @@ public function __construct( ?string $key = null, ?LocalizedString $name = null, ?CustomFieldsDraft $custom = null, - ?string $type = null, ?string $mode = null ) { $this->key = $key; $this->name = $name; $this->custom = $custom; - $this->type = $type; $this->mode = $mode; } @@ -133,26 +125,6 @@ public function getCustom() return $this->custom; } - /** - *Type of the Product Selection.
- * - * - * @return null|string - */ - public function getType() - { - if (is_null($this->type)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_TYPE); - if (is_null($data)) { - return null; - } - $this->type = (string) $data; - } - - return $this->type; - } - /** *Mode of the Product Selection.
* @@ -198,14 +170,6 @@ public function setCustom(?CustomFieldsDraft $custom): void $this->custom = $custom; } - /** - * @param ?string $type - */ - public function setType(?string $type): void - { - $this->type = $type; - } - /** * @param ?string $mode */ diff --git a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionModel.php b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionModel.php index c2a34257802..40a8991a04b 100644 --- a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionModel.php +++ b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionModel.php @@ -84,12 +84,6 @@ final class ProductSelectionModel extends JsonObjectModel implements ProductSele */ protected $productCount; - /** - * - * @var ?string - */ - protected $type; - /** * * @var ?string @@ -116,7 +110,6 @@ public function __construct( ?string $key = null, ?LocalizedString $name = null, ?int $productCount = null, - ?string $type = null, ?string $mode = null, ?CustomFields $custom = null ) { @@ -129,7 +122,6 @@ public function __construct( $this->key = $key; $this->name = $name; $this->productCount = $productCount; - $this->type = $type; $this->mode = $mode; $this->custom = $custom; } @@ -325,27 +317,6 @@ public function getProductCount() return $this->productCount; } - /** - *Specifies in which way the Products are assigned to the ProductSelection. - * Currently, the only way of doing this is to specify each Product individually, either by including or excluding them explicitly.
- * - * - * @return null|string - */ - public function getType() - { - if (is_null($this->type)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_TYPE); - if (is_null($data)) { - return null; - } - $this->type = (string) $data; - } - - return $this->type; - } - /** *Specifies in which way the Products are assigned to the ProductSelection. * Currently, the only way of doing this is to specify each Product individually, either by including or excluding them explicitly.
@@ -461,14 +432,6 @@ public function setProductCount(?int $productCount): void $this->productCount = $productCount; } - /** - * @param ?string $type - */ - public function setType(?string $type): void - { - $this->type = $type; - } - /** * @param ?string $mode */ diff --git a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionType.php b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionType.php deleted file mode 100644 index 0c275fac2ce..00000000000 --- a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionType.php +++ /dev/null @@ -1,26 +0,0 @@ -The following types of Product Selections are supported: - * - - * @return null|string - */ - public function getType(); -} diff --git a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionTypeCollection.php b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionTypeCollection.php deleted file mode 100644 index 44f064a7d49..00000000000 --- a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionTypeCollection.php +++ /dev/null @@ -1,60 +0,0 @@ - - * @psalm-method T current() - * @psalm-method T end() - * @psalm-method T at($offset) - * @method ProductSelectionType current() - * @method ProductSelectionType end() - * @method ProductSelectionType at($offset) - */ -class ProductSelectionTypeCollection extends MapperSequence -{ - /** - * @psalm-assert T $value - * @psalm-param T|stdClass $value - * @throws InvalidArgumentException - * - * @return ProductSelectionTypeCollection - */ - public function add($value) - { - if (!$value instanceof ProductSelectionType) { - throw new InvalidArgumentException(); - } - $this->store($value); - - return $this; - } - - /** - * @psalm-return callable(int):?T - */ - protected function mapper() - { - return function (?int $index): ?ProductSelectionType { - $data = $this->get($index); - if ($data instanceof stdClass) { - /** @var T $data */ - $data = ProductSelectionTypeModel::of($data); - $this->set($data, $index); - } - - return $data; - }; - } -} diff --git a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionTypeModel.php b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionTypeModel.php deleted file mode 100644 index bc6ded06ac5..00000000000 --- a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionTypeModel.php +++ /dev/null @@ -1,95 +0,0 @@ - > - * - */ - private static $discriminatorClasses = [ - ]; - - /** - * @psalm-suppress MissingParamType - */ - public function __construct( - ?string $type = null - ) { - $this->type = $type; - } - - /** - *The following types of Product Selections are supported:
- * - * - * @return null|string - */ - public function getType() - { - if (is_null($this->type)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_TYPE); - if (is_null($data)) { - return null; - } - $this->type = (string) $data; - } - - return $this->type; - } - - - - - - /** - * @psalm-param stdClass|array