From 411e251417b9643a8169035549be86d89cd6d678 Mon Sep 17 00:00:00 2001 From: Auto Mation Date: Fri, 11 Nov 2022 15:42:00 +0000 Subject: [PATCH 1/4] TASK: Updating SDK --- changes.md | 75 +-- lib/commercetools-api/docs/RequestBuilder.md | 19 +- ...usinessUnitSetAddressCustomFieldAction.php | 2 +- ...UnitSetAddressCustomFieldActionBuilder.php | 2 +- ...ssUnitSetAddressCustomFieldActionModel.php | 2 +- .../BusinessUnitSetCustomFieldAction.php | 2 +- ...usinessUnitSetCustomFieldActionBuilder.php | 2 +- .../BusinessUnitSetCustomFieldActionModel.php | 2 +- ...CartSetBillingAddressCustomFieldAction.php | 2 +- ...BillingAddressCustomFieldActionBuilder.php | 2 +- ...etBillingAddressCustomFieldActionModel.php | 2 +- .../Models/Cart/CartSetCustomFieldAction.php | 2 +- .../Cart/CartSetCustomFieldActionBuilder.php | 2 +- .../Cart/CartSetCustomFieldActionModel.php | 2 +- ...CartSetCustomLineItemCustomFieldAction.php | 2 +- ...CustomLineItemCustomFieldActionBuilder.php | 2 +- ...etCustomLineItemCustomFieldActionModel.php | 2 +- ...artSetDeliveryAddressCustomFieldAction.php | 2 +- ...eliveryAddressCustomFieldActionBuilder.php | 2 +- ...tDeliveryAddressCustomFieldActionModel.php | 2 +- ...etItemShippingAddressCustomFieldAction.php | 2 +- ...hippingAddressCustomFieldActionBuilder.php | 2 +- ...mShippingAddressCustomFieldActionModel.php | 2 +- .../Cart/CartSetLineItemCustomFieldAction.php | 2 +- ...artSetLineItemCustomFieldActionBuilder.php | 2 +- .../CartSetLineItemCustomFieldActionModel.php | 2 +- ...artSetShippingAddressCustomFieldAction.php | 2 +- ...hippingAddressCustomFieldActionBuilder.php | 2 +- ...tShippingAddressCustomFieldActionModel.php | 2 +- .../src/Models/Cart/ItemShippingDetails.php | 5 +- .../Cart/ItemShippingDetailsBuilder.php | 5 +- .../Models/Cart/ItemShippingDetailsModel.php | 5 +- .../CartDiscountSetCustomFieldAction.php | 2 +- ...artDiscountSetCustomFieldActionBuilder.php | 2 +- .../CartDiscountSetCustomFieldActionModel.php | 2 +- .../CartDiscount/CartDiscountUpdate.php | 2 +- .../CartDiscountUpdateBuilder.php | 2 +- .../CartDiscount/CartDiscountUpdateModel.php | 2 +- .../CategorySetAssetCustomFieldAction.php | 2 +- ...tegorySetAssetCustomFieldActionBuilder.php | 2 +- ...CategorySetAssetCustomFieldActionModel.php | 2 +- .../Category/CategorySetCustomFieldAction.php | 2 +- .../CategorySetCustomFieldActionBuilder.php | 2 +- .../CategorySetCustomFieldActionModel.php | 2 +- .../src/Models/Category/CategoryUpdate.php | 2 +- .../Models/Category/CategoryUpdateBuilder.php | 2 +- .../Models/Category/CategoryUpdateModel.php | 2 +- .../ChannelSetAddressCustomFieldAction.php | 3 +- ...nnelSetAddressCustomFieldActionBuilder.php | 3 +- ...hannelSetAddressCustomFieldActionModel.php | 3 +- .../Channel/ChannelSetCustomFieldAction.php | 2 +- .../ChannelSetCustomFieldActionBuilder.php | 2 +- .../ChannelSetCustomFieldActionModel.php | 2 +- .../src/Models/Channel/ChannelUpdate.php | 2 +- .../Models/Channel/ChannelUpdateBuilder.php | 2 +- .../src/Models/Channel/ChannelUpdateModel.php | 2 +- .../src/Models/Common/BaseResource.php | 1 + .../src/Models/Common/BaseResourceBuilder.php | 2 + .../src/Models/Common/BaseResourceModel.php | 2 + .../src/Models/Common/ScopedPrice.php | 2 +- .../src/Models/Common/ScopedPriceBuilder.php | 2 +- .../src/Models/Common/ScopedPriceModel.php | 2 +- .../CustomerSetAddressCustomFieldAction.php | 4 +- ...omerSetAddressCustomFieldActionBuilder.php | 4 +- ...stomerSetAddressCustomFieldActionModel.php | 4 +- .../Customer/CustomerSetCustomFieldAction.php | 4 +- .../CustomerSetCustomFieldActionBuilder.php | 4 +- .../CustomerSetCustomFieldActionModel.php | 4 +- .../src/Models/Customer/CustomerSignin.php | 2 +- .../Models/Customer/CustomerSigninBuilder.php | 2 +- .../Models/Customer/CustomerSigninModel.php | 2 +- .../CustomerGroup/CustomerGroupDraft.php | 2 +- .../CustomerGroupDraftBuilder.php | 2 +- .../CustomerGroup/CustomerGroupDraftModel.php | 2 +- .../CustomerGroupSetCustomFieldAction.php | 2 +- ...stomerGroupSetCustomFieldActionBuilder.php | 2 +- ...CustomerGroupSetCustomFieldActionModel.php | 2 +- .../CustomerGroup/CustomerGroupUpdate.php | 2 +- .../CustomerGroupUpdateBuilder.php | 2 +- .../CustomerGroupUpdateModel.php | 2 +- .../DiscountCodeSetCustomFieldAction.php | 2 +- ...iscountCodeSetCustomFieldActionBuilder.php | 2 +- .../DiscountCodeSetCustomFieldActionModel.php | 2 +- .../DiscountCode/DiscountCodeUpdate.php | 2 +- .../DiscountCodeUpdateBuilder.php | 2 +- .../DiscountCode/DiscountCodeUpdateModel.php | 2 +- .../src/Models/Error/AccessDeniedError.php | 16 - .../Models/Error/AccessDeniedErrorBuilder.php | 61 -- .../Error/AccessDeniedErrorCollection.php | 56 -- .../Error/AnonymousIdAlreadyInUseError.php | 18 + .../AnonymousIdAlreadyInUseErrorBuilder.php | 2 + .../AnonymousIdAlreadyInUseErrorModel.php | 2 + .../AttributeDefinitionAlreadyExistsError.php | 25 + ...uteDefinitionAlreadyExistsErrorBuilder.php | 8 + ...ibuteDefinitionAlreadyExistsErrorModel.php | 8 + .../AttributeDefinitionTypeConflictError.php | 25 + ...buteDefinitionTypeConflictErrorBuilder.php | 8 + ...ributeDefinitionTypeConflictErrorModel.php | 8 + .../Error/AttributeNameDoesNotExistError.php | 21 + .../AttributeNameDoesNotExistErrorBuilder.php | 4 + .../AttributeNameDoesNotExistErrorModel.php | 4 + .../src/Models/Error/AuthErrorResponse.php | 57 ++ .../Models/Error/AuthErrorResponseBuilder.php | 179 ++++++ .../Error/AuthErrorResponseCollection.php | 56 ++ .../Models/Error/AuthErrorResponseModel.php | 210 +++++++ .../src/Models/Error/BadGatewayError.php | 18 + .../Models/Error/BadGatewayErrorBuilder.php | 2 + .../src/Models/Error/BadGatewayErrorModel.php | 2 + .../Error/ConcurrentModificationError.php | 21 + .../ConcurrentModificationErrorBuilder.php | 4 + .../ConcurrentModificationErrorModel.php | 4 + .../Error/CountryNotConfiguredInStore.php | 63 +++ .../CountryNotConfiguredInStoreBuilder.php | 121 ++++ .../CountryNotConfiguredInStoreCollection.php | 56 ++ .../CountryNotConfiguredInStoreModel.php | 178 ++++++ .../Error/DiscountCodeNonApplicableError.php | 39 +- .../DiscountCodeNonApplicableErrorBuilder.php | 28 +- .../DiscountCodeNonApplicableErrorModel.php | 36 +- .../Error/DuplicateAttributeValueError.php | 21 + .../DuplicateAttributeValueErrorBuilder.php | 4 + .../DuplicateAttributeValueErrorModel.php | 4 + .../Error/DuplicateAttributeValuesError.php | 21 + .../DuplicateAttributeValuesErrorBuilder.php | 4 + .../DuplicateAttributeValuesErrorModel.php | 4 + .../Models/Error/DuplicateEnumValuesError.php | 21 + .../Error/DuplicateEnumValuesErrorBuilder.php | 4 + .../Error/DuplicateEnumValuesErrorModel.php | 4 + .../src/Models/Error/DuplicateFieldError.php | 32 +- .../Error/DuplicateFieldErrorBuilder.php | 49 +- .../Models/Error/DuplicateFieldErrorModel.php | 45 +- ...icateFieldWithConflictingResourceError.php | 25 +- ...eldWithConflictingResourceErrorBuilder.php | 8 +- ...FieldWithConflictingResourceErrorModel.php | 8 +- .../Models/Error/DuplicatePriceScopeError.php | 21 + .../Error/DuplicatePriceScopeErrorBuilder.php | 4 + .../Error/DuplicatePriceScopeErrorModel.php | 4 + .../DuplicateStandalonePriceScopeError.php | 35 +- ...licateStandalonePriceScopeErrorBuilder.php | 18 +- ...uplicateStandalonePriceScopeErrorModel.php | 18 +- .../Error/DuplicateVariantValuesError.php | 21 + .../DuplicateVariantValuesErrorBuilder.php | 4 + .../DuplicateVariantValuesErrorModel.php | 4 + .../Models/Error/EditPreviewFailedError.php | 21 + .../Error/EditPreviewFailedErrorBuilder.php | 4 + .../Error/EditPreviewFailedErrorModel.php | 4 + .../Error/EnumKeyAlreadyExistsError.php | 23 + .../EnumKeyAlreadyExistsErrorBuilder.php | 6 + .../Error/EnumKeyAlreadyExistsErrorModel.php | 6 + .../Models/Error/EnumKeyDoesNotExistError.php | 23 + .../Error/EnumKeyDoesNotExistErrorBuilder.php | 6 + .../Error/EnumKeyDoesNotExistErrorModel.php | 6 + .../src/Models/Error/EnumValueIsUsedError.php | 18 + .../Error/EnumValueIsUsedErrorBuilder.php | 2 + .../Error/EnumValueIsUsedErrorModel.php | 2 + .../Models/Error/EnumValuesMustMatchError.php | 18 + .../Error/EnumValuesMustMatchErrorBuilder.php | 2 + .../Error/EnumValuesMustMatchErrorModel.php | 2 + .../src/Models/Error/ErrorObject.php | 4 + .../src/Models/Error/ErrorObjectBuilder.php | 2 + .../src/Models/Error/ErrorObjectModel.php | 10 +- .../src/Models/Error/ErrorResponse.php | 31 +- .../src/Models/Error/ErrorResponseBuilder.php | 61 +- .../Models/Error/ErrorResponseCollection.php | 14 +- .../src/Models/Error/ErrorResponseModel.php | 73 +-- .../Error/ExtensionBadResponseError.php | 91 ++- .../ExtensionBadResponseErrorBuilder.php | 143 ++++- .../Error/ExtensionBadResponseErrorModel.php | 179 +++++- .../src/Models/Error/ExtensionError.php | 73 +++ .../Models/Error/ExtensionErrorBuilder.php | 150 +++++ .../Models/Error/ExtensionErrorCollection.php | 56 ++ .../src/Models/Error/ExtensionErrorModel.php | 191 +++++++ .../Models/Error/ExtensionNoResponseError.php | 23 + .../Error/ExtensionNoResponseErrorBuilder.php | 6 + .../Error/ExtensionNoResponseErrorModel.php | 6 + ...xtensionPredicateEvaluationFailedError.php | 49 ++ ...nPredicateEvaluationFailedErrorBuilder.php | 102 ++++ ...edicateEvaluationFailedErrorCollection.php | 56 ++ ...onPredicateEvaluationFailedErrorModel.php} | 43 +- .../ExtensionUpdateActionsFailedError.php | 35 +- ...tensionUpdateActionsFailedErrorBuilder.php | 37 +- ...ExtensionUpdateActionsFailedErrorModel.php | 37 +- .../Models/Error/ExternalOAuthFailedError.php | 18 + .../Error/ExternalOAuthFailedErrorBuilder.php | 2 + .../Error/ExternalOAuthFailedErrorModel.php | 2 + .../src/Models/Error/FeatureRemovedError.php | 18 + .../Error/FeatureRemovedErrorBuilder.php | 2 + .../Models/Error/FeatureRemovedErrorModel.php | 2 + .../src/Models/Error/GeneralError.php | 18 + .../src/Models/Error/GeneralErrorBuilder.php | 2 + .../src/Models/Error/GeneralErrorModel.php | 2 + .../Error/InsufficientScopeErrorBuilder.php | 2 + .../Error/InsufficientScopeErrorModel.php | 4 + .../Error/InternalConstraintViolatedError.php | 18 + ...InternalConstraintViolatedErrorBuilder.php | 2 + .../InternalConstraintViolatedErrorModel.php | 2 + .../Models/Error/InvalidCredentialsError.php | 18 + .../Error/InvalidCredentialsErrorBuilder.php | 2 + .../Error/InvalidCredentialsErrorModel.php | 2 + .../Error/InvalidCurrentPasswordError.php | 18 + .../InvalidCurrentPasswordErrorBuilder.php | 2 + .../InvalidCurrentPasswordErrorModel.php | 2 + .../src/Models/Error/InvalidFieldError.php | 25 + .../Models/Error/InvalidFieldErrorBuilder.php | 8 + .../Models/Error/InvalidFieldErrorModel.php | 8 + .../src/Models/Error/InvalidInputError.php | 18 + .../Models/Error/InvalidInputErrorBuilder.php | 2 + .../Models/Error/InvalidInputErrorModel.php | 2 + .../Error/InvalidItemShippingDetailsError.php | 23 + ...InvalidItemShippingDetailsErrorBuilder.php | 6 + .../InvalidItemShippingDetailsErrorModel.php | 6 + .../Models/Error/InvalidJsonInputError.php | 33 ++ .../Error/InvalidJsonInputErrorBuilder.php | 33 +- .../Error/InvalidJsonInputErrorModel.php | 38 ++ .../Models/Error/InvalidOperationError.php | 18 + .../Error/InvalidOperationErrorBuilder.php | 2 + .../Error/InvalidOperationErrorModel.php | 2 + .../Error/InvalidSubjectErrorBuilder.php | 2 + .../Models/Error/InvalidSubjectErrorModel.php | 4 + .../Models/Error/InvalidTokenErrorBuilder.php | 2 + .../Models/Error/InvalidTokenErrorModel.php | 4 + .../Error/LanguageUsedInStoresError.php | 18 + .../LanguageUsedInStoresErrorBuilder.php | 2 + .../Error/LanguageUsedInStoresErrorModel.php | 2 + .../Error/MatchingPriceNotFoundError.php | 31 +- .../MatchingPriceNotFoundErrorBuilder.php | 14 +- .../Error/MatchingPriceNotFoundErrorModel.php | 14 +- .../Error/MaxResourceLimitExceededError.php | 21 +- .../MaxResourceLimitExceededErrorBuilder.php | 4 +- .../MaxResourceLimitExceededErrorModel.php | 4 +- .../Error/MissingRoleOnChannelError.php | 26 +- .../MissingRoleOnChannelErrorBuilder.php | 9 +- .../Error/MissingRoleOnChannelErrorModel.php | 9 +- .../Error/MissingTaxRateForCountryError.php | 25 + .../MissingTaxRateForCountryErrorBuilder.php | 8 + .../MissingTaxRateForCountryErrorModel.php | 8 + .../NoMatchingProductDiscountFoundError.php | 18 + ...tchingProductDiscountFoundErrorBuilder.php | 2 + ...MatchingProductDiscountFoundErrorModel.php | 2 + .../src/Models/Error/NotEnabledError.php | 18 + .../Models/Error/NotEnabledErrorBuilder.php | 2 + .../src/Models/Error/NotEnabledErrorModel.php | 2 + .../src/Models/Error/ObjectNotFoundError.php | 18 + .../Error/ObjectNotFoundErrorBuilder.php | 2 + .../Models/Error/ObjectNotFoundErrorModel.php | 2 + .../src/Models/Error/OutOfStockError.php | 23 + .../Models/Error/OutOfStockErrorBuilder.php | 6 + .../src/Models/Error/OutOfStockErrorModel.php | 6 + .../src/Models/Error/OverCapacityError.php | 18 + .../Models/Error/OverCapacityErrorBuilder.php | 2 + .../Models/Error/OverCapacityErrorModel.php | 2 + ...verlappingStandalonePriceValidityError.php | 39 +- ...ingStandalonePriceValidityErrorBuilder.php | 22 +- ...ppingStandalonePriceValidityErrorModel.php | 22 +- .../Models/Error/PendingOperationError.php | 18 + .../Error/PendingOperationErrorBuilder.php | 2 + .../Error/PendingOperationErrorModel.php | 2 + .../src/Models/Error/PriceChangedError.php | 23 + .../Models/Error/PriceChangedErrorBuilder.php | 6 + .../Models/Error/PriceChangedErrorModel.php | 6 + .../Error/ProductAssignmentMissingError.php | 50 ++ .../ProductAssignmentMissingErrorBuilder.php | 104 ++++ ...roductAssignmentMissingErrorCollection.php | 56 ++ ...=> ProductAssignmentMissingErrorModel.php} | 45 +- ...sentWithDifferentVariantSelectionError.php | 65 +++ ...hDifferentVariantSelectionErrorBuilder.php | 146 +++++ ...fferentVariantSelectionErrorCollection.php | 56 ++ ...ithDifferentVariantSelectionErrorModel.php | 184 ++++++ .../ProjectNotConfiguredForLanguagesError.php | 21 + ...tNotConfiguredForLanguagesErrorBuilder.php | 4 + ...ectNotConfiguredForLanguagesErrorModel.php | 4 + .../QueryComplexityLimitExceededError.php | 16 + .../src/Models/Error/QueryTimedOutError.php | 18 + .../Error/QueryTimedOutErrorBuilder.php | 2 + .../Models/Error/QueryTimedOutErrorModel.php | 2 + .../src/Models/Error/ReferenceExistsError.php | 21 +- .../Error/ReferenceExistsErrorBuilder.php | 4 +- .../Error/ReferenceExistsErrorModel.php | 4 +- .../Error/ReferencedResourceNotFoundError.php | 25 +- ...ReferencedResourceNotFoundErrorBuilder.php | 8 +- .../ReferencedResourceNotFoundErrorModel.php | 8 +- .../src/Models/Error/RequiredFieldError.php | 21 + .../Error/RequiredFieldErrorBuilder.php | 4 + .../Models/Error/RequiredFieldErrorModel.php | 4 + .../Models/Error/ResourceNotFoundError.php | 18 + .../Error/ResourceNotFoundErrorBuilder.php | 2 + .../Error/ResourceNotFoundErrorModel.php | 2 + .../Error/ResourceSizeLimitExceededError.php | 18 + .../ResourceSizeLimitExceededErrorBuilder.php | 2 + .../ResourceSizeLimitExceededErrorModel.php | 2 + .../Models/Error/SearchDeactivatedError.php | 18 + .../Error/SearchDeactivatedErrorBuilder.php | 2 + .../Error/SearchDeactivatedErrorModel.php | 2 + .../Error/SearchExecutionFailureError.php | 18 + .../SearchExecutionFailureErrorBuilder.php | 2 + .../SearchExecutionFailureErrorModel.php | 2 + .../Error/SearchFacetPathNotFoundError.php | 18 + .../SearchFacetPathNotFoundErrorBuilder.php | 2 + .../SearchFacetPathNotFoundErrorModel.php | 2 + .../Error/SearchIndexingInProgressError.php | 18 + .../SearchIndexingInProgressErrorBuilder.php | 2 + .../SearchIndexingInProgressErrorModel.php | 2 + .../src/Models/Error/SemanticErrorError.php | 18 + .../Error/SemanticErrorErrorBuilder.php | 2 + .../Models/Error/SemanticErrorErrorModel.php | 2 + .../ShippingMethodDoesNotMatchCartError.php | 18 + ...pingMethodDoesNotMatchCartErrorBuilder.php | 2 + ...ippingMethodDoesNotMatchCartErrorModel.php | 2 + .../src/Models/Error/SyntaxErrorError.php | 18 + .../Models/Error/SyntaxErrorErrorBuilder.php | 2 + .../Models/Error/SyntaxErrorErrorModel.php | 2 + .../src/Models/Error/VariantValues.php | 6 + .../src/Models/Error/VariantValuesBuilder.php | 6 + .../src/Models/Error/VariantValuesModel.php | 6 + .../src/Models/Error/WeakPasswordError.php | 16 - .../Models/Error/WeakPasswordErrorBuilder.php | 61 -- .../Error/WeakPasswordErrorCollection.php | 56 -- .../src/Models/Extension/ExtensionUpdate.php | 2 +- .../Extension/ExtensionUpdateBuilder.php | 2 +- .../Models/Extension/ExtensionUpdateModel.php | 2 +- .../InventoryEntrySetCustomFieldAction.php | 2 +- ...entoryEntrySetCustomFieldActionBuilder.php | 2 +- ...nventoryEntrySetCustomFieldActionModel.php | 2 +- .../Models/Inventory/InventoryEntryUpdate.php | 2 +- .../Inventory/InventoryEntryUpdateBuilder.php | 2 +- .../Inventory/InventoryEntryUpdateModel.php | 2 +- ...usinessUnitSetAddressCustomFieldAction.php | 2 +- ...UnitSetAddressCustomFieldActionBuilder.php | 2 +- ...ssUnitSetAddressCustomFieldActionModel.php | 2 +- .../Me/MyBusinessUnitSetCustomFieldAction.php | 2 +- ...usinessUnitSetCustomFieldActionBuilder.php | 2 +- ...yBusinessUnitSetCustomFieldActionModel.php | 2 +- .../Models/Me/MyCartSetCustomFieldAction.php | 2 +- .../Me/MyCartSetCustomFieldActionBuilder.php | 2 +- .../Me/MyCartSetCustomFieldActionModel.php | 2 +- .../Me/MyCartSetLineItemCustomFieldAction.php | 2 +- ...artSetLineItemCustomFieldActionBuilder.php | 2 +- ...yCartSetLineItemCustomFieldActionModel.php | 2 +- .../Me/MyCustomerSetCustomFieldAction.php | 4 +- .../MyCustomerSetCustomFieldActionBuilder.php | 4 +- .../MyCustomerSetCustomFieldActionModel.php | 4 +- .../Me/MyPaymentSetCustomFieldAction.php | 2 +- .../MyPaymentSetCustomFieldActionBuilder.php | 2 +- .../Me/MyPaymentSetCustomFieldActionModel.php | 2 +- ...PaymentSetTransactionCustomFieldAction.php | 2 +- ...SetTransactionCustomFieldActionBuilder.php | 2 +- ...ntSetTransactionCustomFieldActionModel.php | 2 +- .../Me/MyShoppingListSetCustomFieldAction.php | 2 +- ...hoppingListSetCustomFieldActionBuilder.php | 2 +- ...yShoppingListSetCustomFieldActionModel.php | 2 +- ...oppingListSetLineItemCustomFieldAction.php | 2 +- ...istSetLineItemCustomFieldActionBuilder.php | 2 +- ...gListSetLineItemCustomFieldActionModel.php | 2 +- ...ngListSetTextLineItemCustomFieldAction.php | 2 +- ...etTextLineItemCustomFieldActionBuilder.php | 2 +- ...tSetTextLineItemCustomFieldActionModel.php | 2 +- .../src/Models/Message/MessageModel.php | 1 + .../Models/Message/MessagePayloadModel.php | 1 + .../Message/StoreCountriesChangedMessage.php | 45 ++ .../StoreCountriesChangedMessageBuilder.php | 434 +++++++++++++++ ...StoreCountriesChangedMessageCollection.php | 56 ++ .../StoreCountriesChangedMessageModel.php | 527 ++++++++++++++++++ .../StoreCountriesChangedMessagePayload.php | 45 ++ ...eCountriesChangedMessagePayloadBuilder.php | 93 ++++ ...untriesChangedMessagePayloadCollection.php | 56 ++ ...oreCountriesChangedMessagePayloadModel.php | 130 +++++ .../Models/Message/StoreCreatedMessage.php | 15 + .../Message/StoreCreatedMessageBuilder.php | 30 + .../Message/StoreCreatedMessageModel.php | 37 ++ .../Message/StoreCreatedMessagePayload.php | 15 + .../StoreCreatedMessagePayloadBuilder.php | 30 + .../StoreCreatedMessagePayloadModel.php | 37 ++ ...rderSetBillingAddressCustomFieldAction.php | 2 +- ...BillingAddressCustomFieldActionBuilder.php | 2 +- ...etBillingAddressCustomFieldActionModel.php | 2 +- .../Order/OrderSetCustomFieldAction.php | 2 +- .../OrderSetCustomFieldActionBuilder.php | 2 +- .../Order/OrderSetCustomFieldActionModel.php | 2 +- ...rderSetCustomLineItemCustomFieldAction.php | 2 +- ...CustomLineItemCustomFieldActionBuilder.php | 2 +- ...etCustomLineItemCustomFieldActionModel.php | 2 +- ...derSetDeliveryAddressCustomFieldAction.php | 2 +- ...eliveryAddressCustomFieldActionBuilder.php | 2 +- ...tDeliveryAddressCustomFieldActionModel.php | 2 +- .../OrderSetDeliveryCustomFieldAction.php | 2 +- ...derSetDeliveryCustomFieldActionBuilder.php | 2 +- ...OrderSetDeliveryCustomFieldActionModel.php | 2 +- ...etItemShippingAddressCustomFieldAction.php | 2 +- ...hippingAddressCustomFieldActionBuilder.php | 2 +- ...mShippingAddressCustomFieldActionModel.php | 2 +- .../OrderSetLineItemCustomFieldAction.php | 2 +- ...derSetLineItemCustomFieldActionBuilder.php | 2 +- ...OrderSetLineItemCustomFieldActionModel.php | 2 +- .../Order/OrderSetParcelCustomFieldAction.php | 2 +- ...OrderSetParcelCustomFieldActionBuilder.php | 2 +- .../OrderSetParcelCustomFieldActionModel.php | 2 +- .../OrderSetReturnItemCustomFieldAction.php | 2 +- ...rSetReturnItemCustomFieldActionBuilder.php | 2 +- ...derSetReturnItemCustomFieldActionModel.php | 2 +- ...derSetShippingAddressCustomFieldAction.php | 2 +- ...hippingAddressCustomFieldActionBuilder.php | 2 +- ...tShippingAddressCustomFieldActionModel.php | 2 +- .../OrderEditSetCustomFieldAction.php | 2 +- .../OrderEditSetCustomFieldActionBuilder.php | 2 +- .../OrderEditSetCustomFieldActionModel.php | 2 +- ...rderSetBillingAddressCustomFieldAction.php | 2 +- ...BillingAddressCustomFieldActionBuilder.php | 2 +- ...etBillingAddressCustomFieldActionModel.php | 2 +- .../StagedOrderSetCustomFieldAction.php | 2 +- ...StagedOrderSetCustomFieldActionBuilder.php | 2 +- .../StagedOrderSetCustomFieldActionModel.php | 2 +- ...rderSetCustomLineItemCustomFieldAction.php | 2 +- ...CustomLineItemCustomFieldActionBuilder.php | 2 +- ...etCustomLineItemCustomFieldActionModel.php | 2 +- ...derSetDeliveryAddressCustomFieldAction.php | 2 +- ...eliveryAddressCustomFieldActionBuilder.php | 2 +- ...tDeliveryAddressCustomFieldActionModel.php | 2 +- ...tagedOrderSetDeliveryCustomFieldAction.php | 2 +- ...derSetDeliveryCustomFieldActionBuilder.php | 2 +- ...OrderSetDeliveryCustomFieldActionModel.php | 2 +- ...etItemShippingAddressCustomFieldAction.php | 2 +- ...hippingAddressCustomFieldActionBuilder.php | 2 +- ...mShippingAddressCustomFieldActionModel.php | 2 +- ...tagedOrderSetLineItemCustomFieldAction.php | 2 +- ...derSetLineItemCustomFieldActionBuilder.php | 2 +- ...OrderSetLineItemCustomFieldActionModel.php | 2 +- .../StagedOrderSetParcelCustomFieldAction.php | 2 +- ...OrderSetParcelCustomFieldActionBuilder.php | 2 +- ...edOrderSetParcelCustomFieldActionModel.php | 2 +- ...gedOrderSetReturnItemCustomFieldAction.php | 2 +- ...rSetReturnItemCustomFieldActionBuilder.php | 2 +- ...derSetReturnItemCustomFieldActionModel.php | 2 +- ...derSetShippingAddressCustomFieldAction.php | 2 +- ...hippingAddressCustomFieldActionBuilder.php | 2 +- ...tShippingAddressCustomFieldActionModel.php | 2 +- .../Payment/PaymentSetCustomFieldAction.php | 2 +- .../PaymentSetCustomFieldActionBuilder.php | 2 +- .../PaymentSetCustomFieldActionModel.php | 2 +- ...PaymentSetTransactionCustomFieldAction.php | 2 +- ...SetTransactionCustomFieldActionBuilder.php | 2 +- ...ntSetTransactionCustomFieldActionModel.php | 2 +- .../ProductSetAssetCustomFieldAction.php | 2 +- ...roductSetAssetCustomFieldActionBuilder.php | 2 +- .../ProductSetAssetCustomFieldActionModel.php | 2 +- ...roductSetProductPriceCustomFieldAction.php | 2 +- ...etProductPriceCustomFieldActionBuilder.php | 2 +- ...tSetProductPriceCustomFieldActionModel.php | 2 +- .../ProductDiscount/ProductDiscountUpdate.php | 2 +- .../ProductDiscountUpdateBuilder.php | 2 +- .../ProductDiscountUpdateModel.php | 2 +- .../ProductSelectionSetCustomFieldAction.php | 2 +- ...ctSelectionSetCustomFieldActionBuilder.php | 2 +- ...ductSelectionSetCustomFieldActionModel.php | 2 +- .../ProductType/AttributeDefinition.php | 2 +- .../AttributeDefinitionBuilder.php | 2 +- .../ProductType/AttributeDefinitionDraft.php | 5 +- .../AttributeDefinitionDraftBuilder.php | 5 +- .../AttributeDefinitionDraftModel.php | 5 +- .../ProductType/AttributeDefinitionModel.php | 2 +- .../ProductTypeChangeAttributeNameAction.php | 4 +- ...ctTypeChangeAttributeNameActionBuilder.php | 4 +- ...ductTypeChangeAttributeNameActionModel.php | 4 +- ...ypeChangeLocalizedEnumValueOrderAction.php | 2 +- ...geLocalizedEnumValueOrderActionBuilder.php | 2 +- ...angeLocalizedEnumValueOrderActionModel.php | 2 +- ...uctTypeChangePlainEnumValueOrderAction.php | 2 +- ...ChangePlainEnumValueOrderActionBuilder.php | 2 +- ...peChangePlainEnumValueOrderActionModel.php | 2 +- .../Models/ProductType/ProductTypeUpdate.php | 2 +- .../ProductType/ProductTypeUpdateBuilder.php | 2 +- .../ProductType/ProductTypeUpdateModel.php | 2 +- ...angeProductSearchIndexingEnabledAction.php | 6 +- ...ductSearchIndexingEnabledActionBuilder.php | 6 +- ...roductSearchIndexingEnabledActionModel.php | 6 +- .../src/Models/Project/ProjectUpdate.php | 2 +- .../Models/Project/ProjectUpdateBuilder.php | 2 +- .../src/Models/Project/ProjectUpdateModel.php | 2 +- .../Quote/QuoteSetCustomFieldAction.php | 2 +- .../QuoteSetCustomFieldActionBuilder.php | 2 +- .../Quote/QuoteSetCustomFieldActionModel.php | 2 +- .../QuoteRequestSetCustomFieldAction.php | 2 +- ...uoteRequestSetCustomFieldActionBuilder.php | 2 +- .../QuoteRequestSetCustomFieldActionModel.php | 2 +- .../Review/ReviewSetCustomFieldAction.php | 2 +- .../ReviewSetCustomFieldActionBuilder.php | 2 +- .../ReviewSetCustomFieldActionModel.php | 2 +- .../ShippingMethodSetCustomFieldAction.php | 2 +- ...ppingMethodSetCustomFieldActionBuilder.php | 2 +- ...hippingMethodSetCustomFieldActionModel.php | 2 +- .../ShoppingListSetCustomFieldAction.php | 2 +- ...hoppingListSetCustomFieldActionBuilder.php | 2 +- .../ShoppingListSetCustomFieldActionModel.php | 2 +- ...oppingListSetLineItemCustomFieldAction.php | 2 +- ...istSetLineItemCustomFieldActionBuilder.php | 2 +- ...gListSetLineItemCustomFieldActionModel.php | 2 +- ...ngListSetTextLineItemCustomFieldAction.php | 2 +- ...etTextLineItemCustomFieldActionBuilder.php | 2 +- ...tSetTextLineItemCustomFieldActionModel.php | 2 +- .../StagedQuoteSetCustomFieldAction.php | 2 +- ...StagedQuoteSetCustomFieldActionBuilder.php | 2 +- .../StagedQuoteSetCustomFieldActionModel.php | 2 +- .../StandalonePriceSetCustomFieldAction.php | 2 +- ...dalonePriceSetCustomFieldActionBuilder.php | 2 +- ...andalonePriceSetCustomFieldActionModel.php | 2 +- .../StandalonePrice/StandalonePriceUpdate.php | 2 +- .../StandalonePriceUpdateBuilder.php | 2 +- .../StandalonePriceUpdateModel.php | 2 +- .../src/Models/State/StateUpdate.php | 2 +- .../src/Models/State/StateUpdateBuilder.php | 2 +- .../src/Models/State/StateUpdateModel.php | 2 +- .../src/Models/Store/Store.php | 15 + .../Models/Store/StoreAddCountryAction.php | 31 ++ .../Store/StoreAddCountryActionBuilder.php | 75 +++ .../Store/StoreAddCountryActionCollection.php | 56 ++ .../Store/StoreAddCountryActionModel.php | 96 ++++ .../StoreAddDistributionChannelAction.php | 2 +- ...oreAddDistributionChannelActionBuilder.php | 2 +- ...StoreAddDistributionChannelActionModel.php | 2 +- .../Store/StoreAddSupplyChannelAction.php | 2 +- .../StoreAddSupplyChannelActionBuilder.php | 2 +- .../StoreAddSupplyChannelActionModel.php | 2 +- .../src/Models/Store/StoreBuilder.php | 30 + .../src/Models/Store/StoreDraft.php | 15 + .../src/Models/Store/StoreDraftBuilder.php | 30 + .../src/Models/Store/StoreDraftModel.php | 37 ++ .../src/Models/Store/StoreModel.php | 37 ++ .../Models/Store/StoreRemoveCountryAction.php | 31 ++ .../Store/StoreRemoveCountryActionBuilder.php | 75 +++ .../StoreRemoveCountryActionCollection.php | 56 ++ .../Store/StoreRemoveCountryActionModel.php | 96 ++++ .../Models/Store/StoreSetCountriesAction.php | 31 ++ .../Store/StoreSetCountriesActionBuilder.php | 64 +++ .../StoreSetCountriesActionCollection.php | 56 ++ .../Store/StoreSetCountriesActionModel.php | 94 ++++ .../Store/StoreSetCustomFieldAction.php | 2 +- .../StoreSetCustomFieldActionBuilder.php | 2 +- .../Store/StoreSetCustomFieldActionModel.php | 2 +- .../StoreSetDistributionChannelsAction.php | 3 +- ...reSetDistributionChannelsActionBuilder.php | 3 +- ...toreSetDistributionChannelsActionModel.php | 3 +- .../Models/Store/StoreSetLanguagesAction.php | 3 +- .../Store/StoreSetLanguagesActionBuilder.php | 3 +- .../Store/StoreSetLanguagesActionModel.php | 3 +- .../Store/StoreSetSupplyChannelsAction.php | 3 +- .../StoreSetSupplyChannelsActionBuilder.php | 3 +- .../StoreSetSupplyChannelsActionModel.php | 3 +- .../src/Models/Store/StoreUpdate.php | 2 +- .../Models/Store/StoreUpdateActionModel.php | 3 + .../src/Models/Store/StoreUpdateBuilder.php | 2 +- .../src/Models/Store/StoreUpdateModel.php | 2 +- .../src/Models/StoreCountry/StoreCountry.php | 30 + .../StoreCountry/StoreCountryBuilder.php | 63 +++ .../StoreCountry/StoreCountryCollection.php | 56 ++ .../Models/StoreCountry/StoreCountryModel.php | 66 +++ .../Models/TaxCategory/TaxCategoryUpdate.php | 2 +- .../TaxCategory/TaxCategoryUpdateBuilder.php | 2 +- .../TaxCategory/TaxCategoryUpdateModel.php | 2 +- .../src/Models/Type/TypeUpdate.php | 2 +- .../src/Models/Type/TypeUpdateBuilder.php | 2 +- .../src/Models/Type/TypeUpdateModel.php | 2 +- .../src/Models/Zone/ZoneUpdate.php | 2 +- .../src/Models/Zone/ZoneUpdateBuilder.php | 2 +- .../src/Models/Zone/ZoneUpdateModel.php | 2 +- reference.txt | 1 + 563 files changed, 7802 insertions(+), 1026 deletions(-) delete mode 100644 lib/commercetools-api/src/Models/Error/AccessDeniedError.php delete mode 100644 lib/commercetools-api/src/Models/Error/AccessDeniedErrorBuilder.php delete mode 100644 lib/commercetools-api/src/Models/Error/AccessDeniedErrorCollection.php create mode 100644 lib/commercetools-api/src/Models/Error/AuthErrorResponse.php create mode 100644 lib/commercetools-api/src/Models/Error/AuthErrorResponseBuilder.php create mode 100644 lib/commercetools-api/src/Models/Error/AuthErrorResponseCollection.php create mode 100644 lib/commercetools-api/src/Models/Error/AuthErrorResponseModel.php create mode 100644 lib/commercetools-api/src/Models/Error/CountryNotConfiguredInStore.php create mode 100644 lib/commercetools-api/src/Models/Error/CountryNotConfiguredInStoreBuilder.php create mode 100644 lib/commercetools-api/src/Models/Error/CountryNotConfiguredInStoreCollection.php create mode 100644 lib/commercetools-api/src/Models/Error/CountryNotConfiguredInStoreModel.php create mode 100644 lib/commercetools-api/src/Models/Error/ExtensionError.php create mode 100644 lib/commercetools-api/src/Models/Error/ExtensionErrorBuilder.php create mode 100644 lib/commercetools-api/src/Models/Error/ExtensionErrorCollection.php create mode 100644 lib/commercetools-api/src/Models/Error/ExtensionErrorModel.php create mode 100644 lib/commercetools-api/src/Models/Error/ExtensionPredicateEvaluationFailedError.php create mode 100644 lib/commercetools-api/src/Models/Error/ExtensionPredicateEvaluationFailedErrorBuilder.php create mode 100644 lib/commercetools-api/src/Models/Error/ExtensionPredicateEvaluationFailedErrorCollection.php rename lib/commercetools-api/src/Models/Error/{WeakPasswordErrorModel.php => ExtensionPredicateEvaluationFailedErrorModel.php} (59%) create mode 100644 lib/commercetools-api/src/Models/Error/ProductAssignmentMissingError.php create mode 100644 lib/commercetools-api/src/Models/Error/ProductAssignmentMissingErrorBuilder.php create mode 100644 lib/commercetools-api/src/Models/Error/ProductAssignmentMissingErrorCollection.php rename lib/commercetools-api/src/Models/Error/{AccessDeniedErrorModel.php => ProductAssignmentMissingErrorModel.php} (57%) create mode 100644 lib/commercetools-api/src/Models/Error/ProductPresentWithDifferentVariantSelectionError.php create mode 100644 lib/commercetools-api/src/Models/Error/ProductPresentWithDifferentVariantSelectionErrorBuilder.php create mode 100644 lib/commercetools-api/src/Models/Error/ProductPresentWithDifferentVariantSelectionErrorCollection.php create mode 100644 lib/commercetools-api/src/Models/Error/ProductPresentWithDifferentVariantSelectionErrorModel.php delete mode 100644 lib/commercetools-api/src/Models/Error/WeakPasswordError.php delete mode 100644 lib/commercetools-api/src/Models/Error/WeakPasswordErrorBuilder.php delete mode 100644 lib/commercetools-api/src/Models/Error/WeakPasswordErrorCollection.php create mode 100644 lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessage.php create mode 100644 lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessageBuilder.php create mode 100644 lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessageCollection.php create mode 100644 lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessageModel.php create mode 100644 lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessagePayload.php create mode 100644 lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessagePayloadBuilder.php create mode 100644 lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessagePayloadCollection.php create mode 100644 lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessagePayloadModel.php create mode 100644 lib/commercetools-api/src/Models/Store/StoreAddCountryAction.php create mode 100644 lib/commercetools-api/src/Models/Store/StoreAddCountryActionBuilder.php create mode 100644 lib/commercetools-api/src/Models/Store/StoreAddCountryActionCollection.php create mode 100644 lib/commercetools-api/src/Models/Store/StoreAddCountryActionModel.php create mode 100644 lib/commercetools-api/src/Models/Store/StoreRemoveCountryAction.php create mode 100644 lib/commercetools-api/src/Models/Store/StoreRemoveCountryActionBuilder.php create mode 100644 lib/commercetools-api/src/Models/Store/StoreRemoveCountryActionCollection.php create mode 100644 lib/commercetools-api/src/Models/Store/StoreRemoveCountryActionModel.php create mode 100644 lib/commercetools-api/src/Models/Store/StoreSetCountriesAction.php create mode 100644 lib/commercetools-api/src/Models/Store/StoreSetCountriesActionBuilder.php create mode 100644 lib/commercetools-api/src/Models/Store/StoreSetCountriesActionCollection.php create mode 100644 lib/commercetools-api/src/Models/Store/StoreSetCountriesActionModel.php create mode 100644 lib/commercetools-api/src/Models/StoreCountry/StoreCountry.php create mode 100644 lib/commercetools-api/src/Models/StoreCountry/StoreCountryBuilder.php create mode 100644 lib/commercetools-api/src/Models/StoreCountry/StoreCountryCollection.php create mode 100644 lib/commercetools-api/src/Models/StoreCountry/StoreCountryModel.php create mode 100644 reference.txt diff --git a/changes.md b/changes.md index 13d1b56958b..9f9e98b72db 100644 --- a/changes.md +++ b/changes.md @@ -3,59 +3,60 @@
Added Property(s) -- added property `shippingKey` to type `CartSetLineItemTaxAmountAction` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/cart/updates/CartSetLineItemTaxAmountAction.raml:12:2) -- added property `shippingKey` to type `CartSetLineItemTaxRateAction` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/cart/updates/CartSetLineItemTaxRateAction.raml:12:2) -- added property `shippingKey` to type `StagedOrderSetLineItemTaxAmountAction` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/order-edit/updates/StagedOrderSetLineItemTaxAmountAction.raml:12:2) -- added property `shippingKey` to type `StagedOrderSetLineItemTaxRateAction` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/order-edit/updates/StagedOrderSetLineItemTaxRateAction.raml:12:2) +- added property `discountCodeId` to type `DiscountCodeNonApplicableError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/DiscountCodeNonApplicableError.raml:27:2) +- added property `extensionErrors` to type `ExtensionBadResponseError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/ExtensionBadResponseError.raml:23:2) +- added property `extensionBody` to type `ExtensionBadResponseError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/ExtensionBadResponseError.raml:27:2) +- added property `extensionStatusCode` to type `ExtensionBadResponseError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/ExtensionBadResponseError.raml:30:2) +- added property `extensionId` to type `ExtensionBadResponseError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/ExtensionBadResponseError.raml:33:2) +- added property `extensionKey` to type `ExtensionBadResponseError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/ExtensionBadResponseError.raml:36:2) +- added property `extensionErrors` to type `ExtensionUpdateActionsFailedError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/ExtensionUpdateActionsFailedError.raml:24:2) +- added property `detailedErrorMessage` to type `InvalidJsonInputError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/InvalidJsonInputError.raml:17:2)
-Added Type(s) - -- added type `AttributeGroup` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:6:0) -- added type `AttributeGroupDraft` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:7:0) -- added type `AttributeGroupPagedQueryResponse` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:8:0) -- added type `AttributeGroupReference` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:9:0) -- added type `AttributeGroupResourceIdentifier` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:10:0) -- added type `AttributeGroupUpdate` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:11:0) -- added type `AttributeGroupUpdateAction` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:12:0) -- added type `AttributeReference` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:13:0) -- added type `AttributeGroupAddAttributeAction` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:14:0) -- added type `AttributeGroupChangeNameAction` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:15:0) -- added type `AttributeGroupRemoveAttributeAction` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:16:0) -- added type `AttributeGroupSetAttributesAction` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:17:0) -- added type `AttributeGroupSetDescriptionAction` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:18:0) -- added type `AttributeGroupSetKeyAction` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:19:0) +Removed Property(s) + +- :warning: removed property `dicountCodeId` from type `DiscountCodeNonApplicableError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference-previous/api-specs/api/types/error/DiscountCodeNonApplicableError.raml:10:2) +- :warning: removed property `conflictingResource` from type `DuplicateFieldError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference-previous/api-specs/api/types/error/DuplicateFieldError.raml:10:2) +- :warning: removed property `error` from type `ErrorResponse` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference-previous/api-specs/api/types/error/ErrorResponse.raml:9:2) +- :warning: removed property `error_description` from type `ErrorResponse` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference-previous/api-specs/api/types/error/ErrorResponse.raml:11:2) +- :warning: removed property `errorByExtension` from type `ExtensionBadResponseError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference-previous/api-specs/api/types/error/ExtensionBadResponseError.raml:10:2) +- :warning: removed property `errorByExtension` from type `ExtensionUpdateActionsFailedError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference-previous/api-specs/api/types/error/ExtensionUpdateActionsFailedError.raml:10:2)
-Changed Type(s) - -- marked type `ShippingMethodSetDescriptionAction` as deprecated (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:1512:0) +Changed Property(s) + +- :warning: changed property `currency` of type `DuplicateStandalonePriceScopeError` from type `string` to `CurrencyCode` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/DuplicateStandalonePriceScopeError.raml:25:2) +- :warning: changed property `country` of type `DuplicateStandalonePriceScopeError` from type `string` to `CountryCode` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/DuplicateStandalonePriceScopeError.raml:29:2) +- :warning: changed property `currency` of type `MatchingPriceNotFoundError` from type `string` to `CurrencyCode` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/MatchingPriceNotFoundError.raml:29:2) +- :warning: changed property `country` of type `MatchingPriceNotFoundError` from type `string` to `CountryCode` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/MatchingPriceNotFoundError.raml:33:2) +- :warning: changed property `country` of type `MissingTaxRateForCountryError` from type `string` to `CountryCode` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/MissingTaxRateForCountryError.raml:23:2) +- :warning: changed property `currency` of type `OverlappingStandalonePriceValidityError` from type `string` to `CurrencyCode` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/OverlappingStandalonePriceValidityError.raml:25:2) +- :warning: changed property `country` of type `OverlappingStandalonePriceValidityError` from type `string` to `CountryCode` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/OverlappingStandalonePriceValidityError.raml:29:2) +- :warning: changed property `field` of type `DuplicateFieldError` to be required (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/DuplicateFieldError.raml:14:2) +- :warning: changed property `duplicateValue` of type `DuplicateFieldError` to be required (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/DuplicateFieldError.raml:18:2)
-Added Method(s) - -- added method `get /{projectKey}/attribute-groups` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/resources/attribute-groups.raml:11:0) -- added method `post /{projectKey}/attribute-groups` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/resources/attribute-groups.raml:25:0) -- added method `get /{projectKey}/attribute-groups/key={key}` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/resources/attribute-groups.raml:49:2) -- added method `post /{projectKey}/attribute-groups/key={key}` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/resources/attribute-groups.raml:63:2) -- added method `delete /{projectKey}/attribute-groups/key={key}` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/resources/attribute-groups.raml:80:2) -- added method `get /{projectKey}/attribute-groups/{ID}` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/resources/attribute-groups.raml:101:2) -- added method `post /{projectKey}/attribute-groups/{ID}` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/resources/attribute-groups.raml:115:2) -- added method `delete /{projectKey}/attribute-groups/{ID}` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/resources/attribute-groups.raml:132:2) +Added Type(s) + +- added type `AuthErrorResponse` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:412:0) +- added type `CountryNotConfiguredInStore` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:415:0) +- added type `ExtensionError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:434:0) +- added type `ExtensionPredicateEvaluationFailedError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:436:0) +- added type `ProductAssignmentMissingError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:465:0) +- added type `ProductPresentWithDifferentVariantSelectionError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/types.raml:466:0)
-Added Resource(s) +Removed Type(s) -- added resource `/{projectKey}/attribute-groups` (file:///home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/api.raml:216:2) -- added resource `/{projectKey}/attribute-groups/key={key}` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/resources/attribute-groups.raml:42:0) -- added resource `/{projectKey}/attribute-groups/{ID}` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/resources/attribute-groups.raml:94:0) +- :warning: removed type `AccessDeniedError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference-previous/api-specs/api/types/types.raml:408:0) +- :warning: removed type `WeakPasswordError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference-previous/api-specs/api/types/types.raml:478:0)
diff --git a/lib/commercetools-api/docs/RequestBuilder.md b/lib/commercetools-api/docs/RequestBuilder.md index e6bca28aeac..defb3e25634 100644 --- a/lib/commercetools-api/docs/RequestBuilder.md +++ b/lib/commercetools-api/docs/RequestBuilder.md @@ -824,7 +824,7 @@ $request = $builder ## `withProjectKey("projectKey")->customObjects()->post(null)` If an object with the given container/key exists, the object will be replaced with the new value and the version is incremented. -If the request contains a version and an object with the given container/key, then the version must match the version of the existing object. Concurrent updates for the same Custom Object can result in a [409 Conflict](/../api/errors#409-conflict) even if the version is not provided. +If the request contains a version and an object with the given container/key, then the version must match the version of the existing object. Concurrent updates to the same Custom Object returns a [ConcurrentModification](ctp:api:type:ConcurrentModificationError) error even if the version is not provided. Fields with `null` values will **not be saved**. @@ -1477,8 +1477,7 @@ $request = $builder Creates a [Cart](ctp:api:type:Cart) in the Store specified by `storeKey`. When using this endpoint the Cart's `store` field is always set to the store specified in the path parameter. -Creating a Cart can fail with an [InvalidOperationError](ctp:api:type:InvalidOperationError) if the referenced [ShippingMethod](ctp:api:type:ShippingMethod) -in the [CartDraft](ctp:api:type:CartDraft) has a predicate which does not match the Cart. +If the referenced [ShippingMethod](ctp:api:type:ShippingMethod) in the [CartDraft](ctp:api:type:CartDraft) has a predicate that does not match, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned. ### Example @@ -1516,8 +1515,7 @@ $request = $builder ## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->carts()->withId("ID")->post(null)` Updates a [Cart](ctp:api:type:Cart) in the Store specified by `storeKey`. -If the Cart exists in the Project but does not have the store field, -or the `store` field references a different Store, this method returns a [ResourceNotFoundError](ctp:api:type:ResourceNotFoundError). +If the Cart exists in the Project but does not have the `store` field, or the `store` field references a different Store, a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned. ### Example @@ -4353,6 +4351,8 @@ $request = $builder This endpoint can be used to simulate which Product Discounts would be applied if a specified Product Variant had a specified Price. Given Product and Product Variant IDs and a Price, this endpoint will return the [ProductDiscount](ctp:api:type:ProductDiscount) that would have been applied to that Price. +If a Product Discount could not be found that could be applied to the Price of a Product Variant, a [NoMatchingProductDiscountFound](ctp:api:type:NoMatchingProductDiscountFoundError) error is returned. + ### Example ```php @@ -4854,6 +4854,8 @@ $request = $builder If [Price selection](ctp:api:type:ProductPriceSelection) query parameters are provided, the selected Prices are added to the response. +A failed response can return a [DuplicatePriceScope](ctp:api:type:DuplicatePriceScopeError), [DuplicateVariantValues](ctp:api:type:DuplicateVariantValuesError), [DuplicateAttributeValue](ctp:api:type:DuplicateAttributeValueError), or [DuplicateAttributeValues](ctp:api:type:DuplicateAttributeValuesError) error. + ### Example ```php use Commercetools\Api\Client\ApiRequestBuilder; @@ -4946,7 +4948,7 @@ $request = $builder ``` ## `withProjectKey("projectKey")->products()->withKey("key")->post(null)` -null +A failed response can return a [DuplicatePriceScope](ctp:api:type:DuplicatePriceScopeError), [DuplicateVariantValues](ctp:api:type:DuplicateVariantValuesError), [DuplicateAttributeValue](ctp:api:type:DuplicateAttributeValueError), or [DuplicateAttributeValues](ctp:api:type:DuplicateAttributeValuesError) error. ### Example ```php @@ -5502,8 +5504,9 @@ $request = $builder ``` ## `withProjectKey("projectKey")->shippingMethods()->matchingOrderedit()->get()` -Retrieves all the ShippingMethods that can ship to the given [Location](/projects/zones#location) for an [OrderEdit](/projects/order-edits). -In case the OrderEdit preview cannot be created an [EditPreviewFailed](ctp:api:type:EditPreviewFailedError) error is raised. +Retrieves all the ShippingMethods that can ship to the given [Location](/../api/projects/zones#location) for an [OrderEdit](/../api/projects/order-edits). + +If the OrderEdit preview cannot be generated, an [EditPreviewFailed](ctp:api:type:EditPreviewFailedError) error is returned. ### Example diff --git a/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetAddressCustomFieldAction.php index e1f36daa68f..ca0ab099b9f 100644 --- a/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetAddressCustomFieldAction.php @@ -35,7 +35,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Trying to remove a field that does not exist will fail with an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetAddressCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetAddressCustomFieldActionBuilder.php index c0c12e67297..55ff70b0743 100644 --- a/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetAddressCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetAddressCustomFieldActionBuilder.php @@ -62,7 +62,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Trying to remove a field that does not exist will fail with an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetAddressCustomFieldActionModel.php b/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetAddressCustomFieldActionModel.php index 868b9f6922a..6aaaa6e0a0a 100644 --- a/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetAddressCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetAddressCustomFieldActionModel.php @@ -120,7 +120,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Trying to remove a field that does not exist will fail with an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetCustomFieldAction.php b/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetCustomFieldAction.php index f4e5b554135..2c56bcd3fa3 100644 --- a/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Trying to remove a field that does not exist will fail with an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetCustomFieldActionBuilder.php index 0f3bbd512f3..c2acfcc93e3 100644 --- a/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Trying to remove a field that does not exist will fail with an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetCustomFieldActionModel.php index 01a6b966922..7ca49e3430e 100644 --- a/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/BusinessUnit/BusinessUnitSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Trying to remove a field that does not exist will fail with an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Cart/CartSetBillingAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/Cart/CartSetBillingAddressCustomFieldAction.php index b66223680f6..ffa5ba6f4bb 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetBillingAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetBillingAddressCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Cart/CartSetBillingAddressCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Cart/CartSetBillingAddressCustomFieldActionBuilder.php index d783e4a627a..4714e15864e 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetBillingAddressCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetBillingAddressCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Cart/CartSetBillingAddressCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Cart/CartSetBillingAddressCustomFieldActionModel.php index acacd801c4c..2d17ae8592a 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetBillingAddressCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetBillingAddressCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomFieldAction.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomFieldAction.php index 71277093b25..982efddca91 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomFieldActionBuilder.php index c088f371965..ca068bd3cdb 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomFieldActionModel.php index 329a3b34dfa..6d9efba85ea 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldAction.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldAction.php index 3fef76ca0a7..5e4926f0177 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldAction.php @@ -33,7 +33,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldActionBuilder.php index 04d23eea4f6..8d20de0ca15 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldActionBuilder.php @@ -60,7 +60,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldActionModel.php index 8d79db44e8f..3a333d3e80f 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetCustomLineItemCustomFieldActionModel.php @@ -118,7 +118,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Cart/CartSetDeliveryAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/Cart/CartSetDeliveryAddressCustomFieldAction.php index ae59e404910..9db4f9224a0 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetDeliveryAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetDeliveryAddressCustomFieldAction.php @@ -33,7 +33,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Cart/CartSetDeliveryAddressCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Cart/CartSetDeliveryAddressCustomFieldActionBuilder.php index 63299eb1f8b..7a4666cf1cb 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetDeliveryAddressCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetDeliveryAddressCustomFieldActionBuilder.php @@ -60,7 +60,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Cart/CartSetDeliveryAddressCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Cart/CartSetDeliveryAddressCustomFieldActionModel.php index 5e0eff890eb..bc4d71641f6 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetDeliveryAddressCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetDeliveryAddressCustomFieldActionModel.php @@ -118,7 +118,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Cart/CartSetItemShippingAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/Cart/CartSetItemShippingAddressCustomFieldAction.php index c49a4c5d959..0badfa35415 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetItemShippingAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetItemShippingAddressCustomFieldAction.php @@ -33,7 +33,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Cart/CartSetItemShippingAddressCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Cart/CartSetItemShippingAddressCustomFieldActionBuilder.php index 47f6736f4d4..f670fdbb026 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetItemShippingAddressCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetItemShippingAddressCustomFieldActionBuilder.php @@ -60,7 +60,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Cart/CartSetItemShippingAddressCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Cart/CartSetItemShippingAddressCustomFieldActionModel.php index 4795c83aef5..df4eba768cb 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetItemShippingAddressCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetItemShippingAddressCustomFieldActionModel.php @@ -118,7 +118,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Cart/CartSetLineItemCustomFieldAction.php b/lib/commercetools-api/src/Models/Cart/CartSetLineItemCustomFieldAction.php index eb4be5b9c3d..acffda50fcb 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetLineItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetLineItemCustomFieldAction.php @@ -33,7 +33,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Cart/CartSetLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Cart/CartSetLineItemCustomFieldActionBuilder.php index b3bc5af68ea..78d70a80bf1 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetLineItemCustomFieldActionBuilder.php @@ -60,7 +60,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Cart/CartSetLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Cart/CartSetLineItemCustomFieldActionModel.php index d55e2ca8c99..6f6b2c54b43 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetLineItemCustomFieldActionModel.php @@ -118,7 +118,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Cart/CartSetShippingAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/Cart/CartSetShippingAddressCustomFieldAction.php index 85022f3247f..25f744019be 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetShippingAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetShippingAddressCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Cart/CartSetShippingAddressCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Cart/CartSetShippingAddressCustomFieldActionBuilder.php index e01a05e2d22..afe9c4031f1 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetShippingAddressCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetShippingAddressCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Cart/CartSetShippingAddressCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Cart/CartSetShippingAddressCustomFieldActionModel.php index 6e40075d7a8..f21c6511265 100644 --- a/lib/commercetools-api/src/Models/Cart/CartSetShippingAddressCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Cart/CartSetShippingAddressCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Cart/ItemShippingDetails.php b/lib/commercetools-api/src/Models/Cart/ItemShippingDetails.php index 35755f893fd..03b23be5fbd 100644 --- a/lib/commercetools-api/src/Models/Cart/ItemShippingDetails.php +++ b/lib/commercetools-api/src/Models/Cart/ItemShippingDetails.php @@ -26,9 +26,8 @@ interface ItemShippingDetails extends JsonObject public function getTargets(); /** - *

true if the quantity of the (custom) line item is equal to the sum of the sub-quantities in targets, false otherwise. - * A cart cannot be ordered when the value is false. - * The error InvalidItemShippingDetails will be triggered.

+ *

true if the quantity of the Line Item or Custom Line Item is equal to the sum of the sub-quantities in targets, else it is false. + * Ordering a Cart with value as false returns an InvalidItemShippingDetails error.

* * @return null|bool diff --git a/lib/commercetools-api/src/Models/Cart/ItemShippingDetailsBuilder.php b/lib/commercetools-api/src/Models/Cart/ItemShippingDetailsBuilder.php index 3e741897324..08dccdcb5fe 100644 --- a/lib/commercetools-api/src/Models/Cart/ItemShippingDetailsBuilder.php +++ b/lib/commercetools-api/src/Models/Cart/ItemShippingDetailsBuilder.php @@ -45,9 +45,8 @@ public function getTargets() } /** - *

true if the quantity of the (custom) line item is equal to the sum of the sub-quantities in targets, false otherwise. - * A cart cannot be ordered when the value is false. - * The error InvalidItemShippingDetails will be triggered.

+ *

true if the quantity of the Line Item or Custom Line Item is equal to the sum of the sub-quantities in targets, else it is false. + * Ordering a Cart with value as false returns an InvalidItemShippingDetails error.

* * @return null|bool diff --git a/lib/commercetools-api/src/Models/Cart/ItemShippingDetailsModel.php b/lib/commercetools-api/src/Models/Cart/ItemShippingDetailsModel.php index a18cc48ec82..2902345c9e9 100644 --- a/lib/commercetools-api/src/Models/Cart/ItemShippingDetailsModel.php +++ b/lib/commercetools-api/src/Models/Cart/ItemShippingDetailsModel.php @@ -65,9 +65,8 @@ public function getTargets() } /** - *

true if the quantity of the (custom) line item is equal to the sum of the sub-quantities in targets, false otherwise. - * A cart cannot be ordered when the value is false. - * The error InvalidItemShippingDetails will be triggered.

+ *

true if the quantity of the Line Item or Custom Line Item is equal to the sum of the sub-quantities in targets, else it is false. + * Ordering a Cart with value as false returns an InvalidItemShippingDetails error.

* * * @return null|bool diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountSetCustomFieldAction.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountSetCustomFieldAction.php index 0d9665d003d..814d29eae61 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountSetCustomFieldActionBuilder.php index 1de8bd41fe8..4f0dfa8642f 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountSetCustomFieldActionModel.php index b4fa8a25cbe..a9dac11ad20 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountUpdate.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountUpdate.php index 5c5d95ecc67..3c7110af506 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountUpdate.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountUpdate.php @@ -17,7 +17,7 @@ interface CartDiscountUpdate extends JsonObject public const FIELD_ACTIONS = 'actions'; /** - *

Expected version of the CartDiscount on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the CartDiscount on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountUpdateBuilder.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountUpdateBuilder.php index bb3fdf28d37..11d460c2dfc 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountUpdateBuilder.php @@ -33,7 +33,7 @@ final class CartDiscountUpdateBuilder implements Builder private $actions; /** - *

Expected version of the CartDiscount on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the CartDiscount on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountUpdateModel.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountUpdateModel.php index 0452b0e5b37..ab4458e3257 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountUpdateModel.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountUpdateModel.php @@ -44,7 +44,7 @@ public function __construct( } /** - *

Expected version of the CartDiscount on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the CartDiscount on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * * @return null|int diff --git a/lib/commercetools-api/src/Models/Category/CategorySetAssetCustomFieldAction.php b/lib/commercetools-api/src/Models/Category/CategorySetAssetCustomFieldAction.php index 5dbbbd33b03..883f382565b 100644 --- a/lib/commercetools-api/src/Models/Category/CategorySetAssetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Category/CategorySetAssetCustomFieldAction.php @@ -44,7 +44,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Category/CategorySetAssetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Category/CategorySetAssetCustomFieldActionBuilder.php index 8ed1bab0d3d..872b9593032 100644 --- a/lib/commercetools-api/src/Models/Category/CategorySetAssetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Category/CategorySetAssetCustomFieldActionBuilder.php @@ -79,7 +79,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Category/CategorySetAssetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Category/CategorySetAssetCustomFieldActionModel.php index 851f34ade9c..731b44233c3 100644 --- a/lib/commercetools-api/src/Models/Category/CategorySetAssetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Category/CategorySetAssetCustomFieldActionModel.php @@ -148,7 +148,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Category/CategorySetCustomFieldAction.php b/lib/commercetools-api/src/Models/Category/CategorySetCustomFieldAction.php index bcb2560a2ad..6ed17418955 100644 --- a/lib/commercetools-api/src/Models/Category/CategorySetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Category/CategorySetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Category/CategorySetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Category/CategorySetCustomFieldActionBuilder.php index d9f87504c46..5ad91f11c28 100644 --- a/lib/commercetools-api/src/Models/Category/CategorySetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Category/CategorySetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Category/CategorySetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Category/CategorySetCustomFieldActionModel.php index f7491772baf..07c30bcde4b 100644 --- a/lib/commercetools-api/src/Models/Category/CategorySetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Category/CategorySetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Category/CategoryUpdate.php b/lib/commercetools-api/src/Models/Category/CategoryUpdate.php index 9124b824aab..b2ab3f6b5cc 100644 --- a/lib/commercetools-api/src/Models/Category/CategoryUpdate.php +++ b/lib/commercetools-api/src/Models/Category/CategoryUpdate.php @@ -18,7 +18,7 @@ interface CategoryUpdate extends JsonObject /** *

Expected version of the Category on which the changes should be applied. - * If the expected version does not match the actual version, a 409 Conflict will be returned.

+ * If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/Category/CategoryUpdateBuilder.php b/lib/commercetools-api/src/Models/Category/CategoryUpdateBuilder.php index b148b183e26..3f981e561bc 100644 --- a/lib/commercetools-api/src/Models/Category/CategoryUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/Category/CategoryUpdateBuilder.php @@ -34,7 +34,7 @@ final class CategoryUpdateBuilder implements Builder /** *

Expected version of the Category on which the changes should be applied. - * If the expected version does not match the actual version, a 409 Conflict will be returned.

+ * If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/Category/CategoryUpdateModel.php b/lib/commercetools-api/src/Models/Category/CategoryUpdateModel.php index 9e932c1b14b..8142301aff7 100644 --- a/lib/commercetools-api/src/Models/Category/CategoryUpdateModel.php +++ b/lib/commercetools-api/src/Models/Category/CategoryUpdateModel.php @@ -45,7 +45,7 @@ public function __construct( /** *

Expected version of the Category on which the changes should be applied. - * If the expected version does not match the actual version, a 409 Conflict will be returned.

+ * If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * * @return null|int diff --git a/lib/commercetools-api/src/Models/Channel/ChannelSetAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/Channel/ChannelSetAddressCustomFieldAction.php index 5d806ecca3d..88335c972f5 100644 --- a/lib/commercetools-api/src/Models/Channel/ChannelSetAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Channel/ChannelSetAddressCustomFieldAction.php @@ -26,7 +26,8 @@ public function getName(); /** *

Specifies the format of the value of the Custom Field defined by name. - * If value is absent or null, this field will be removed, if it exists. Trying to remove a field that does not exist will fail with an InvalidOperation error.

+ * 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.

* * @return null|mixed diff --git a/lib/commercetools-api/src/Models/Channel/ChannelSetAddressCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Channel/ChannelSetAddressCustomFieldActionBuilder.php index 90ca2606510..14ec9d2122a 100644 --- a/lib/commercetools-api/src/Models/Channel/ChannelSetAddressCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Channel/ChannelSetAddressCustomFieldActionBuilder.php @@ -45,7 +45,8 @@ public function getName() /** *

Specifies the format of the value of the Custom Field defined by name. - * If value is absent or null, this field will be removed, if it exists. Trying to remove a field that does not exist will fail with an InvalidOperation error.

+ * 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.

* * @return null|mixed diff --git a/lib/commercetools-api/src/Models/Channel/ChannelSetAddressCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Channel/ChannelSetAddressCustomFieldActionModel.php index d4508e67a96..dec4aa9b526 100644 --- a/lib/commercetools-api/src/Models/Channel/ChannelSetAddressCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Channel/ChannelSetAddressCustomFieldActionModel.php @@ -92,7 +92,8 @@ public function getName() /** *

Specifies the format of the value of the Custom Field defined by name. - * If value is absent or null, this field will be removed, if it exists. Trying to remove a field that does not exist will fail with an InvalidOperation error.

+ * 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.

* * * @return null|mixed diff --git a/lib/commercetools-api/src/Models/Channel/ChannelSetCustomFieldAction.php b/lib/commercetools-api/src/Models/Channel/ChannelSetCustomFieldAction.php index d8f5f825354..f1b61b721c6 100644 --- a/lib/commercetools-api/src/Models/Channel/ChannelSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Channel/ChannelSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Channel/ChannelSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Channel/ChannelSetCustomFieldActionBuilder.php index ac3bd2ea1e0..284b7a3ae9c 100644 --- a/lib/commercetools-api/src/Models/Channel/ChannelSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Channel/ChannelSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Channel/ChannelSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Channel/ChannelSetCustomFieldActionModel.php index e8c0100ba10..9171d7a32a1 100644 --- a/lib/commercetools-api/src/Models/Channel/ChannelSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Channel/ChannelSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Channel/ChannelUpdate.php b/lib/commercetools-api/src/Models/Channel/ChannelUpdate.php index dde2b294160..bf200b37e79 100644 --- a/lib/commercetools-api/src/Models/Channel/ChannelUpdate.php +++ b/lib/commercetools-api/src/Models/Channel/ChannelUpdate.php @@ -17,7 +17,7 @@ interface ChannelUpdate extends JsonObject public const FIELD_ACTIONS = 'actions'; /** - *

Expected version of the Channel on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict error will be returned.

+ *

Expected version of the Channel on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/Channel/ChannelUpdateBuilder.php b/lib/commercetools-api/src/Models/Channel/ChannelUpdateBuilder.php index 72b97fa19d4..1ef70b8193f 100644 --- a/lib/commercetools-api/src/Models/Channel/ChannelUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/Channel/ChannelUpdateBuilder.php @@ -33,7 +33,7 @@ final class ChannelUpdateBuilder implements Builder private $actions; /** - *

Expected version of the Channel on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict error will be returned.

+ *

Expected version of the Channel on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/Channel/ChannelUpdateModel.php b/lib/commercetools-api/src/Models/Channel/ChannelUpdateModel.php index 5c4abd7eb3b..2d1516f8ab6 100644 --- a/lib/commercetools-api/src/Models/Channel/ChannelUpdateModel.php +++ b/lib/commercetools-api/src/Models/Channel/ChannelUpdateModel.php @@ -44,7 +44,7 @@ public function __construct( } /** - *

Expected version of the Channel on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict error will be returned.

+ *

Expected version of the Channel on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * * @return null|int diff --git a/lib/commercetools-api/src/Models/Common/BaseResource.php b/lib/commercetools-api/src/Models/Common/BaseResource.php index b8d14b5cc83..86dfdb56b38 100644 --- a/lib/commercetools-api/src/Models/Common/BaseResource.php +++ b/lib/commercetools-api/src/Models/Common/BaseResource.php @@ -116,6 +116,7 @@ use Commercetools\Api\Models\Message\StandalonePriceExternalDiscountSetMessage; use Commercetools\Api\Models\Message\StandalonePriceStagedChangesAppliedMessage; use Commercetools\Api\Models\Message\StandalonePriceValueChangedMessage; +use Commercetools\Api\Models\Message\StoreCountriesChangedMessage; use Commercetools\Api\Models\Message\StoreCreatedMessage; use Commercetools\Api\Models\Message\StoreDeletedMessage; use Commercetools\Api\Models\Message\StoreDistributionChannelsChangedMessage; diff --git a/lib/commercetools-api/src/Models/Common/BaseResourceBuilder.php b/lib/commercetools-api/src/Models/Common/BaseResourceBuilder.php index 2f1686d1f3a..1eb5a95ce24 100644 --- a/lib/commercetools-api/src/Models/Common/BaseResourceBuilder.php +++ b/lib/commercetools-api/src/Models/Common/BaseResourceBuilder.php @@ -224,6 +224,8 @@ use Commercetools\Api\Models\Message\StandalonePriceStagedChangesAppliedMessageBuilder; use Commercetools\Api\Models\Message\StandalonePriceValueChangedMessage; use Commercetools\Api\Models\Message\StandalonePriceValueChangedMessageBuilder; +use Commercetools\Api\Models\Message\StoreCountriesChangedMessage; +use Commercetools\Api\Models\Message\StoreCountriesChangedMessageBuilder; use Commercetools\Api\Models\Message\StoreCreatedMessage; use Commercetools\Api\Models\Message\StoreCreatedMessageBuilder; use Commercetools\Api\Models\Message\StoreDeletedMessage; diff --git a/lib/commercetools-api/src/Models/Common/BaseResourceModel.php b/lib/commercetools-api/src/Models/Common/BaseResourceModel.php index 8a55e0db85f..edb197fc6aa 100644 --- a/lib/commercetools-api/src/Models/Common/BaseResourceModel.php +++ b/lib/commercetools-api/src/Models/Common/BaseResourceModel.php @@ -224,6 +224,8 @@ use Commercetools\Api\Models\Message\StandalonePriceStagedChangesAppliedMessageModel; use Commercetools\Api\Models\Message\StandalonePriceValueChangedMessage; use Commercetools\Api\Models\Message\StandalonePriceValueChangedMessageModel; +use Commercetools\Api\Models\Message\StoreCountriesChangedMessage; +use Commercetools\Api\Models\Message\StoreCountriesChangedMessageModel; use Commercetools\Api\Models\Message\StoreCreatedMessage; use Commercetools\Api\Models\Message\StoreCreatedMessageModel; use Commercetools\Api\Models\Message\StoreDeletedMessage; diff --git a/lib/commercetools-api/src/Models/Common/ScopedPrice.php b/lib/commercetools-api/src/Models/Common/ScopedPrice.php index f79834aa433..84bf1f6def7 100644 --- a/lib/commercetools-api/src/Models/Common/ScopedPrice.php +++ b/lib/commercetools-api/src/Models/Common/ScopedPrice.php @@ -93,7 +93,7 @@ public function getValidFrom(); public function getValidUntil(); /** - *

Is set if a matching ProductDiscount exists. If set, the Cart uses the discounted value for the Cart Price calculation.

+ *

Is set if a matching ProductDiscount exists. If set, the Cart uses the discounted value for the Cart Price calculation.

*

When a relative Product Discount is applied and the fractional part of the discounted Price is 0.5, the discounted Price is rounded half down in favor of the Customer.

* diff --git a/lib/commercetools-api/src/Models/Common/ScopedPriceBuilder.php b/lib/commercetools-api/src/Models/Common/ScopedPriceBuilder.php index ffc3b9d7e78..3d061743912 100644 --- a/lib/commercetools-api/src/Models/Common/ScopedPriceBuilder.php +++ b/lib/commercetools-api/src/Models/Common/ScopedPriceBuilder.php @@ -176,7 +176,7 @@ public function getValidUntil() } /** - *

Is set if a matching ProductDiscount exists. If set, the Cart uses the discounted value for the Cart Price calculation.

+ *

Is set if a matching ProductDiscount exists. If set, the Cart uses the discounted value for the Cart Price calculation.

*

When a relative Product Discount is applied and the fractional part of the discounted Price is 0.5, the discounted Price is rounded half down in favor of the Customer.

* diff --git a/lib/commercetools-api/src/Models/Common/ScopedPriceModel.php b/lib/commercetools-api/src/Models/Common/ScopedPriceModel.php index d6f4ad5e6ff..974665535e9 100644 --- a/lib/commercetools-api/src/Models/Common/ScopedPriceModel.php +++ b/lib/commercetools-api/src/Models/Common/ScopedPriceModel.php @@ -287,7 +287,7 @@ public function getValidUntil() } /** - *

Is set if a matching ProductDiscount exists. If set, the Cart uses the discounted value for the Cart Price calculation.

+ *

Is set if a matching ProductDiscount exists. If set, the Cart uses the discounted value for the Cart Price calculation.

*

When a relative Product Discount is applied and the fractional part of the discounted Price is 0.5, the discounted Price is rounded half down in favor of the Customer.

* * diff --git a/lib/commercetools-api/src/Models/Customer/CustomerSetAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/Customer/CustomerSetAddressCustomFieldAction.php index 6fb29430a69..f4821515b79 100644 --- a/lib/commercetools-api/src/Models/Customer/CustomerSetAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Customer/CustomerSetAddressCustomFieldAction.php @@ -35,8 +35,8 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. - * If value is provided, it is set for the field defined by name.

+ * If value is provided, it is set for the field defined by name. + * Trying to remove a field that does not exist will fail with an InvalidOperation error.

* * @return null|mixed diff --git a/lib/commercetools-api/src/Models/Customer/CustomerSetAddressCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Customer/CustomerSetAddressCustomFieldActionBuilder.php index c56d0e2602a..ae5511993f6 100644 --- a/lib/commercetools-api/src/Models/Customer/CustomerSetAddressCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Customer/CustomerSetAddressCustomFieldActionBuilder.php @@ -62,8 +62,8 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. - * If value is provided, it is set for the field defined by name.

+ * If value is provided, it is set for the field defined by name. + * Trying to remove a field that does not exist will fail with an InvalidOperation error.

* * @return null|mixed diff --git a/lib/commercetools-api/src/Models/Customer/CustomerSetAddressCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Customer/CustomerSetAddressCustomFieldActionModel.php index 14119650c88..4b3fc8d96b6 100644 --- a/lib/commercetools-api/src/Models/Customer/CustomerSetAddressCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Customer/CustomerSetAddressCustomFieldActionModel.php @@ -120,8 +120,8 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. - * If value is provided, it is set for the field defined by name.

+ * If value is provided, it is set for the field defined by name. + * Trying to remove a field that does not exist will fail with an InvalidOperation error.

* * * @return null|mixed diff --git a/lib/commercetools-api/src/Models/Customer/CustomerSetCustomFieldAction.php b/lib/commercetools-api/src/Models/Customer/CustomerSetCustomFieldAction.php index 661f4c80183..099a62abc8d 100644 --- a/lib/commercetools-api/src/Models/Customer/CustomerSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Customer/CustomerSetCustomFieldAction.php @@ -26,8 +26,8 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. - * If value is provided, it is set for the field defined by name.

+ * If value is provided, it is set for the field defined by name. + * Trying to remove a field that does not exist will fail with an InvalidOperation error.

* * @return null|mixed diff --git a/lib/commercetools-api/src/Models/Customer/CustomerSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Customer/CustomerSetCustomFieldActionBuilder.php index 89c2b908552..23d1031c764 100644 --- a/lib/commercetools-api/src/Models/Customer/CustomerSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Customer/CustomerSetCustomFieldActionBuilder.php @@ -45,8 +45,8 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. - * If value is provided, it is set for the field defined by name.

+ * If value is provided, it is set for the field defined by name. + * Trying to remove a field that does not exist will fail with an InvalidOperation error.

* * @return null|mixed diff --git a/lib/commercetools-api/src/Models/Customer/CustomerSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Customer/CustomerSetCustomFieldActionModel.php index 4c5b4fa5e74..e9728a5ce5c 100644 --- a/lib/commercetools-api/src/Models/Customer/CustomerSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Customer/CustomerSetCustomFieldActionModel.php @@ -92,8 +92,8 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. - * If value is provided, it is set for the field defined by name.

+ * If value is provided, it is set for the field defined by name. + * Trying to remove a field that does not exist will fail with an InvalidOperation error.

* * * @return null|mixed diff --git a/lib/commercetools-api/src/Models/Customer/CustomerSignin.php b/lib/commercetools-api/src/Models/Customer/CustomerSignin.php index a19ef9f21d1..e22994a6e12 100644 --- a/lib/commercetools-api/src/Models/Customer/CustomerSignin.php +++ b/lib/commercetools-api/src/Models/Customer/CustomerSignin.php @@ -66,7 +66,7 @@ public function getAnonymousCart(); public function getAnonymousCartSignInMode(); /** - *

If both anonymousCart and anonymousId are provided, the anonymousId on the CustomerSignin must match that of the anonymous [Cart](ctp:api:type:Cart]. + *

If both anonymousCart and anonymousId are provided, the anonymousId on the CustomerSignin must match that of the anonymous Cart. * Otherwise a 400 Bad Request Invalid Operation error is returned with the message: * "Cart with the ID cart-id does not have the expected anonymousId.".

* diff --git a/lib/commercetools-api/src/Models/Customer/CustomerSigninBuilder.php b/lib/commercetools-api/src/Models/Customer/CustomerSigninBuilder.php index 907c37276e6..ae699be6bce 100644 --- a/lib/commercetools-api/src/Models/Customer/CustomerSigninBuilder.php +++ b/lib/commercetools-api/src/Models/Customer/CustomerSigninBuilder.php @@ -123,7 +123,7 @@ public function getAnonymousCartSignInMode() } /** - *

If both anonymousCart and anonymousId are provided, the anonymousId on the CustomerSignin must match that of the anonymous [Cart](ctp:api:type:Cart]. + *

If both anonymousCart and anonymousId are provided, the anonymousId on the CustomerSignin must match that of the anonymous Cart. * Otherwise a 400 Bad Request Invalid Operation error is returned with the message: * "Cart with the ID cart-id does not have the expected anonymousId.".

* diff --git a/lib/commercetools-api/src/Models/Customer/CustomerSigninModel.php b/lib/commercetools-api/src/Models/Customer/CustomerSigninModel.php index 271076a8459..166ec0b2aad 100644 --- a/lib/commercetools-api/src/Models/Customer/CustomerSigninModel.php +++ b/lib/commercetools-api/src/Models/Customer/CustomerSigninModel.php @@ -190,7 +190,7 @@ public function getAnonymousCartSignInMode() } /** - *

If both anonymousCart and anonymousId are provided, the anonymousId on the CustomerSignin must match that of the anonymous [Cart](ctp:api:type:Cart]. + *

If both anonymousCart and anonymousId are provided, the anonymousId on the CustomerSignin must match that of the anonymous Cart. * Otherwise a 400 Bad Request Invalid Operation error is returned with the message: * "Cart with the ID cart-id does not have the expected anonymousId.".

* diff --git a/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupDraft.php b/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupDraft.php index 9bc817a2b3e..4f93962a207 100644 --- a/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupDraft.php +++ b/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupDraft.php @@ -28,7 +28,7 @@ public function getKey(); /** *

Unique value which must be different from any value used for name in CustomerGroup in the Project. - * If not, a DuplicateField error is thrown.

+ * If not, a DuplicateField error is returned.

* * @return null|string diff --git a/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupDraftBuilder.php b/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupDraftBuilder.php index eb1db777546..5e09691e44a 100644 --- a/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupDraftBuilder.php +++ b/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupDraftBuilder.php @@ -53,7 +53,7 @@ public function getKey() /** *

Unique value which must be different from any value used for name in CustomerGroup in the Project. - * If not, a DuplicateField error is thrown.

+ * If not, a DuplicateField error is returned.

* * @return null|string diff --git a/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupDraftModel.php b/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupDraftModel.php index f93c24f447e..86de796d1f5 100644 --- a/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupDraftModel.php +++ b/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupDraftModel.php @@ -75,7 +75,7 @@ public function getKey() /** *

Unique value which must be different from any value used for name in CustomerGroup in the Project. - * If not, a DuplicateField error is thrown.

+ * If not, a DuplicateField error is returned.

* * * @return null|string diff --git a/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupSetCustomFieldAction.php b/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupSetCustomFieldAction.php index c0742dac814..51fe1764478 100644 --- a/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupSetCustomFieldActionBuilder.php index 3f53d4deec0..34a36571bdb 100644 --- a/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupSetCustomFieldActionModel.php index 2c07a1827fc..8d876835b23 100644 --- a/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupUpdate.php b/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupUpdate.php index ebc5da43aa7..cda5eed1f80 100644 --- a/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupUpdate.php +++ b/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupUpdate.php @@ -18,7 +18,7 @@ interface CustomerGroupUpdate extends JsonObject /** *

Expected version of the CustomerGroup on which the changes should be applied. - * If the expected version does not match the actual version, a 409 Conflict will be returned.

+ * If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupUpdateBuilder.php b/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupUpdateBuilder.php index 6b2e1837d3c..582ddc8b601 100644 --- a/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupUpdateBuilder.php @@ -34,7 +34,7 @@ final class CustomerGroupUpdateBuilder implements Builder /** *

Expected version of the CustomerGroup on which the changes should be applied. - * If the expected version does not match the actual version, a 409 Conflict will be returned.

+ * If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupUpdateModel.php b/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupUpdateModel.php index 0d349b9e279..64463a86dfa 100644 --- a/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupUpdateModel.php +++ b/lib/commercetools-api/src/Models/CustomerGroup/CustomerGroupUpdateModel.php @@ -45,7 +45,7 @@ public function __construct( /** *

Expected version of the CustomerGroup on which the changes should be applied. - * If the expected version does not match the actual version, a 409 Conflict will be returned.

+ * If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * * @return null|int diff --git a/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeSetCustomFieldAction.php b/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeSetCustomFieldAction.php index 16d0609a99a..b4e09f9db3a 100644 --- a/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeSetCustomFieldActionBuilder.php index 549c284011c..02d0d814f5e 100644 --- a/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeSetCustomFieldActionModel.php index e3a6f15b645..0d65d88fb9f 100644 --- a/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeUpdate.php b/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeUpdate.php index 87ac5ba4411..ff8ce047e5e 100644 --- a/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeUpdate.php +++ b/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeUpdate.php @@ -18,7 +18,7 @@ interface DiscountCodeUpdate extends JsonObject /** *

Expected version of the DiscountCode on which the changes should be applied. - * If the expected version does not match the actual version, a 409 Conflict will be returned.

+ * If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeUpdateBuilder.php b/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeUpdateBuilder.php index 00c07f6c928..ae3581a8f65 100644 --- a/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeUpdateBuilder.php @@ -34,7 +34,7 @@ final class DiscountCodeUpdateBuilder implements Builder /** *

Expected version of the DiscountCode on which the changes should be applied. - * If the expected version does not match the actual version, a 409 Conflict will be returned.

+ * If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeUpdateModel.php b/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeUpdateModel.php index 4c22b1883a1..0cd4af286d6 100644 --- a/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeUpdateModel.php +++ b/lib/commercetools-api/src/Models/DiscountCode/DiscountCodeUpdateModel.php @@ -45,7 +45,7 @@ public function __construct( /** *

Expected version of the DiscountCode on which the changes should be applied. - * If the expected version does not match the actual version, a 409 Conflict will be returned.

+ * If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * * @return null|int diff --git a/lib/commercetools-api/src/Models/Error/AccessDeniedError.php b/lib/commercetools-api/src/Models/Error/AccessDeniedError.php deleted file mode 100644 index ccb9c3c08fa..00000000000 --- a/lib/commercetools-api/src/Models/Error/AccessDeniedError.php +++ /dev/null @@ -1,16 +0,0 @@ - - */ -final class AccessDeniedErrorBuilder implements Builder -{ - /** - - * @var ?string - */ - private $message; - - /** - - * @return null|string - */ - public function getMessage() - { - return $this->message; - } - - /** - * @param ?string $message - * @return $this - */ - public function withMessage(?string $message) - { - $this->message = $message; - - return $this; - } - - - public function build(): AccessDeniedError - { - return new AccessDeniedErrorModel( - $this->message - ); - } - - public static function of(): AccessDeniedErrorBuilder - { - return new self(); - } -} diff --git a/lib/commercetools-api/src/Models/Error/AccessDeniedErrorCollection.php b/lib/commercetools-api/src/Models/Error/AccessDeniedErrorCollection.php deleted file mode 100644 index fd8aafe8122..00000000000 --- a/lib/commercetools-api/src/Models/Error/AccessDeniedErrorCollection.php +++ /dev/null @@ -1,56 +0,0 @@ - - * @method AccessDeniedError current() - * @method AccessDeniedError end() - * @method AccessDeniedError at($offset) - */ -class AccessDeniedErrorCollection extends ErrorObjectCollection -{ - /** - * @psalm-assert AccessDeniedError $value - * @psalm-param AccessDeniedError|stdClass $value - * @throws InvalidArgumentException - * - * @return AccessDeniedErrorCollection - */ - public function add($value) - { - if (!$value instanceof AccessDeniedError) { - throw new InvalidArgumentException(); - } - $this->store($value); - - return $this; - } - - /** - * @psalm-return callable(int):?AccessDeniedError - */ - protected function mapper() - { - return function (?int $index): ?AccessDeniedError { - $data = $this->get($index); - if ($data instanceof stdClass) { - /** @var AccessDeniedError $data */ - $data = AccessDeniedErrorModel::of($data); - $this->set($data, $index); - } - - return $data; - }; - } -} diff --git a/lib/commercetools-api/src/Models/Error/AnonymousIdAlreadyInUseError.php b/lib/commercetools-api/src/Models/Error/AnonymousIdAlreadyInUseError.php index 1217c465387..59de38f067f 100644 --- a/lib/commercetools-api/src/Models/Error/AnonymousIdAlreadyInUseError.php +++ b/lib/commercetools-api/src/Models/Error/AnonymousIdAlreadyInUseError.php @@ -13,4 +13,22 @@ interface AnonymousIdAlreadyInUseError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"The given anonymous ID is already in use."

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/AnonymousIdAlreadyInUseErrorBuilder.php b/lib/commercetools-api/src/Models/Error/AnonymousIdAlreadyInUseErrorBuilder.php index c1e5d5b87d3..551aa3b38ce 100644 --- a/lib/commercetools-api/src/Models/Error/AnonymousIdAlreadyInUseErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/AnonymousIdAlreadyInUseErrorBuilder.php @@ -27,6 +27,8 @@ final class AnonymousIdAlreadyInUseErrorBuilder implements Builder private $message; /** + *

"The given anonymous ID is already in use."

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/AnonymousIdAlreadyInUseErrorModel.php b/lib/commercetools-api/src/Models/Error/AnonymousIdAlreadyInUseErrorModel.php index 468f91265f0..b71827d49af 100644 --- a/lib/commercetools-api/src/Models/Error/AnonymousIdAlreadyInUseErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/AnonymousIdAlreadyInUseErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

"The given anonymous ID is already in use."

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/AttributeDefinitionAlreadyExistsError.php b/lib/commercetools-api/src/Models/Error/AttributeDefinitionAlreadyExistsError.php index d94bfa5e31f..4acca049906 100644 --- a/lib/commercetools-api/src/Models/Error/AttributeDefinitionAlreadyExistsError.php +++ b/lib/commercetools-api/src/Models/Error/AttributeDefinitionAlreadyExistsError.php @@ -19,22 +19,47 @@ interface AttributeDefinitionAlreadyExistsError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"An attribute definition with name $attributeName already exists on product type $productTypeName."

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

Unique identifier of the Product Type containing the conflicting name.

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

Name of the Product Type containing the conflicting name.

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

Name of the conflicting Attribute.

+ * * @return null|string */ public function getConflictingAttributeName(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?string $conflictingProductTypeId */ diff --git a/lib/commercetools-api/src/Models/Error/AttributeDefinitionAlreadyExistsErrorBuilder.php b/lib/commercetools-api/src/Models/Error/AttributeDefinitionAlreadyExistsErrorBuilder.php index b18094ec858..800d150bc4a 100644 --- a/lib/commercetools-api/src/Models/Error/AttributeDefinitionAlreadyExistsErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/AttributeDefinitionAlreadyExistsErrorBuilder.php @@ -45,6 +45,8 @@ final class AttributeDefinitionAlreadyExistsErrorBuilder implements Builder private $conflictingAttributeName; /** + *

"An attribute definition with name $attributeName already exists on product type $productTypeName."

+ * * @return null|string */ @@ -54,6 +56,8 @@ public function getMessage() } /** + *

Unique identifier of the Product Type containing the conflicting name.

+ * * @return null|string */ @@ -63,6 +67,8 @@ public function getConflictingProductTypeId() } /** + *

Name of the Product Type containing the conflicting name.

+ * * @return null|string */ @@ -72,6 +78,8 @@ public function getConflictingProductTypeName() } /** + *

Name of the conflicting Attribute.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/AttributeDefinitionAlreadyExistsErrorModel.php b/lib/commercetools-api/src/Models/Error/AttributeDefinitionAlreadyExistsErrorModel.php index ad4818b2a91..00b24bd0ea9 100644 --- a/lib/commercetools-api/src/Models/Error/AttributeDefinitionAlreadyExistsErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/AttributeDefinitionAlreadyExistsErrorModel.php @@ -87,6 +87,8 @@ public function getCode() } /** + *

"An attribute definition with name $attributeName already exists on product type $productTypeName."

+ * * * @return null|string */ @@ -105,6 +107,8 @@ public function getMessage() } /** + *

Unique identifier of the Product Type containing the conflicting name.

+ * * * @return null|string */ @@ -123,6 +127,8 @@ public function getConflictingProductTypeId() } /** + *

Name of the Product Type containing the conflicting name.

+ * * * @return null|string */ @@ -141,6 +147,8 @@ public function getConflictingProductTypeName() } /** + *

Name of the conflicting Attribute.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/AttributeDefinitionTypeConflictError.php b/lib/commercetools-api/src/Models/Error/AttributeDefinitionTypeConflictError.php index b669c86fad7..4b4ff6aabbf 100644 --- a/lib/commercetools-api/src/Models/Error/AttributeDefinitionTypeConflictError.php +++ b/lib/commercetools-api/src/Models/Error/AttributeDefinitionTypeConflictError.php @@ -19,22 +19,47 @@ interface AttributeDefinitionTypeConflictError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"The attribute with name $attributeName has a different type on product type $productTypeName."

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

Unique identifier of the Product Type containing the conflicting name.

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

Name of the Product Type containing the conflicting name.

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

Name of the conflicting Attribute.

+ * * @return null|string */ public function getConflictingAttributeName(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?string $conflictingProductTypeId */ diff --git a/lib/commercetools-api/src/Models/Error/AttributeDefinitionTypeConflictErrorBuilder.php b/lib/commercetools-api/src/Models/Error/AttributeDefinitionTypeConflictErrorBuilder.php index d3b8f4e73ff..b466fa4e2cb 100644 --- a/lib/commercetools-api/src/Models/Error/AttributeDefinitionTypeConflictErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/AttributeDefinitionTypeConflictErrorBuilder.php @@ -45,6 +45,8 @@ final class AttributeDefinitionTypeConflictErrorBuilder implements Builder private $conflictingAttributeName; /** + *

"The attribute with name $attributeName has a different type on product type $productTypeName."

+ * * @return null|string */ @@ -54,6 +56,8 @@ public function getMessage() } /** + *

Unique identifier of the Product Type containing the conflicting name.

+ * * @return null|string */ @@ -63,6 +67,8 @@ public function getConflictingProductTypeId() } /** + *

Name of the Product Type containing the conflicting name.

+ * * @return null|string */ @@ -72,6 +78,8 @@ public function getConflictingProductTypeName() } /** + *

Name of the conflicting Attribute.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/AttributeDefinitionTypeConflictErrorModel.php b/lib/commercetools-api/src/Models/Error/AttributeDefinitionTypeConflictErrorModel.php index c93883aa3fb..217930ac420 100644 --- a/lib/commercetools-api/src/Models/Error/AttributeDefinitionTypeConflictErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/AttributeDefinitionTypeConflictErrorModel.php @@ -87,6 +87,8 @@ public function getCode() } /** + *

"The attribute with name $attributeName has a different type on product type $productTypeName."

+ * * * @return null|string */ @@ -105,6 +107,8 @@ public function getMessage() } /** + *

Unique identifier of the Product Type containing the conflicting name.

+ * * * @return null|string */ @@ -123,6 +127,8 @@ public function getConflictingProductTypeId() } /** + *

Name of the Product Type containing the conflicting name.

+ * * * @return null|string */ @@ -141,6 +147,8 @@ public function getConflictingProductTypeName() } /** + *

Name of the conflicting Attribute.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/AttributeNameDoesNotExistError.php b/lib/commercetools-api/src/Models/Error/AttributeNameDoesNotExistError.php index e089c37541f..f8715126de0 100644 --- a/lib/commercetools-api/src/Models/Error/AttributeNameDoesNotExistError.php +++ b/lib/commercetools-api/src/Models/Error/AttributeNameDoesNotExistError.php @@ -17,10 +17,31 @@ interface AttributeNameDoesNotExistError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"Attribute definition for $attributeName does not exist on type $typeName."

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

Non-existent Attribute name.

+ * + * @return null|string */ public function getInvalidAttributeName(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?string $invalidAttributeName */ diff --git a/lib/commercetools-api/src/Models/Error/AttributeNameDoesNotExistErrorBuilder.php b/lib/commercetools-api/src/Models/Error/AttributeNameDoesNotExistErrorBuilder.php index a4da49a4918..7be8283834b 100644 --- a/lib/commercetools-api/src/Models/Error/AttributeNameDoesNotExistErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/AttributeNameDoesNotExistErrorBuilder.php @@ -33,6 +33,8 @@ final class AttributeNameDoesNotExistErrorBuilder implements Builder private $invalidAttributeName; /** + *

"Attribute definition for $attributeName does not exist on type $typeName."

+ * * @return null|string */ @@ -42,6 +44,8 @@ public function getMessage() } /** + *

Non-existent Attribute name.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/AttributeNameDoesNotExistErrorModel.php b/lib/commercetools-api/src/Models/Error/AttributeNameDoesNotExistErrorModel.php index 46c39d61280..d5061d02717 100644 --- a/lib/commercetools-api/src/Models/Error/AttributeNameDoesNotExistErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/AttributeNameDoesNotExistErrorModel.php @@ -71,6 +71,8 @@ public function getCode() } /** + *

"Attribute definition for $attributeName does not exist on type $typeName."

+ * * * @return null|string */ @@ -89,6 +91,8 @@ public function getMessage() } /** + *

Non-existent Attribute name.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/AuthErrorResponse.php b/lib/commercetools-api/src/Models/Error/AuthErrorResponse.php new file mode 100644 index 00000000000..583e6f5ec0d --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/AuthErrorResponse.php @@ -0,0 +1,57 @@ +Error code as per the OAuth 2.0 specification. For example: "access_denied".

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

Plain text description of the first error.

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

Authentication and authorization-related errors returned for a request.

+ * + + * @return null|ErrorObjectCollection + */ + public function getErrors(); + + /** + * @param ?string $error + */ + public function setError(?string $error): void; + + /** + * @param ?string $error_description + */ + public function setError_description(?string $error_description): void; + + /** + * @param ?ErrorObjectCollection $errors + */ + public function setErrors(?ErrorObjectCollection $errors): void; +} diff --git a/lib/commercetools-api/src/Models/Error/AuthErrorResponseBuilder.php b/lib/commercetools-api/src/Models/Error/AuthErrorResponseBuilder.php new file mode 100644 index 00000000000..1a9ece24e85 --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/AuthErrorResponseBuilder.php @@ -0,0 +1,179 @@ + + */ +final class AuthErrorResponseBuilder implements Builder +{ + /** + + * @var ?int + */ + private $statusCode; + + /** + + * @var ?string + */ + private $message; + + /** + + * @var ?ErrorObjectCollection + */ + private $errors; + + /** + + * @var ?string + */ + private $error; + + /** + + * @var ?string + */ + private $error_description; + + /** + *

HTTP status code corresponding to the error.

+ * + + * @return null|int + */ + public function getStatusCode() + { + return $this->statusCode; + } + + /** + *

First error message in the errors array.

+ * + + * @return null|string + */ + public function getMessage() + { + return $this->message; + } + + /** + *

Authentication and authorization-related errors returned for a request.

+ * + + * @return null|ErrorObjectCollection + */ + public function getErrors() + { + return $this->errors; + } + + /** + *

Error code as per the OAuth 2.0 specification. For example: "access_denied".

+ * + + * @return null|string + */ + public function getError() + { + return $this->error; + } + + /** + *

Plain text description of the first error.

+ * + + * @return null|string + */ + public function getError_description() + { + return $this->error_description; + } + + /** + * @param ?int $statusCode + * @return $this + */ + public function withStatusCode(?int $statusCode) + { + $this->statusCode = $statusCode; + + return $this; + } + + /** + * @param ?string $message + * @return $this + */ + public function withMessage(?string $message) + { + $this->message = $message; + + return $this; + } + + /** + * @param ?ErrorObjectCollection $errors + * @return $this + */ + public function withErrors(?ErrorObjectCollection $errors) + { + $this->errors = $errors; + + return $this; + } + + /** + * @param ?string $error + * @return $this + */ + public function withError(?string $error) + { + $this->error = $error; + + return $this; + } + + /** + * @param ?string $error_description + * @return $this + */ + public function withError_description(?string $error_description) + { + $this->error_description = $error_description; + + return $this; + } + + + public function build(): AuthErrorResponse + { + return new AuthErrorResponseModel( + $this->statusCode, + $this->message, + $this->errors, + $this->error, + $this->error_description + ); + } + + public static function of(): AuthErrorResponseBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Error/AuthErrorResponseCollection.php b/lib/commercetools-api/src/Models/Error/AuthErrorResponseCollection.php new file mode 100644 index 00000000000..2c9c833e481 --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/AuthErrorResponseCollection.php @@ -0,0 +1,56 @@ + + * @method AuthErrorResponse current() + * @method AuthErrorResponse end() + * @method AuthErrorResponse at($offset) + */ +class AuthErrorResponseCollection extends ErrorResponseCollection +{ + /** + * @psalm-assert AuthErrorResponse $value + * @psalm-param AuthErrorResponse|stdClass $value + * @throws InvalidArgumentException + * + * @return AuthErrorResponseCollection + */ + public function add($value) + { + if (!$value instanceof AuthErrorResponse) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?AuthErrorResponse + */ + protected function mapper() + { + return function (?int $index): ?AuthErrorResponse { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var AuthErrorResponse $data */ + $data = AuthErrorResponseModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Error/AuthErrorResponseModel.php b/lib/commercetools-api/src/Models/Error/AuthErrorResponseModel.php new file mode 100644 index 00000000000..2631b4b9f78 --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/AuthErrorResponseModel.php @@ -0,0 +1,210 @@ +statusCode = $statusCode; + $this->message = $message; + $this->errors = $errors; + $this->error = $error; + $this->error_description = $error_description; + } + + /** + *

HTTP status code corresponding to the error.

+ * + * + * @return null|int + */ + public function getStatusCode() + { + if (is_null($this->statusCode)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_STATUS_CODE); + if (is_null($data)) { + return null; + } + $this->statusCode = (int) $data; + } + + return $this->statusCode; + } + + /** + *

First error message in the errors array.

+ * + * + * @return null|string + */ + public function getMessage() + { + if (is_null($this->message)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_MESSAGE); + if (is_null($data)) { + return null; + } + $this->message = (string) $data; + } + + return $this->message; + } + + /** + *

Authentication and authorization-related errors returned for a request.

+ * + * + * @return null|ErrorObjectCollection + */ + public function getErrors() + { + if (is_null($this->errors)) { + /** @psalm-var ?list $data */ + $data = $this->raw(self::FIELD_ERRORS); + if (is_null($data)) { + return null; + } + $this->errors = ErrorObjectCollection::fromArray($data); + } + + return $this->errors; + } + + /** + *

Error code as per the OAuth 2.0 specification. For example: "access_denied".

+ * + * + * @return null|string + */ + public function getError() + { + if (is_null($this->error)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ERROR); + if (is_null($data)) { + return null; + } + $this->error = (string) $data; + } + + return $this->error; + } + + /** + *

Plain text description of the first error.

+ * + * + * @return null|string + */ + public function getError_description() + { + if (is_null($this->error_description)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ERROR_DESCRIPTION); + if (is_null($data)) { + return null; + } + $this->error_description = (string) $data; + } + + return $this->error_description; + } + + + /** + * @param ?int $statusCode + */ + public function setStatusCode(?int $statusCode): void + { + $this->statusCode = $statusCode; + } + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void + { + $this->message = $message; + } + + /** + * @param ?ErrorObjectCollection $errors + */ + public function setErrors(?ErrorObjectCollection $errors): void + { + $this->errors = $errors; + } + + /** + * @param ?string $error + */ + public function setError(?string $error): void + { + $this->error = $error; + } + + /** + * @param ?string $error_description + */ + public function setError_description(?string $error_description): void + { + $this->error_description = $error_description; + } +} diff --git a/lib/commercetools-api/src/Models/Error/BadGatewayError.php b/lib/commercetools-api/src/Models/Error/BadGatewayError.php index 9262b748686..5c0f9bd9107 100644 --- a/lib/commercetools-api/src/Models/Error/BadGatewayError.php +++ b/lib/commercetools-api/src/Models/Error/BadGatewayError.php @@ -13,4 +13,22 @@ interface BadGatewayError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

Plain text description of the error.

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/BadGatewayErrorBuilder.php b/lib/commercetools-api/src/Models/Error/BadGatewayErrorBuilder.php index 7cd21234969..358339f3a29 100644 --- a/lib/commercetools-api/src/Models/Error/BadGatewayErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/BadGatewayErrorBuilder.php @@ -27,6 +27,8 @@ final class BadGatewayErrorBuilder implements Builder private $message; /** + *

Plain text description of the error.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/BadGatewayErrorModel.php b/lib/commercetools-api/src/Models/Error/BadGatewayErrorModel.php index 526f2c6ab49..eab600474a2 100644 --- a/lib/commercetools-api/src/Models/Error/BadGatewayErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/BadGatewayErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

Plain text description of the error.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/ConcurrentModificationError.php b/lib/commercetools-api/src/Models/Error/ConcurrentModificationError.php index 3ff95863fe2..954bf9bf1f4 100644 --- a/lib/commercetools-api/src/Models/Error/ConcurrentModificationError.php +++ b/lib/commercetools-api/src/Models/Error/ConcurrentModificationError.php @@ -17,10 +17,31 @@ interface ConcurrentModificationError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"Object $resourceId has a different version than expected. Expected: $expectedVersion - Actual: $currentVersion."

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

Current version of the resource.

+ * + * @return null|int */ public function getCurrentVersion(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?int $currentVersion */ diff --git a/lib/commercetools-api/src/Models/Error/ConcurrentModificationErrorBuilder.php b/lib/commercetools-api/src/Models/Error/ConcurrentModificationErrorBuilder.php index 93bf1585c86..ca37e4fe32b 100644 --- a/lib/commercetools-api/src/Models/Error/ConcurrentModificationErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/ConcurrentModificationErrorBuilder.php @@ -33,6 +33,8 @@ final class ConcurrentModificationErrorBuilder implements Builder private $currentVersion; /** + *

"Object $resourceId has a different version than expected. Expected: $expectedVersion - Actual: $currentVersion."

+ * * @return null|string */ @@ -42,6 +44,8 @@ public function getMessage() } /** + *

Current version of the resource.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Error/ConcurrentModificationErrorModel.php b/lib/commercetools-api/src/Models/Error/ConcurrentModificationErrorModel.php index 44202687f82..2171a70fba4 100644 --- a/lib/commercetools-api/src/Models/Error/ConcurrentModificationErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/ConcurrentModificationErrorModel.php @@ -71,6 +71,8 @@ public function getCode() } /** + *

"Object $resourceId has a different version than expected. Expected: $expectedVersion - Actual: $currentVersion."

+ * * * @return null|string */ @@ -89,6 +91,8 @@ public function getMessage() } /** + *

Current version of the resource.

+ * * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Error/CountryNotConfiguredInStore.php b/lib/commercetools-api/src/Models/Error/CountryNotConfiguredInStore.php new file mode 100644 index 00000000000..d161c50831b --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/CountryNotConfiguredInStore.php @@ -0,0 +1,63 @@ +"The country $country is not configured for the store $store."

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

Countries configured for the Store.

+ * + + * @return null|array + */ + public function getStoreCountries(); + + /** + *

The country that is not configured for the Store but referenced on the Cart or Order.

+ * + + * @return null|string + */ + public function getCountry(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + + /** + * @param ?array $storeCountries + */ + public function setStoreCountries(?array $storeCountries): void; + + /** + * @param ?string $country + */ + public function setCountry(?string $country): void; +} diff --git a/lib/commercetools-api/src/Models/Error/CountryNotConfiguredInStoreBuilder.php b/lib/commercetools-api/src/Models/Error/CountryNotConfiguredInStoreBuilder.php new file mode 100644 index 00000000000..d5d5776f744 --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/CountryNotConfiguredInStoreBuilder.php @@ -0,0 +1,121 @@ + + */ +final class CountryNotConfiguredInStoreBuilder implements Builder +{ + /** + + * @var ?string + */ + private $message; + + /** + + * @var ?array + */ + private $storeCountries; + + /** + + * @var ?string + */ + private $country; + + /** + *

"The country $country is not configured for the store $store."

+ * + + * @return null|string + */ + public function getMessage() + { + return $this->message; + } + + /** + *

Countries configured for the Store.

+ * + + * @return null|array + */ + public function getStoreCountries() + { + return $this->storeCountries; + } + + /** + *

The country that is not configured for the Store but referenced on the Cart or Order.

+ * + + * @return null|string + */ + public function getCountry() + { + return $this->country; + } + + /** + * @param ?string $message + * @return $this + */ + public function withMessage(?string $message) + { + $this->message = $message; + + return $this; + } + + /** + * @param ?array $storeCountries + * @return $this + */ + public function withStoreCountries(?array $storeCountries) + { + $this->storeCountries = $storeCountries; + + return $this; + } + + /** + * @param ?string $country + * @return $this + */ + public function withCountry(?string $country) + { + $this->country = $country; + + return $this; + } + + + public function build(): CountryNotConfiguredInStore + { + return new CountryNotConfiguredInStoreModel( + $this->message, + $this->storeCountries, + $this->country + ); + } + + public static function of(): CountryNotConfiguredInStoreBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Error/CountryNotConfiguredInStoreCollection.php b/lib/commercetools-api/src/Models/Error/CountryNotConfiguredInStoreCollection.php new file mode 100644 index 00000000000..eefaad5c00c --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/CountryNotConfiguredInStoreCollection.php @@ -0,0 +1,56 @@ + + * @method CountryNotConfiguredInStore current() + * @method CountryNotConfiguredInStore end() + * @method CountryNotConfiguredInStore at($offset) + */ +class CountryNotConfiguredInStoreCollection extends ErrorObjectCollection +{ + /** + * @psalm-assert CountryNotConfiguredInStore $value + * @psalm-param CountryNotConfiguredInStore|stdClass $value + * @throws InvalidArgumentException + * + * @return CountryNotConfiguredInStoreCollection + */ + public function add($value) + { + if (!$value instanceof CountryNotConfiguredInStore) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?CountryNotConfiguredInStore + */ + protected function mapper() + { + return function (?int $index): ?CountryNotConfiguredInStore { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var CountryNotConfiguredInStore $data */ + $data = CountryNotConfiguredInStoreModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Error/CountryNotConfiguredInStoreModel.php b/lib/commercetools-api/src/Models/Error/CountryNotConfiguredInStoreModel.php new file mode 100644 index 00000000000..50b8e603427 --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/CountryNotConfiguredInStoreModel.php @@ -0,0 +1,178 @@ +message = $message; + $this->storeCountries = $storeCountries; + $this->country = $country; + $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; + } + + /** + *

"The country $country is not configured for the store $store."

+ * + * + * @return null|string + */ + public function getMessage() + { + if (is_null($this->message)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_MESSAGE); + if (is_null($data)) { + return null; + } + $this->message = (string) $data; + } + + return $this->message; + } + + /** + *

Countries configured for the Store.

+ * + * + * @return null|array + */ + public function getStoreCountries() + { + if (is_null($this->storeCountries)) { + /** @psalm-var ?list $data */ + $data = $this->raw(self::FIELD_STORE_COUNTRIES); + if (is_null($data)) { + return null; + } + $this->storeCountries = $data; + } + + return $this->storeCountries; + } + + /** + *

The country that is not configured for the Store but referenced on the Cart or Order.

+ * + * + * @return null|string + */ + public function getCountry() + { + if (is_null($this->country)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_COUNTRY); + if (is_null($data)) { + return null; + } + $this->country = (string) $data; + } + + return $this->country; + } + + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void + { + $this->message = $message; + } + + /** + * @param ?array $storeCountries + */ + public function setStoreCountries(?array $storeCountries): void + { + $this->storeCountries = $storeCountries; + } + + /** + * @param ?string $country + */ + public function setCountry(?string $country): void + { + $this->country = $country; + } + + /** + * @return mixed + */ + public function by(string $key) + { + $data = $this->raw($key); + if (is_null($data)) { + return null; + } + + return $data; + } +} diff --git a/lib/commercetools-api/src/Models/Error/DiscountCodeNonApplicableError.php b/lib/commercetools-api/src/Models/Error/DiscountCodeNonApplicableError.php index aaa2bf230aa..e4880defa94 100644 --- a/lib/commercetools-api/src/Models/Error/DiscountCodeNonApplicableError.php +++ b/lib/commercetools-api/src/Models/Error/DiscountCodeNonApplicableError.php @@ -16,47 +16,78 @@ interface DiscountCodeNonApplicableError extends ErrorObject { public const FIELD_DISCOUNT_CODE = 'discountCode'; public const FIELD_REASON = 'reason'; - public const FIELD_DICOUNT_CODE_ID = 'dicountCodeId'; + public const FIELD_DISCOUNT_CODE_ID = 'discountCodeId'; public const FIELD_VALID_FROM = 'validFrom'; public const FIELD_VALID_UNTIL = 'validUntil'; public const FIELD_VALIDITY_CHECK_TIME = 'validityCheckTime'; /** + * @return null|string + */ + public function getCode(); + + /** + *

"The discountCode $discountCodeId cannot be applied to the cart."

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

Discount Code passed to the Cart.

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

"DoesNotExist" or "TimeRangeNonApplicable"

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

Unique identifier of the Discount Code.

+ * * @return null|string */ - public function getDicountCodeId(); + public function getDiscountCodeId(); /** + *

Date and time (UTC) from which the Discount Code is valid.

+ * * @return null|DateTimeImmutable */ public function getValidFrom(); /** + *

Date and time (UTC) until which the Discount Code is valid.

+ * * @return null|DateTimeImmutable */ public function getValidUntil(); /** + *

Date and time (UTC) the Discount Code validity check was last performed.

+ * * @return null|DateTimeImmutable */ public function getValidityCheckTime(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?string $discountCode */ @@ -68,9 +99,9 @@ public function setDiscountCode(?string $discountCode): void; public function setReason(?string $reason): void; /** - * @param ?string $dicountCodeId + * @param ?string $discountCodeId */ - public function setDicountCodeId(?string $dicountCodeId): void; + public function setDiscountCodeId(?string $discountCodeId): void; /** * @param ?DateTimeImmutable $validFrom diff --git a/lib/commercetools-api/src/Models/Error/DiscountCodeNonApplicableErrorBuilder.php b/lib/commercetools-api/src/Models/Error/DiscountCodeNonApplicableErrorBuilder.php index 99117b0d328..9e54f3d960a 100644 --- a/lib/commercetools-api/src/Models/Error/DiscountCodeNonApplicableErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/DiscountCodeNonApplicableErrorBuilder.php @@ -43,7 +43,7 @@ final class DiscountCodeNonApplicableErrorBuilder implements Builder * @var ?string */ - private $dicountCodeId; + private $discountCodeId; /** @@ -64,6 +64,8 @@ final class DiscountCodeNonApplicableErrorBuilder implements Builder private $validityCheckTime; /** + *

"The discountCode $discountCodeId cannot be applied to the cart."

+ * * @return null|string */ @@ -73,6 +75,8 @@ public function getMessage() } /** + *

Discount Code passed to the Cart.

+ * * @return null|string */ @@ -82,6 +86,8 @@ public function getDiscountCode() } /** + *

"DoesNotExist" or "TimeRangeNonApplicable"

+ * * @return null|string */ @@ -91,15 +97,19 @@ public function getReason() } /** + *

Unique identifier of the Discount Code.

+ * * @return null|string */ - public function getDicountCodeId() + public function getDiscountCodeId() { - return $this->dicountCodeId; + return $this->discountCodeId; } /** + *

Date and time (UTC) from which the Discount Code is valid.

+ * * @return null|DateTimeImmutable */ @@ -109,6 +119,8 @@ public function getValidFrom() } /** + *

Date and time (UTC) until which the Discount Code is valid.

+ * * @return null|DateTimeImmutable */ @@ -118,6 +130,8 @@ public function getValidUntil() } /** + *

Date and time (UTC) the Discount Code validity check was last performed.

+ * * @return null|DateTimeImmutable */ @@ -160,12 +174,12 @@ public function withReason(?string $reason) } /** - * @param ?string $dicountCodeId + * @param ?string $discountCodeId * @return $this */ - public function withDicountCodeId(?string $dicountCodeId) + public function withDiscountCodeId(?string $discountCodeId) { - $this->dicountCodeId = $dicountCodeId; + $this->discountCodeId = $discountCodeId; return $this; } @@ -210,7 +224,7 @@ public function build(): DiscountCodeNonApplicableError $this->message, $this->discountCode, $this->reason, - $this->dicountCodeId, + $this->discountCodeId, $this->validFrom, $this->validUntil, $this->validityCheckTime diff --git a/lib/commercetools-api/src/Models/Error/DiscountCodeNonApplicableErrorModel.php b/lib/commercetools-api/src/Models/Error/DiscountCodeNonApplicableErrorModel.php index 540e9d1a19a..c31bb1ec2d2 100644 --- a/lib/commercetools-api/src/Models/Error/DiscountCodeNonApplicableErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/DiscountCodeNonApplicableErrorModel.php @@ -49,7 +49,7 @@ final class DiscountCodeNonApplicableErrorModel extends JsonObjectModel implemen * * @var ?string */ - protected $dicountCodeId; + protected $discountCodeId; /** * @@ -77,7 +77,7 @@ public function __construct( ?string $message = null, ?string $discountCode = null, ?string $reason = null, - ?string $dicountCodeId = null, + ?string $discountCodeId = null, ?DateTimeImmutable $validFrom = null, ?DateTimeImmutable $validUntil = null, ?DateTimeImmutable $validityCheckTime = null, @@ -86,7 +86,7 @@ public function __construct( $this->message = $message; $this->discountCode = $discountCode; $this->reason = $reason; - $this->dicountCodeId = $dicountCodeId; + $this->discountCodeId = $discountCodeId; $this->validFrom = $validFrom; $this->validUntil = $validUntil; $this->validityCheckTime = $validityCheckTime; @@ -112,6 +112,8 @@ public function getCode() } /** + *

"The discountCode $discountCodeId cannot be applied to the cart."

+ * * * @return null|string */ @@ -130,6 +132,8 @@ public function getMessage() } /** + *

Discount Code passed to the Cart.

+ * * * @return null|string */ @@ -148,6 +152,8 @@ public function getDiscountCode() } /** + *

"DoesNotExist" or "TimeRangeNonApplicable"

+ * * * @return null|string */ @@ -166,24 +172,28 @@ public function getReason() } /** + *

Unique identifier of the Discount Code.

+ * * * @return null|string */ - public function getDicountCodeId() + public function getDiscountCodeId() { - if (is_null($this->dicountCodeId)) { + if (is_null($this->discountCodeId)) { /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_DICOUNT_CODE_ID); + $data = $this->raw(self::FIELD_DISCOUNT_CODE_ID); if (is_null($data)) { return null; } - $this->dicountCodeId = (string) $data; + $this->discountCodeId = (string) $data; } - return $this->dicountCodeId; + return $this->discountCodeId; } /** + *

Date and time (UTC) from which the Discount Code is valid.

+ * * * @return null|DateTimeImmutable */ @@ -206,6 +216,8 @@ public function getValidFrom() } /** + *

Date and time (UTC) until which the Discount Code is valid.

+ * * * @return null|DateTimeImmutable */ @@ -228,6 +240,8 @@ public function getValidUntil() } /** + *

Date and time (UTC) the Discount Code validity check was last performed.

+ * * * @return null|DateTimeImmutable */ @@ -275,11 +289,11 @@ public function setReason(?string $reason): void } /** - * @param ?string $dicountCodeId + * @param ?string $discountCodeId */ - public function setDicountCodeId(?string $dicountCodeId): void + public function setDiscountCodeId(?string $discountCodeId): void { - $this->dicountCodeId = $dicountCodeId; + $this->discountCodeId = $discountCodeId; } /** diff --git a/lib/commercetools-api/src/Models/Error/DuplicateAttributeValueError.php b/lib/commercetools-api/src/Models/Error/DuplicateAttributeValueError.php index 04f09faebbe..8bab553217f 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateAttributeValueError.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateAttributeValueError.php @@ -18,10 +18,31 @@ interface DuplicateAttributeValueError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"Attribute can't have the same value in a different variant."

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

Conflicting Attributes.

+ * + * @return null|Attribute */ public function getAttribute(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?Attribute $attribute */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicateAttributeValueErrorBuilder.php b/lib/commercetools-api/src/Models/Error/DuplicateAttributeValueErrorBuilder.php index edb972c6fa1..75ed42382ef 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateAttributeValueErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateAttributeValueErrorBuilder.php @@ -35,6 +35,8 @@ final class DuplicateAttributeValueErrorBuilder implements Builder private $attribute; /** + *

"Attribute can't have the same value in a different variant."

+ * * @return null|string */ @@ -44,6 +46,8 @@ public function getMessage() } /** + *

Conflicting Attributes.

+ * * @return null|Attribute */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicateAttributeValueErrorModel.php b/lib/commercetools-api/src/Models/Error/DuplicateAttributeValueErrorModel.php index 082888b6248..23a45d6224a 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateAttributeValueErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateAttributeValueErrorModel.php @@ -73,6 +73,8 @@ public function getCode() } /** + *

"Attribute can't have the same value in a different variant."

+ * * * @return null|string */ @@ -91,6 +93,8 @@ public function getMessage() } /** + *

Conflicting Attributes.

+ * * * @return null|Attribute */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicateAttributeValuesError.php b/lib/commercetools-api/src/Models/Error/DuplicateAttributeValuesError.php index 70b26289f77..854614408c4 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateAttributeValuesError.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateAttributeValuesError.php @@ -18,10 +18,31 @@ interface DuplicateAttributeValuesError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"The set of attributes must be unique across all variants."

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

Conflicting Attributes.

+ * + * @return null|AttributeCollection */ public function getAttributes(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?AttributeCollection $attributes */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicateAttributeValuesErrorBuilder.php b/lib/commercetools-api/src/Models/Error/DuplicateAttributeValuesErrorBuilder.php index a96aacab33a..b15148ff84c 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateAttributeValuesErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateAttributeValuesErrorBuilder.php @@ -34,6 +34,8 @@ final class DuplicateAttributeValuesErrorBuilder implements Builder private $attributes; /** + *

"The set of attributes must be unique across all variants."

+ * * @return null|string */ @@ -43,6 +45,8 @@ public function getMessage() } /** + *

Conflicting Attributes.

+ * * @return null|AttributeCollection */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicateAttributeValuesErrorModel.php b/lib/commercetools-api/src/Models/Error/DuplicateAttributeValuesErrorModel.php index 78efb082886..fc84624adf6 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateAttributeValuesErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateAttributeValuesErrorModel.php @@ -72,6 +72,8 @@ public function getCode() } /** + *

"The set of attributes must be unique across all variants."

+ * * * @return null|string */ @@ -90,6 +92,8 @@ public function getMessage() } /** + *

Conflicting Attributes.

+ * * * @return null|AttributeCollection */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicateEnumValuesError.php b/lib/commercetools-api/src/Models/Error/DuplicateEnumValuesError.php index 5333652d305..43d4b3c2bb3 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateEnumValuesError.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateEnumValuesError.php @@ -17,10 +17,31 @@ interface DuplicateEnumValuesError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"The enum values contain duplicate keys: $listOfDuplicateKeys."

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

Duplicate keys.

+ * + * @return null|array */ public function getDuplicates(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?array $duplicates */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicateEnumValuesErrorBuilder.php b/lib/commercetools-api/src/Models/Error/DuplicateEnumValuesErrorBuilder.php index 7bd15e87aa0..ee7ee341194 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateEnumValuesErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateEnumValuesErrorBuilder.php @@ -33,6 +33,8 @@ final class DuplicateEnumValuesErrorBuilder implements Builder private $duplicates; /** + *

"The enum values contain duplicate keys: $listOfDuplicateKeys."

+ * * @return null|string */ @@ -42,6 +44,8 @@ public function getMessage() } /** + *

Duplicate keys.

+ * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicateEnumValuesErrorModel.php b/lib/commercetools-api/src/Models/Error/DuplicateEnumValuesErrorModel.php index 55ea4e8e8d0..b961fb4e4af 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateEnumValuesErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateEnumValuesErrorModel.php @@ -71,6 +71,8 @@ public function getCode() } /** + *

"The enum values contain duplicate keys: $listOfDuplicateKeys."

+ * * * @return null|string */ @@ -89,6 +91,8 @@ public function getMessage() } /** + *

Duplicate keys.

+ * * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicateFieldError.php b/lib/commercetools-api/src/Models/Error/DuplicateFieldError.php index 7e0fa2c8ff5..d63d98aab52 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateFieldError.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateFieldError.php @@ -8,7 +8,6 @@ namespace Commercetools\Api\Models\Error; -use Commercetools\Api\Models\Common\Reference; use Commercetools\Base\DateTimeImmutableCollection; use Commercetools\Base\JsonObject; @@ -16,27 +15,41 @@ interface DuplicateFieldError extends ErrorObject { public const FIELD_FIELD = 'field'; public const FIELD_DUPLICATE_VALUE = 'duplicateValue'; - public const FIELD_CONFLICTING_RESOURCE = 'conflictingResource'; /** + * @return null|string + */ + public function getCode(); + + /** + *

"A duplicate value $duplicateValue exists for field $field."

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

Name of the conflicting field.

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

Conflicting duplicate value.

+ * * @return null|mixed */ public function getDuplicateValue(); /** - *

A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

- * - - * @return null|Reference + * @param ?string $message */ - public function getConflictingResource(); + public function setMessage(?string $message): void; /** * @param ?string $field @@ -47,9 +60,4 @@ public function setField(?string $field): void; * @param mixed $duplicateValue */ public function setDuplicateValue($duplicateValue): void; - - /** - * @param ?Reference $conflictingResource - */ - public function setConflictingResource(?Reference $conflictingResource): void; } diff --git a/lib/commercetools-api/src/Models/Error/DuplicateFieldErrorBuilder.php b/lib/commercetools-api/src/Models/Error/DuplicateFieldErrorBuilder.php index 1aa97396b4d..e4964351dec 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateFieldErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateFieldErrorBuilder.php @@ -8,8 +8,6 @@ namespace Commercetools\Api\Models\Error; -use Commercetools\Api\Models\Common\Reference; -use Commercetools\Api\Models\Common\ReferenceBuilder; use Commercetools\Base\Builder; use Commercetools\Base\DateTimeImmutableCollection; use Commercetools\Base\JsonObject; @@ -41,12 +39,8 @@ final class DuplicateFieldErrorBuilder implements Builder private $duplicateValue; /** - - * @var null|Reference|ReferenceBuilder - */ - private $conflictingResource; - - /** + *

"A duplicate value $duplicateValue exists for field $field."

+ * * @return null|string */ @@ -56,6 +50,8 @@ public function getMessage() } /** + *

Name of the conflicting field.

+ * * @return null|string */ @@ -65,6 +61,8 @@ public function getField() } /** + *

Conflicting duplicate value.

+ * * @return null|mixed */ @@ -73,17 +71,6 @@ public function getDuplicateValue() return $this->duplicateValue; } - /** - *

A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

- * - - * @return null|Reference - */ - public function getConflictingResource() - { - return $this->conflictingResource instanceof ReferenceBuilder ? $this->conflictingResource->build() : $this->conflictingResource; - } - /** * @param ?string $message * @return $this @@ -117,35 +104,13 @@ public function withDuplicateValue($duplicateValue) return $this; } - /** - * @param ?Reference $conflictingResource - * @return $this - */ - public function withConflictingResource(?Reference $conflictingResource) - { - $this->conflictingResource = $conflictingResource; - - return $this; - } - - /** - * @deprecated use withConflictingResource() instead - * @return $this - */ - public function withConflictingResourceBuilder(?ReferenceBuilder $conflictingResource) - { - $this->conflictingResource = $conflictingResource; - - return $this; - } public function build(): DuplicateFieldError { return new DuplicateFieldErrorModel( $this->message, $this->field, - $this->duplicateValue, - $this->conflictingResource instanceof ReferenceBuilder ? $this->conflictingResource->build() : $this->conflictingResource + $this->duplicateValue ); } diff --git a/lib/commercetools-api/src/Models/Error/DuplicateFieldErrorModel.php b/lib/commercetools-api/src/Models/Error/DuplicateFieldErrorModel.php index 21f1273ae4c..700756468a7 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateFieldErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateFieldErrorModel.php @@ -8,8 +8,6 @@ namespace Commercetools\Api\Models\Error; -use Commercetools\Api\Models\Common\Reference; -use Commercetools\Api\Models\Common\ReferenceModel; use Commercetools\Base\DateTimeImmutableCollection; use Commercetools\Base\JsonObject; use Commercetools\Base\JsonObjectModel; @@ -46,12 +44,6 @@ final class DuplicateFieldErrorModel extends JsonObjectModel implements Duplicat */ protected $duplicateValue; - /** - * - * @var ?Reference - */ - protected $conflictingResource; - /** * @psalm-suppress MissingParamType @@ -60,13 +52,11 @@ public function __construct( ?string $message = null, ?string $field = null, $duplicateValue = null, - ?Reference $conflictingResource = null, ?string $code = null ) { $this->message = $message; $this->field = $field; $this->duplicateValue = $duplicateValue; - $this->conflictingResource = $conflictingResource; $this->code = $code ?? self::DISCRIMINATOR_VALUE; } @@ -89,6 +79,8 @@ public function getCode() } /** + *

"A duplicate value $duplicateValue exists for field $field."

+ * * * @return null|string */ @@ -107,6 +99,8 @@ public function getMessage() } /** + *

Name of the conflicting field.

+ * * * @return null|string */ @@ -125,6 +119,8 @@ public function getField() } /** + *

Conflicting duplicate value.

+ * * * @return null|mixed */ @@ -142,27 +138,6 @@ public function getDuplicateValue() return $this->duplicateValue; } - /** - *

A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

- * - * - * @return null|Reference - */ - public function getConflictingResource() - { - if (is_null($this->conflictingResource)) { - /** @psalm-var stdClass|array|null $data */ - $data = $this->raw(self::FIELD_CONFLICTING_RESOURCE); - if (is_null($data)) { - return null; - } - $className = ReferenceModel::resolveDiscriminatorClass($data); - $this->conflictingResource = $className::of($data); - } - - return $this->conflictingResource; - } - /** * @param ?string $message @@ -188,14 +163,6 @@ public function setDuplicateValue($duplicateValue): void $this->duplicateValue = $duplicateValue; } - /** - * @param ?Reference $conflictingResource - */ - public function setConflictingResource(?Reference $conflictingResource): void - { - $this->conflictingResource = $conflictingResource; - } - /** * @return mixed */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicateFieldWithConflictingResourceError.php b/lib/commercetools-api/src/Models/Error/DuplicateFieldWithConflictingResourceError.php index 4530c98f849..54910dbc2d1 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateFieldWithConflictingResourceError.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateFieldWithConflictingResourceError.php @@ -20,24 +20,47 @@ interface DuplicateFieldWithConflictingResourceError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"A duplicate value $duplicateValue exists for field $field on $conflictingResource."

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

Name of the conflicting field.

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

Conflicting duplicate value.

+ * * @return null|mixed */ public function getDuplicateValue(); /** - *

A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

+ *

Reference to the resource that has the conflicting value.

* * @return null|Reference */ public function getConflictingResource(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?string $field */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicateFieldWithConflictingResourceErrorBuilder.php b/lib/commercetools-api/src/Models/Error/DuplicateFieldWithConflictingResourceErrorBuilder.php index d776098e26b..8d468ae897d 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateFieldWithConflictingResourceErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateFieldWithConflictingResourceErrorBuilder.php @@ -47,6 +47,8 @@ final class DuplicateFieldWithConflictingResourceErrorBuilder implements Builder private $conflictingResource; /** + *

"A duplicate value $duplicateValue exists for field $field on $conflictingResource."

+ * * @return null|string */ @@ -56,6 +58,8 @@ public function getMessage() } /** + *

Name of the conflicting field.

+ * * @return null|string */ @@ -65,6 +69,8 @@ public function getField() } /** + *

Conflicting duplicate value.

+ * * @return null|mixed */ @@ -74,7 +80,7 @@ public function getDuplicateValue() } /** - *

A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

+ *

Reference to the resource that has the conflicting value.

* * @return null|Reference diff --git a/lib/commercetools-api/src/Models/Error/DuplicateFieldWithConflictingResourceErrorModel.php b/lib/commercetools-api/src/Models/Error/DuplicateFieldWithConflictingResourceErrorModel.php index d8b53da5ff0..b83f53c1a42 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateFieldWithConflictingResourceErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateFieldWithConflictingResourceErrorModel.php @@ -89,6 +89,8 @@ public function getCode() } /** + *

"A duplicate value $duplicateValue exists for field $field on $conflictingResource."

+ * * * @return null|string */ @@ -107,6 +109,8 @@ public function getMessage() } /** + *

Name of the conflicting field.

+ * * * @return null|string */ @@ -125,6 +129,8 @@ public function getField() } /** + *

Conflicting duplicate value.

+ * * * @return null|mixed */ @@ -143,7 +149,7 @@ public function getDuplicateValue() } /** - *

A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

+ *

Reference to the resource that has the conflicting value.

* * * @return null|Reference diff --git a/lib/commercetools-api/src/Models/Error/DuplicatePriceScopeError.php b/lib/commercetools-api/src/Models/Error/DuplicatePriceScopeError.php index e9c75b5182a..dcf452d7363 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicatePriceScopeError.php +++ b/lib/commercetools-api/src/Models/Error/DuplicatePriceScopeError.php @@ -18,10 +18,31 @@ interface DuplicatePriceScopeError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"Duplicate price scope: $priceScope. The combination of currency, country, customerGroup and channel must be unique for each price of a product variant."

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

Conflicting Embedded Prices.

+ * + * @return null|PriceCollection */ public function getConflictingPrices(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?PriceCollection $conflictingPrices */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicatePriceScopeErrorBuilder.php b/lib/commercetools-api/src/Models/Error/DuplicatePriceScopeErrorBuilder.php index 6a68c3a3607..a9ee0555f82 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicatePriceScopeErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/DuplicatePriceScopeErrorBuilder.php @@ -34,6 +34,8 @@ final class DuplicatePriceScopeErrorBuilder implements Builder private $conflictingPrices; /** + *

"Duplicate price scope: $priceScope. The combination of currency, country, customerGroup and channel must be unique for each price of a product variant."

+ * * @return null|string */ @@ -43,6 +45,8 @@ public function getMessage() } /** + *

Conflicting Embedded Prices.

+ * * @return null|PriceCollection */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicatePriceScopeErrorModel.php b/lib/commercetools-api/src/Models/Error/DuplicatePriceScopeErrorModel.php index 95dd13e798c..40862d114be 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicatePriceScopeErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/DuplicatePriceScopeErrorModel.php @@ -72,6 +72,8 @@ public function getCode() } /** + *

"Duplicate price scope: $priceScope. The combination of currency, country, customerGroup and channel must be unique for each price of a product variant."

+ * * * @return null|string */ @@ -90,6 +92,8 @@ public function getMessage() } /** + *

Conflicting Embedded Prices.

+ * * * @return null|PriceCollection */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicateStandalonePriceScopeError.php b/lib/commercetools-api/src/Models/Error/DuplicateStandalonePriceScopeError.php index f718631fd8b..59a4d7201f9 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateStandalonePriceScopeError.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateStandalonePriceScopeError.php @@ -27,7 +27,21 @@ interface DuplicateStandalonePriceScopeError extends ErrorObject public const FIELD_VALID_UNTIL = 'validUntil'; /** - *

Reference to a StandalonePrice.

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

"Duplicate standalone price scope for SKU: $sku. The combination of SKU, currency, country, customerGroup, channel, validFrom and validUntil must be unique for each standalone price."

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

Reference to the conflicting Standalone Price.

* * @return null|StandalonePriceReference @@ -35,25 +49,31 @@ interface DuplicateStandalonePriceScopeError extends ErrorObject public function getConflictingStandalonePrice(); /** + *

SKU of the ProductVariant to which the conflicting Standalone Price is associated.

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

Currency code of the country.

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

Country code of the geographic location.

+ * * @return null|string */ public function getCountry(); /** - *

ResourceIdentifier to a CustomerGroup.

+ *

CustomerGroup for which the Standalone Price is valid.

* * @return null|CustomerGroupResourceIdentifier @@ -61,7 +81,7 @@ public function getCountry(); public function getCustomerGroup(); /** - *

ResourceIdentifier to a Channel.

+ *

Channel for which the Standalone Price is valid.

* * @return null|ChannelResourceIdentifier @@ -69,17 +89,26 @@ public function getCustomerGroup(); public function getChannel(); /** + *

Date and time (UTC) from which the Standalone Price is valid.

+ * * @return null|DateTimeImmutable */ public function getValidFrom(); /** + *

Date and time (UTC) until which the Standalone Price is valid.

+ * * @return null|DateTimeImmutable */ public function getValidUntil(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?StandalonePriceReference $conflictingStandalonePrice */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicateStandalonePriceScopeErrorBuilder.php b/lib/commercetools-api/src/Models/Error/DuplicateStandalonePriceScopeErrorBuilder.php index b298a6b26d4..e89558d46ea 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateStandalonePriceScopeErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateStandalonePriceScopeErrorBuilder.php @@ -82,6 +82,8 @@ final class DuplicateStandalonePriceScopeErrorBuilder implements Builder private $validUntil; /** + *

"Duplicate standalone price scope for SKU: $sku. The combination of SKU, currency, country, customerGroup, channel, validFrom and validUntil must be unique for each standalone price."

+ * * @return null|string */ @@ -91,7 +93,7 @@ public function getMessage() } /** - *

Reference to a StandalonePrice.

+ *

Reference to the conflicting Standalone Price.

* * @return null|StandalonePriceReference @@ -102,6 +104,8 @@ public function getConflictingStandalonePrice() } /** + *

SKU of the ProductVariant to which the conflicting Standalone Price is associated.

+ * * @return null|string */ @@ -111,6 +115,8 @@ public function getSku() } /** + *

Currency code of the country.

+ * * @return null|string */ @@ -120,6 +126,8 @@ public function getCurrency() } /** + *

Country code of the geographic location.

+ * * @return null|string */ @@ -129,7 +137,7 @@ public function getCountry() } /** - *

ResourceIdentifier to a CustomerGroup.

+ *

CustomerGroup for which the Standalone Price is valid.

* * @return null|CustomerGroupResourceIdentifier @@ -140,7 +148,7 @@ public function getCustomerGroup() } /** - *

ResourceIdentifier to a Channel.

+ *

Channel for which the Standalone Price is valid.

* * @return null|ChannelResourceIdentifier @@ -151,6 +159,8 @@ public function getChannel() } /** + *

Date and time (UTC) from which the Standalone Price is valid.

+ * * @return null|DateTimeImmutable */ @@ -160,6 +170,8 @@ public function getValidFrom() } /** + *

Date and time (UTC) until which the Standalone Price is valid.

+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicateStandalonePriceScopeErrorModel.php b/lib/commercetools-api/src/Models/Error/DuplicateStandalonePriceScopeErrorModel.php index 947b4ee3f1f..bcb16b75257 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateStandalonePriceScopeErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateStandalonePriceScopeErrorModel.php @@ -134,6 +134,8 @@ public function getCode() } /** + *

"Duplicate standalone price scope for SKU: $sku. The combination of SKU, currency, country, customerGroup, channel, validFrom and validUntil must be unique for each standalone price."

+ * * * @return null|string */ @@ -152,7 +154,7 @@ public function getMessage() } /** - *

Reference to a StandalonePrice.

+ *

Reference to the conflicting Standalone Price.

* * * @return null|StandalonePriceReference @@ -173,6 +175,8 @@ public function getConflictingStandalonePrice() } /** + *

SKU of the ProductVariant to which the conflicting Standalone Price is associated.

+ * * * @return null|string */ @@ -191,6 +195,8 @@ public function getSku() } /** + *

Currency code of the country.

+ * * * @return null|string */ @@ -209,6 +215,8 @@ public function getCurrency() } /** + *

Country code of the geographic location.

+ * * * @return null|string */ @@ -227,7 +235,7 @@ public function getCountry() } /** - *

ResourceIdentifier to a CustomerGroup.

+ *

CustomerGroup for which the Standalone Price is valid.

* * * @return null|CustomerGroupResourceIdentifier @@ -248,7 +256,7 @@ public function getCustomerGroup() } /** - *

ResourceIdentifier to a Channel.

+ *

Channel for which the Standalone Price is valid.

* * * @return null|ChannelResourceIdentifier @@ -269,6 +277,8 @@ public function getChannel() } /** + *

Date and time (UTC) from which the Standalone Price is valid.

+ * * * @return null|DateTimeImmutable */ @@ -291,6 +301,8 @@ public function getValidFrom() } /** + *

Date and time (UTC) until which the Standalone Price is valid.

+ * * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicateVariantValuesError.php b/lib/commercetools-api/src/Models/Error/DuplicateVariantValuesError.php index a03f96d987a..b6170de180d 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateVariantValuesError.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateVariantValuesError.php @@ -17,10 +17,31 @@ interface DuplicateVariantValuesError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"A duplicate combination of the variant values (sku, key, images, prices, attributes) exists."

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

Every Product Variant must have a distinct combination of SKU, prices, and custom Attribute values.

+ * + * @return null|VariantValues */ public function getVariantValues(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?VariantValues $variantValues */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicateVariantValuesErrorBuilder.php b/lib/commercetools-api/src/Models/Error/DuplicateVariantValuesErrorBuilder.php index bec5c96e7ba..fe2193c454b 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateVariantValuesErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateVariantValuesErrorBuilder.php @@ -33,6 +33,8 @@ final class DuplicateVariantValuesErrorBuilder implements Builder private $variantValues; /** + *

"A duplicate combination of the variant values (sku, key, images, prices, attributes) exists."

+ * * @return null|string */ @@ -42,6 +44,8 @@ public function getMessage() } /** + *

Every Product Variant must have a distinct combination of SKU, prices, and custom Attribute values.

+ * * @return null|VariantValues */ diff --git a/lib/commercetools-api/src/Models/Error/DuplicateVariantValuesErrorModel.php b/lib/commercetools-api/src/Models/Error/DuplicateVariantValuesErrorModel.php index ac04ee388b0..5e3e802dda6 100644 --- a/lib/commercetools-api/src/Models/Error/DuplicateVariantValuesErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/DuplicateVariantValuesErrorModel.php @@ -71,6 +71,8 @@ public function getCode() } /** + *

"A duplicate combination of the variant values (sku, key, images, prices, attributes) exists."

+ * * * @return null|string */ @@ -89,6 +91,8 @@ public function getMessage() } /** + *

Every Product Variant must have a distinct combination of SKU, prices, and custom Attribute values.

+ * * * @return null|VariantValues */ diff --git a/lib/commercetools-api/src/Models/Error/EditPreviewFailedError.php b/lib/commercetools-api/src/Models/Error/EditPreviewFailedError.php index 309735ec96f..b75bf26a777 100644 --- a/lib/commercetools-api/src/Models/Error/EditPreviewFailedError.php +++ b/lib/commercetools-api/src/Models/Error/EditPreviewFailedError.php @@ -18,10 +18,31 @@ interface EditPreviewFailedError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"Error while applying staged actions. ShippingMethods could not be determined."

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

State of the OrderEdit where the stagedActions cannot be applied to the Order.

+ * + * @return null|OrderEditPreviewFailure */ public function getResult(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?OrderEditPreviewFailure $result */ diff --git a/lib/commercetools-api/src/Models/Error/EditPreviewFailedErrorBuilder.php b/lib/commercetools-api/src/Models/Error/EditPreviewFailedErrorBuilder.php index a2523d887db..307b38de8d1 100644 --- a/lib/commercetools-api/src/Models/Error/EditPreviewFailedErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/EditPreviewFailedErrorBuilder.php @@ -35,6 +35,8 @@ final class EditPreviewFailedErrorBuilder implements Builder private $result; /** + *

"Error while applying staged actions. ShippingMethods could not be determined."

+ * * @return null|string */ @@ -44,6 +46,8 @@ public function getMessage() } /** + *

State of the OrderEdit where the stagedActions cannot be applied to the Order.

+ * * @return null|OrderEditPreviewFailure */ diff --git a/lib/commercetools-api/src/Models/Error/EditPreviewFailedErrorModel.php b/lib/commercetools-api/src/Models/Error/EditPreviewFailedErrorModel.php index aeb64acd465..955c6b38012 100644 --- a/lib/commercetools-api/src/Models/Error/EditPreviewFailedErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/EditPreviewFailedErrorModel.php @@ -73,6 +73,8 @@ public function getCode() } /** + *

"Error while applying staged actions. ShippingMethods could not be determined."

+ * * * @return null|string */ @@ -91,6 +93,8 @@ public function getMessage() } /** + *

State of the OrderEdit where the stagedActions cannot be applied to the Order.

+ * * * @return null|OrderEditPreviewFailure */ diff --git a/lib/commercetools-api/src/Models/Error/EnumKeyAlreadyExistsError.php b/lib/commercetools-api/src/Models/Error/EnumKeyAlreadyExistsError.php index be527b415ec..12a63e6bc1b 100644 --- a/lib/commercetools-api/src/Models/Error/EnumKeyAlreadyExistsError.php +++ b/lib/commercetools-api/src/Models/Error/EnumKeyAlreadyExistsError.php @@ -18,16 +18,39 @@ interface EnumKeyAlreadyExistsError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"The $attributeName attribute definition already contains an enum value with the key $enumKey."

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

Conflicting enum key.

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

Name of the conflicting Attribute.

+ * * @return null|string */ public function getConflictingAttributeName(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?string $conflictingEnumKey */ diff --git a/lib/commercetools-api/src/Models/Error/EnumKeyAlreadyExistsErrorBuilder.php b/lib/commercetools-api/src/Models/Error/EnumKeyAlreadyExistsErrorBuilder.php index 01d10b1088f..6937ad33ba8 100644 --- a/lib/commercetools-api/src/Models/Error/EnumKeyAlreadyExistsErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/EnumKeyAlreadyExistsErrorBuilder.php @@ -39,6 +39,8 @@ final class EnumKeyAlreadyExistsErrorBuilder implements Builder private $conflictingAttributeName; /** + *

"The $attributeName attribute definition already contains an enum value with the key $enumKey."

+ * * @return null|string */ @@ -48,6 +50,8 @@ public function getMessage() } /** + *

Conflicting enum key.

+ * * @return null|string */ @@ -57,6 +61,8 @@ public function getConflictingEnumKey() } /** + *

Name of the conflicting Attribute.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/EnumKeyAlreadyExistsErrorModel.php b/lib/commercetools-api/src/Models/Error/EnumKeyAlreadyExistsErrorModel.php index 03b00022e7a..cb02c1dda84 100644 --- a/lib/commercetools-api/src/Models/Error/EnumKeyAlreadyExistsErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/EnumKeyAlreadyExistsErrorModel.php @@ -79,6 +79,8 @@ public function getCode() } /** + *

"The $attributeName attribute definition already contains an enum value with the key $enumKey."

+ * * * @return null|string */ @@ -97,6 +99,8 @@ public function getMessage() } /** + *

Conflicting enum key.

+ * * * @return null|string */ @@ -115,6 +119,8 @@ public function getConflictingEnumKey() } /** + *

Name of the conflicting Attribute.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/EnumKeyDoesNotExistError.php b/lib/commercetools-api/src/Models/Error/EnumKeyDoesNotExistError.php index ccd02d54c0e..7294fb7a6e9 100644 --- a/lib/commercetools-api/src/Models/Error/EnumKeyDoesNotExistError.php +++ b/lib/commercetools-api/src/Models/Error/EnumKeyDoesNotExistError.php @@ -18,16 +18,39 @@ interface EnumKeyDoesNotExistError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"The $fieldName field definition does not contain an enum value with the key $enumKey."

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

Conflicting enum key.

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

Name of the conflicting Attribute.

+ * * @return null|string */ public function getConflictingAttributeName(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?string $conflictingEnumKey */ diff --git a/lib/commercetools-api/src/Models/Error/EnumKeyDoesNotExistErrorBuilder.php b/lib/commercetools-api/src/Models/Error/EnumKeyDoesNotExistErrorBuilder.php index 5d7f717fbd2..07e96735e11 100644 --- a/lib/commercetools-api/src/Models/Error/EnumKeyDoesNotExistErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/EnumKeyDoesNotExistErrorBuilder.php @@ -39,6 +39,8 @@ final class EnumKeyDoesNotExistErrorBuilder implements Builder private $conflictingAttributeName; /** + *

"The $fieldName field definition does not contain an enum value with the key $enumKey."

+ * * @return null|string */ @@ -48,6 +50,8 @@ public function getMessage() } /** + *

Conflicting enum key.

+ * * @return null|string */ @@ -57,6 +61,8 @@ public function getConflictingEnumKey() } /** + *

Name of the conflicting Attribute.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/EnumKeyDoesNotExistErrorModel.php b/lib/commercetools-api/src/Models/Error/EnumKeyDoesNotExistErrorModel.php index 14f562d783b..e0921cbd509 100644 --- a/lib/commercetools-api/src/Models/Error/EnumKeyDoesNotExistErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/EnumKeyDoesNotExistErrorModel.php @@ -79,6 +79,8 @@ public function getCode() } /** + *

"The $fieldName field definition does not contain an enum value with the key $enumKey."

+ * * * @return null|string */ @@ -97,6 +99,8 @@ public function getMessage() } /** + *

Conflicting enum key.

+ * * * @return null|string */ @@ -115,6 +119,8 @@ public function getConflictingEnumKey() } /** + *

Name of the conflicting Attribute.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/EnumValueIsUsedError.php b/lib/commercetools-api/src/Models/Error/EnumValueIsUsedError.php index a74f88c9537..d48a00d7610 100644 --- a/lib/commercetools-api/src/Models/Error/EnumValueIsUsedError.php +++ b/lib/commercetools-api/src/Models/Error/EnumValueIsUsedError.php @@ -13,4 +13,22 @@ interface EnumValueIsUsedError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"$enumKeysTranscript is used by some products and cannot be deleted because the $attributeName attribute is required."

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/EnumValueIsUsedErrorBuilder.php b/lib/commercetools-api/src/Models/Error/EnumValueIsUsedErrorBuilder.php index 04b01a9e318..d398d7c01b3 100644 --- a/lib/commercetools-api/src/Models/Error/EnumValueIsUsedErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/EnumValueIsUsedErrorBuilder.php @@ -27,6 +27,8 @@ final class EnumValueIsUsedErrorBuilder implements Builder private $message; /** + *

"$enumKeysTranscript is used by some products and cannot be deleted because the $attributeName attribute is required."

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/EnumValueIsUsedErrorModel.php b/lib/commercetools-api/src/Models/Error/EnumValueIsUsedErrorModel.php index 01cd21b00d9..b25d8b6ce4b 100644 --- a/lib/commercetools-api/src/Models/Error/EnumValueIsUsedErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/EnumValueIsUsedErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

"$enumKeysTranscript is used by some products and cannot be deleted because the $attributeName attribute is required."

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/EnumValuesMustMatchError.php b/lib/commercetools-api/src/Models/Error/EnumValuesMustMatchError.php index 4340beee2ee..fc433470183 100644 --- a/lib/commercetools-api/src/Models/Error/EnumValuesMustMatchError.php +++ b/lib/commercetools-api/src/Models/Error/EnumValuesMustMatchError.php @@ -13,4 +13,22 @@ interface EnumValuesMustMatchError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"The given values must be equal to the existing enum values."

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/EnumValuesMustMatchErrorBuilder.php b/lib/commercetools-api/src/Models/Error/EnumValuesMustMatchErrorBuilder.php index da64336a1f3..5c1fd87fddb 100644 --- a/lib/commercetools-api/src/Models/Error/EnumValuesMustMatchErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/EnumValuesMustMatchErrorBuilder.php @@ -27,6 +27,8 @@ final class EnumValuesMustMatchErrorBuilder implements Builder private $message; /** + *

"The given values must be equal to the existing enum values."

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/EnumValuesMustMatchErrorModel.php b/lib/commercetools-api/src/Models/Error/EnumValuesMustMatchErrorModel.php index 19a544ce00b..a8850d500ca 100644 --- a/lib/commercetools-api/src/Models/Error/EnumValuesMustMatchErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/EnumValuesMustMatchErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

"The given values must be equal to the existing enum values."

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/ErrorObject.php b/lib/commercetools-api/src/Models/Error/ErrorObject.php index 355fc34de4c..0671d378db3 100644 --- a/lib/commercetools-api/src/Models/Error/ErrorObject.php +++ b/lib/commercetools-api/src/Models/Error/ErrorObject.php @@ -19,12 +19,16 @@ interface ErrorObject extends JsonObject public const FIELD_PATTERN2 = '//'; /** + *

Error identifier.

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

Plain text description of the cause of the error.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/ErrorObjectBuilder.php b/lib/commercetools-api/src/Models/Error/ErrorObjectBuilder.php index 7bb7d7dc0ba..9768ac41113 100644 --- a/lib/commercetools-api/src/Models/Error/ErrorObjectBuilder.php +++ b/lib/commercetools-api/src/Models/Error/ErrorObjectBuilder.php @@ -27,6 +27,8 @@ final class ErrorObjectBuilder implements Builder private $message; /** + *

Plain text description of the cause of the error.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/ErrorObjectModel.php b/lib/commercetools-api/src/Models/Error/ErrorObjectModel.php index 57c2a6f5bef..343d29de753 100644 --- a/lib/commercetools-api/src/Models/Error/ErrorObjectModel.php +++ b/lib/commercetools-api/src/Models/Error/ErrorObjectModel.php @@ -43,6 +43,7 @@ final class ErrorObjectModel extends JsonObjectModel implements ErrorObject 'AttributeNameDoesNotExist' => AttributeNameDoesNotExistErrorModel::class, 'BadGateway' => BadGatewayErrorModel::class, 'ConcurrentModification' => ConcurrentModificationErrorModel::class, + 'CountryNotConfiguredInStore' => CountryNotConfiguredInStoreModel::class, 'DiscountCodeNonApplicable' => DiscountCodeNonApplicableErrorModel::class, 'DuplicateAttributeValue' => DuplicateAttributeValueErrorModel::class, 'DuplicateAttributeValues' => DuplicateAttributeValuesErrorModel::class, @@ -59,6 +60,7 @@ final class ErrorObjectModel extends JsonObjectModel implements ErrorObject 'EnumValuesMustMatch' => EnumValuesMustMatchErrorModel::class, 'ExtensionBadResponse' => ExtensionBadResponseErrorModel::class, 'ExtensionNoResponse' => ExtensionNoResponseErrorModel::class, + 'ExtensionPredicateEvaluationFailed' => ExtensionPredicateEvaluationFailedErrorModel::class, 'ExtensionUpdateActionsFailed' => ExtensionUpdateActionsFailedErrorModel::class, 'ExternalOAuthFailed' => ExternalOAuthFailedErrorModel::class, 'FeatureRemoved' => FeatureRemovedErrorModel::class, @@ -85,6 +87,8 @@ final class ErrorObjectModel extends JsonObjectModel implements ErrorObject 'OverlappingStandalonePriceValidity' => OverlappingStandalonePriceValidityErrorModel::class, 'PendingOperation' => PendingOperationErrorModel::class, 'PriceChanged' => PriceChangedErrorModel::class, + 'ProductAssignmentMissing' => ProductAssignmentMissingErrorModel::class, + 'ProductPresentWithDifferentVariantSelection' => ProductPresentWithDifferentVariantSelectionErrorModel::class, 'ProjectNotConfiguredForLanguages' => ProjectNotConfiguredForLanguagesErrorModel::class, 'QueryComplexityLimitExceeded' => QueryComplexityLimitExceededErrorModel::class, 'QueryTimedOut' => QueryTimedOutErrorModel::class, @@ -100,8 +104,6 @@ final class ErrorObjectModel extends JsonObjectModel implements ErrorObject 'SemanticError' => SemanticErrorErrorModel::class, 'ShippingMethodDoesNotMatchCart' => ShippingMethodDoesNotMatchCartErrorModel::class, 'SyntaxError' => SyntaxErrorErrorModel::class, - 'WeakPassword' => WeakPasswordErrorModel::class, - 'access_denied' => AccessDeniedErrorModel::class, 'insufficient_scope' => InsufficientScopeErrorModel::class, 'invalid_token' => InvalidTokenErrorModel::class, ]; @@ -118,6 +120,8 @@ public function __construct( } /** + *

Error identifier.

+ * * * @return null|string */ @@ -136,6 +140,8 @@ public function getCode() } /** + *

Plain text description of the cause of the error.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/ErrorResponse.php b/lib/commercetools-api/src/Models/Error/ErrorResponse.php index 39f50bf299a..18940e2f071 100644 --- a/lib/commercetools-api/src/Models/Error/ErrorResponse.php +++ b/lib/commercetools-api/src/Models/Error/ErrorResponse.php @@ -15,35 +15,28 @@ interface ErrorResponse extends JsonObject { public const FIELD_STATUS_CODE = 'statusCode'; public const FIELD_MESSAGE = 'message'; - public const FIELD_ERROR = 'error'; - public const FIELD_ERROR_DESCRIPTION = 'error_description'; public const FIELD_ERRORS = 'errors'; /** + *

HTTP status code corresponding to the error.

+ * * @return null|int */ public function getStatusCode(); /** + *

First error message in the errors array.

+ * * @return null|string */ public function getMessage(); /** - - * @return null|string - */ - public function getError(); - - /** - - * @return null|string - */ - public function getError_description(); - - /** + *

Errors returned for a request.

+ *

A single error response can contain multiple errors if the errors are related to the same HTTP status code such as 400.

+ * * @return null|ErrorObjectCollection */ @@ -59,16 +52,6 @@ public function setStatusCode(?int $statusCode): void; */ public function setMessage(?string $message): void; - /** - * @param ?string $error - */ - public function setError(?string $error): void; - - /** - * @param ?string $error_description - */ - public function setError_description(?string $error_description): void; - /** * @param ?ErrorObjectCollection $errors */ diff --git a/lib/commercetools-api/src/Models/Error/ErrorResponseBuilder.php b/lib/commercetools-api/src/Models/Error/ErrorResponseBuilder.php index 173174af6e3..6567bc1fb60 100644 --- a/lib/commercetools-api/src/Models/Error/ErrorResponseBuilder.php +++ b/lib/commercetools-api/src/Models/Error/ErrorResponseBuilder.php @@ -32,18 +32,6 @@ final class ErrorResponseBuilder implements Builder */ private $message; - /** - - * @var ?string - */ - private $error; - - /** - - * @var ?string - */ - private $error_description; - /** * @var ?ErrorObjectCollection @@ -51,6 +39,8 @@ final class ErrorResponseBuilder implements Builder private $errors; /** + *

HTTP status code corresponding to the error.

+ * * @return null|int */ @@ -60,6 +50,8 @@ public function getStatusCode() } /** + *

First error message in the errors array.

+ * * @return null|string */ @@ -69,24 +61,9 @@ public function getMessage() } /** - - * @return null|string - */ - public function getError() - { - return $this->error; - } - - /** - - * @return null|string - */ - public function getError_description() - { - return $this->error_description; - } - - /** + *

Errors returned for a request.

+ *

A single error response can contain multiple errors if the errors are related to the same HTTP status code such as 400.

+ * * @return null|ErrorObjectCollection */ @@ -117,28 +94,6 @@ public function withMessage(?string $message) return $this; } - /** - * @param ?string $error - * @return $this - */ - public function withError(?string $error) - { - $this->error = $error; - - return $this; - } - - /** - * @param ?string $error_description - * @return $this - */ - public function withError_description(?string $error_description) - { - $this->error_description = $error_description; - - return $this; - } - /** * @param ?ErrorObjectCollection $errors * @return $this @@ -156,8 +111,6 @@ public function build(): ErrorResponse return new ErrorResponseModel( $this->statusCode, $this->message, - $this->error, - $this->error_description, $this->errors ); } diff --git a/lib/commercetools-api/src/Models/Error/ErrorResponseCollection.php b/lib/commercetools-api/src/Models/Error/ErrorResponseCollection.php index db715d17f75..10ea1efaa0c 100644 --- a/lib/commercetools-api/src/Models/Error/ErrorResponseCollection.php +++ b/lib/commercetools-api/src/Models/Error/ErrorResponseCollection.php @@ -13,7 +13,11 @@ use stdClass; /** - * @extends MapperSequence + * @template T of ErrorResponse + * @extends MapperSequence + * @psalm-method T current() + * @psalm-method T end() + * @psalm-method T at($offset) * @method ErrorResponse current() * @method ErrorResponse end() * @method ErrorResponse at($offset) @@ -21,8 +25,8 @@ class ErrorResponseCollection extends MapperSequence { /** - * @psalm-assert ErrorResponse $value - * @psalm-param ErrorResponse|stdClass $value + * @psalm-assert T $value + * @psalm-param T|stdClass $value * @throws InvalidArgumentException * * @return ErrorResponseCollection @@ -38,14 +42,14 @@ public function add($value) } /** - * @psalm-return callable(int):?ErrorResponse + * @psalm-return callable(int):?T */ protected function mapper() { return function (?int $index): ?ErrorResponse { $data = $this->get($index); if ($data instanceof stdClass) { - /** @var ErrorResponse $data */ + /** @var T $data */ $data = ErrorResponseModel::of($data); $this->set($data, $index); } diff --git a/lib/commercetools-api/src/Models/Error/ErrorResponseModel.php b/lib/commercetools-api/src/Models/Error/ErrorResponseModel.php index e1c03f73e69..b39bde6905b 100644 --- a/lib/commercetools-api/src/Models/Error/ErrorResponseModel.php +++ b/lib/commercetools-api/src/Models/Error/ErrorResponseModel.php @@ -31,18 +31,6 @@ final class ErrorResponseModel extends JsonObjectModel implements ErrorResponse */ protected $message; - /** - * - * @var ?string - */ - protected $error; - - /** - * - * @var ?string - */ - protected $error_description; - /** * * @var ?ErrorObjectCollection @@ -56,18 +44,16 @@ final class ErrorResponseModel extends JsonObjectModel implements ErrorResponse public function __construct( ?int $statusCode = null, ?string $message = null, - ?string $error = null, - ?string $error_description = null, ?ErrorObjectCollection $errors = null ) { $this->statusCode = $statusCode; $this->message = $message; - $this->error = $error; - $this->error_description = $error_description; $this->errors = $errors; } /** + *

HTTP status code corresponding to the error.

+ * * * @return null|int */ @@ -86,6 +72,8 @@ public function getStatusCode() } /** + *

First error message in the errors array.

+ * * * @return null|string */ @@ -104,42 +92,9 @@ public function getMessage() } /** + *

Errors returned for a request.

+ *

A single error response can contain multiple errors if the errors are related to the same HTTP status code such as 400.

* - * @return null|string - */ - public function getError() - { - if (is_null($this->error)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_ERROR); - if (is_null($data)) { - return null; - } - $this->error = (string) $data; - } - - return $this->error; - } - - /** - * - * @return null|string - */ - public function getError_description() - { - if (is_null($this->error_description)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_ERROR_DESCRIPTION); - if (is_null($data)) { - return null; - } - $this->error_description = (string) $data; - } - - return $this->error_description; - } - - /** * * @return null|ErrorObjectCollection */ @@ -174,22 +129,6 @@ public function setMessage(?string $message): void $this->message = $message; } - /** - * @param ?string $error - */ - public function setError(?string $error): void - { - $this->error = $error; - } - - /** - * @param ?string $error_description - */ - public function setError_description(?string $error_description): void - { - $this->error_description = $error_description; - } - /** * @param ?ErrorObjectCollection $errors */ diff --git a/lib/commercetools-api/src/Models/Error/ExtensionBadResponseError.php b/lib/commercetools-api/src/Models/Error/ExtensionBadResponseError.php index 2692269db81..5a3e3ea1942 100644 --- a/lib/commercetools-api/src/Models/Error/ExtensionBadResponseError.php +++ b/lib/commercetools-api/src/Models/Error/ExtensionBadResponseError.php @@ -16,10 +16,28 @@ interface ExtensionBadResponseError extends ErrorObject { public const FIELD_LOCALIZED_MESSAGE = 'localizedMessage'; public const FIELD_EXTENSION_EXTRA_INFO = 'extensionExtraInfo'; - public const FIELD_ERROR_BY_EXTENSION = 'errorByExtension'; + public const FIELD_EXTENSION_ERRORS = 'extensionErrors'; + public const FIELD_EXTENSION_BODY = 'extensionBody'; + public const FIELD_EXTENSION_STATUS_CODE = 'extensionStatusCode'; + public const FIELD_EXTENSION_ID = 'extensionId'; + public const FIELD_EXTENSION_KEY = 'extensionKey'; /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

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

Description of the invalid Extension response. For example, "The extension did not return the expected JSON.".

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

User-defined localized description of the error.

* * @return null|LocalizedString @@ -27,16 +45,57 @@ interface ExtensionBadResponseError extends ErrorObject public function getLocalizedMessage(); /** + *

Any information that should be returned to the API caller.

+ * * @return null|mixed */ public function getExtensionExtraInfo(); /** + *

Additional errors related to the API Extension.

+ * + + * @return null|ExtensionErrorCollection + */ + public function getExtensionErrors(); + + /** + *

The response body returned by the Extension.

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

Http status code returned by the Extension.

+ * + + * @return null|int + */ + public function getExtensionStatusCode(); + + /** + *

Unique identifier of the Extension.

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

User-defined unique identifier of the Extension.

+ * + + * @return null|string + */ + public function getExtensionKey(); - * @return null|ErrorByExtension + /** + * @param ?string $message */ - public function getErrorByExtension(); + public function setMessage(?string $message): void; /** * @param ?LocalizedString $localizedMessage @@ -49,7 +108,27 @@ public function setLocalizedMessage(?LocalizedString $localizedMessage): void; public function setExtensionExtraInfo(?JsonObject $extensionExtraInfo): void; /** - * @param ?ErrorByExtension $errorByExtension + * @param ?ExtensionErrorCollection $extensionErrors + */ + public function setExtensionErrors(?ExtensionErrorCollection $extensionErrors): void; + + /** + * @param ?string $extensionBody + */ + public function setExtensionBody(?string $extensionBody): void; + + /** + * @param ?int $extensionStatusCode + */ + public function setExtensionStatusCode(?int $extensionStatusCode): void; + + /** + * @param ?string $extensionId + */ + public function setExtensionId(?string $extensionId): void; + + /** + * @param ?string $extensionKey */ - public function setErrorByExtension(?ErrorByExtension $errorByExtension): void; + public function setExtensionKey(?string $extensionKey): void; } diff --git a/lib/commercetools-api/src/Models/Error/ExtensionBadResponseErrorBuilder.php b/lib/commercetools-api/src/Models/Error/ExtensionBadResponseErrorBuilder.php index 27db5472c67..ff4243a6d86 100644 --- a/lib/commercetools-api/src/Models/Error/ExtensionBadResponseErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/ExtensionBadResponseErrorBuilder.php @@ -42,12 +42,38 @@ final class ExtensionBadResponseErrorBuilder implements Builder /** - * @var null|ErrorByExtension|ErrorByExtensionBuilder + * @var ?ExtensionErrorCollection */ - private $errorByExtension; + private $extensionErrors; /** + * @var ?string + */ + private $extensionBody; + + /** + + * @var ?int + */ + private $extensionStatusCode; + + /** + + * @var ?string + */ + private $extensionId; + + /** + + * @var ?string + */ + private $extensionKey; + + /** + *

Description of the invalid Extension response. For example, "The extension did not return the expected JSON.".

+ * + * @return null|string */ public function getMessage() @@ -56,7 +82,7 @@ public function getMessage() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

User-defined localized description of the error.

* * @return null|LocalizedString @@ -67,6 +93,8 @@ public function getLocalizedMessage() } /** + *

Any information that should be returned to the API caller.

+ * * @return null|JsonObject */ @@ -76,12 +104,58 @@ public function getExtensionExtraInfo() } /** + *

Additional errors related to the API Extension.

+ * - * @return null|ErrorByExtension + * @return null|ExtensionErrorCollection */ - public function getErrorByExtension() + public function getExtensionErrors() { - return $this->errorByExtension instanceof ErrorByExtensionBuilder ? $this->errorByExtension->build() : $this->errorByExtension; + return $this->extensionErrors; + } + + /** + *

The response body returned by the Extension.

+ * + + * @return null|string + */ + public function getExtensionBody() + { + return $this->extensionBody; + } + + /** + *

Http status code returned by the Extension.

+ * + + * @return null|int + */ + public function getExtensionStatusCode() + { + return $this->extensionStatusCode; + } + + /** + *

Unique identifier of the Extension.

+ * + + * @return null|string + */ + public function getExtensionId() + { + return $this->extensionId; + } + + /** + *

User-defined unique identifier of the Extension.

+ * + + * @return null|string + */ + public function getExtensionKey() + { + return $this->extensionKey; } /** @@ -118,34 +192,67 @@ public function withExtensionExtraInfo(?JsonObject $extensionExtraInfo) } /** - * @param ?ErrorByExtension $errorByExtension + * @param ?ExtensionErrorCollection $extensionErrors * @return $this */ - public function withErrorByExtension(?ErrorByExtension $errorByExtension) + public function withExtensionErrors(?ExtensionErrorCollection $extensionErrors) { - $this->errorByExtension = $errorByExtension; + $this->extensionErrors = $extensionErrors; return $this; } /** - * @deprecated use withLocalizedMessage() instead + * @param ?string $extensionBody * @return $this */ - public function withLocalizedMessageBuilder(?LocalizedStringBuilder $localizedMessage) + public function withExtensionBody(?string $extensionBody) { - $this->localizedMessage = $localizedMessage; + $this->extensionBody = $extensionBody; return $this; } /** - * @deprecated use withErrorByExtension() instead + * @param ?int $extensionStatusCode * @return $this */ - public function withErrorByExtensionBuilder(?ErrorByExtensionBuilder $errorByExtension) + public function withExtensionStatusCode(?int $extensionStatusCode) { - $this->errorByExtension = $errorByExtension; + $this->extensionStatusCode = $extensionStatusCode; + + return $this; + } + + /** + * @param ?string $extensionId + * @return $this + */ + public function withExtensionId(?string $extensionId) + { + $this->extensionId = $extensionId; + + return $this; + } + + /** + * @param ?string $extensionKey + * @return $this + */ + public function withExtensionKey(?string $extensionKey) + { + $this->extensionKey = $extensionKey; + + return $this; + } + + /** + * @deprecated use withLocalizedMessage() instead + * @return $this + */ + public function withLocalizedMessageBuilder(?LocalizedStringBuilder $localizedMessage) + { + $this->localizedMessage = $localizedMessage; return $this; } @@ -156,7 +263,11 @@ public function build(): ExtensionBadResponseError $this->message, $this->localizedMessage instanceof LocalizedStringBuilder ? $this->localizedMessage->build() : $this->localizedMessage, $this->extensionExtraInfo, - $this->errorByExtension instanceof ErrorByExtensionBuilder ? $this->errorByExtension->build() : $this->errorByExtension + $this->extensionErrors, + $this->extensionBody, + $this->extensionStatusCode, + $this->extensionId, + $this->extensionKey ); } diff --git a/lib/commercetools-api/src/Models/Error/ExtensionBadResponseErrorModel.php b/lib/commercetools-api/src/Models/Error/ExtensionBadResponseErrorModel.php index 8d10872c666..53c9ff63877 100644 --- a/lib/commercetools-api/src/Models/Error/ExtensionBadResponseErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/ExtensionBadResponseErrorModel.php @@ -48,9 +48,33 @@ final class ExtensionBadResponseErrorModel extends JsonObjectModel implements Ex /** * - * @var ?ErrorByExtension + * @var ?ExtensionErrorCollection */ - protected $errorByExtension; + protected $extensionErrors; + + /** + * + * @var ?string + */ + protected $extensionBody; + + /** + * + * @var ?int + */ + protected $extensionStatusCode; + + /** + * + * @var ?string + */ + protected $extensionId; + + /** + * + * @var ?string + */ + protected $extensionKey; /** @@ -60,13 +84,21 @@ public function __construct( ?string $message = null, ?LocalizedString $localizedMessage = null, ?JsonObject $extensionExtraInfo = null, - ?ErrorByExtension $errorByExtension = null, + ?ExtensionErrorCollection $extensionErrors = null, + ?string $extensionBody = null, + ?int $extensionStatusCode = null, + ?string $extensionId = null, + ?string $extensionKey = null, ?string $code = null ) { $this->message = $message; $this->localizedMessage = $localizedMessage; $this->extensionExtraInfo = $extensionExtraInfo; - $this->errorByExtension = $errorByExtension; + $this->extensionErrors = $extensionErrors; + $this->extensionBody = $extensionBody; + $this->extensionStatusCode = $extensionStatusCode; + $this->extensionId = $extensionId; + $this->extensionKey = $extensionKey; $this->code = $code ?? self::DISCRIMINATOR_VALUE; } @@ -89,6 +121,8 @@ public function getCode() } /** + *

Description of the invalid Extension response. For example, "The extension did not return the expected JSON.".

+ * * * @return null|string */ @@ -107,7 +141,7 @@ public function getMessage() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

User-defined localized description of the error.

* * * @return null|LocalizedString @@ -128,6 +162,8 @@ public function getLocalizedMessage() } /** + *

Any information that should be returned to the API caller.

+ * * * @return null|mixed */ @@ -146,22 +182,103 @@ public function getExtensionExtraInfo() } /** + *

Additional errors related to the API Extension.

* - * @return null|ErrorByExtension + * + * @return null|ExtensionErrorCollection */ - public function getErrorByExtension() + public function getExtensionErrors() { - if (is_null($this->errorByExtension)) { - /** @psalm-var stdClass|array|null $data */ - $data = $this->raw(self::FIELD_ERROR_BY_EXTENSION); + if (is_null($this->extensionErrors)) { + /** @psalm-var ?list $data */ + $data = $this->raw(self::FIELD_EXTENSION_ERRORS); + if (is_null($data)) { + return null; + } + $this->extensionErrors = ExtensionErrorCollection::fromArray($data); + } + + return $this->extensionErrors; + } + + /** + *

The response body returned by the Extension.

+ * + * + * @return null|string + */ + public function getExtensionBody() + { + if (is_null($this->extensionBody)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_EXTENSION_BODY); + if (is_null($data)) { + return null; + } + $this->extensionBody = (string) $data; + } + + return $this->extensionBody; + } + + /** + *

Http status code returned by the Extension.

+ * + * + * @return null|int + */ + public function getExtensionStatusCode() + { + if (is_null($this->extensionStatusCode)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_EXTENSION_STATUS_CODE); + if (is_null($data)) { + return null; + } + $this->extensionStatusCode = (int) $data; + } + + return $this->extensionStatusCode; + } + + /** + *

Unique identifier of the Extension.

+ * + * + * @return null|string + */ + public function getExtensionId() + { + if (is_null($this->extensionId)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_EXTENSION_ID); if (is_null($data)) { return null; } + $this->extensionId = (string) $data; + } + + return $this->extensionId; + } - $this->errorByExtension = ErrorByExtensionModel::of($data); + /** + *

User-defined unique identifier of the Extension.

+ * + * + * @return null|string + */ + public function getExtensionKey() + { + if (is_null($this->extensionKey)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_EXTENSION_KEY); + if (is_null($data)) { + return null; + } + $this->extensionKey = (string) $data; } - return $this->errorByExtension; + return $this->extensionKey; } @@ -190,11 +307,43 @@ public function setExtensionExtraInfo(?JsonObject $extensionExtraInfo): void } /** - * @param ?ErrorByExtension $errorByExtension + * @param ?ExtensionErrorCollection $extensionErrors + */ + public function setExtensionErrors(?ExtensionErrorCollection $extensionErrors): void + { + $this->extensionErrors = $extensionErrors; + } + + /** + * @param ?string $extensionBody + */ + public function setExtensionBody(?string $extensionBody): void + { + $this->extensionBody = $extensionBody; + } + + /** + * @param ?int $extensionStatusCode + */ + public function setExtensionStatusCode(?int $extensionStatusCode): void + { + $this->extensionStatusCode = $extensionStatusCode; + } + + /** + * @param ?string $extensionId + */ + public function setExtensionId(?string $extensionId): void + { + $this->extensionId = $extensionId; + } + + /** + * @param ?string $extensionKey */ - public function setErrorByExtension(?ErrorByExtension $errorByExtension): void + public function setExtensionKey(?string $extensionKey): void { - $this->errorByExtension = $errorByExtension; + $this->extensionKey = $extensionKey; } /** diff --git a/lib/commercetools-api/src/Models/Error/ExtensionError.php b/lib/commercetools-api/src/Models/Error/ExtensionError.php new file mode 100644 index 00000000000..993e7a578e7 --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/ExtensionError.php @@ -0,0 +1,73 @@ +Error code caused by the Extension. For example, InvalidField.

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

Plain text description of the error.

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

Unique identifier of the Extension.

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

User-defined unique identifier of the Extension.

+ * + + * @return null|string + */ + public function getExtensionKey(); + + /** + * @param ?string $code + */ + public function setCode(?string $code): void; + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + + /** + * @param ?string $extensionId + */ + public function setExtensionId(?string $extensionId): void; + + /** + * @param ?string $extensionKey + */ + public function setExtensionKey(?string $extensionKey): void; +} diff --git a/lib/commercetools-api/src/Models/Error/ExtensionErrorBuilder.php b/lib/commercetools-api/src/Models/Error/ExtensionErrorBuilder.php new file mode 100644 index 00000000000..8179413cd08 --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/ExtensionErrorBuilder.php @@ -0,0 +1,150 @@ + + */ +final class ExtensionErrorBuilder implements Builder +{ + /** + + * @var ?string + */ + private $code; + + /** + + * @var ?string + */ + private $message; + + /** + + * @var ?string + */ + private $extensionId; + + /** + + * @var ?string + */ + private $extensionKey; + + /** + *

Error code caused by the Extension. For example, InvalidField.

+ * + + * @return null|string + */ + public function getCode() + { + return $this->code; + } + + /** + *

Plain text description of the error.

+ * + + * @return null|string + */ + public function getMessage() + { + return $this->message; + } + + /** + *

Unique identifier of the Extension.

+ * + + * @return null|string + */ + public function getExtensionId() + { + return $this->extensionId; + } + + /** + *

User-defined unique identifier of the Extension.

+ * + + * @return null|string + */ + public function getExtensionKey() + { + return $this->extensionKey; + } + + /** + * @param ?string $code + * @return $this + */ + public function withCode(?string $code) + { + $this->code = $code; + + return $this; + } + + /** + * @param ?string $message + * @return $this + */ + public function withMessage(?string $message) + { + $this->message = $message; + + return $this; + } + + /** + * @param ?string $extensionId + * @return $this + */ + public function withExtensionId(?string $extensionId) + { + $this->extensionId = $extensionId; + + return $this; + } + + /** + * @param ?string $extensionKey + * @return $this + */ + public function withExtensionKey(?string $extensionKey) + { + $this->extensionKey = $extensionKey; + + return $this; + } + + + public function build(): ExtensionError + { + return new ExtensionErrorModel( + $this->code, + $this->message, + $this->extensionId, + $this->extensionKey + ); + } + + public static function of(): ExtensionErrorBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Error/ExtensionErrorCollection.php b/lib/commercetools-api/src/Models/Error/ExtensionErrorCollection.php new file mode 100644 index 00000000000..f661a3dfc8d --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/ExtensionErrorCollection.php @@ -0,0 +1,56 @@ + + * @method ExtensionError current() + * @method ExtensionError end() + * @method ExtensionError at($offset) + */ +class ExtensionErrorCollection extends MapperSequence +{ + /** + * @psalm-assert ExtensionError $value + * @psalm-param ExtensionError|stdClass $value + * @throws InvalidArgumentException + * + * @return ExtensionErrorCollection + */ + public function add($value) + { + if (!$value instanceof ExtensionError) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?ExtensionError + */ + protected function mapper() + { + return function (?int $index): ?ExtensionError { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var ExtensionError $data */ + $data = ExtensionErrorModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Error/ExtensionErrorModel.php b/lib/commercetools-api/src/Models/Error/ExtensionErrorModel.php new file mode 100644 index 00000000000..cef958a1b84 --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/ExtensionErrorModel.php @@ -0,0 +1,191 @@ +code = $code; + $this->message = $message; + $this->extensionId = $extensionId; + $this->extensionKey = $extensionKey; + } + + /** + *

Error code caused by the Extension. For example, InvalidField.

+ * + * + * @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; + } + + /** + *

Plain text description of the error.

+ * + * + * @return null|string + */ + public function getMessage() + { + if (is_null($this->message)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_MESSAGE); + if (is_null($data)) { + return null; + } + $this->message = (string) $data; + } + + return $this->message; + } + + /** + *

Unique identifier of the Extension.

+ * + * + * @return null|string + */ + public function getExtensionId() + { + if (is_null($this->extensionId)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_EXTENSION_ID); + if (is_null($data)) { + return null; + } + $this->extensionId = (string) $data; + } + + return $this->extensionId; + } + + /** + *

User-defined unique identifier of the Extension.

+ * + * + * @return null|string + */ + public function getExtensionKey() + { + if (is_null($this->extensionKey)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_EXTENSION_KEY); + if (is_null($data)) { + return null; + } + $this->extensionKey = (string) $data; + } + + return $this->extensionKey; + } + + + /** + * @param ?string $code + */ + public function setCode(?string $code): void + { + $this->code = $code; + } + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void + { + $this->message = $message; + } + + /** + * @param ?string $extensionId + */ + public function setExtensionId(?string $extensionId): void + { + $this->extensionId = $extensionId; + } + + /** + * @param ?string $extensionKey + */ + public function setExtensionKey(?string $extensionKey): void + { + $this->extensionKey = $extensionKey; + } + + /** + * @return mixed + */ + public function by(string $key) + { + $data = $this->raw($key); + if (is_null($data)) { + return null; + } + if (preg_match(ExtensionError::FIELD_PATTERN4, $key) === 1) { + /** @psalm-var stdClass $data */ + return JsonObjectModel::of($data); + } + + return $data; + } +} diff --git a/lib/commercetools-api/src/Models/Error/ExtensionNoResponseError.php b/lib/commercetools-api/src/Models/Error/ExtensionNoResponseError.php index 543f629070a..93c247e0d7b 100644 --- a/lib/commercetools-api/src/Models/Error/ExtensionNoResponseError.php +++ b/lib/commercetools-api/src/Models/Error/ExtensionNoResponseError.php @@ -18,16 +18,39 @@ interface ExtensionNoResponseError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"Extension did not respond in time."

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

Unique identifier of the API Extension.

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

User-defined unique identifier of the API Extension, if available.

+ * * @return null|string */ public function getExtensionKey(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?string $extensionId */ diff --git a/lib/commercetools-api/src/Models/Error/ExtensionNoResponseErrorBuilder.php b/lib/commercetools-api/src/Models/Error/ExtensionNoResponseErrorBuilder.php index d45761f5195..a60db5b6466 100644 --- a/lib/commercetools-api/src/Models/Error/ExtensionNoResponseErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/ExtensionNoResponseErrorBuilder.php @@ -39,6 +39,8 @@ final class ExtensionNoResponseErrorBuilder implements Builder private $extensionKey; /** + *

"Extension did not respond in time."

+ * * @return null|string */ @@ -48,6 +50,8 @@ public function getMessage() } /** + *

Unique identifier of the API Extension.

+ * * @return null|string */ @@ -57,6 +61,8 @@ public function getExtensionId() } /** + *

User-defined unique identifier of the API Extension, if available.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/ExtensionNoResponseErrorModel.php b/lib/commercetools-api/src/Models/Error/ExtensionNoResponseErrorModel.php index c04f3b38e41..9603e79e21e 100644 --- a/lib/commercetools-api/src/Models/Error/ExtensionNoResponseErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/ExtensionNoResponseErrorModel.php @@ -79,6 +79,8 @@ public function getCode() } /** + *

"Extension did not respond in time."

+ * * * @return null|string */ @@ -97,6 +99,8 @@ public function getMessage() } /** + *

Unique identifier of the API Extension.

+ * * * @return null|string */ @@ -115,6 +119,8 @@ public function getExtensionId() } /** + *

User-defined unique identifier of the API Extension, if available.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/ExtensionPredicateEvaluationFailedError.php b/lib/commercetools-api/src/Models/Error/ExtensionPredicateEvaluationFailedError.php new file mode 100644 index 00000000000..99b0f116281 --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/ExtensionPredicateEvaluationFailedError.php @@ -0,0 +1,49 @@ +"The compared field $fieldName is not present."

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

Details about the API Extension that was involved in the error.

+ * + + * @return null|ErrorByExtension + */ + public function getErrorByExtension(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + + /** + * @param ?ErrorByExtension $errorByExtension + */ + public function setErrorByExtension(?ErrorByExtension $errorByExtension): void; +} diff --git a/lib/commercetools-api/src/Models/Error/ExtensionPredicateEvaluationFailedErrorBuilder.php b/lib/commercetools-api/src/Models/Error/ExtensionPredicateEvaluationFailedErrorBuilder.php new file mode 100644 index 00000000000..45da6989e40 --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/ExtensionPredicateEvaluationFailedErrorBuilder.php @@ -0,0 +1,102 @@ + + */ +final class ExtensionPredicateEvaluationFailedErrorBuilder implements Builder +{ + /** + + * @var ?string + */ + private $message; + + /** + + * @var null|ErrorByExtension|ErrorByExtensionBuilder + */ + private $errorByExtension; + + /** + *

"The compared field $fieldName is not present."

+ * + + * @return null|string + */ + public function getMessage() + { + return $this->message; + } + + /** + *

Details about the API Extension that was involved in the error.

+ * + + * @return null|ErrorByExtension + */ + public function getErrorByExtension() + { + return $this->errorByExtension instanceof ErrorByExtensionBuilder ? $this->errorByExtension->build() : $this->errorByExtension; + } + + /** + * @param ?string $message + * @return $this + */ + public function withMessage(?string $message) + { + $this->message = $message; + + return $this; + } + + /** + * @param ?ErrorByExtension $errorByExtension + * @return $this + */ + public function withErrorByExtension(?ErrorByExtension $errorByExtension) + { + $this->errorByExtension = $errorByExtension; + + return $this; + } + + /** + * @deprecated use withErrorByExtension() instead + * @return $this + */ + public function withErrorByExtensionBuilder(?ErrorByExtensionBuilder $errorByExtension) + { + $this->errorByExtension = $errorByExtension; + + return $this; + } + + public function build(): ExtensionPredicateEvaluationFailedError + { + return new ExtensionPredicateEvaluationFailedErrorModel( + $this->message, + $this->errorByExtension instanceof ErrorByExtensionBuilder ? $this->errorByExtension->build() : $this->errorByExtension + ); + } + + public static function of(): ExtensionPredicateEvaluationFailedErrorBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Error/ExtensionPredicateEvaluationFailedErrorCollection.php b/lib/commercetools-api/src/Models/Error/ExtensionPredicateEvaluationFailedErrorCollection.php new file mode 100644 index 00000000000..f798cd5b6bc --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/ExtensionPredicateEvaluationFailedErrorCollection.php @@ -0,0 +1,56 @@ + + * @method ExtensionPredicateEvaluationFailedError current() + * @method ExtensionPredicateEvaluationFailedError end() + * @method ExtensionPredicateEvaluationFailedError at($offset) + */ +class ExtensionPredicateEvaluationFailedErrorCollection extends ErrorObjectCollection +{ + /** + * @psalm-assert ExtensionPredicateEvaluationFailedError $value + * @psalm-param ExtensionPredicateEvaluationFailedError|stdClass $value + * @throws InvalidArgumentException + * + * @return ExtensionPredicateEvaluationFailedErrorCollection + */ + public function add($value) + { + if (!$value instanceof ExtensionPredicateEvaluationFailedError) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?ExtensionPredicateEvaluationFailedError + */ + protected function mapper() + { + return function (?int $index): ?ExtensionPredicateEvaluationFailedError { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var ExtensionPredicateEvaluationFailedError $data */ + $data = ExtensionPredicateEvaluationFailedErrorModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Error/WeakPasswordErrorModel.php b/lib/commercetools-api/src/Models/Error/ExtensionPredicateEvaluationFailedErrorModel.php similarity index 59% rename from lib/commercetools-api/src/Models/Error/WeakPasswordErrorModel.php rename to lib/commercetools-api/src/Models/Error/ExtensionPredicateEvaluationFailedErrorModel.php index fdd3f577200..431168373d6 100644 --- a/lib/commercetools-api/src/Models/Error/WeakPasswordErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/ExtensionPredicateEvaluationFailedErrorModel.php @@ -17,9 +17,9 @@ /** * @internal */ -final class WeakPasswordErrorModel extends JsonObjectModel implements WeakPasswordError +final class ExtensionPredicateEvaluationFailedErrorModel extends JsonObjectModel implements ExtensionPredicateEvaluationFailedError { - public const DISCRIMINATOR_VALUE = 'WeakPassword'; + public const DISCRIMINATOR_VALUE = 'ExtensionPredicateEvaluationFailed'; /** * * @var ?string @@ -32,15 +32,23 @@ final class WeakPasswordErrorModel extends JsonObjectModel implements WeakPasswo */ protected $message; + /** + * + * @var ?ErrorByExtension + */ + protected $errorByExtension; + /** * @psalm-suppress MissingParamType */ public function __construct( ?string $message = null, + ?ErrorByExtension $errorByExtension = null, ?string $code = null ) { $this->message = $message; + $this->errorByExtension = $errorByExtension; $this->code = $code ?? self::DISCRIMINATOR_VALUE; } @@ -63,6 +71,8 @@ public function getCode() } /** + *

"The compared field $fieldName is not present."

+ * * * @return null|string */ @@ -80,6 +90,27 @@ public function getMessage() return $this->message; } + /** + *

Details about the API Extension that was involved in the error.

+ * + * + * @return null|ErrorByExtension + */ + public function getErrorByExtension() + { + if (is_null($this->errorByExtension)) { + /** @psalm-var stdClass|array|null $data */ + $data = $this->raw(self::FIELD_ERROR_BY_EXTENSION); + if (is_null($data)) { + return null; + } + + $this->errorByExtension = ErrorByExtensionModel::of($data); + } + + return $this->errorByExtension; + } + /** * @param ?string $message @@ -89,6 +120,14 @@ public function setMessage(?string $message): void $this->message = $message; } + /** + * @param ?ErrorByExtension $errorByExtension + */ + public function setErrorByExtension(?ErrorByExtension $errorByExtension): void + { + $this->errorByExtension = $errorByExtension; + } + /** * @return mixed */ diff --git a/lib/commercetools-api/src/Models/Error/ExtensionUpdateActionsFailedError.php b/lib/commercetools-api/src/Models/Error/ExtensionUpdateActionsFailedError.php index 109f1823824..6fb83b8c208 100644 --- a/lib/commercetools-api/src/Models/Error/ExtensionUpdateActionsFailedError.php +++ b/lib/commercetools-api/src/Models/Error/ExtensionUpdateActionsFailedError.php @@ -16,10 +16,24 @@ interface ExtensionUpdateActionsFailedError extends ErrorObject { public const FIELD_LOCALIZED_MESSAGE = 'localizedMessage'; public const FIELD_EXTENSION_EXTRA_INFO = 'extensionExtraInfo'; - public const FIELD_ERROR_BY_EXTENSION = 'errorByExtension'; + public const FIELD_EXTENSION_ERRORS = 'extensionErrors'; /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

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

"The extension returned update actions that could not be executed."

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

User-defined localized description of the error.

* * @return null|LocalizedString @@ -27,16 +41,25 @@ interface ExtensionUpdateActionsFailedError extends ErrorObject public function getLocalizedMessage(); /** + *

Any information that should be returned to the API caller.

+ * * @return null|mixed */ public function getExtensionExtraInfo(); /** + *

Additional errors related to the API Extension.

+ * - * @return null|ErrorByExtension + * @return null|ExtensionErrorCollection + */ + public function getExtensionErrors(); + + /** + * @param ?string $message */ - public function getErrorByExtension(); + public function setMessage(?string $message): void; /** * @param ?LocalizedString $localizedMessage @@ -49,7 +72,7 @@ public function setLocalizedMessage(?LocalizedString $localizedMessage): void; public function setExtensionExtraInfo(?JsonObject $extensionExtraInfo): void; /** - * @param ?ErrorByExtension $errorByExtension + * @param ?ExtensionErrorCollection $extensionErrors */ - public function setErrorByExtension(?ErrorByExtension $errorByExtension): void; + public function setExtensionErrors(?ExtensionErrorCollection $extensionErrors): void; } diff --git a/lib/commercetools-api/src/Models/Error/ExtensionUpdateActionsFailedErrorBuilder.php b/lib/commercetools-api/src/Models/Error/ExtensionUpdateActionsFailedErrorBuilder.php index 4acd5092a8e..928fac0ca97 100644 --- a/lib/commercetools-api/src/Models/Error/ExtensionUpdateActionsFailedErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/ExtensionUpdateActionsFailedErrorBuilder.php @@ -42,11 +42,13 @@ final class ExtensionUpdateActionsFailedErrorBuilder implements Builder /** - * @var null|ErrorByExtension|ErrorByExtensionBuilder + * @var ?ExtensionErrorCollection */ - private $errorByExtension; + private $extensionErrors; /** + *

"The extension returned update actions that could not be executed."

+ * * @return null|string */ @@ -56,7 +58,7 @@ public function getMessage() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

User-defined localized description of the error.

* * @return null|LocalizedString @@ -67,6 +69,8 @@ public function getLocalizedMessage() } /** + *

Any information that should be returned to the API caller.

+ * * @return null|JsonObject */ @@ -76,12 +80,14 @@ public function getExtensionExtraInfo() } /** + *

Additional errors related to the API Extension.

+ * - * @return null|ErrorByExtension + * @return null|ExtensionErrorCollection */ - public function getErrorByExtension() + public function getExtensionErrors() { - return $this->errorByExtension instanceof ErrorByExtensionBuilder ? $this->errorByExtension->build() : $this->errorByExtension; + return $this->extensionErrors; } /** @@ -118,12 +124,12 @@ public function withExtensionExtraInfo(?JsonObject $extensionExtraInfo) } /** - * @param ?ErrorByExtension $errorByExtension + * @param ?ExtensionErrorCollection $extensionErrors * @return $this */ - public function withErrorByExtension(?ErrorByExtension $errorByExtension) + public function withExtensionErrors(?ExtensionErrorCollection $extensionErrors) { - $this->errorByExtension = $errorByExtension; + $this->extensionErrors = $extensionErrors; return $this; } @@ -139,24 +145,13 @@ public function withLocalizedMessageBuilder(?LocalizedStringBuilder $localizedMe return $this; } - /** - * @deprecated use withErrorByExtension() instead - * @return $this - */ - public function withErrorByExtensionBuilder(?ErrorByExtensionBuilder $errorByExtension) - { - $this->errorByExtension = $errorByExtension; - - return $this; - } - public function build(): ExtensionUpdateActionsFailedError { return new ExtensionUpdateActionsFailedErrorModel( $this->message, $this->localizedMessage instanceof LocalizedStringBuilder ? $this->localizedMessage->build() : $this->localizedMessage, $this->extensionExtraInfo, - $this->errorByExtension instanceof ErrorByExtensionBuilder ? $this->errorByExtension->build() : $this->errorByExtension + $this->extensionErrors ); } diff --git a/lib/commercetools-api/src/Models/Error/ExtensionUpdateActionsFailedErrorModel.php b/lib/commercetools-api/src/Models/Error/ExtensionUpdateActionsFailedErrorModel.php index 41707e9ba52..d31a2f0dd5e 100644 --- a/lib/commercetools-api/src/Models/Error/ExtensionUpdateActionsFailedErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/ExtensionUpdateActionsFailedErrorModel.php @@ -48,9 +48,9 @@ final class ExtensionUpdateActionsFailedErrorModel extends JsonObjectModel imple /** * - * @var ?ErrorByExtension + * @var ?ExtensionErrorCollection */ - protected $errorByExtension; + protected $extensionErrors; /** @@ -60,13 +60,13 @@ public function __construct( ?string $message = null, ?LocalizedString $localizedMessage = null, ?JsonObject $extensionExtraInfo = null, - ?ErrorByExtension $errorByExtension = null, + ?ExtensionErrorCollection $extensionErrors = null, ?string $code = null ) { $this->message = $message; $this->localizedMessage = $localizedMessage; $this->extensionExtraInfo = $extensionExtraInfo; - $this->errorByExtension = $errorByExtension; + $this->extensionErrors = $extensionErrors; $this->code = $code ?? self::DISCRIMINATOR_VALUE; } @@ -89,6 +89,8 @@ public function getCode() } /** + *

"The extension returned update actions that could not be executed."

+ * * * @return null|string */ @@ -107,7 +109,7 @@ public function getMessage() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

User-defined localized description of the error.

* * * @return null|LocalizedString @@ -128,6 +130,8 @@ public function getLocalizedMessage() } /** + *

Any information that should be returned to the API caller.

+ * * * @return null|mixed */ @@ -146,22 +150,23 @@ public function getExtensionExtraInfo() } /** + *

Additional errors related to the API Extension.

+ * * - * @return null|ErrorByExtension + * @return null|ExtensionErrorCollection */ - public function getErrorByExtension() + public function getExtensionErrors() { - if (is_null($this->errorByExtension)) { - /** @psalm-var stdClass|array|null $data */ - $data = $this->raw(self::FIELD_ERROR_BY_EXTENSION); + if (is_null($this->extensionErrors)) { + /** @psalm-var ?list $data */ + $data = $this->raw(self::FIELD_EXTENSION_ERRORS); if (is_null($data)) { return null; } - - $this->errorByExtension = ErrorByExtensionModel::of($data); + $this->extensionErrors = ExtensionErrorCollection::fromArray($data); } - return $this->errorByExtension; + return $this->extensionErrors; } @@ -190,11 +195,11 @@ public function setExtensionExtraInfo(?JsonObject $extensionExtraInfo): void } /** - * @param ?ErrorByExtension $errorByExtension + * @param ?ExtensionErrorCollection $extensionErrors */ - public function setErrorByExtension(?ErrorByExtension $errorByExtension): void + public function setExtensionErrors(?ExtensionErrorCollection $extensionErrors): void { - $this->errorByExtension = $errorByExtension; + $this->extensionErrors = $extensionErrors; } /** diff --git a/lib/commercetools-api/src/Models/Error/ExternalOAuthFailedError.php b/lib/commercetools-api/src/Models/Error/ExternalOAuthFailedError.php index 0326ff1ec26..3567feca897 100644 --- a/lib/commercetools-api/src/Models/Error/ExternalOAuthFailedError.php +++ b/lib/commercetools-api/src/Models/Error/ExternalOAuthFailedError.php @@ -13,4 +13,22 @@ interface ExternalOAuthFailedError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

Plain text description detailing the external OAuth error. For example, "External OAuth did not respond in time.".

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/ExternalOAuthFailedErrorBuilder.php b/lib/commercetools-api/src/Models/Error/ExternalOAuthFailedErrorBuilder.php index 250e34e6922..26268cbe5cd 100644 --- a/lib/commercetools-api/src/Models/Error/ExternalOAuthFailedErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/ExternalOAuthFailedErrorBuilder.php @@ -27,6 +27,8 @@ final class ExternalOAuthFailedErrorBuilder implements Builder private $message; /** + *

Plain text description detailing the external OAuth error. For example, "External OAuth did not respond in time.".

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/ExternalOAuthFailedErrorModel.php b/lib/commercetools-api/src/Models/Error/ExternalOAuthFailedErrorModel.php index 9ef138daf82..76e6418fd20 100644 --- a/lib/commercetools-api/src/Models/Error/ExternalOAuthFailedErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/ExternalOAuthFailedErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

Plain text description detailing the external OAuth error. For example, "External OAuth did not respond in time.".

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/FeatureRemovedError.php b/lib/commercetools-api/src/Models/Error/FeatureRemovedError.php index c252a1223a9..67cc54bce05 100644 --- a/lib/commercetools-api/src/Models/Error/FeatureRemovedError.php +++ b/lib/commercetools-api/src/Models/Error/FeatureRemovedError.php @@ -13,4 +13,22 @@ interface FeatureRemovedError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

Description of the feature that is removed.

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/FeatureRemovedErrorBuilder.php b/lib/commercetools-api/src/Models/Error/FeatureRemovedErrorBuilder.php index 75e790e355c..f6b0e37ece9 100644 --- a/lib/commercetools-api/src/Models/Error/FeatureRemovedErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/FeatureRemovedErrorBuilder.php @@ -27,6 +27,8 @@ final class FeatureRemovedErrorBuilder implements Builder private $message; /** + *

Description of the feature that is removed.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/FeatureRemovedErrorModel.php b/lib/commercetools-api/src/Models/Error/FeatureRemovedErrorModel.php index 9e416db3a7f..b01ceb847f6 100644 --- a/lib/commercetools-api/src/Models/Error/FeatureRemovedErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/FeatureRemovedErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

Description of the feature that is removed.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/GeneralError.php b/lib/commercetools-api/src/Models/Error/GeneralError.php index e2b01d43bea..21ae0d6b9f4 100644 --- a/lib/commercetools-api/src/Models/Error/GeneralError.php +++ b/lib/commercetools-api/src/Models/Error/GeneralError.php @@ -13,4 +13,22 @@ interface GeneralError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

Description about any known details of the problem, for example, "Write operations are temporarily unavailable".

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/GeneralErrorBuilder.php b/lib/commercetools-api/src/Models/Error/GeneralErrorBuilder.php index cc20c3ba387..2aaccc35355 100644 --- a/lib/commercetools-api/src/Models/Error/GeneralErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/GeneralErrorBuilder.php @@ -27,6 +27,8 @@ final class GeneralErrorBuilder implements Builder private $message; /** + *

Description about any known details of the problem, for example, "Write operations are temporarily unavailable".

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/GeneralErrorModel.php b/lib/commercetools-api/src/Models/Error/GeneralErrorModel.php index 4396097962b..6c618c720c3 100644 --- a/lib/commercetools-api/src/Models/Error/GeneralErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/GeneralErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

Description about any known details of the problem, for example, "Write operations are temporarily unavailable".

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/InsufficientScopeErrorBuilder.php b/lib/commercetools-api/src/Models/Error/InsufficientScopeErrorBuilder.php index 73649657612..309c39f7999 100644 --- a/lib/commercetools-api/src/Models/Error/InsufficientScopeErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/InsufficientScopeErrorBuilder.php @@ -27,6 +27,8 @@ final class InsufficientScopeErrorBuilder implements Builder private $message; /** + *

Plain text description of the cause of the error.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/InsufficientScopeErrorModel.php b/lib/commercetools-api/src/Models/Error/InsufficientScopeErrorModel.php index a5f29971edd..0798f5f14bb 100644 --- a/lib/commercetools-api/src/Models/Error/InsufficientScopeErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/InsufficientScopeErrorModel.php @@ -45,6 +45,8 @@ public function __construct( } /** + *

Error identifier.

+ * * * @return null|string */ @@ -63,6 +65,8 @@ public function getCode() } /** + *

Plain text description of the cause of the error.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/InternalConstraintViolatedError.php b/lib/commercetools-api/src/Models/Error/InternalConstraintViolatedError.php index 2b8535cec64..0131220ddd9 100644 --- a/lib/commercetools-api/src/Models/Error/InternalConstraintViolatedError.php +++ b/lib/commercetools-api/src/Models/Error/InternalConstraintViolatedError.php @@ -13,4 +13,22 @@ interface InternalConstraintViolatedError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

Plain text description of the constraints that were violated.

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/InternalConstraintViolatedErrorBuilder.php b/lib/commercetools-api/src/Models/Error/InternalConstraintViolatedErrorBuilder.php index 0d980c6e0e5..c8d8003725f 100644 --- a/lib/commercetools-api/src/Models/Error/InternalConstraintViolatedErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/InternalConstraintViolatedErrorBuilder.php @@ -27,6 +27,8 @@ final class InternalConstraintViolatedErrorBuilder implements Builder private $message; /** + *

Plain text description of the constraints that were violated.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/InternalConstraintViolatedErrorModel.php b/lib/commercetools-api/src/Models/Error/InternalConstraintViolatedErrorModel.php index 28089864ad6..14af89ed780 100644 --- a/lib/commercetools-api/src/Models/Error/InternalConstraintViolatedErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/InternalConstraintViolatedErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

Plain text description of the constraints that were violated.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidCredentialsError.php b/lib/commercetools-api/src/Models/Error/InvalidCredentialsError.php index 25b1b8e7f50..049fa2e3860 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidCredentialsError.php +++ b/lib/commercetools-api/src/Models/Error/InvalidCredentialsError.php @@ -13,4 +13,22 @@ interface InvalidCredentialsError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"Account with the given credentials not found."

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/InvalidCredentialsErrorBuilder.php b/lib/commercetools-api/src/Models/Error/InvalidCredentialsErrorBuilder.php index 667ed173368..d4247dd5554 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidCredentialsErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/InvalidCredentialsErrorBuilder.php @@ -27,6 +27,8 @@ final class InvalidCredentialsErrorBuilder implements Builder private $message; /** + *

"Account with the given credentials not found."

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidCredentialsErrorModel.php b/lib/commercetools-api/src/Models/Error/InvalidCredentialsErrorModel.php index 0cee486fb01..d6957a36a89 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidCredentialsErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/InvalidCredentialsErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

"Account with the given credentials not found."

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidCurrentPasswordError.php b/lib/commercetools-api/src/Models/Error/InvalidCurrentPasswordError.php index 4b8de8c7e01..701bd37b2d4 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidCurrentPasswordError.php +++ b/lib/commercetools-api/src/Models/Error/InvalidCurrentPasswordError.php @@ -13,4 +13,22 @@ interface InvalidCurrentPasswordError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"The given current password does not match."

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/InvalidCurrentPasswordErrorBuilder.php b/lib/commercetools-api/src/Models/Error/InvalidCurrentPasswordErrorBuilder.php index 5bc39d34d8a..e6fe1fcc02f 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidCurrentPasswordErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/InvalidCurrentPasswordErrorBuilder.php @@ -27,6 +27,8 @@ final class InvalidCurrentPasswordErrorBuilder implements Builder private $message; /** + *

"The given current password does not match."

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidCurrentPasswordErrorModel.php b/lib/commercetools-api/src/Models/Error/InvalidCurrentPasswordErrorModel.php index 755cfab02ad..85769b8450b 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidCurrentPasswordErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/InvalidCurrentPasswordErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

"The given current password does not match."

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidFieldError.php b/lib/commercetools-api/src/Models/Error/InvalidFieldError.php index a9959e0d4f3..89147f6d0ac 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidFieldError.php +++ b/lib/commercetools-api/src/Models/Error/InvalidFieldError.php @@ -19,22 +19,47 @@ interface InvalidFieldError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"The value $invalidValue is not valid for field $field."

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

Name of the field with the invalid value.

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

Value invalid for the field.

+ * * @return null|mixed */ public function getInvalidValue(); /** + *

Fixed set of allowed values for the field, if any.

+ * * @return null|array */ public function getAllowedValues(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?string $field */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidFieldErrorBuilder.php b/lib/commercetools-api/src/Models/Error/InvalidFieldErrorBuilder.php index 4b8673177b2..690cf21d5df 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidFieldErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/InvalidFieldErrorBuilder.php @@ -45,6 +45,8 @@ final class InvalidFieldErrorBuilder implements Builder private $allowedValues; /** + *

"The value $invalidValue is not valid for field $field."

+ * * @return null|string */ @@ -54,6 +56,8 @@ public function getMessage() } /** + *

Name of the field with the invalid value.

+ * * @return null|string */ @@ -63,6 +67,8 @@ public function getField() } /** + *

Value invalid for the field.

+ * * @return null|mixed */ @@ -72,6 +78,8 @@ public function getInvalidValue() } /** + *

Fixed set of allowed values for the field, if any.

+ * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidFieldErrorModel.php b/lib/commercetools-api/src/Models/Error/InvalidFieldErrorModel.php index 386400cac8b..3da10d4bcc5 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidFieldErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/InvalidFieldErrorModel.php @@ -87,6 +87,8 @@ public function getCode() } /** + *

"The value $invalidValue is not valid for field $field."

+ * * * @return null|string */ @@ -105,6 +107,8 @@ public function getMessage() } /** + *

Name of the field with the invalid value.

+ * * * @return null|string */ @@ -123,6 +127,8 @@ public function getField() } /** + *

Value invalid for the field.

+ * * * @return null|mixed */ @@ -141,6 +147,8 @@ public function getInvalidValue() } /** + *

Fixed set of allowed values for the field, if any.

+ * * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidInputError.php b/lib/commercetools-api/src/Models/Error/InvalidInputError.php index dfa011bcc5c..7a01dd780d0 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidInputError.php +++ b/lib/commercetools-api/src/Models/Error/InvalidInputError.php @@ -13,4 +13,22 @@ interface InvalidInputError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

Description of the constraints that are not met by the request. For example, "Invalid $propertyName. It may be a non-empty string up to $maxLength".

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/InvalidInputErrorBuilder.php b/lib/commercetools-api/src/Models/Error/InvalidInputErrorBuilder.php index 3bf8360ce24..26af2ec8fb8 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidInputErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/InvalidInputErrorBuilder.php @@ -27,6 +27,8 @@ final class InvalidInputErrorBuilder implements Builder private $message; /** + *

Description of the constraints that are not met by the request. For example, "Invalid $propertyName. It may be a non-empty string up to $maxLength".

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidInputErrorModel.php b/lib/commercetools-api/src/Models/Error/InvalidInputErrorModel.php index baf76122d9e..b14a98b2070 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidInputErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/InvalidInputErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

Description of the constraints that are not met by the request. For example, "Invalid $propertyName. It may be a non-empty string up to $maxLength".

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidItemShippingDetailsError.php b/lib/commercetools-api/src/Models/Error/InvalidItemShippingDetailsError.php index 677459fb1fc..da39ee6fcd9 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidItemShippingDetailsError.php +++ b/lib/commercetools-api/src/Models/Error/InvalidItemShippingDetailsError.php @@ -18,16 +18,39 @@ interface InvalidItemShippingDetailsError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"Inconsistent shipping details for $subject with ID $itemId. $subject quantity is $itemQuantity and shippingTargets quantity sum is $quantitySum."

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

"LineItem" or "CustomLineItem"

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

Unique identifier of the Line Item or Custom Line Item.

+ * * @return null|string */ public function getItemId(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?string $subject */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidItemShippingDetailsErrorBuilder.php b/lib/commercetools-api/src/Models/Error/InvalidItemShippingDetailsErrorBuilder.php index 0101391e796..93aea9b6198 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidItemShippingDetailsErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/InvalidItemShippingDetailsErrorBuilder.php @@ -39,6 +39,8 @@ final class InvalidItemShippingDetailsErrorBuilder implements Builder private $itemId; /** + *

"Inconsistent shipping details for $subject with ID $itemId. $subject quantity is $itemQuantity and shippingTargets quantity sum is $quantitySum."

+ * * @return null|string */ @@ -48,6 +50,8 @@ public function getMessage() } /** + *

"LineItem" or "CustomLineItem"

+ * * @return null|string */ @@ -57,6 +61,8 @@ public function getSubject() } /** + *

Unique identifier of the Line Item or Custom Line Item.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidItemShippingDetailsErrorModel.php b/lib/commercetools-api/src/Models/Error/InvalidItemShippingDetailsErrorModel.php index 3a3dbe7e546..5c8fa802c96 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidItemShippingDetailsErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/InvalidItemShippingDetailsErrorModel.php @@ -79,6 +79,8 @@ public function getCode() } /** + *

"Inconsistent shipping details for $subject with ID $itemId. $subject quantity is $itemQuantity and shippingTargets quantity sum is $quantitySum."

+ * * * @return null|string */ @@ -97,6 +99,8 @@ public function getMessage() } /** + *

"LineItem" or "CustomLineItem"

+ * * * @return null|string */ @@ -115,6 +119,8 @@ public function getSubject() } /** + *

Unique identifier of the Line Item or Custom Line Item.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidJsonInputError.php b/lib/commercetools-api/src/Models/Error/InvalidJsonInputError.php index ee321b69cca..f9e164399f1 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidJsonInputError.php +++ b/lib/commercetools-api/src/Models/Error/InvalidJsonInputError.php @@ -13,4 +13,37 @@ interface InvalidJsonInputError extends ErrorObject { + public const FIELD_DETAILED_ERROR_MESSAGE = 'detailedErrorMessage'; + + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"Request body does not contain valid JSON."

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

Further explanation about why the JSON is invalid.

+ * + + * @return null|string + */ + public function getDetailedErrorMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + + /** + * @param ?string $detailedErrorMessage + */ + public function setDetailedErrorMessage(?string $detailedErrorMessage): void; } diff --git a/lib/commercetools-api/src/Models/Error/InvalidJsonInputErrorBuilder.php b/lib/commercetools-api/src/Models/Error/InvalidJsonInputErrorBuilder.php index 061ac3dcc2b..f61fab9a689 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidJsonInputErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/InvalidJsonInputErrorBuilder.php @@ -28,6 +28,14 @@ final class InvalidJsonInputErrorBuilder implements Builder /** + * @var ?string + */ + private $detailedErrorMessage; + + /** + *

"Request body does not contain valid JSON."

+ * + * @return null|string */ public function getMessage() @@ -35,6 +43,17 @@ public function getMessage() return $this->message; } + /** + *

Further explanation about why the JSON is invalid.

+ * + + * @return null|string + */ + public function getDetailedErrorMessage() + { + return $this->detailedErrorMessage; + } + /** * @param ?string $message * @return $this @@ -46,11 +65,23 @@ public function withMessage(?string $message) return $this; } + /** + * @param ?string $detailedErrorMessage + * @return $this + */ + public function withDetailedErrorMessage(?string $detailedErrorMessage) + { + $this->detailedErrorMessage = $detailedErrorMessage; + + return $this; + } + public function build(): InvalidJsonInputError { return new InvalidJsonInputErrorModel( - $this->message + $this->message, + $this->detailedErrorMessage ); } diff --git a/lib/commercetools-api/src/Models/Error/InvalidJsonInputErrorModel.php b/lib/commercetools-api/src/Models/Error/InvalidJsonInputErrorModel.php index 0cd710e5be2..0d42c3a42c6 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidJsonInputErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/InvalidJsonInputErrorModel.php @@ -32,15 +32,23 @@ final class InvalidJsonInputErrorModel extends JsonObjectModel implements Invali */ protected $message; + /** + * + * @var ?string + */ + protected $detailedErrorMessage; + /** * @psalm-suppress MissingParamType */ public function __construct( ?string $message = null, + ?string $detailedErrorMessage = null, ?string $code = null ) { $this->message = $message; + $this->detailedErrorMessage = $detailedErrorMessage; $this->code = $code ?? self::DISCRIMINATOR_VALUE; } @@ -63,6 +71,8 @@ public function getCode() } /** + *

"Request body does not contain valid JSON."

+ * * * @return null|string */ @@ -80,6 +90,26 @@ public function getMessage() return $this->message; } + /** + *

Further explanation about why the JSON is invalid.

+ * + * + * @return null|string + */ + public function getDetailedErrorMessage() + { + if (is_null($this->detailedErrorMessage)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_DETAILED_ERROR_MESSAGE); + if (is_null($data)) { + return null; + } + $this->detailedErrorMessage = (string) $data; + } + + return $this->detailedErrorMessage; + } + /** * @param ?string $message @@ -89,6 +119,14 @@ public function setMessage(?string $message): void $this->message = $message; } + /** + * @param ?string $detailedErrorMessage + */ + public function setDetailedErrorMessage(?string $detailedErrorMessage): void + { + $this->detailedErrorMessage = $detailedErrorMessage; + } + /** * @return mixed */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidOperationError.php b/lib/commercetools-api/src/Models/Error/InvalidOperationError.php index 798bbb90429..a8fa930e852 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidOperationError.php +++ b/lib/commercetools-api/src/Models/Error/InvalidOperationError.php @@ -13,4 +13,22 @@ interface InvalidOperationError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

Plain text description of the error.

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/InvalidOperationErrorBuilder.php b/lib/commercetools-api/src/Models/Error/InvalidOperationErrorBuilder.php index 14a6f1b9c76..b3ba2b21b87 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidOperationErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/InvalidOperationErrorBuilder.php @@ -27,6 +27,8 @@ final class InvalidOperationErrorBuilder implements Builder private $message; /** + *

Plain text description of the error.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidOperationErrorModel.php b/lib/commercetools-api/src/Models/Error/InvalidOperationErrorModel.php index 7bbc222cf04..8ac8dcefb58 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidOperationErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/InvalidOperationErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

Plain text description of the error.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidSubjectErrorBuilder.php b/lib/commercetools-api/src/Models/Error/InvalidSubjectErrorBuilder.php index 8c2c7f66d55..1b06b859eb3 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidSubjectErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/InvalidSubjectErrorBuilder.php @@ -27,6 +27,8 @@ final class InvalidSubjectErrorBuilder implements Builder private $message; /** + *

Plain text description of the cause of the error.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidSubjectErrorModel.php b/lib/commercetools-api/src/Models/Error/InvalidSubjectErrorModel.php index 3f52f16b0c8..8607726b8f1 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidSubjectErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/InvalidSubjectErrorModel.php @@ -45,6 +45,8 @@ public function __construct( } /** + *

Error identifier.

+ * * * @return null|string */ @@ -63,6 +65,8 @@ public function getCode() } /** + *

Plain text description of the cause of the error.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidTokenErrorBuilder.php b/lib/commercetools-api/src/Models/Error/InvalidTokenErrorBuilder.php index 76cecc1d158..c1cb2886872 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidTokenErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/InvalidTokenErrorBuilder.php @@ -27,6 +27,8 @@ final class InvalidTokenErrorBuilder implements Builder private $message; /** + *

Plain text description of the cause of the error.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/InvalidTokenErrorModel.php b/lib/commercetools-api/src/Models/Error/InvalidTokenErrorModel.php index 6b83c2ffb0d..8ef8e91ce56 100644 --- a/lib/commercetools-api/src/Models/Error/InvalidTokenErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/InvalidTokenErrorModel.php @@ -45,6 +45,8 @@ public function __construct( } /** + *

Error identifier.

+ * * * @return null|string */ @@ -63,6 +65,8 @@ public function getCode() } /** + *

Plain text description of the cause of the error.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/LanguageUsedInStoresError.php b/lib/commercetools-api/src/Models/Error/LanguageUsedInStoresError.php index e9cdc6d4cea..88f31451f23 100644 --- a/lib/commercetools-api/src/Models/Error/LanguageUsedInStoresError.php +++ b/lib/commercetools-api/src/Models/Error/LanguageUsedInStoresError.php @@ -13,4 +13,22 @@ interface LanguageUsedInStoresError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"Language(s) in use by a store cannot be deleted. Remove them in all the stores of this project first."

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/LanguageUsedInStoresErrorBuilder.php b/lib/commercetools-api/src/Models/Error/LanguageUsedInStoresErrorBuilder.php index 7f01faacb99..d843f45cbb7 100644 --- a/lib/commercetools-api/src/Models/Error/LanguageUsedInStoresErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/LanguageUsedInStoresErrorBuilder.php @@ -27,6 +27,8 @@ final class LanguageUsedInStoresErrorBuilder implements Builder private $message; /** + *

"Language(s) in use by a store cannot be deleted. Remove them in all the stores of this project first."

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/LanguageUsedInStoresErrorModel.php b/lib/commercetools-api/src/Models/Error/LanguageUsedInStoresErrorModel.php index 0a8989f68c3..10a03d3a2a8 100644 --- a/lib/commercetools-api/src/Models/Error/LanguageUsedInStoresErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/LanguageUsedInStoresErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

"Language(s) in use by a store cannot be deleted. Remove them in all the stores of this project first."

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/MatchingPriceNotFoundError.php b/lib/commercetools-api/src/Models/Error/MatchingPriceNotFoundError.php index cda715471be..5edd9439028 100644 --- a/lib/commercetools-api/src/Models/Error/MatchingPriceNotFoundError.php +++ b/lib/commercetools-api/src/Models/Error/MatchingPriceNotFoundError.php @@ -24,30 +24,52 @@ interface MatchingPriceNotFoundError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"The variant $variantId of product $productId does not contain a price for currency $currencyCode, $country, $customerGroup, $channel."

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

Unique identifier of a Product.

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

Unique identifier of a ProductVariant in the Product.

+ * * @return null|int */ public function getVariantId(); /** + *

Currency code of the country.

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

Country code of the geographic location.

+ * * @return null|string */ public function getCountry(); /** - *

Reference to a CustomerGroup.

+ *

Customer Group associated with the Price.

* * @return null|CustomerGroupReference @@ -55,13 +77,18 @@ public function getCountry(); public function getCustomerGroup(); /** - *

Reference to a Channel.

+ *

Channel associated with the Price.

* * @return null|ChannelReference */ public function getChannel(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?string $productId */ diff --git a/lib/commercetools-api/src/Models/Error/MatchingPriceNotFoundErrorBuilder.php b/lib/commercetools-api/src/Models/Error/MatchingPriceNotFoundErrorBuilder.php index 54e1bdc2602..71ff160d359 100644 --- a/lib/commercetools-api/src/Models/Error/MatchingPriceNotFoundErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/MatchingPriceNotFoundErrorBuilder.php @@ -67,6 +67,8 @@ final class MatchingPriceNotFoundErrorBuilder implements Builder private $channel; /** + *

"The variant $variantId of product $productId does not contain a price for currency $currencyCode, $country, $customerGroup, $channel."

+ * * @return null|string */ @@ -76,6 +78,8 @@ public function getMessage() } /** + *

Unique identifier of a Product.

+ * * @return null|string */ @@ -85,6 +89,8 @@ public function getProductId() } /** + *

Unique identifier of a ProductVariant in the Product.

+ * * @return null|int */ @@ -94,6 +100,8 @@ public function getVariantId() } /** + *

Currency code of the country.

+ * * @return null|string */ @@ -103,6 +111,8 @@ public function getCurrency() } /** + *

Country code of the geographic location.

+ * * @return null|string */ @@ -112,7 +122,7 @@ public function getCountry() } /** - *

Reference to a CustomerGroup.

+ *

Customer Group associated with the Price.

* * @return null|CustomerGroupReference @@ -123,7 +133,7 @@ public function getCustomerGroup() } /** - *

Reference to a Channel.

+ *

Channel associated with the Price.

* * @return null|ChannelReference diff --git a/lib/commercetools-api/src/Models/Error/MatchingPriceNotFoundErrorModel.php b/lib/commercetools-api/src/Models/Error/MatchingPriceNotFoundErrorModel.php index f169aa0f9a3..ad523e03246 100644 --- a/lib/commercetools-api/src/Models/Error/MatchingPriceNotFoundErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/MatchingPriceNotFoundErrorModel.php @@ -115,6 +115,8 @@ public function getCode() } /** + *

"The variant $variantId of product $productId does not contain a price for currency $currencyCode, $country, $customerGroup, $channel."

+ * * * @return null|string */ @@ -133,6 +135,8 @@ public function getMessage() } /** + *

Unique identifier of a Product.

+ * * * @return null|string */ @@ -151,6 +155,8 @@ public function getProductId() } /** + *

Unique identifier of a ProductVariant in the Product.

+ * * * @return null|int */ @@ -169,6 +175,8 @@ public function getVariantId() } /** + *

Currency code of the country.

+ * * * @return null|string */ @@ -187,6 +195,8 @@ public function getCurrency() } /** + *

Country code of the geographic location.

+ * * * @return null|string */ @@ -205,7 +215,7 @@ public function getCountry() } /** - *

Reference to a CustomerGroup.

+ *

Customer Group associated with the Price.

* * * @return null|CustomerGroupReference @@ -226,7 +236,7 @@ public function getCustomerGroup() } /** - *

Reference to a Channel.

+ *

Channel associated with the Price.

* * * @return null|ChannelReference diff --git a/lib/commercetools-api/src/Models/Error/MaxResourceLimitExceededError.php b/lib/commercetools-api/src/Models/Error/MaxResourceLimitExceededError.php index e4cca676711..1274c511fec 100644 --- a/lib/commercetools-api/src/Models/Error/MaxResourceLimitExceededError.php +++ b/lib/commercetools-api/src/Models/Error/MaxResourceLimitExceededError.php @@ -16,13 +16,32 @@ interface MaxResourceLimitExceededError extends ErrorObject public const FIELD_EXCEEDED_RESOURCE = 'exceededResource'; /** - *

Type of resource the value should reference. Supported resource type identifiers are:

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

"You have exceeded the limit of $limit resources of type $resourceTypeId."

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

Resource type that reached its maximum limit of configured elements (for example, 100 Zones per Project).

* * @return null|string */ public function getExceededResource(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?string $exceededResource */ diff --git a/lib/commercetools-api/src/Models/Error/MaxResourceLimitExceededErrorBuilder.php b/lib/commercetools-api/src/Models/Error/MaxResourceLimitExceededErrorBuilder.php index 14c6c9831c0..b14373b2cbe 100644 --- a/lib/commercetools-api/src/Models/Error/MaxResourceLimitExceededErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/MaxResourceLimitExceededErrorBuilder.php @@ -33,6 +33,8 @@ final class MaxResourceLimitExceededErrorBuilder implements Builder private $exceededResource; /** + *

"You have exceeded the limit of $limit resources of type $resourceTypeId."

+ * * @return null|string */ @@ -42,7 +44,7 @@ public function getMessage() } /** - *

Type of resource the value should reference. Supported resource type identifiers are:

+ *

Resource type that reached its maximum limit of configured elements (for example, 100 Zones per Project).

* * @return null|string diff --git a/lib/commercetools-api/src/Models/Error/MaxResourceLimitExceededErrorModel.php b/lib/commercetools-api/src/Models/Error/MaxResourceLimitExceededErrorModel.php index 0c514fa63ef..2fa169d2b69 100644 --- a/lib/commercetools-api/src/Models/Error/MaxResourceLimitExceededErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/MaxResourceLimitExceededErrorModel.php @@ -71,6 +71,8 @@ public function getCode() } /** + *

"You have exceeded the limit of $limit resources of type $resourceTypeId."

+ * * * @return null|string */ @@ -89,7 +91,7 @@ public function getMessage() } /** - *

Type of resource the value should reference. Supported resource type identifiers are:

+ *

Resource type that reached its maximum limit of configured elements (for example, 100 Zones per Project).

* * * @return null|string diff --git a/lib/commercetools-api/src/Models/Error/MissingRoleOnChannelError.php b/lib/commercetools-api/src/Models/Error/MissingRoleOnChannelError.php index b6e307c8a34..291f911fcfe 100644 --- a/lib/commercetools-api/src/Models/Error/MissingRoleOnChannelError.php +++ b/lib/commercetools-api/src/Models/Error/MissingRoleOnChannelError.php @@ -18,7 +18,21 @@ interface MissingRoleOnChannelError extends ErrorObject public const FIELD_MISSING_ROLE = 'missingRole'; /** - *

ResourceIdentifier to a Channel.

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

"Given channel with $idOrKeyOfChannel does not have the required role $role."

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

ResourceIdentifier to a given Channel.

* * @return null|ChannelResourceIdentifier @@ -26,13 +40,21 @@ interface MissingRoleOnChannelError extends ErrorObject public function getChannel(); /** - *

Describes the purpose and type of the Channel. A Channel can have one or more roles.

+ *
    + *
  • ProductDistribution for Product Distribution Channels allowed for the Store. Also required for Standalone Prices.
  • + *
  • InventorySupply for Inventory Supply Channels allowed for the Store.
  • + *
* * @return null|string */ public function getMissingRole(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?ChannelResourceIdentifier $channel */ diff --git a/lib/commercetools-api/src/Models/Error/MissingRoleOnChannelErrorBuilder.php b/lib/commercetools-api/src/Models/Error/MissingRoleOnChannelErrorBuilder.php index e8d5f58589d..bc499c04f35 100644 --- a/lib/commercetools-api/src/Models/Error/MissingRoleOnChannelErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/MissingRoleOnChannelErrorBuilder.php @@ -41,6 +41,8 @@ final class MissingRoleOnChannelErrorBuilder implements Builder private $missingRole; /** + *

"Given channel with $idOrKeyOfChannel does not have the required role $role."

+ * * @return null|string */ @@ -50,7 +52,7 @@ public function getMessage() } /** - *

ResourceIdentifier to a Channel.

+ *

ResourceIdentifier to a given Channel.

* * @return null|ChannelResourceIdentifier @@ -61,7 +63,10 @@ public function getChannel() } /** - *

Describes the purpose and type of the Channel. A Channel can have one or more roles.

+ *
    + *
  • ProductDistribution for Product Distribution Channels allowed for the Store. Also required for Standalone Prices.
  • + *
  • InventorySupply for Inventory Supply Channels allowed for the Store.
  • + *
* * @return null|string diff --git a/lib/commercetools-api/src/Models/Error/MissingRoleOnChannelErrorModel.php b/lib/commercetools-api/src/Models/Error/MissingRoleOnChannelErrorModel.php index ff2fb427543..e019c108585 100644 --- a/lib/commercetools-api/src/Models/Error/MissingRoleOnChannelErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/MissingRoleOnChannelErrorModel.php @@ -81,6 +81,8 @@ public function getCode() } /** + *

"Given channel with $idOrKeyOfChannel does not have the required role $role."

+ * * * @return null|string */ @@ -99,7 +101,7 @@ public function getMessage() } /** - *

ResourceIdentifier to a Channel.

+ *

ResourceIdentifier to a given Channel.

* * * @return null|ChannelResourceIdentifier @@ -120,7 +122,10 @@ public function getChannel() } /** - *

Describes the purpose and type of the Channel. A Channel can have one or more roles.

+ *
    + *
  • ProductDistribution for Product Distribution Channels allowed for the Store. Also required for Standalone Prices.
  • + *
  • InventorySupply for Inventory Supply Channels allowed for the Store.
  • + *
* * * @return null|string diff --git a/lib/commercetools-api/src/Models/Error/MissingTaxRateForCountryError.php b/lib/commercetools-api/src/Models/Error/MissingTaxRateForCountryError.php index eba593a4df4..ca36bd2f57f 100644 --- a/lib/commercetools-api/src/Models/Error/MissingTaxRateForCountryError.php +++ b/lib/commercetools-api/src/Models/Error/MissingTaxRateForCountryError.php @@ -19,22 +19,47 @@ interface MissingTaxRateForCountryError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"Tax category $taxCategoryId is missing a tax rate for country $countriesAndStates."

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

Unique identifier of the TaxCategory.

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

Country code of the geographic location.

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

State within the country, such as Texas in the United States.

+ * * @return null|string */ public function getState(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?string $taxCategoryId */ diff --git a/lib/commercetools-api/src/Models/Error/MissingTaxRateForCountryErrorBuilder.php b/lib/commercetools-api/src/Models/Error/MissingTaxRateForCountryErrorBuilder.php index 39e142562d4..f4b7f5e507c 100644 --- a/lib/commercetools-api/src/Models/Error/MissingTaxRateForCountryErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/MissingTaxRateForCountryErrorBuilder.php @@ -45,6 +45,8 @@ final class MissingTaxRateForCountryErrorBuilder implements Builder private $state; /** + *

"Tax category $taxCategoryId is missing a tax rate for country $countriesAndStates."

+ * * @return null|string */ @@ -54,6 +56,8 @@ public function getMessage() } /** + *

Unique identifier of the TaxCategory.

+ * * @return null|string */ @@ -63,6 +67,8 @@ public function getTaxCategoryId() } /** + *

Country code of the geographic location.

+ * * @return null|string */ @@ -72,6 +78,8 @@ public function getCountry() } /** + *

State within the country, such as Texas in the United States.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/MissingTaxRateForCountryErrorModel.php b/lib/commercetools-api/src/Models/Error/MissingTaxRateForCountryErrorModel.php index 918a899c92f..56f30236397 100644 --- a/lib/commercetools-api/src/Models/Error/MissingTaxRateForCountryErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/MissingTaxRateForCountryErrorModel.php @@ -87,6 +87,8 @@ public function getCode() } /** + *

"Tax category $taxCategoryId is missing a tax rate for country $countriesAndStates."

+ * * * @return null|string */ @@ -105,6 +107,8 @@ public function getMessage() } /** + *

Unique identifier of the TaxCategory.

+ * * * @return null|string */ @@ -123,6 +127,8 @@ public function getTaxCategoryId() } /** + *

Country code of the geographic location.

+ * * * @return null|string */ @@ -141,6 +147,8 @@ public function getCountry() } /** + *

State within the country, such as Texas in the United States.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/NoMatchingProductDiscountFoundError.php b/lib/commercetools-api/src/Models/Error/NoMatchingProductDiscountFoundError.php index baeca098dab..3f2c3a09e22 100644 --- a/lib/commercetools-api/src/Models/Error/NoMatchingProductDiscountFoundError.php +++ b/lib/commercetools-api/src/Models/Error/NoMatchingProductDiscountFoundError.php @@ -13,4 +13,22 @@ interface NoMatchingProductDiscountFoundError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"Couldn't find a matching product discount for: productId=$productId, variantId=$variantId, price=$price."

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/NoMatchingProductDiscountFoundErrorBuilder.php b/lib/commercetools-api/src/Models/Error/NoMatchingProductDiscountFoundErrorBuilder.php index 30ce1c8f584..c9d51b600d8 100644 --- a/lib/commercetools-api/src/Models/Error/NoMatchingProductDiscountFoundErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/NoMatchingProductDiscountFoundErrorBuilder.php @@ -27,6 +27,8 @@ final class NoMatchingProductDiscountFoundErrorBuilder implements Builder private $message; /** + *

"Couldn't find a matching product discount for: productId=$productId, variantId=$variantId, price=$price."

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/NoMatchingProductDiscountFoundErrorModel.php b/lib/commercetools-api/src/Models/Error/NoMatchingProductDiscountFoundErrorModel.php index c08da3f95ad..6348e6ce2a0 100644 --- a/lib/commercetools-api/src/Models/Error/NoMatchingProductDiscountFoundErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/NoMatchingProductDiscountFoundErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

"Couldn't find a matching product discount for: productId=$productId, variantId=$variantId, price=$price."

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/NotEnabledError.php b/lib/commercetools-api/src/Models/Error/NotEnabledError.php index 785c6ac6902..52d2266e817 100644 --- a/lib/commercetools-api/src/Models/Error/NotEnabledError.php +++ b/lib/commercetools-api/src/Models/Error/NotEnabledError.php @@ -13,4 +13,22 @@ interface NotEnabledError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"The category recommendations API is not yet enabled for your project."

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/NotEnabledErrorBuilder.php b/lib/commercetools-api/src/Models/Error/NotEnabledErrorBuilder.php index fc1e083939c..ff7d613fa9d 100644 --- a/lib/commercetools-api/src/Models/Error/NotEnabledErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/NotEnabledErrorBuilder.php @@ -27,6 +27,8 @@ final class NotEnabledErrorBuilder implements Builder private $message; /** + *

"The category recommendations API is not yet enabled for your project."

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/NotEnabledErrorModel.php b/lib/commercetools-api/src/Models/Error/NotEnabledErrorModel.php index 5eaa8df34ba..35378e18090 100644 --- a/lib/commercetools-api/src/Models/Error/NotEnabledErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/NotEnabledErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

"The category recommendations API is not yet enabled for your project."

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/ObjectNotFoundError.php b/lib/commercetools-api/src/Models/Error/ObjectNotFoundError.php index aa1f86a2009..b9de68fe6fc 100644 --- a/lib/commercetools-api/src/Models/Error/ObjectNotFoundError.php +++ b/lib/commercetools-api/src/Models/Error/ObjectNotFoundError.php @@ -13,4 +13,22 @@ interface ObjectNotFoundError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"A $resourceType with identifier $id was unexpectedly not found."

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/ObjectNotFoundErrorBuilder.php b/lib/commercetools-api/src/Models/Error/ObjectNotFoundErrorBuilder.php index 02933975ba8..eba33e6ee63 100644 --- a/lib/commercetools-api/src/Models/Error/ObjectNotFoundErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/ObjectNotFoundErrorBuilder.php @@ -27,6 +27,8 @@ final class ObjectNotFoundErrorBuilder implements Builder private $message; /** + *

"A $resourceType with identifier $id was unexpectedly not found."

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/ObjectNotFoundErrorModel.php b/lib/commercetools-api/src/Models/Error/ObjectNotFoundErrorModel.php index 97a411a775b..e33cf7a20b0 100644 --- a/lib/commercetools-api/src/Models/Error/ObjectNotFoundErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/ObjectNotFoundErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

"A $resourceType with identifier $id was unexpectedly not found."

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/OutOfStockError.php b/lib/commercetools-api/src/Models/Error/OutOfStockError.php index b0b39624d21..4563f89ed07 100644 --- a/lib/commercetools-api/src/Models/Error/OutOfStockError.php +++ b/lib/commercetools-api/src/Models/Error/OutOfStockError.php @@ -18,16 +18,39 @@ interface OutOfStockError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"Some line items are out of stock at the time of placing the order: $itemSku."

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

Unique identifiers of the Line Items that are out of stock.

+ * + * @return null|array */ public function getLineItems(); /** + *

SKUs of the Line Items that are out of stock.

+ * * @return null|array */ public function getSkus(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?array $lineItems */ diff --git a/lib/commercetools-api/src/Models/Error/OutOfStockErrorBuilder.php b/lib/commercetools-api/src/Models/Error/OutOfStockErrorBuilder.php index 02219558a3e..c756c89ca7f 100644 --- a/lib/commercetools-api/src/Models/Error/OutOfStockErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/OutOfStockErrorBuilder.php @@ -39,6 +39,8 @@ final class OutOfStockErrorBuilder implements Builder private $skus; /** + *

"Some line items are out of stock at the time of placing the order: $itemSku."

+ * * @return null|string */ @@ -48,6 +50,8 @@ public function getMessage() } /** + *

Unique identifiers of the Line Items that are out of stock.

+ * * @return null|array */ @@ -57,6 +61,8 @@ public function getLineItems() } /** + *

SKUs of the Line Items that are out of stock.

+ * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/Error/OutOfStockErrorModel.php b/lib/commercetools-api/src/Models/Error/OutOfStockErrorModel.php index 0d9b18bd342..c618c85a52f 100644 --- a/lib/commercetools-api/src/Models/Error/OutOfStockErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/OutOfStockErrorModel.php @@ -79,6 +79,8 @@ public function getCode() } /** + *

"Some line items are out of stock at the time of placing the order: $itemSku."

+ * * * @return null|string */ @@ -97,6 +99,8 @@ public function getMessage() } /** + *

Unique identifiers of the Line Items that are out of stock.

+ * * * @return null|array */ @@ -115,6 +119,8 @@ public function getLineItems() } /** + *

SKUs of the Line Items that are out of stock.

+ * * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/Error/OverCapacityError.php b/lib/commercetools-api/src/Models/Error/OverCapacityError.php index 5bd0d41710d..7c24d106e4c 100644 --- a/lib/commercetools-api/src/Models/Error/OverCapacityError.php +++ b/lib/commercetools-api/src/Models/Error/OverCapacityError.php @@ -13,4 +13,22 @@ interface OverCapacityError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

Plain text description of the error.

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/OverCapacityErrorBuilder.php b/lib/commercetools-api/src/Models/Error/OverCapacityErrorBuilder.php index 74959f62464..6e44004c99e 100644 --- a/lib/commercetools-api/src/Models/Error/OverCapacityErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/OverCapacityErrorBuilder.php @@ -27,6 +27,8 @@ final class OverCapacityErrorBuilder implements Builder private $message; /** + *

Plain text description of the error.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/OverCapacityErrorModel.php b/lib/commercetools-api/src/Models/Error/OverCapacityErrorModel.php index 2a8434797a0..d28abb9b12a 100644 --- a/lib/commercetools-api/src/Models/Error/OverCapacityErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/OverCapacityErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

Plain text description of the error.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/OverlappingStandalonePriceValidityError.php b/lib/commercetools-api/src/Models/Error/OverlappingStandalonePriceValidityError.php index 46614e79e01..ece309a2282 100644 --- a/lib/commercetools-api/src/Models/Error/OverlappingStandalonePriceValidityError.php +++ b/lib/commercetools-api/src/Models/Error/OverlappingStandalonePriceValidityError.php @@ -29,7 +29,21 @@ interface OverlappingStandalonePriceValidityError extends ErrorObject public const FIELD_CONFLICTING_VALID_UNTIL = 'conflictingValidUntil'; /** - *

Reference to a StandalonePrice.

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

Two standalone prices have overlapping validity periods."

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

Reference to the conflicting Standalone Price.

* * @return null|StandalonePriceReference @@ -37,25 +51,31 @@ interface OverlappingStandalonePriceValidityError extends ErrorObject public function getConflictingStandalonePrice(); /** + *

SKU of the ProductVariant to which the conflicting Standalone Price is associated.

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

Currency code of the country.

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

Country code of the geographic location.

+ * * @return null|string */ public function getCountry(); /** - *

ResourceIdentifier to a CustomerGroup.

+ *

CustomerGroup for which the Standalone Price is valid.

* * @return null|CustomerGroupResourceIdentifier @@ -63,7 +83,7 @@ public function getCountry(); public function getCustomerGroup(); /** - *

ResourceIdentifier to a Channel.

+ *

Channel for which the Standalone Price is valid.

* * @return null|ChannelResourceIdentifier @@ -71,29 +91,42 @@ public function getCustomerGroup(); public function getChannel(); /** + *

Date and time (UTC) from which the Standalone Price is valid.

+ * * @return null|DateTimeImmutable */ public function getValidFrom(); /** + *

Date and time (UTC) until which the Standalone Price is valid.

+ * * @return null|DateTimeImmutable */ public function getValidUntil(); /** + *

Date and time (UTC) from which the conflicting Standalone Price is valid.

+ * * @return null|DateTimeImmutable */ public function getConflictingValidFrom(); /** + *

Date and time (UTC) until which the conflicting Standalone Price is valid.

+ * * @return null|DateTimeImmutable */ public function getConflictingValidUntil(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?StandalonePriceReference $conflictingStandalonePrice */ diff --git a/lib/commercetools-api/src/Models/Error/OverlappingStandalonePriceValidityErrorBuilder.php b/lib/commercetools-api/src/Models/Error/OverlappingStandalonePriceValidityErrorBuilder.php index d347dbeba7a..d6511ba8abe 100644 --- a/lib/commercetools-api/src/Models/Error/OverlappingStandalonePriceValidityErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/OverlappingStandalonePriceValidityErrorBuilder.php @@ -94,6 +94,8 @@ final class OverlappingStandalonePriceValidityErrorBuilder implements Builder private $conflictingValidUntil; /** + *

Two standalone prices have overlapping validity periods."

+ * * @return null|string */ @@ -103,7 +105,7 @@ public function getMessage() } /** - *

Reference to a StandalonePrice.

+ *

Reference to the conflicting Standalone Price.

* * @return null|StandalonePriceReference @@ -114,6 +116,8 @@ public function getConflictingStandalonePrice() } /** + *

SKU of the ProductVariant to which the conflicting Standalone Price is associated.

+ * * @return null|string */ @@ -123,6 +127,8 @@ public function getSku() } /** + *

Currency code of the country.

+ * * @return null|string */ @@ -132,6 +138,8 @@ public function getCurrency() } /** + *

Country code of the geographic location.

+ * * @return null|string */ @@ -141,7 +149,7 @@ public function getCountry() } /** - *

ResourceIdentifier to a CustomerGroup.

+ *

CustomerGroup for which the Standalone Price is valid.

* * @return null|CustomerGroupResourceIdentifier @@ -152,7 +160,7 @@ public function getCustomerGroup() } /** - *

ResourceIdentifier to a Channel.

+ *

Channel for which the Standalone Price is valid.

* * @return null|ChannelResourceIdentifier @@ -163,6 +171,8 @@ public function getChannel() } /** + *

Date and time (UTC) from which the Standalone Price is valid.

+ * * @return null|DateTimeImmutable */ @@ -172,6 +182,8 @@ public function getValidFrom() } /** + *

Date and time (UTC) until which the Standalone Price is valid.

+ * * @return null|DateTimeImmutable */ @@ -181,6 +193,8 @@ public function getValidUntil() } /** + *

Date and time (UTC) from which the conflicting Standalone Price is valid.

+ * * @return null|DateTimeImmutable */ @@ -190,6 +204,8 @@ public function getConflictingValidFrom() } /** + *

Date and time (UTC) until which the conflicting Standalone Price is valid.

+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Error/OverlappingStandalonePriceValidityErrorModel.php b/lib/commercetools-api/src/Models/Error/OverlappingStandalonePriceValidityErrorModel.php index 181cef82f67..240440cb93a 100644 --- a/lib/commercetools-api/src/Models/Error/OverlappingStandalonePriceValidityErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/OverlappingStandalonePriceValidityErrorModel.php @@ -150,6 +150,8 @@ public function getCode() } /** + *

Two standalone prices have overlapping validity periods."

+ * * * @return null|string */ @@ -168,7 +170,7 @@ public function getMessage() } /** - *

Reference to a StandalonePrice.

+ *

Reference to the conflicting Standalone Price.

* * * @return null|StandalonePriceReference @@ -189,6 +191,8 @@ public function getConflictingStandalonePrice() } /** + *

SKU of the ProductVariant to which the conflicting Standalone Price is associated.

+ * * * @return null|string */ @@ -207,6 +211,8 @@ public function getSku() } /** + *

Currency code of the country.

+ * * * @return null|string */ @@ -225,6 +231,8 @@ public function getCurrency() } /** + *

Country code of the geographic location.

+ * * * @return null|string */ @@ -243,7 +251,7 @@ public function getCountry() } /** - *

ResourceIdentifier to a CustomerGroup.

+ *

CustomerGroup for which the Standalone Price is valid.

* * * @return null|CustomerGroupResourceIdentifier @@ -264,7 +272,7 @@ public function getCustomerGroup() } /** - *

ResourceIdentifier to a Channel.

+ *

Channel for which the Standalone Price is valid.

* * * @return null|ChannelResourceIdentifier @@ -285,6 +293,8 @@ public function getChannel() } /** + *

Date and time (UTC) from which the Standalone Price is valid.

+ * * * @return null|DateTimeImmutable */ @@ -307,6 +317,8 @@ public function getValidFrom() } /** + *

Date and time (UTC) until which the Standalone Price is valid.

+ * * * @return null|DateTimeImmutable */ @@ -329,6 +341,8 @@ public function getValidUntil() } /** + *

Date and time (UTC) from which the conflicting Standalone Price is valid.

+ * * * @return null|DateTimeImmutable */ @@ -351,6 +365,8 @@ public function getConflictingValidFrom() } /** + *

Date and time (UTC) until which the conflicting Standalone Price is valid.

+ * * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Error/PendingOperationError.php b/lib/commercetools-api/src/Models/Error/PendingOperationError.php index 207ff7fad2d..91fca87f42d 100644 --- a/lib/commercetools-api/src/Models/Error/PendingOperationError.php +++ b/lib/commercetools-api/src/Models/Error/PendingOperationError.php @@ -13,4 +13,22 @@ interface PendingOperationError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

Plain text description of the error.

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/PendingOperationErrorBuilder.php b/lib/commercetools-api/src/Models/Error/PendingOperationErrorBuilder.php index a21425ba4b1..4d925da9380 100644 --- a/lib/commercetools-api/src/Models/Error/PendingOperationErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/PendingOperationErrorBuilder.php @@ -27,6 +27,8 @@ final class PendingOperationErrorBuilder implements Builder private $message; /** + *

Plain text description of the error.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/PendingOperationErrorModel.php b/lib/commercetools-api/src/Models/Error/PendingOperationErrorModel.php index 9321ccd4468..bc0cdef3ba7 100644 --- a/lib/commercetools-api/src/Models/Error/PendingOperationErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/PendingOperationErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

Plain text description of the error.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/PriceChangedError.php b/lib/commercetools-api/src/Models/Error/PriceChangedError.php index dcf1c9a09aa..8dd2e5d9237 100644 --- a/lib/commercetools-api/src/Models/Error/PriceChangedError.php +++ b/lib/commercetools-api/src/Models/Error/PriceChangedError.php @@ -18,16 +18,39 @@ interface PriceChangedError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

Plain text description of the reason for the Price change. For example, "The price or tax of some line items changed at the time of placing the order: $lineItems.".

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

Unique identifiers of the Line Items for which the Price or TaxRate has changed.

+ * + * @return null|array */ public function getLineItems(); /** + *

true if the ShippingRate has changed.

+ * * @return null|bool */ public function getShipping(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?array $lineItems */ diff --git a/lib/commercetools-api/src/Models/Error/PriceChangedErrorBuilder.php b/lib/commercetools-api/src/Models/Error/PriceChangedErrorBuilder.php index 8cda8d282d0..192f1c851de 100644 --- a/lib/commercetools-api/src/Models/Error/PriceChangedErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/PriceChangedErrorBuilder.php @@ -39,6 +39,8 @@ final class PriceChangedErrorBuilder implements Builder private $shipping; /** + *

Plain text description of the reason for the Price change. For example, "The price or tax of some line items changed at the time of placing the order: $lineItems.".

+ * * @return null|string */ @@ -48,6 +50,8 @@ public function getMessage() } /** + *

Unique identifiers of the Line Items for which the Price or TaxRate has changed.

+ * * @return null|array */ @@ -57,6 +61,8 @@ public function getLineItems() } /** + *

true if the ShippingRate has changed.

+ * * @return null|bool */ diff --git a/lib/commercetools-api/src/Models/Error/PriceChangedErrorModel.php b/lib/commercetools-api/src/Models/Error/PriceChangedErrorModel.php index f00e01e5012..0f53f96d62f 100644 --- a/lib/commercetools-api/src/Models/Error/PriceChangedErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/PriceChangedErrorModel.php @@ -79,6 +79,8 @@ public function getCode() } /** + *

Plain text description of the reason for the Price change. For example, "The price or tax of some line items changed at the time of placing the order: $lineItems.".

+ * * * @return null|string */ @@ -97,6 +99,8 @@ public function getMessage() } /** + *

Unique identifiers of the Line Items for which the Price or TaxRate has changed.

+ * * * @return null|array */ @@ -115,6 +119,8 @@ public function getLineItems() } /** + *

true if the ShippingRate has changed.

+ * * * @return null|bool */ diff --git a/lib/commercetools-api/src/Models/Error/ProductAssignmentMissingError.php b/lib/commercetools-api/src/Models/Error/ProductAssignmentMissingError.php new file mode 100644 index 00000000000..e1dd6d99fd0 --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/ProductAssignmentMissingError.php @@ -0,0 +1,50 @@ +"A Product Variant Selection can only be set for a Product previously added to the Product Selection."

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

Reference to the Product for which the error was returned.

+ * + + * @return null|ProductReference + */ + public function getProduct(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + + /** + * @param ?ProductReference $product + */ + public function setProduct(?ProductReference $product): void; +} diff --git a/lib/commercetools-api/src/Models/Error/ProductAssignmentMissingErrorBuilder.php b/lib/commercetools-api/src/Models/Error/ProductAssignmentMissingErrorBuilder.php new file mode 100644 index 00000000000..f2da59d67ec --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/ProductAssignmentMissingErrorBuilder.php @@ -0,0 +1,104 @@ + + */ +final class ProductAssignmentMissingErrorBuilder implements Builder +{ + /** + + * @var ?string + */ + private $message; + + /** + + * @var null|ProductReference|ProductReferenceBuilder + */ + private $product; + + /** + *

"A Product Variant Selection can only be set for a Product previously added to the Product Selection."

+ * + + * @return null|string + */ + public function getMessage() + { + return $this->message; + } + + /** + *

Reference to the Product for which the error was returned.

+ * + + * @return null|ProductReference + */ + public function getProduct() + { + return $this->product instanceof ProductReferenceBuilder ? $this->product->build() : $this->product; + } + + /** + * @param ?string $message + * @return $this + */ + public function withMessage(?string $message) + { + $this->message = $message; + + return $this; + } + + /** + * @param ?ProductReference $product + * @return $this + */ + public function withProduct(?ProductReference $product) + { + $this->product = $product; + + return $this; + } + + /** + * @deprecated use withProduct() instead + * @return $this + */ + public function withProductBuilder(?ProductReferenceBuilder $product) + { + $this->product = $product; + + return $this; + } + + public function build(): ProductAssignmentMissingError + { + return new ProductAssignmentMissingErrorModel( + $this->message, + $this->product instanceof ProductReferenceBuilder ? $this->product->build() : $this->product + ); + } + + public static function of(): ProductAssignmentMissingErrorBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Error/ProductAssignmentMissingErrorCollection.php b/lib/commercetools-api/src/Models/Error/ProductAssignmentMissingErrorCollection.php new file mode 100644 index 00000000000..ab658abe770 --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/ProductAssignmentMissingErrorCollection.php @@ -0,0 +1,56 @@ + + * @method ProductAssignmentMissingError current() + * @method ProductAssignmentMissingError end() + * @method ProductAssignmentMissingError at($offset) + */ +class ProductAssignmentMissingErrorCollection extends ErrorObjectCollection +{ + /** + * @psalm-assert ProductAssignmentMissingError $value + * @psalm-param ProductAssignmentMissingError|stdClass $value + * @throws InvalidArgumentException + * + * @return ProductAssignmentMissingErrorCollection + */ + public function add($value) + { + if (!$value instanceof ProductAssignmentMissingError) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?ProductAssignmentMissingError + */ + protected function mapper() + { + return function (?int $index): ?ProductAssignmentMissingError { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var ProductAssignmentMissingError $data */ + $data = ProductAssignmentMissingErrorModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Error/AccessDeniedErrorModel.php b/lib/commercetools-api/src/Models/Error/ProductAssignmentMissingErrorModel.php similarity index 57% rename from lib/commercetools-api/src/Models/Error/AccessDeniedErrorModel.php rename to lib/commercetools-api/src/Models/Error/ProductAssignmentMissingErrorModel.php index 053e14eaab2..696df1cfe66 100644 --- a/lib/commercetools-api/src/Models/Error/AccessDeniedErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/ProductAssignmentMissingErrorModel.php @@ -8,6 +8,8 @@ namespace Commercetools\Api\Models\Error; +use Commercetools\Api\Models\Product\ProductReference; +use Commercetools\Api\Models\Product\ProductReferenceModel; use Commercetools\Base\DateTimeImmutableCollection; use Commercetools\Base\JsonObject; use Commercetools\Base\JsonObjectModel; @@ -17,9 +19,9 @@ /** * @internal */ -final class AccessDeniedErrorModel extends JsonObjectModel implements AccessDeniedError +final class ProductAssignmentMissingErrorModel extends JsonObjectModel implements ProductAssignmentMissingError { - public const DISCRIMINATOR_VALUE = 'access_denied'; + public const DISCRIMINATOR_VALUE = 'ProductAssignmentMissing'; /** * * @var ?string @@ -32,15 +34,23 @@ final class AccessDeniedErrorModel extends JsonObjectModel implements AccessDeni */ protected $message; + /** + * + * @var ?ProductReference + */ + protected $product; + /** * @psalm-suppress MissingParamType */ public function __construct( ?string $message = null, + ?ProductReference $product = null, ?string $code = null ) { $this->message = $message; + $this->product = $product; $this->code = $code ?? self::DISCRIMINATOR_VALUE; } @@ -63,6 +73,8 @@ public function getCode() } /** + *

"A Product Variant Selection can only be set for a Product previously added to the Product Selection."

+ * * * @return null|string */ @@ -80,6 +92,27 @@ public function getMessage() return $this->message; } + /** + *

Reference to the Product for which the error was returned.

+ * + * + * @return null|ProductReference + */ + public function getProduct() + { + if (is_null($this->product)) { + /** @psalm-var stdClass|array|null $data */ + $data = $this->raw(self::FIELD_PRODUCT); + if (is_null($data)) { + return null; + } + + $this->product = ProductReferenceModel::of($data); + } + + return $this->product; + } + /** * @param ?string $message @@ -89,6 +122,14 @@ public function setMessage(?string $message): void $this->message = $message; } + /** + * @param ?ProductReference $product + */ + public function setProduct(?ProductReference $product): void + { + $this->product = $product; + } + /** * @return mixed */ diff --git a/lib/commercetools-api/src/Models/Error/ProductPresentWithDifferentVariantSelectionError.php b/lib/commercetools-api/src/Models/Error/ProductPresentWithDifferentVariantSelectionError.php new file mode 100644 index 00000000000..509a83b63d1 --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/ProductPresentWithDifferentVariantSelectionError.php @@ -0,0 +1,65 @@ +"Product is already present with the following different $variantSelections."

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

Reference to the Product for which the error was returned.

+ * + + * @return null|ProductReference + */ + public function getProduct(); + + /** + *

Existing Product Variant Selection for the Product in the Product Selection.

+ * + + * @return null|ProductVariantSelection + */ + public function getExistingVariantSelection(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + + /** + * @param ?ProductReference $product + */ + public function setProduct(?ProductReference $product): void; + + /** + * @param ?ProductVariantSelection $existingVariantSelection + */ + public function setExistingVariantSelection(?ProductVariantSelection $existingVariantSelection): void; +} diff --git a/lib/commercetools-api/src/Models/Error/ProductPresentWithDifferentVariantSelectionErrorBuilder.php b/lib/commercetools-api/src/Models/Error/ProductPresentWithDifferentVariantSelectionErrorBuilder.php new file mode 100644 index 00000000000..dfbbf179a4b --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/ProductPresentWithDifferentVariantSelectionErrorBuilder.php @@ -0,0 +1,146 @@ + + */ +final class ProductPresentWithDifferentVariantSelectionErrorBuilder implements Builder +{ + /** + + * @var ?string + */ + private $message; + + /** + + * @var null|ProductReference|ProductReferenceBuilder + */ + private $product; + + /** + + * @var null|ProductVariantSelection|ProductVariantSelectionBuilder + */ + private $existingVariantSelection; + + /** + *

"Product is already present with the following different $variantSelections."

+ * + + * @return null|string + */ + public function getMessage() + { + return $this->message; + } + + /** + *

Reference to the Product for which the error was returned.

+ * + + * @return null|ProductReference + */ + public function getProduct() + { + return $this->product instanceof ProductReferenceBuilder ? $this->product->build() : $this->product; + } + + /** + *

Existing Product Variant Selection for the Product in the Product Selection.

+ * + + * @return null|ProductVariantSelection + */ + public function getExistingVariantSelection() + { + return $this->existingVariantSelection instanceof ProductVariantSelectionBuilder ? $this->existingVariantSelection->build() : $this->existingVariantSelection; + } + + /** + * @param ?string $message + * @return $this + */ + public function withMessage(?string $message) + { + $this->message = $message; + + return $this; + } + + /** + * @param ?ProductReference $product + * @return $this + */ + public function withProduct(?ProductReference $product) + { + $this->product = $product; + + return $this; + } + + /** + * @param ?ProductVariantSelection $existingVariantSelection + * @return $this + */ + public function withExistingVariantSelection(?ProductVariantSelection $existingVariantSelection) + { + $this->existingVariantSelection = $existingVariantSelection; + + return $this; + } + + /** + * @deprecated use withProduct() instead + * @return $this + */ + public function withProductBuilder(?ProductReferenceBuilder $product) + { + $this->product = $product; + + return $this; + } + + /** + * @deprecated use withExistingVariantSelection() instead + * @return $this + */ + public function withExistingVariantSelectionBuilder(?ProductVariantSelectionBuilder $existingVariantSelection) + { + $this->existingVariantSelection = $existingVariantSelection; + + return $this; + } + + public function build(): ProductPresentWithDifferentVariantSelectionError + { + return new ProductPresentWithDifferentVariantSelectionErrorModel( + $this->message, + $this->product instanceof ProductReferenceBuilder ? $this->product->build() : $this->product, + $this->existingVariantSelection instanceof ProductVariantSelectionBuilder ? $this->existingVariantSelection->build() : $this->existingVariantSelection + ); + } + + public static function of(): ProductPresentWithDifferentVariantSelectionErrorBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Error/ProductPresentWithDifferentVariantSelectionErrorCollection.php b/lib/commercetools-api/src/Models/Error/ProductPresentWithDifferentVariantSelectionErrorCollection.php new file mode 100644 index 00000000000..7fe6bf78b5c --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/ProductPresentWithDifferentVariantSelectionErrorCollection.php @@ -0,0 +1,56 @@ + + * @method ProductPresentWithDifferentVariantSelectionError current() + * @method ProductPresentWithDifferentVariantSelectionError end() + * @method ProductPresentWithDifferentVariantSelectionError at($offset) + */ +class ProductPresentWithDifferentVariantSelectionErrorCollection extends ErrorObjectCollection +{ + /** + * @psalm-assert ProductPresentWithDifferentVariantSelectionError $value + * @psalm-param ProductPresentWithDifferentVariantSelectionError|stdClass $value + * @throws InvalidArgumentException + * + * @return ProductPresentWithDifferentVariantSelectionErrorCollection + */ + public function add($value) + { + if (!$value instanceof ProductPresentWithDifferentVariantSelectionError) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?ProductPresentWithDifferentVariantSelectionError + */ + protected function mapper() + { + return function (?int $index): ?ProductPresentWithDifferentVariantSelectionError { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var ProductPresentWithDifferentVariantSelectionError $data */ + $data = ProductPresentWithDifferentVariantSelectionErrorModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Error/ProductPresentWithDifferentVariantSelectionErrorModel.php b/lib/commercetools-api/src/Models/Error/ProductPresentWithDifferentVariantSelectionErrorModel.php new file mode 100644 index 00000000000..e5cdb6001e4 --- /dev/null +++ b/lib/commercetools-api/src/Models/Error/ProductPresentWithDifferentVariantSelectionErrorModel.php @@ -0,0 +1,184 @@ +message = $message; + $this->product = $product; + $this->existingVariantSelection = $existingVariantSelection; + $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; + } + + /** + *

"Product is already present with the following different $variantSelections."

+ * + * + * @return null|string + */ + public function getMessage() + { + if (is_null($this->message)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_MESSAGE); + if (is_null($data)) { + return null; + } + $this->message = (string) $data; + } + + return $this->message; + } + + /** + *

Reference to the Product for which the error was returned.

+ * + * + * @return null|ProductReference + */ + public function getProduct() + { + if (is_null($this->product)) { + /** @psalm-var stdClass|array|null $data */ + $data = $this->raw(self::FIELD_PRODUCT); + if (is_null($data)) { + return null; + } + + $this->product = ProductReferenceModel::of($data); + } + + return $this->product; + } + + /** + *

Existing Product Variant Selection for the Product in the Product Selection.

+ * + * + * @return null|ProductVariantSelection + */ + public function getExistingVariantSelection() + { + if (is_null($this->existingVariantSelection)) { + /** @psalm-var stdClass|array|null $data */ + $data = $this->raw(self::FIELD_EXISTING_VARIANT_SELECTION); + if (is_null($data)) { + return null; + } + + $this->existingVariantSelection = ProductVariantSelectionModel::of($data); + } + + return $this->existingVariantSelection; + } + + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void + { + $this->message = $message; + } + + /** + * @param ?ProductReference $product + */ + public function setProduct(?ProductReference $product): void + { + $this->product = $product; + } + + /** + * @param ?ProductVariantSelection $existingVariantSelection + */ + public function setExistingVariantSelection(?ProductVariantSelection $existingVariantSelection): void + { + $this->existingVariantSelection = $existingVariantSelection; + } + + /** + * @return mixed + */ + public function by(string $key) + { + $data = $this->raw($key); + if (is_null($data)) { + return null; + } + + return $data; + } +} diff --git a/lib/commercetools-api/src/Models/Error/ProjectNotConfiguredForLanguagesError.php b/lib/commercetools-api/src/Models/Error/ProjectNotConfiguredForLanguagesError.php index 20b7bb143b8..2c950afb174 100644 --- a/lib/commercetools-api/src/Models/Error/ProjectNotConfiguredForLanguagesError.php +++ b/lib/commercetools-api/src/Models/Error/ProjectNotConfiguredForLanguagesError.php @@ -17,10 +17,31 @@ interface ProjectNotConfiguredForLanguagesError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"The project is not configured for given languages."

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

Languages configured for the Store.

+ * + * @return null|array */ public function getLanguages(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?array $languages */ diff --git a/lib/commercetools-api/src/Models/Error/ProjectNotConfiguredForLanguagesErrorBuilder.php b/lib/commercetools-api/src/Models/Error/ProjectNotConfiguredForLanguagesErrorBuilder.php index 8baed851b10..3e72f96d870 100644 --- a/lib/commercetools-api/src/Models/Error/ProjectNotConfiguredForLanguagesErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/ProjectNotConfiguredForLanguagesErrorBuilder.php @@ -33,6 +33,8 @@ final class ProjectNotConfiguredForLanguagesErrorBuilder implements Builder private $languages; /** + *

"The project is not configured for given languages."

+ * * @return null|string */ @@ -42,6 +44,8 @@ public function getMessage() } /** + *

Languages configured for the Store.

+ * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/Error/ProjectNotConfiguredForLanguagesErrorModel.php b/lib/commercetools-api/src/Models/Error/ProjectNotConfiguredForLanguagesErrorModel.php index e1171439798..71f173f9266 100644 --- a/lib/commercetools-api/src/Models/Error/ProjectNotConfiguredForLanguagesErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/ProjectNotConfiguredForLanguagesErrorModel.php @@ -71,6 +71,8 @@ public function getCode() } /** + *

"The project is not configured for given languages."

+ * * * @return null|string */ @@ -89,6 +91,8 @@ public function getMessage() } /** + *

Languages configured for the Store.

+ * * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/Error/QueryComplexityLimitExceededError.php b/lib/commercetools-api/src/Models/Error/QueryComplexityLimitExceededError.php index 106fd1022dc..b6ded71335a 100644 --- a/lib/commercetools-api/src/Models/Error/QueryComplexityLimitExceededError.php +++ b/lib/commercetools-api/src/Models/Error/QueryComplexityLimitExceededError.php @@ -13,4 +13,20 @@ interface QueryComplexityLimitExceededError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/QueryTimedOutError.php b/lib/commercetools-api/src/Models/Error/QueryTimedOutError.php index 3dff0427f8d..98f261e3173 100644 --- a/lib/commercetools-api/src/Models/Error/QueryTimedOutError.php +++ b/lib/commercetools-api/src/Models/Error/QueryTimedOutError.php @@ -13,4 +13,22 @@ interface QueryTimedOutError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"The query timed out. If your query constantly times out, please check that it follows the performance best practices (see https://docs.commercetools.com/api/predicates/query#performance-considerations)."

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/QueryTimedOutErrorBuilder.php b/lib/commercetools-api/src/Models/Error/QueryTimedOutErrorBuilder.php index 7870dd54098..9e453df11ad 100644 --- a/lib/commercetools-api/src/Models/Error/QueryTimedOutErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/QueryTimedOutErrorBuilder.php @@ -27,6 +27,8 @@ final class QueryTimedOutErrorBuilder implements Builder private $message; /** + *

"The query timed out. If your query constantly times out, please check that it follows the performance best practices (see https://docs.commercetools.com/api/predicates/query#performance-considerations)."

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/QueryTimedOutErrorModel.php b/lib/commercetools-api/src/Models/Error/QueryTimedOutErrorModel.php index f77713d1c66..645923c69b6 100644 --- a/lib/commercetools-api/src/Models/Error/QueryTimedOutErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/QueryTimedOutErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

"The query timed out. If your query constantly times out, please check that it follows the performance best practices (see https://docs.commercetools.com/api/predicates/query#performance-considerations)."

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/ReferenceExistsError.php b/lib/commercetools-api/src/Models/Error/ReferenceExistsError.php index 6f2f568ec2d..7669a46325a 100644 --- a/lib/commercetools-api/src/Models/Error/ReferenceExistsError.php +++ b/lib/commercetools-api/src/Models/Error/ReferenceExistsError.php @@ -16,13 +16,32 @@ interface ReferenceExistsError extends ErrorObject public const FIELD_REFERENCED_BY = 'referencedBy'; /** - *

Type of resource the value should reference. Supported resource type identifiers are:

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

"Can not delete a $resource while it is referenced by at least one $referencedBy."

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

Type of referenced resource.

* * @return null|string */ public function getReferencedBy(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?string $referencedBy */ diff --git a/lib/commercetools-api/src/Models/Error/ReferenceExistsErrorBuilder.php b/lib/commercetools-api/src/Models/Error/ReferenceExistsErrorBuilder.php index 86ada46fd35..4d2075827ba 100644 --- a/lib/commercetools-api/src/Models/Error/ReferenceExistsErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/ReferenceExistsErrorBuilder.php @@ -33,6 +33,8 @@ final class ReferenceExistsErrorBuilder implements Builder private $referencedBy; /** + *

"Can not delete a $resource while it is referenced by at least one $referencedBy."

+ * * @return null|string */ @@ -42,7 +44,7 @@ public function getMessage() } /** - *

Type of resource the value should reference. Supported resource type identifiers are:

+ *

Type of referenced resource.

* * @return null|string diff --git a/lib/commercetools-api/src/Models/Error/ReferenceExistsErrorModel.php b/lib/commercetools-api/src/Models/Error/ReferenceExistsErrorModel.php index 920894dad06..1edd00ec6bd 100644 --- a/lib/commercetools-api/src/Models/Error/ReferenceExistsErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/ReferenceExistsErrorModel.php @@ -71,6 +71,8 @@ public function getCode() } /** + *

"Can not delete a $resource while it is referenced by at least one $referencedBy."

+ * * * @return null|string */ @@ -89,7 +91,7 @@ public function getMessage() } /** - *

Type of resource the value should reference. Supported resource type identifiers are:

+ *

Type of referenced resource.

* * * @return null|string diff --git a/lib/commercetools-api/src/Models/Error/ReferencedResourceNotFoundError.php b/lib/commercetools-api/src/Models/Error/ReferencedResourceNotFoundError.php index 41511118241..ddc4e29a2b9 100644 --- a/lib/commercetools-api/src/Models/Error/ReferencedResourceNotFoundError.php +++ b/lib/commercetools-api/src/Models/Error/ReferencedResourceNotFoundError.php @@ -18,7 +18,21 @@ interface ReferencedResourceNotFoundError extends ErrorObject public const FIELD_KEY = 'key'; /** - *

Type of resource the value should reference. Supported resource type identifiers are:

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

"The referenced object of type $typeId $predicate was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."

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

Type of referenced resource.

* * @return null|string @@ -26,17 +40,26 @@ interface ReferencedResourceNotFoundError extends ErrorObject public function getTypeId(); /** + *

Unique identifier of the referenced resource, if known.

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

User-defined unique identifier of the referenced resource, if known.

+ * * @return null|string */ public function getKey(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?string $typeId */ diff --git a/lib/commercetools-api/src/Models/Error/ReferencedResourceNotFoundErrorBuilder.php b/lib/commercetools-api/src/Models/Error/ReferencedResourceNotFoundErrorBuilder.php index 711ce4aed9a..316c7ef244b 100644 --- a/lib/commercetools-api/src/Models/Error/ReferencedResourceNotFoundErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/ReferencedResourceNotFoundErrorBuilder.php @@ -45,6 +45,8 @@ final class ReferencedResourceNotFoundErrorBuilder implements Builder private $key; /** + *

"The referenced object of type $typeId $predicate was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."

+ * * @return null|string */ @@ -54,7 +56,7 @@ public function getMessage() } /** - *

Type of resource the value should reference. Supported resource type identifiers are:

+ *

Type of referenced resource.

* * @return null|string @@ -65,6 +67,8 @@ public function getTypeId() } /** + *

Unique identifier of the referenced resource, if known.

+ * * @return null|string */ @@ -74,6 +78,8 @@ public function getId() } /** + *

User-defined unique identifier of the referenced resource, if known.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/ReferencedResourceNotFoundErrorModel.php b/lib/commercetools-api/src/Models/Error/ReferencedResourceNotFoundErrorModel.php index b1526e34b05..01a03f122f4 100644 --- a/lib/commercetools-api/src/Models/Error/ReferencedResourceNotFoundErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/ReferencedResourceNotFoundErrorModel.php @@ -87,6 +87,8 @@ public function getCode() } /** + *

"The referenced object of type $typeId $predicate was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."

+ * * * @return null|string */ @@ -105,7 +107,7 @@ public function getMessage() } /** - *

Type of resource the value should reference. Supported resource type identifiers are:

+ *

Type of referenced resource.

* * * @return null|string @@ -125,6 +127,8 @@ public function getTypeId() } /** + *

Unique identifier of the referenced resource, if known.

+ * * * @return null|string */ @@ -143,6 +147,8 @@ public function getId() } /** + *

User-defined unique identifier of the referenced resource, if known.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/RequiredFieldError.php b/lib/commercetools-api/src/Models/Error/RequiredFieldError.php index bcbd031ca58..0dcd06c1c08 100644 --- a/lib/commercetools-api/src/Models/Error/RequiredFieldError.php +++ b/lib/commercetools-api/src/Models/Error/RequiredFieldError.php @@ -17,10 +17,31 @@ interface RequiredFieldError extends ErrorObject /** + * @return null|string + */ + public function getCode(); + + /** + *

"A value is required for field $field."

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

Name of the field missing the value.

+ * + * @return null|string */ public function getField(); + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; + /** * @param ?string $field */ diff --git a/lib/commercetools-api/src/Models/Error/RequiredFieldErrorBuilder.php b/lib/commercetools-api/src/Models/Error/RequiredFieldErrorBuilder.php index 7bdd41d784e..b90834096c3 100644 --- a/lib/commercetools-api/src/Models/Error/RequiredFieldErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/RequiredFieldErrorBuilder.php @@ -33,6 +33,8 @@ final class RequiredFieldErrorBuilder implements Builder private $field; /** + *

"A value is required for field $field."

+ * * @return null|string */ @@ -42,6 +44,8 @@ public function getMessage() } /** + *

Name of the field missing the value.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/RequiredFieldErrorModel.php b/lib/commercetools-api/src/Models/Error/RequiredFieldErrorModel.php index 4190c095cd4..030be07184a 100644 --- a/lib/commercetools-api/src/Models/Error/RequiredFieldErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/RequiredFieldErrorModel.php @@ -71,6 +71,8 @@ public function getCode() } /** + *

"A value is required for field $field."

+ * * * @return null|string */ @@ -89,6 +91,8 @@ public function getMessage() } /** + *

Name of the field missing the value.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/ResourceNotFoundError.php b/lib/commercetools-api/src/Models/Error/ResourceNotFoundError.php index 068413bae3a..911d4afa10f 100644 --- a/lib/commercetools-api/src/Models/Error/ResourceNotFoundError.php +++ b/lib/commercetools-api/src/Models/Error/ResourceNotFoundError.php @@ -13,4 +13,22 @@ interface ResourceNotFoundError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"The Resource with ID $resourceId was not found."

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/ResourceNotFoundErrorBuilder.php b/lib/commercetools-api/src/Models/Error/ResourceNotFoundErrorBuilder.php index 1fc4c242b9b..2fb3bc6df11 100644 --- a/lib/commercetools-api/src/Models/Error/ResourceNotFoundErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/ResourceNotFoundErrorBuilder.php @@ -27,6 +27,8 @@ final class ResourceNotFoundErrorBuilder implements Builder private $message; /** + *

"The Resource with ID $resourceId was not found."

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/ResourceNotFoundErrorModel.php b/lib/commercetools-api/src/Models/Error/ResourceNotFoundErrorModel.php index de84e821ee7..59a0cd1c3b6 100644 --- a/lib/commercetools-api/src/Models/Error/ResourceNotFoundErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/ResourceNotFoundErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

"The Resource with ID $resourceId was not found."

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/ResourceSizeLimitExceededError.php b/lib/commercetools-api/src/Models/Error/ResourceSizeLimitExceededError.php index cac3d9cd451..d7f78ca6ed8 100644 --- a/lib/commercetools-api/src/Models/Error/ResourceSizeLimitExceededError.php +++ b/lib/commercetools-api/src/Models/Error/ResourceSizeLimitExceededError.php @@ -13,4 +13,22 @@ interface ResourceSizeLimitExceededError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"The resource size exceeds the maximal allowed size of 16 MB."

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/ResourceSizeLimitExceededErrorBuilder.php b/lib/commercetools-api/src/Models/Error/ResourceSizeLimitExceededErrorBuilder.php index e9e374cb837..23b092c7602 100644 --- a/lib/commercetools-api/src/Models/Error/ResourceSizeLimitExceededErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/ResourceSizeLimitExceededErrorBuilder.php @@ -27,6 +27,8 @@ final class ResourceSizeLimitExceededErrorBuilder implements Builder private $message; /** + *

"The resource size exceeds the maximal allowed size of 16 MB."

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/ResourceSizeLimitExceededErrorModel.php b/lib/commercetools-api/src/Models/Error/ResourceSizeLimitExceededErrorModel.php index 4b33aa2cb1b..41ddb1f0d6e 100644 --- a/lib/commercetools-api/src/Models/Error/ResourceSizeLimitExceededErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/ResourceSizeLimitExceededErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

"The resource size exceeds the maximal allowed size of 16 MB."

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/SearchDeactivatedError.php b/lib/commercetools-api/src/Models/Error/SearchDeactivatedError.php index c36a38e57db..5df4ae9b5e8 100644 --- a/lib/commercetools-api/src/Models/Error/SearchDeactivatedError.php +++ b/lib/commercetools-api/src/Models/Error/SearchDeactivatedError.php @@ -13,4 +13,22 @@ interface SearchDeactivatedError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"The endpoint is deactivated for this project. Please enable it via the Project endpoint, via the Merchant Center in the Project settings, or reach out to Support to enable it."

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/SearchDeactivatedErrorBuilder.php b/lib/commercetools-api/src/Models/Error/SearchDeactivatedErrorBuilder.php index 7656fe5999f..b5f2a43aa50 100644 --- a/lib/commercetools-api/src/Models/Error/SearchDeactivatedErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/SearchDeactivatedErrorBuilder.php @@ -27,6 +27,8 @@ final class SearchDeactivatedErrorBuilder implements Builder private $message; /** + *

"The endpoint is deactivated for this project. Please enable it via the Project endpoint, via the Merchant Center in the Project settings, or reach out to Support to enable it."

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/SearchDeactivatedErrorModel.php b/lib/commercetools-api/src/Models/Error/SearchDeactivatedErrorModel.php index f717e37ffd1..7bd3d04bf9a 100644 --- a/lib/commercetools-api/src/Models/Error/SearchDeactivatedErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/SearchDeactivatedErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

"The endpoint is deactivated for this project. Please enable it via the Project endpoint, via the Merchant Center in the Project settings, or reach out to Support to enable it."

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/SearchExecutionFailureError.php b/lib/commercetools-api/src/Models/Error/SearchExecutionFailureError.php index f9e29f2cb82..53b3f78d550 100644 --- a/lib/commercetools-api/src/Models/Error/SearchExecutionFailureError.php +++ b/lib/commercetools-api/src/Models/Error/SearchExecutionFailureError.php @@ -13,4 +13,22 @@ interface SearchExecutionFailureError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"Something went wrong during the search query execution. In most case this happens due to usage of non-existing fields and custom product attributes. Please verify all filters and facets in your search query and make sure that all paths are correct."

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/SearchExecutionFailureErrorBuilder.php b/lib/commercetools-api/src/Models/Error/SearchExecutionFailureErrorBuilder.php index e210b96cd58..b3af6ba8118 100644 --- a/lib/commercetools-api/src/Models/Error/SearchExecutionFailureErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/SearchExecutionFailureErrorBuilder.php @@ -27,6 +27,8 @@ final class SearchExecutionFailureErrorBuilder implements Builder private $message; /** + *

"Something went wrong during the search query execution. In most case this happens due to usage of non-existing fields and custom product attributes. Please verify all filters and facets in your search query and make sure that all paths are correct."

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/SearchExecutionFailureErrorModel.php b/lib/commercetools-api/src/Models/Error/SearchExecutionFailureErrorModel.php index 0259f1b0e74..f2686f9e3b0 100644 --- a/lib/commercetools-api/src/Models/Error/SearchExecutionFailureErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/SearchExecutionFailureErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

"Something went wrong during the search query execution. In most case this happens due to usage of non-existing fields and custom product attributes. Please verify all filters and facets in your search query and make sure that all paths are correct."

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/SearchFacetPathNotFoundError.php b/lib/commercetools-api/src/Models/Error/SearchFacetPathNotFoundError.php index da68858fc98..6aa79f6ddae 100644 --- a/lib/commercetools-api/src/Models/Error/SearchFacetPathNotFoundError.php +++ b/lib/commercetools-api/src/Models/Error/SearchFacetPathNotFoundError.php @@ -13,4 +13,22 @@ interface SearchFacetPathNotFoundError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"Facet path $path not found."

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/SearchFacetPathNotFoundErrorBuilder.php b/lib/commercetools-api/src/Models/Error/SearchFacetPathNotFoundErrorBuilder.php index b3809df5e80..1086dc842e2 100644 --- a/lib/commercetools-api/src/Models/Error/SearchFacetPathNotFoundErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/SearchFacetPathNotFoundErrorBuilder.php @@ -27,6 +27,8 @@ final class SearchFacetPathNotFoundErrorBuilder implements Builder private $message; /** + *

"Facet path $path not found."

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/SearchFacetPathNotFoundErrorModel.php b/lib/commercetools-api/src/Models/Error/SearchFacetPathNotFoundErrorModel.php index aa04f97a788..f672faec20b 100644 --- a/lib/commercetools-api/src/Models/Error/SearchFacetPathNotFoundErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/SearchFacetPathNotFoundErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

"Facet path $path not found."

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/SearchIndexingInProgressError.php b/lib/commercetools-api/src/Models/Error/SearchIndexingInProgressError.php index a2620a7c0e0..bd132484a88 100644 --- a/lib/commercetools-api/src/Models/Error/SearchIndexingInProgressError.php +++ b/lib/commercetools-api/src/Models/Error/SearchIndexingInProgressError.php @@ -13,4 +13,22 @@ interface SearchIndexingInProgressError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"The indexing is currently in progress. Please wait until the status is "Activated" to execute search requests."

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/SearchIndexingInProgressErrorBuilder.php b/lib/commercetools-api/src/Models/Error/SearchIndexingInProgressErrorBuilder.php index 3e9c81d91eb..aa82b68ed00 100644 --- a/lib/commercetools-api/src/Models/Error/SearchIndexingInProgressErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/SearchIndexingInProgressErrorBuilder.php @@ -27,6 +27,8 @@ final class SearchIndexingInProgressErrorBuilder implements Builder private $message; /** + *

"The indexing is currently in progress. Please wait until the status is "Activated" to execute search requests."

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/SearchIndexingInProgressErrorModel.php b/lib/commercetools-api/src/Models/Error/SearchIndexingInProgressErrorModel.php index 89c5ab58d0f..afd8b4ff5dc 100644 --- a/lib/commercetools-api/src/Models/Error/SearchIndexingInProgressErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/SearchIndexingInProgressErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

"The indexing is currently in progress. Please wait until the status is "Activated" to execute search requests."

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/SemanticErrorError.php b/lib/commercetools-api/src/Models/Error/SemanticErrorError.php index 8456c415bd4..7c743d0f6c0 100644 --- a/lib/commercetools-api/src/Models/Error/SemanticErrorError.php +++ b/lib/commercetools-api/src/Models/Error/SemanticErrorError.php @@ -13,4 +13,22 @@ interface SemanticErrorError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

Plain text description of the error concerning the predicate. For example, "Invalid country code $countryCode provided for the field $fieldDefinition.".

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/SemanticErrorErrorBuilder.php b/lib/commercetools-api/src/Models/Error/SemanticErrorErrorBuilder.php index 08bee928318..d9828369ea4 100644 --- a/lib/commercetools-api/src/Models/Error/SemanticErrorErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/SemanticErrorErrorBuilder.php @@ -27,6 +27,8 @@ final class SemanticErrorErrorBuilder implements Builder private $message; /** + *

Plain text description of the error concerning the predicate. For example, "Invalid country code $countryCode provided for the field $fieldDefinition.".

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/SemanticErrorErrorModel.php b/lib/commercetools-api/src/Models/Error/SemanticErrorErrorModel.php index 68e7479db25..e8be952ad76 100644 --- a/lib/commercetools-api/src/Models/Error/SemanticErrorErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/SemanticErrorErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

Plain text description of the error concerning the predicate. For example, "Invalid country code $countryCode provided for the field $fieldDefinition.".

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/ShippingMethodDoesNotMatchCartError.php b/lib/commercetools-api/src/Models/Error/ShippingMethodDoesNotMatchCartError.php index 4a1aa351158..c3626422ae8 100644 --- a/lib/commercetools-api/src/Models/Error/ShippingMethodDoesNotMatchCartError.php +++ b/lib/commercetools-api/src/Models/Error/ShippingMethodDoesNotMatchCartError.php @@ -13,4 +13,22 @@ interface ShippingMethodDoesNotMatchCartError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"The predicate does not match the cart."

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/ShippingMethodDoesNotMatchCartErrorBuilder.php b/lib/commercetools-api/src/Models/Error/ShippingMethodDoesNotMatchCartErrorBuilder.php index a95f114e5ef..b3ab4200e2a 100644 --- a/lib/commercetools-api/src/Models/Error/ShippingMethodDoesNotMatchCartErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/ShippingMethodDoesNotMatchCartErrorBuilder.php @@ -27,6 +27,8 @@ final class ShippingMethodDoesNotMatchCartErrorBuilder implements Builder private $message; /** + *

"The predicate does not match the cart."

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/ShippingMethodDoesNotMatchCartErrorModel.php b/lib/commercetools-api/src/Models/Error/ShippingMethodDoesNotMatchCartErrorModel.php index 4d5231d0111..06362c7df73 100644 --- a/lib/commercetools-api/src/Models/Error/ShippingMethodDoesNotMatchCartErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/ShippingMethodDoesNotMatchCartErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

"The predicate does not match the cart."

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/SyntaxErrorError.php b/lib/commercetools-api/src/Models/Error/SyntaxErrorError.php index 23bb81d6bd3..1ab9d89738b 100644 --- a/lib/commercetools-api/src/Models/Error/SyntaxErrorError.php +++ b/lib/commercetools-api/src/Models/Error/SyntaxErrorError.php @@ -13,4 +13,22 @@ interface SyntaxErrorError extends ErrorObject { + /** + + * @return null|string + */ + public function getCode(); + + /** + *

"Syntax error while parsing $fieldDefinition."

+ * + + * @return null|string + */ + public function getMessage(); + + /** + * @param ?string $message + */ + public function setMessage(?string $message): void; } diff --git a/lib/commercetools-api/src/Models/Error/SyntaxErrorErrorBuilder.php b/lib/commercetools-api/src/Models/Error/SyntaxErrorErrorBuilder.php index bc925987edb..bbb33a7eabf 100644 --- a/lib/commercetools-api/src/Models/Error/SyntaxErrorErrorBuilder.php +++ b/lib/commercetools-api/src/Models/Error/SyntaxErrorErrorBuilder.php @@ -27,6 +27,8 @@ final class SyntaxErrorErrorBuilder implements Builder private $message; /** + *

"Syntax error while parsing $fieldDefinition."

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/SyntaxErrorErrorModel.php b/lib/commercetools-api/src/Models/Error/SyntaxErrorErrorModel.php index 869f5b730e1..b349a5d5578 100644 --- a/lib/commercetools-api/src/Models/Error/SyntaxErrorErrorModel.php +++ b/lib/commercetools-api/src/Models/Error/SyntaxErrorErrorModel.php @@ -63,6 +63,8 @@ public function getCode() } /** + *

"Syntax error while parsing $fieldDefinition."

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Error/VariantValues.php b/lib/commercetools-api/src/Models/Error/VariantValues.php index 2d9057a4ed5..6acfa1690d3 100644 --- a/lib/commercetools-api/src/Models/Error/VariantValues.php +++ b/lib/commercetools-api/src/Models/Error/VariantValues.php @@ -20,18 +20,24 @@ interface VariantValues extends JsonObject public const FIELD_ATTRIBUTES = 'attributes'; /** + *

SKU of the ProductVariant.

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

Embedded Prices of the ProductVariant.

+ * * @return null|PriceDraftCollection */ public function getPrices(); /** + *

Attributes of the ProductVariant.

+ * * @return null|AttributeCollection */ diff --git a/lib/commercetools-api/src/Models/Error/VariantValuesBuilder.php b/lib/commercetools-api/src/Models/Error/VariantValuesBuilder.php index 27c01fff0fe..413ebc320a9 100644 --- a/lib/commercetools-api/src/Models/Error/VariantValuesBuilder.php +++ b/lib/commercetools-api/src/Models/Error/VariantValuesBuilder.php @@ -41,6 +41,8 @@ final class VariantValuesBuilder implements Builder private $attributes; /** + *

SKU of the ProductVariant.

+ * * @return null|string */ @@ -50,6 +52,8 @@ public function getSku() } /** + *

Embedded Prices of the ProductVariant.

+ * * @return null|PriceDraftCollection */ @@ -59,6 +63,8 @@ public function getPrices() } /** + *

Attributes of the ProductVariant.

+ * * @return null|AttributeCollection */ diff --git a/lib/commercetools-api/src/Models/Error/VariantValuesModel.php b/lib/commercetools-api/src/Models/Error/VariantValuesModel.php index 569b5d43641..bff7fafa8e9 100644 --- a/lib/commercetools-api/src/Models/Error/VariantValuesModel.php +++ b/lib/commercetools-api/src/Models/Error/VariantValuesModel.php @@ -54,6 +54,8 @@ public function __construct( } /** + *

SKU of the ProductVariant.

+ * * * @return null|string */ @@ -72,6 +74,8 @@ public function getSku() } /** + *

Embedded Prices of the ProductVariant.

+ * * * @return null|PriceDraftCollection */ @@ -90,6 +94,8 @@ public function getPrices() } /** + *

Attributes of the ProductVariant.

+ * * * @return null|AttributeCollection */ diff --git a/lib/commercetools-api/src/Models/Error/WeakPasswordError.php b/lib/commercetools-api/src/Models/Error/WeakPasswordError.php deleted file mode 100644 index 8df85d076f6..00000000000 --- a/lib/commercetools-api/src/Models/Error/WeakPasswordError.php +++ /dev/null @@ -1,16 +0,0 @@ - - */ -final class WeakPasswordErrorBuilder implements Builder -{ - /** - - * @var ?string - */ - private $message; - - /** - - * @return null|string - */ - public function getMessage() - { - return $this->message; - } - - /** - * @param ?string $message - * @return $this - */ - public function withMessage(?string $message) - { - $this->message = $message; - - return $this; - } - - - public function build(): WeakPasswordError - { - return new WeakPasswordErrorModel( - $this->message - ); - } - - public static function of(): WeakPasswordErrorBuilder - { - return new self(); - } -} diff --git a/lib/commercetools-api/src/Models/Error/WeakPasswordErrorCollection.php b/lib/commercetools-api/src/Models/Error/WeakPasswordErrorCollection.php deleted file mode 100644 index d14624f5c9f..00000000000 --- a/lib/commercetools-api/src/Models/Error/WeakPasswordErrorCollection.php +++ /dev/null @@ -1,56 +0,0 @@ - - * @method WeakPasswordError current() - * @method WeakPasswordError end() - * @method WeakPasswordError at($offset) - */ -class WeakPasswordErrorCollection extends ErrorObjectCollection -{ - /** - * @psalm-assert WeakPasswordError $value - * @psalm-param WeakPasswordError|stdClass $value - * @throws InvalidArgumentException - * - * @return WeakPasswordErrorCollection - */ - public function add($value) - { - if (!$value instanceof WeakPasswordError) { - throw new InvalidArgumentException(); - } - $this->store($value); - - return $this; - } - - /** - * @psalm-return callable(int):?WeakPasswordError - */ - protected function mapper() - { - return function (?int $index): ?WeakPasswordError { - $data = $this->get($index); - if ($data instanceof stdClass) { - /** @var WeakPasswordError $data */ - $data = WeakPasswordErrorModel::of($data); - $this->set($data, $index); - } - - return $data; - }; - } -} diff --git a/lib/commercetools-api/src/Models/Extension/ExtensionUpdate.php b/lib/commercetools-api/src/Models/Extension/ExtensionUpdate.php index 7f3530d2fdc..a2ff39192ca 100644 --- a/lib/commercetools-api/src/Models/Extension/ExtensionUpdate.php +++ b/lib/commercetools-api/src/Models/Extension/ExtensionUpdate.php @@ -17,7 +17,7 @@ interface ExtensionUpdate extends JsonObject public const FIELD_ACTIONS = 'actions'; /** - *

Expected version of the Extension on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the Extension on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/Extension/ExtensionUpdateBuilder.php b/lib/commercetools-api/src/Models/Extension/ExtensionUpdateBuilder.php index e6c49608edc..28f81420e92 100644 --- a/lib/commercetools-api/src/Models/Extension/ExtensionUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/Extension/ExtensionUpdateBuilder.php @@ -33,7 +33,7 @@ final class ExtensionUpdateBuilder implements Builder private $actions; /** - *

Expected version of the Extension on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the Extension on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/Extension/ExtensionUpdateModel.php b/lib/commercetools-api/src/Models/Extension/ExtensionUpdateModel.php index e43f45df4d4..c87b67c3844 100644 --- a/lib/commercetools-api/src/Models/Extension/ExtensionUpdateModel.php +++ b/lib/commercetools-api/src/Models/Extension/ExtensionUpdateModel.php @@ -44,7 +44,7 @@ public function __construct( } /** - *

Expected version of the Extension on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the Extension on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * * @return null|int diff --git a/lib/commercetools-api/src/Models/Inventory/InventoryEntrySetCustomFieldAction.php b/lib/commercetools-api/src/Models/Inventory/InventoryEntrySetCustomFieldAction.php index 6ba640e58fe..7550625fcf7 100644 --- a/lib/commercetools-api/src/Models/Inventory/InventoryEntrySetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Inventory/InventoryEntrySetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Inventory/InventoryEntrySetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Inventory/InventoryEntrySetCustomFieldActionBuilder.php index fe43d23fb17..2a58b9cf24d 100644 --- a/lib/commercetools-api/src/Models/Inventory/InventoryEntrySetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Inventory/InventoryEntrySetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Inventory/InventoryEntrySetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Inventory/InventoryEntrySetCustomFieldActionModel.php index 798a978da71..6773269b51f 100644 --- a/lib/commercetools-api/src/Models/Inventory/InventoryEntrySetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Inventory/InventoryEntrySetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Inventory/InventoryEntryUpdate.php b/lib/commercetools-api/src/Models/Inventory/InventoryEntryUpdate.php index aa6f082021a..dead88e2b88 100644 --- a/lib/commercetools-api/src/Models/Inventory/InventoryEntryUpdate.php +++ b/lib/commercetools-api/src/Models/Inventory/InventoryEntryUpdate.php @@ -17,7 +17,7 @@ interface InventoryEntryUpdate extends JsonObject public const FIELD_ACTIONS = 'actions'; /** - *

Expected version of the InventoryEntry on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict error will be returned.

+ *

Expected version of the InventoryEntry on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/Inventory/InventoryEntryUpdateBuilder.php b/lib/commercetools-api/src/Models/Inventory/InventoryEntryUpdateBuilder.php index 8019bf65d19..3295af03eef 100644 --- a/lib/commercetools-api/src/Models/Inventory/InventoryEntryUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/Inventory/InventoryEntryUpdateBuilder.php @@ -33,7 +33,7 @@ final class InventoryEntryUpdateBuilder implements Builder private $actions; /** - *

Expected version of the InventoryEntry on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict error will be returned.

+ *

Expected version of the InventoryEntry on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/Inventory/InventoryEntryUpdateModel.php b/lib/commercetools-api/src/Models/Inventory/InventoryEntryUpdateModel.php index 9b607fedeee..ce7ed1c4536 100644 --- a/lib/commercetools-api/src/Models/Inventory/InventoryEntryUpdateModel.php +++ b/lib/commercetools-api/src/Models/Inventory/InventoryEntryUpdateModel.php @@ -44,7 +44,7 @@ public function __construct( } /** - *

Expected version of the InventoryEntry on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict error will be returned.

+ *

Expected version of the InventoryEntry on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * * @return null|int diff --git a/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetAddressCustomFieldAction.php index 1f2b94f1908..7ad3fbce2a4 100644 --- a/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetAddressCustomFieldAction.php @@ -35,7 +35,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Trying to remove a field that does not exist will fail with an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetAddressCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetAddressCustomFieldActionBuilder.php index 8a175a32f40..13a372783d0 100644 --- a/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetAddressCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetAddressCustomFieldActionBuilder.php @@ -62,7 +62,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Trying to remove a field that does not exist will fail with an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetAddressCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetAddressCustomFieldActionModel.php index 6871fe35bec..510ddfdf4cb 100644 --- a/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetAddressCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetAddressCustomFieldActionModel.php @@ -120,7 +120,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Trying to remove a field that does not exist will fail with an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetCustomFieldAction.php b/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetCustomFieldAction.php index d0013e4e853..3924f466131 100644 --- a/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Trying to remove a field that does not exist will fail with an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetCustomFieldActionBuilder.php index ebd7910514f..ef6803e3bf3 100644 --- a/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Trying to remove a field that does not exist will fail with an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetCustomFieldActionModel.php index 00a8431aa70..4118602e5e6 100644 --- a/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyBusinessUnitSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Trying to remove a field that does not exist will fail with an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Me/MyCartSetCustomFieldAction.php b/lib/commercetools-api/src/Models/Me/MyCartSetCustomFieldAction.php index 3c356341070..53da349eced 100644 --- a/lib/commercetools-api/src/Models/Me/MyCartSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Me/MyCartSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Me/MyCartSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyCartSetCustomFieldActionBuilder.php index 070ac7af0b0..d0a5d32f3f3 100644 --- a/lib/commercetools-api/src/Models/Me/MyCartSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyCartSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Me/MyCartSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Me/MyCartSetCustomFieldActionModel.php index 21c5ccbe6c2..6d7b2599425 100644 --- a/lib/commercetools-api/src/Models/Me/MyCartSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyCartSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Me/MyCartSetLineItemCustomFieldAction.php b/lib/commercetools-api/src/Models/Me/MyCartSetLineItemCustomFieldAction.php index 86b6e1e98ee..0c4adf92c2d 100644 --- a/lib/commercetools-api/src/Models/Me/MyCartSetLineItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Me/MyCartSetLineItemCustomFieldAction.php @@ -33,7 +33,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Me/MyCartSetLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyCartSetLineItemCustomFieldActionBuilder.php index 91dd9c35b4a..4351ece5dfe 100644 --- a/lib/commercetools-api/src/Models/Me/MyCartSetLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyCartSetLineItemCustomFieldActionBuilder.php @@ -60,7 +60,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Me/MyCartSetLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Me/MyCartSetLineItemCustomFieldActionModel.php index 7d3849479e3..5b92a62bf14 100644 --- a/lib/commercetools-api/src/Models/Me/MyCartSetLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyCartSetLineItemCustomFieldActionModel.php @@ -118,7 +118,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Me/MyCustomerSetCustomFieldAction.php b/lib/commercetools-api/src/Models/Me/MyCustomerSetCustomFieldAction.php index c398b769596..39438e3a3f3 100644 --- a/lib/commercetools-api/src/Models/Me/MyCustomerSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Me/MyCustomerSetCustomFieldAction.php @@ -26,8 +26,8 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. - * If value is provided, it is set for the field defined by name.

+ * If value is provided, it is set for the field defined by name. + * Trying to remove a field that does not exist will fail with an InvalidOperation error.

* * @return null|mixed diff --git a/lib/commercetools-api/src/Models/Me/MyCustomerSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyCustomerSetCustomFieldActionBuilder.php index 92a0af743fc..54e322415e5 100644 --- a/lib/commercetools-api/src/Models/Me/MyCustomerSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyCustomerSetCustomFieldActionBuilder.php @@ -45,8 +45,8 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. - * If value is provided, it is set for the field defined by name.

+ * If value is provided, it is set for the field defined by name. + * Trying to remove a field that does not exist will fail with an InvalidOperation error.

* * @return null|mixed diff --git a/lib/commercetools-api/src/Models/Me/MyCustomerSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Me/MyCustomerSetCustomFieldActionModel.php index 08780810cc5..7e3cd465de2 100644 --- a/lib/commercetools-api/src/Models/Me/MyCustomerSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyCustomerSetCustomFieldActionModel.php @@ -92,8 +92,8 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. - * If value is provided, it is set for the field defined by name.

+ * If value is provided, it is set for the field defined by name. + * Trying to remove a field that does not exist will fail with an InvalidOperation error.

* * * @return null|mixed diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentSetCustomFieldAction.php b/lib/commercetools-api/src/Models/Me/MyPaymentSetCustomFieldAction.php index 7bc0a7a8d93..1307ead5469 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyPaymentSetCustomFieldActionBuilder.php index c6d857d82b4..aa1f32084e2 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Me/MyPaymentSetCustomFieldActionModel.php index 1ac0390a039..e8ad392bd10 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentSetTransactionCustomFieldAction.php b/lib/commercetools-api/src/Models/Me/MyPaymentSetTransactionCustomFieldAction.php index a9334d7c275..a0df868f3b4 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentSetTransactionCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentSetTransactionCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentSetTransactionCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyPaymentSetTransactionCustomFieldActionBuilder.php index 12a3dc9c998..78216d148ac 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentSetTransactionCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentSetTransactionCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentSetTransactionCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Me/MyPaymentSetTransactionCustomFieldActionModel.php index d7b4391a38f..3cbef93e8dd 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentSetTransactionCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentSetTransactionCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetCustomFieldAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetCustomFieldAction.php index c60f3422ca0..bc1b60a0a39 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetCustomFieldActionBuilder.php index 1bf0f166625..cfb2ab88f7d 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetCustomFieldActionModel.php index 72439d9289a..6998dd81852 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldAction.php index 7c6ed157491..036f19e67c5 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldAction.php @@ -33,7 +33,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionBuilder.php index 18490f0f601..49724bb023d 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionBuilder.php @@ -60,7 +60,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionModel.php index 1b2fc9dc79c..90d4eeb50f8 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionModel.php @@ -118,7 +118,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldAction.php index 3fe8e3e06a6..cf44aea3fed 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldAction.php @@ -33,7 +33,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionBuilder.php index 50ca1742023..55fd3356084 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionBuilder.php @@ -60,7 +60,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionModel.php index 1dbd5c033ad..7dfda9c3063 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionModel.php @@ -118,7 +118,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Message/MessageModel.php b/lib/commercetools-api/src/Models/Message/MessageModel.php index 7cdfb91ab1e..26aad9717d7 100644 --- a/lib/commercetools-api/src/Models/Message/MessageModel.php +++ b/lib/commercetools-api/src/Models/Message/MessageModel.php @@ -233,6 +233,7 @@ final class MessageModel extends JsonObjectModel implements Message 'StandalonePriceExternalDiscountSet' => StandalonePriceExternalDiscountSetMessageModel::class, 'StandalonePriceStagedChangesApplied' => StandalonePriceStagedChangesAppliedMessageModel::class, 'StandalonePriceValueChanged' => StandalonePriceValueChangedMessageModel::class, + 'StoreCountriesChanged' => StoreCountriesChangedMessageModel::class, 'StoreCreated' => StoreCreatedMessageModel::class, 'StoreDeleted' => StoreDeletedMessageModel::class, 'StoreDistributionChannelsChanged' => StoreDistributionChannelsChangedMessageModel::class, diff --git a/lib/commercetools-api/src/Models/Message/MessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/MessagePayloadModel.php index 49ad1c3090e..2c7363d550a 100644 --- a/lib/commercetools-api/src/Models/Message/MessagePayloadModel.php +++ b/lib/commercetools-api/src/Models/Message/MessagePayloadModel.php @@ -165,6 +165,7 @@ final class MessagePayloadModel extends JsonObjectModel implements MessagePayloa 'StandalonePriceExternalDiscountSet' => StandalonePriceExternalDiscountSetMessagePayloadModel::class, 'StandalonePriceStagedChangesApplied' => StandalonePriceStagedChangesAppliedMessagePayloadModel::class, 'StandalonePriceValueChanged' => StandalonePriceValueChangedMessagePayloadModel::class, + 'StoreCountriesChanged' => StoreCountriesChangedMessagePayloadModel::class, 'StoreCreated' => StoreCreatedMessagePayloadModel::class, 'StoreDeleted' => StoreDeletedMessagePayloadModel::class, 'StoreDistributionChannelsChanged' => StoreDistributionChannelsChangedMessagePayloadModel::class, diff --git a/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessage.php b/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessage.php new file mode 100644 index 00000000000..a89a09419be --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessage.php @@ -0,0 +1,45 @@ +Countries added to the Store.

+ * + + * @return null|StoreCountryCollection + */ + public function getAddedCountries(); + + /** + *

Countries removed from the Store.

+ * + + * @return null|StoreCountryCollection + */ + public function getRemovedCountries(); + + /** + * @param ?StoreCountryCollection $addedCountries + */ + public function setAddedCountries(?StoreCountryCollection $addedCountries): void; + + /** + * @param ?StoreCountryCollection $removedCountries + */ + public function setRemovedCountries(?StoreCountryCollection $removedCountries): void; +} diff --git a/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessageBuilder.php b/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessageBuilder.php new file mode 100644 index 00000000000..0b753d58f48 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessageBuilder.php @@ -0,0 +1,434 @@ + + */ +final class StoreCountriesChangedMessageBuilder 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 ?StoreCountryCollection + */ + private $addedCountries; + + /** + + * @var ?StoreCountryCollection + */ + private $removedCountries; + + /** + *

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.

+ * + + * @return null|int + */ + public function getVersion() + { + return $this->version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + *

Value of createdAt.

+ * + + * @return null|DateTimeImmutable + */ + public function getLastModifiedAt() + { + return $this->lastModifiedAt; + } + + /** + *

Value of createdBy.

+ * + + * @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.

+ * + + * @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.

+ * + + * @return null|int + */ + public function getSequenceNumber() + { + return $this->sequenceNumber; + } + + /** + *

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.

+ * + + * @return null|UserProvidedIdentifiers + */ + public function getResourceUserProvidedIdentifiers() + { + return $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers; + } + + /** + *

Countries added to the Store.

+ * + + * @return null|StoreCountryCollection + */ + public function getAddedCountries() + { + return $this->addedCountries; + } + + /** + *

Countries removed from the Store.

+ * + + * @return null|StoreCountryCollection + */ + public function getRemovedCountries() + { + return $this->removedCountries; + } + + /** + * @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 ?StoreCountryCollection $addedCountries + * @return $this + */ + public function withAddedCountries(?StoreCountryCollection $addedCountries) + { + $this->addedCountries = $addedCountries; + + return $this; + } + + /** + * @param ?StoreCountryCollection $removedCountries + * @return $this + */ + public function withRemovedCountries(?StoreCountryCollection $removedCountries) + { + $this->removedCountries = $removedCountries; + + 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(): StoreCountriesChangedMessage + { + return new StoreCountriesChangedMessageModel( + $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->addedCountries, + $this->removedCountries + ); + } + + public static function of(): StoreCountriesChangedMessageBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessageCollection.php b/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessageCollection.php new file mode 100644 index 00000000000..bc3539a4b23 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessageCollection.php @@ -0,0 +1,56 @@ + + * @method StoreCountriesChangedMessage current() + * @method StoreCountriesChangedMessage end() + * @method StoreCountriesChangedMessage at($offset) + */ +class StoreCountriesChangedMessageCollection extends MessageCollection +{ + /** + * @psalm-assert StoreCountriesChangedMessage $value + * @psalm-param StoreCountriesChangedMessage|stdClass $value + * @throws InvalidArgumentException + * + * @return StoreCountriesChangedMessageCollection + */ + public function add($value) + { + if (!$value instanceof StoreCountriesChangedMessage) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?StoreCountriesChangedMessage + */ + protected function mapper() + { + return function (?int $index): ?StoreCountriesChangedMessage { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var StoreCountriesChangedMessage $data */ + $data = StoreCountriesChangedMessageModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessageModel.php b/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessageModel.php new file mode 100644 index 00000000000..73505e29c23 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessageModel.php @@ -0,0 +1,527 @@ +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->addedCountries = $addedCountries; + $this->removedCountries = $removedCountries; + $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.

+ * + * + * @return null|int + */ + public function getVersion() + { + if (is_null($this->version)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_VERSION); + if (is_null($data)) { + return null; + } + $this->version = (int) $data; + } + + return $this->version; + } + + /** + *

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.

+ * + * + * @return null|DateTimeImmutable + */ + public function getLastModifiedAt() + { + if (is_null($this->lastModifiedAt)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_LAST_MODIFIED_AT); + if (is_null($data)) { + return null; + } + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->lastModifiedAt = $data; + } + + return $this->lastModifiedAt; + } + + /** + *

Value of createdBy.

+ * + * + * @return null|LastModifiedBy + */ + public function getLastModifiedBy() + { + if (is_null($this->lastModifiedBy)) { + /** @psalm-var stdClass|array|null $data */ + $data = $this->raw(self::FIELD_LAST_MODIFIED_BY); + if (is_null($data)) { + return null; + } + + $this->lastModifiedBy = LastModifiedByModel::of($data); + } + + return $this->lastModifiedBy; + } + + /** + *

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|array|null $data */ + $data = $this->raw(self::FIELD_CREATED_BY); + if (is_null($data)) { + return null; + } + + $this->createdBy = CreatedByModel::of($data); + } + + return $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.

+ * + * + * @return null|int + */ + public function getSequenceNumber() + { + if (is_null($this->sequenceNumber)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_SEQUENCE_NUMBER); + if (is_null($data)) { + return null; + } + $this->sequenceNumber = (int) $data; + } + + return $this->sequenceNumber; + } + + /** + *

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|array|null $data */ + $data = $this->raw(self::FIELD_RESOURCE); + if (is_null($data)) { + return null; + } + $className = ReferenceModel::resolveDiscriminatorClass($data); + $this->resource = $className::of($data); + } + + return $this->resource; + } + + /** + *

Version 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.

+ * + * + * @return null|UserProvidedIdentifiers + */ + public function getResourceUserProvidedIdentifiers() + { + if (is_null($this->resourceUserProvidedIdentifiers)) { + /** @psalm-var stdClass|array|null $data */ + $data = $this->raw(self::FIELD_RESOURCE_USER_PROVIDED_IDENTIFIERS); + if (is_null($data)) { + return null; + } + + $this->resourceUserProvidedIdentifiers = UserProvidedIdentifiersModel::of($data); + } + + return $this->resourceUserProvidedIdentifiers; + } + + /** + *

Countries added to the Store.

+ * + * + * @return null|StoreCountryCollection + */ + public function getAddedCountries() + { + if (is_null($this->addedCountries)) { + /** @psalm-var ?list $data */ + $data = $this->raw(self::FIELD_ADDED_COUNTRIES); + if (is_null($data)) { + return null; + } + $this->addedCountries = StoreCountryCollection::fromArray($data); + } + + return $this->addedCountries; + } + + /** + *

Countries removed from the Store.

+ * + * + * @return null|StoreCountryCollection + */ + public function getRemovedCountries() + { + if (is_null($this->removedCountries)) { + /** @psalm-var ?list $data */ + $data = $this->raw(self::FIELD_REMOVED_COUNTRIES); + if (is_null($data)) { + return null; + } + $this->removedCountries = StoreCountryCollection::fromArray($data); + } + + return $this->removedCountries; + } + + + /** + * @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 ?StoreCountryCollection $addedCountries + */ + public function setAddedCountries(?StoreCountryCollection $addedCountries): void + { + $this->addedCountries = $addedCountries; + } + + /** + * @param ?StoreCountryCollection $removedCountries + */ + public function setRemovedCountries(?StoreCountryCollection $removedCountries): void + { + $this->removedCountries = $removedCountries; + } + + + #[\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/StoreCountriesChangedMessagePayload.php b/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessagePayload.php new file mode 100644 index 00000000000..a426f145ed2 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessagePayload.php @@ -0,0 +1,45 @@ +Countries added to the Store.

+ * + + * @return null|StoreCountryCollection + */ + public function getAddedCountries(); + + /** + *

Countries removed from the Store.

+ * + + * @return null|StoreCountryCollection + */ + public function getRemovedCountries(); + + /** + * @param ?StoreCountryCollection $addedCountries + */ + public function setAddedCountries(?StoreCountryCollection $addedCountries): void; + + /** + * @param ?StoreCountryCollection $removedCountries + */ + public function setRemovedCountries(?StoreCountryCollection $removedCountries): void; +} diff --git a/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessagePayloadBuilder.php new file mode 100644 index 00000000000..018298fd7f9 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessagePayloadBuilder.php @@ -0,0 +1,93 @@ + + */ +final class StoreCountriesChangedMessagePayloadBuilder implements Builder +{ + /** + + * @var ?StoreCountryCollection + */ + private $addedCountries; + + /** + + * @var ?StoreCountryCollection + */ + private $removedCountries; + + /** + *

Countries added to the Store.

+ * + + * @return null|StoreCountryCollection + */ + public function getAddedCountries() + { + return $this->addedCountries; + } + + /** + *

Countries removed from the Store.

+ * + + * @return null|StoreCountryCollection + */ + public function getRemovedCountries() + { + return $this->removedCountries; + } + + /** + * @param ?StoreCountryCollection $addedCountries + * @return $this + */ + public function withAddedCountries(?StoreCountryCollection $addedCountries) + { + $this->addedCountries = $addedCountries; + + return $this; + } + + /** + * @param ?StoreCountryCollection $removedCountries + * @return $this + */ + public function withRemovedCountries(?StoreCountryCollection $removedCountries) + { + $this->removedCountries = $removedCountries; + + return $this; + } + + + public function build(): StoreCountriesChangedMessagePayload + { + return new StoreCountriesChangedMessagePayloadModel( + $this->addedCountries, + $this->removedCountries + ); + } + + public static function of(): StoreCountriesChangedMessagePayloadBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessagePayloadCollection.php b/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessagePayloadCollection.php new file mode 100644 index 00000000000..178ecdc6562 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessagePayloadCollection.php @@ -0,0 +1,56 @@ + + * @method StoreCountriesChangedMessagePayload current() + * @method StoreCountriesChangedMessagePayload end() + * @method StoreCountriesChangedMessagePayload at($offset) + */ +class StoreCountriesChangedMessagePayloadCollection extends MessagePayloadCollection +{ + /** + * @psalm-assert StoreCountriesChangedMessagePayload $value + * @psalm-param StoreCountriesChangedMessagePayload|stdClass $value + * @throws InvalidArgumentException + * + * @return StoreCountriesChangedMessagePayloadCollection + */ + public function add($value) + { + if (!$value instanceof StoreCountriesChangedMessagePayload) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?StoreCountriesChangedMessagePayload + */ + protected function mapper() + { + return function (?int $index): ?StoreCountriesChangedMessagePayload { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var StoreCountriesChangedMessagePayload $data */ + $data = StoreCountriesChangedMessagePayloadModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessagePayloadModel.php new file mode 100644 index 00000000000..da8fc971334 --- /dev/null +++ b/lib/commercetools-api/src/Models/Message/StoreCountriesChangedMessagePayloadModel.php @@ -0,0 +1,130 @@ +addedCountries = $addedCountries; + $this->removedCountries = $removedCountries; + $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; + } + + /** + *

Countries added to the Store.

+ * + * + * @return null|StoreCountryCollection + */ + public function getAddedCountries() + { + if (is_null($this->addedCountries)) { + /** @psalm-var ?list $data */ + $data = $this->raw(self::FIELD_ADDED_COUNTRIES); + if (is_null($data)) { + return null; + } + $this->addedCountries = StoreCountryCollection::fromArray($data); + } + + return $this->addedCountries; + } + + /** + *

Countries removed from the Store.

+ * + * + * @return null|StoreCountryCollection + */ + public function getRemovedCountries() + { + if (is_null($this->removedCountries)) { + /** @psalm-var ?list $data */ + $data = $this->raw(self::FIELD_REMOVED_COUNTRIES); + if (is_null($data)) { + return null; + } + $this->removedCountries = StoreCountryCollection::fromArray($data); + } + + return $this->removedCountries; + } + + + /** + * @param ?StoreCountryCollection $addedCountries + */ + public function setAddedCountries(?StoreCountryCollection $addedCountries): void + { + $this->addedCountries = $addedCountries; + } + + /** + * @param ?StoreCountryCollection $removedCountries + */ + public function setRemovedCountries(?StoreCountryCollection $removedCountries): void + { + $this->removedCountries = $removedCountries; + } +} diff --git a/lib/commercetools-api/src/Models/Message/StoreCreatedMessage.php b/lib/commercetools-api/src/Models/Message/StoreCreatedMessage.php index 2e53677d786..bf6155b705e 100644 --- a/lib/commercetools-api/src/Models/Message/StoreCreatedMessage.php +++ b/lib/commercetools-api/src/Models/Message/StoreCreatedMessage.php @@ -11,6 +11,7 @@ use Commercetools\Api\Models\Channel\ChannelReferenceCollection; use Commercetools\Api\Models\Common\LocalizedString; use Commercetools\Api\Models\Store\ProductSelectionSettingCollection; +use Commercetools\Api\Models\StoreCountry\StoreCountryCollection; use Commercetools\Api\Models\Type\CustomFields; use Commercetools\Base\DateTimeImmutableCollection; use Commercetools\Base\JsonObject; @@ -19,6 +20,7 @@ interface StoreCreatedMessage extends Message { public const FIELD_NAME = 'name'; public const FIELD_LANGUAGES = 'languages'; + public const FIELD_COUNTRIES = 'countries'; public const FIELD_DISTRIBUTION_CHANNELS = 'distributionChannels'; public const FIELD_SUPPLY_CHANNELS = 'supplyChannels'; public const FIELD_PRODUCT_SELECTIONS = 'productSelections'; @@ -40,6 +42,14 @@ public function getName(); */ public function getLanguages(); + /** + *

Countries of the Store that was created.

+ * + + * @return null|StoreCountryCollection + */ + public function getCountries(); + /** *

Distribution Channels of the Store that was created.

* @@ -82,6 +92,11 @@ public function setName(?LocalizedString $name): void; */ public function setLanguages(?array $languages): void; + /** + * @param ?StoreCountryCollection $countries + */ + public function setCountries(?StoreCountryCollection $countries): void; + /** * @param ?ChannelReferenceCollection $distributionChannels */ diff --git a/lib/commercetools-api/src/Models/Message/StoreCreatedMessageBuilder.php b/lib/commercetools-api/src/Models/Message/StoreCreatedMessageBuilder.php index 33f312dfd6d..56353f6e59f 100644 --- a/lib/commercetools-api/src/Models/Message/StoreCreatedMessageBuilder.php +++ b/lib/commercetools-api/src/Models/Message/StoreCreatedMessageBuilder.php @@ -18,6 +18,7 @@ use Commercetools\Api\Models\Common\Reference; use Commercetools\Api\Models\Common\ReferenceBuilder; use Commercetools\Api\Models\Store\ProductSelectionSettingCollection; +use Commercetools\Api\Models\StoreCountry\StoreCountryCollection; use Commercetools\Api\Models\Type\CustomFields; use Commercetools\Api\Models\Type\CustomFieldsBuilder; use Commercetools\Base\Builder; @@ -105,6 +106,12 @@ final class StoreCreatedMessageBuilder implements Builder */ private $languages; + /** + + * @var ?StoreCountryCollection + */ + private $countries; + /** * @var ?ChannelReferenceCollection @@ -262,6 +269,17 @@ public function getLanguages() return $this->languages; } + /** + *

Countries of the Store that was created.

+ * + + * @return null|StoreCountryCollection + */ + public function getCountries() + { + return $this->countries; + } + /** *

Distribution Channels of the Store that was created.

* @@ -438,6 +456,17 @@ public function withLanguages(?array $languages) return $this; } + /** + * @param ?StoreCountryCollection $countries + * @return $this + */ + public function withCountries(?StoreCountryCollection $countries) + { + $this->countries = $countries; + + return $this; + } + /** * @param ?ChannelReferenceCollection $distributionChannels * @return $this @@ -563,6 +592,7 @@ public function build(): StoreCreatedMessage $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers, $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name, $this->languages, + $this->countries, $this->distributionChannels, $this->supplyChannels, $this->productSelections, diff --git a/lib/commercetools-api/src/Models/Message/StoreCreatedMessageModel.php b/lib/commercetools-api/src/Models/Message/StoreCreatedMessageModel.php index 36973addcb1..9397a9ccf85 100644 --- a/lib/commercetools-api/src/Models/Message/StoreCreatedMessageModel.php +++ b/lib/commercetools-api/src/Models/Message/StoreCreatedMessageModel.php @@ -18,6 +18,7 @@ use Commercetools\Api\Models\Common\Reference; use Commercetools\Api\Models\Common\ReferenceModel; use Commercetools\Api\Models\Store\ProductSelectionSettingCollection; +use Commercetools\Api\Models\StoreCountry\StoreCountryCollection; use Commercetools\Api\Models\Type\CustomFields; use Commercetools\Api\Models\Type\CustomFieldsModel; use Commercetools\Base\DateTimeImmutableCollection; @@ -111,6 +112,12 @@ final class StoreCreatedMessageModel extends JsonObjectModel implements StoreCre */ protected $languages; + /** + * + * @var ?StoreCountryCollection + */ + protected $countries; + /** * * @var ?ChannelReferenceCollection @@ -152,6 +159,7 @@ public function __construct( ?UserProvidedIdentifiers $resourceUserProvidedIdentifiers = null, ?LocalizedString $name = null, ?array $languages = null, + ?StoreCountryCollection $countries = null, ?ChannelReferenceCollection $distributionChannels = null, ?ChannelReferenceCollection $supplyChannels = null, ?ProductSelectionSettingCollection $productSelections = null, @@ -170,6 +178,7 @@ public function __construct( $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers; $this->name = $name; $this->languages = $languages; + $this->countries = $countries; $this->distributionChannels = $distributionChannels; $this->supplyChannels = $supplyChannels; $this->productSelections = $productSelections; @@ -451,6 +460,26 @@ public function getLanguages() return $this->languages; } + /** + *

Countries of the Store that was created.

+ * + * + * @return null|StoreCountryCollection + */ + public function getCountries() + { + if (is_null($this->countries)) { + /** @psalm-var ?list $data */ + $data = $this->raw(self::FIELD_COUNTRIES); + if (is_null($data)) { + return null; + } + $this->countries = StoreCountryCollection::fromArray($data); + } + + return $this->countries; + } + /** *

Distribution Channels of the Store that was created.

* @@ -629,6 +658,14 @@ public function setLanguages(?array $languages): void $this->languages = $languages; } + /** + * @param ?StoreCountryCollection $countries + */ + public function setCountries(?StoreCountryCollection $countries): void + { + $this->countries = $countries; + } + /** * @param ?ChannelReferenceCollection $distributionChannels */ diff --git a/lib/commercetools-api/src/Models/Message/StoreCreatedMessagePayload.php b/lib/commercetools-api/src/Models/Message/StoreCreatedMessagePayload.php index e2a77f1bd62..a7508abacb5 100644 --- a/lib/commercetools-api/src/Models/Message/StoreCreatedMessagePayload.php +++ b/lib/commercetools-api/src/Models/Message/StoreCreatedMessagePayload.php @@ -11,6 +11,7 @@ use Commercetools\Api\Models\Channel\ChannelReferenceCollection; use Commercetools\Api\Models\Common\LocalizedString; use Commercetools\Api\Models\Store\ProductSelectionSettingCollection; +use Commercetools\Api\Models\StoreCountry\StoreCountryCollection; use Commercetools\Api\Models\Type\CustomFields; use Commercetools\Base\DateTimeImmutableCollection; use Commercetools\Base\JsonObject; @@ -19,6 +20,7 @@ interface StoreCreatedMessagePayload extends MessagePayload { public const FIELD_NAME = 'name'; public const FIELD_LANGUAGES = 'languages'; + public const FIELD_COUNTRIES = 'countries'; public const FIELD_DISTRIBUTION_CHANNELS = 'distributionChannels'; public const FIELD_SUPPLY_CHANNELS = 'supplyChannels'; public const FIELD_PRODUCT_SELECTIONS = 'productSelections'; @@ -40,6 +42,14 @@ public function getName(); */ public function getLanguages(); + /** + *

Countries of the Store that was created.

+ * + + * @return null|StoreCountryCollection + */ + public function getCountries(); + /** *

Distribution Channels of the Store that was created.

* @@ -82,6 +92,11 @@ public function setName(?LocalizedString $name): void; */ public function setLanguages(?array $languages): void; + /** + * @param ?StoreCountryCollection $countries + */ + public function setCountries(?StoreCountryCollection $countries): void; + /** * @param ?ChannelReferenceCollection $distributionChannels */ diff --git a/lib/commercetools-api/src/Models/Message/StoreCreatedMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/StoreCreatedMessagePayloadBuilder.php index a3b649376c1..f7889a99016 100644 --- a/lib/commercetools-api/src/Models/Message/StoreCreatedMessagePayloadBuilder.php +++ b/lib/commercetools-api/src/Models/Message/StoreCreatedMessagePayloadBuilder.php @@ -12,6 +12,7 @@ use Commercetools\Api\Models\Common\LocalizedString; use Commercetools\Api\Models\Common\LocalizedStringBuilder; use Commercetools\Api\Models\Store\ProductSelectionSettingCollection; +use Commercetools\Api\Models\StoreCountry\StoreCountryCollection; use Commercetools\Api\Models\Type\CustomFields; use Commercetools\Api\Models\Type\CustomFieldsBuilder; use Commercetools\Base\Builder; @@ -38,6 +39,12 @@ final class StoreCreatedMessagePayloadBuilder implements Builder */ private $languages; + /** + + * @var ?StoreCountryCollection + */ + private $countries; + /** * @var ?ChannelReferenceCollection @@ -84,6 +91,17 @@ public function getLanguages() return $this->languages; } + /** + *

Countries of the Store that was created.

+ * + + * @return null|StoreCountryCollection + */ + public function getCountries() + { + return $this->countries; + } + /** *

Distribution Channels of the Store that was created.

* @@ -150,6 +168,17 @@ public function withLanguages(?array $languages) return $this; } + /** + * @param ?StoreCountryCollection $countries + * @return $this + */ + public function withCountries(?StoreCountryCollection $countries) + { + $this->countries = $countries; + + return $this; + } + /** * @param ?ChannelReferenceCollection $distributionChannels * @return $this @@ -221,6 +250,7 @@ public function build(): StoreCreatedMessagePayload return new StoreCreatedMessagePayloadModel( $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name, $this->languages, + $this->countries, $this->distributionChannels, $this->supplyChannels, $this->productSelections, diff --git a/lib/commercetools-api/src/Models/Message/StoreCreatedMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/StoreCreatedMessagePayloadModel.php index afdba01b084..a48bba9d2ad 100644 --- a/lib/commercetools-api/src/Models/Message/StoreCreatedMessagePayloadModel.php +++ b/lib/commercetools-api/src/Models/Message/StoreCreatedMessagePayloadModel.php @@ -12,6 +12,7 @@ use Commercetools\Api\Models\Common\LocalizedString; use Commercetools\Api\Models\Common\LocalizedStringModel; use Commercetools\Api\Models\Store\ProductSelectionSettingCollection; +use Commercetools\Api\Models\StoreCountry\StoreCountryCollection; use Commercetools\Api\Models\Type\CustomFields; use Commercetools\Api\Models\Type\CustomFieldsModel; use Commercetools\Base\DateTimeImmutableCollection; @@ -44,6 +45,12 @@ final class StoreCreatedMessagePayloadModel extends JsonObjectModel implements S */ protected $languages; + /** + * + * @var ?StoreCountryCollection + */ + protected $countries; + /** * * @var ?ChannelReferenceCollection @@ -75,6 +82,7 @@ final class StoreCreatedMessagePayloadModel extends JsonObjectModel implements S public function __construct( ?LocalizedString $name = null, ?array $languages = null, + ?StoreCountryCollection $countries = null, ?ChannelReferenceCollection $distributionChannels = null, ?ChannelReferenceCollection $supplyChannels = null, ?ProductSelectionSettingCollection $productSelections = null, @@ -83,6 +91,7 @@ public function __construct( ) { $this->name = $name; $this->languages = $languages; + $this->countries = $countries; $this->distributionChannels = $distributionChannels; $this->supplyChannels = $supplyChannels; $this->productSelections = $productSelections; @@ -149,6 +158,26 @@ public function getLanguages() return $this->languages; } + /** + *

Countries of the Store that was created.

+ * + * + * @return null|StoreCountryCollection + */ + public function getCountries() + { + if (is_null($this->countries)) { + /** @psalm-var ?list $data */ + $data = $this->raw(self::FIELD_COUNTRIES); + if (is_null($data)) { + return null; + } + $this->countries = StoreCountryCollection::fromArray($data); + } + + return $this->countries; + } + /** *

Distribution Channels of the Store that was created.

* @@ -247,6 +276,14 @@ public function setLanguages(?array $languages): void $this->languages = $languages; } + /** + * @param ?StoreCountryCollection $countries + */ + public function setCountries(?StoreCountryCollection $countries): void + { + $this->countries = $countries; + } + /** * @param ?ChannelReferenceCollection $distributionChannels */ diff --git a/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressCustomFieldAction.php index 4c4ceeb1f4c..d7e8364a81c 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressCustomFieldActionBuilder.php index 22cb4f538a7..b1f8bc390f2 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressCustomFieldActionModel.php index 8c4ef57c96b..b58b0a3df51 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetBillingAddressCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomFieldAction.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomFieldAction.php index d8e4355d0db..a540efd77a9 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomFieldActionBuilder.php index 76a2399074a..8ba8b5fd8f4 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomFieldActionModel.php index dba6b644a5f..df6558e854e 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldAction.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldAction.php index 7ac0307ce02..d374b45a9f3 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldAction.php @@ -33,7 +33,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldActionBuilder.php index 94fc4274d63..ec5a194a700 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldActionBuilder.php @@ -60,7 +60,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldActionModel.php index e5dcc24b18f..45eb44de895 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetCustomLineItemCustomFieldActionModel.php @@ -118,7 +118,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressCustomFieldAction.php index 916453abd96..9f482295def 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressCustomFieldAction.php @@ -33,7 +33,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressCustomFieldActionBuilder.php index 0283c4f1ea1..a487c56dc21 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressCustomFieldActionBuilder.php @@ -60,7 +60,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressCustomFieldActionModel.php index d5defceb3a6..2d3dd484e42 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryAddressCustomFieldActionModel.php @@ -118,7 +118,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryCustomFieldAction.php b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryCustomFieldAction.php index a62fffb60b0..c871c91f1c9 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryCustomFieldAction.php @@ -33,7 +33,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryCustomFieldActionBuilder.php index 74329386553..517a677d7e4 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryCustomFieldActionBuilder.php @@ -60,7 +60,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryCustomFieldActionModel.php index 50d8b77fe59..3a8979d8797 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetDeliveryCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetDeliveryCustomFieldActionModel.php @@ -118,7 +118,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Order/OrderSetItemShippingAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/Order/OrderSetItemShippingAddressCustomFieldAction.php index 538097f03b4..a827ef13486 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetItemShippingAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetItemShippingAddressCustomFieldAction.php @@ -33,7 +33,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetItemShippingAddressCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetItemShippingAddressCustomFieldActionBuilder.php index 1068a83fbe8..a2e7a634ade 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetItemShippingAddressCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetItemShippingAddressCustomFieldActionBuilder.php @@ -60,7 +60,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetItemShippingAddressCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetItemShippingAddressCustomFieldActionModel.php index 58100fcf97f..efa150da3d2 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetItemShippingAddressCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetItemShippingAddressCustomFieldActionModel.php @@ -118,7 +118,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomFieldAction.php b/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomFieldAction.php index fbcc3b653fb..6bfc5ead795 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomFieldAction.php @@ -33,7 +33,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomFieldActionBuilder.php index 395f40d356a..17509fd4630 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomFieldActionBuilder.php @@ -60,7 +60,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomFieldActionModel.php index 23d98f476e5..08d2e25431b 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetLineItemCustomFieldActionModel.php @@ -118,7 +118,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Order/OrderSetParcelCustomFieldAction.php b/lib/commercetools-api/src/Models/Order/OrderSetParcelCustomFieldAction.php index e798ef9ac97..6792efd0bf5 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetParcelCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetParcelCustomFieldAction.php @@ -33,7 +33,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetParcelCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetParcelCustomFieldActionBuilder.php index f3ef6a6c557..5c452f5c917 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetParcelCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetParcelCustomFieldActionBuilder.php @@ -60,7 +60,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetParcelCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetParcelCustomFieldActionModel.php index 01ea6952107..26e3be7ef70 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetParcelCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetParcelCustomFieldActionModel.php @@ -118,7 +118,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldAction.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldAction.php index e0b17e2bb86..5e4dd705794 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldAction.php @@ -33,7 +33,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldActionBuilder.php index 433436352e2..77c340e49af 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldActionBuilder.php @@ -60,7 +60,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldActionModel.php index cbc530155d2..52b1cca9cca 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetReturnItemCustomFieldActionModel.php @@ -118,7 +118,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressCustomFieldAction.php index 01d06daec46..80d46c22986 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressCustomFieldActionBuilder.php index ac0a3e71b9c..8f4530647d7 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressCustomFieldActionModel.php index 769c666e94b..9878db71c45 100644 --- a/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderSetShippingAddressCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomFieldAction.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomFieldAction.php index 55f217f594d..be78e98311a 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomFieldActionBuilder.php index 183c64d32e5..c21327fd4a5 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomFieldActionModel.php index 65da72dfb58..bf62d8c4be6 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/OrderEditSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressCustomFieldAction.php index 71ba1a85ad6..ca6fc41d569 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressCustomFieldAction.php @@ -27,7 +27,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressCustomFieldActionBuilder.php index d3b24b64109..97407c03ece 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressCustomFieldActionBuilder.php @@ -47,7 +47,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressCustomFieldActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressCustomFieldActionModel.php index 19e1be95037..b519294a89e 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetBillingAddressCustomFieldActionModel.php @@ -94,7 +94,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomFieldAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomFieldAction.php index ec7e2375d0e..aef73ae84c9 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomFieldAction.php @@ -27,7 +27,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomFieldActionBuilder.php index 2ad0935a250..77925397987 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomFieldActionBuilder.php @@ -47,7 +47,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomFieldActionModel.php index 14fa7958b72..7dd967ad7fe 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomFieldActionModel.php @@ -94,7 +94,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldAction.php index daa65a5572b..54d3b908617 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldAction.php @@ -34,7 +34,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldActionBuilder.php index f9b51f5f5f5..f527ccdbdc9 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldActionBuilder.php @@ -62,7 +62,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldActionModel.php index 8eb05a37277..e9c738fb624 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetCustomLineItemCustomFieldActionModel.php @@ -120,7 +120,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldAction.php index 7dfcd7913ce..e0f58075f95 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldAction.php @@ -34,7 +34,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldActionBuilder.php index c39e576da68..8a70676b890 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldActionBuilder.php @@ -62,7 +62,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldActionModel.php index 0b7ea8d64cb..d817f89f36d 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldActionModel.php @@ -120,7 +120,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryCustomFieldAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryCustomFieldAction.php index 83fca93ba13..57258dca033 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryCustomFieldAction.php @@ -34,7 +34,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryCustomFieldActionBuilder.php index 15630b23d3d..8d133c2197e 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryCustomFieldActionBuilder.php @@ -62,7 +62,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryCustomFieldActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryCustomFieldActionModel.php index 2a9e78da2a1..a0067846a57 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetDeliveryCustomFieldActionModel.php @@ -120,7 +120,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetItemShippingAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetItemShippingAddressCustomFieldAction.php index 8e1f76b5136..3a3e0e87dbc 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetItemShippingAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetItemShippingAddressCustomFieldAction.php @@ -34,7 +34,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetItemShippingAddressCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetItemShippingAddressCustomFieldActionBuilder.php index f11f621bb06..817fa0f6319 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetItemShippingAddressCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetItemShippingAddressCustomFieldActionBuilder.php @@ -62,7 +62,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetItemShippingAddressCustomFieldActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetItemShippingAddressCustomFieldActionModel.php index 1761d95075e..82c31bb8f70 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetItemShippingAddressCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetItemShippingAddressCustomFieldActionModel.php @@ -120,7 +120,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomFieldAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomFieldAction.php index 69ece643675..dbd398ef0a1 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomFieldAction.php @@ -34,7 +34,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomFieldActionBuilder.php index 2e4a07e25f9..fcd14b2e87f 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomFieldActionBuilder.php @@ -62,7 +62,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomFieldActionModel.php index 7fc6cc92c4c..c6a34857cda 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetLineItemCustomFieldActionModel.php @@ -120,7 +120,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelCustomFieldAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelCustomFieldAction.php index a69995f5f67..fd2bef3d3bc 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelCustomFieldAction.php @@ -34,7 +34,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelCustomFieldActionBuilder.php index d6611003efd..171d1f8a67e 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelCustomFieldActionBuilder.php @@ -62,7 +62,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelCustomFieldActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelCustomFieldActionModel.php index e32542b86aa..00bf4ea2edd 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetParcelCustomFieldActionModel.php @@ -120,7 +120,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldAction.php index a43c49fcdd6..84f70709bef 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldAction.php @@ -34,7 +34,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldActionBuilder.php index 051981c3a4a..010b3f40492 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldActionBuilder.php @@ -62,7 +62,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldActionModel.php index 8df15f1665a..00af5383a39 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetReturnItemCustomFieldActionModel.php @@ -120,7 +120,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressCustomFieldAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressCustomFieldAction.php index b9bed89800b..a0961b2c983 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressCustomFieldAction.php @@ -27,7 +27,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressCustomFieldActionBuilder.php index dc59cf9dcbd..fbf51d19945 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressCustomFieldActionBuilder.php @@ -47,7 +47,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressCustomFieldActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressCustomFieldActionModel.php index 5473de44c35..426a8e99ac3 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderSetShippingAddressCustomFieldActionModel.php @@ -94,7 +94,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetCustomFieldAction.php b/lib/commercetools-api/src/Models/Payment/PaymentSetCustomFieldAction.php index 4968a42bc11..d44c456c750 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentSetCustomFieldActionBuilder.php index 61391f06eda..a6587266f52 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentSetCustomFieldActionModel.php index 418c1660462..b9984e6e30e 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldAction.php b/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldAction.php index 58bda59e1b9..5147eed2d3f 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldAction.php @@ -34,7 +34,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldActionBuilder.php index a4c0a2901c4..80302a91ff7 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldActionBuilder.php @@ -61,7 +61,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldActionModel.php index 7e3826735f4..dd43a25f241 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldActionModel.php @@ -119,7 +119,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Product/ProductSetAssetCustomFieldAction.php b/lib/commercetools-api/src/Models/Product/ProductSetAssetCustomFieldAction.php index 583643972f6..6b19d5546dd 100644 --- a/lib/commercetools-api/src/Models/Product/ProductSetAssetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Product/ProductSetAssetCustomFieldAction.php @@ -71,7 +71,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Product/ProductSetAssetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Product/ProductSetAssetCustomFieldActionBuilder.php index 3c84c7625c2..7de7baff873 100644 --- a/lib/commercetools-api/src/Models/Product/ProductSetAssetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Product/ProductSetAssetCustomFieldActionBuilder.php @@ -130,7 +130,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Product/ProductSetAssetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Product/ProductSetAssetCustomFieldActionModel.php index 44da040f5d6..9b248c8ea38 100644 --- a/lib/commercetools-api/src/Models/Product/ProductSetAssetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Product/ProductSetAssetCustomFieldActionModel.php @@ -232,7 +232,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Product/ProductSetProductPriceCustomFieldAction.php b/lib/commercetools-api/src/Models/Product/ProductSetProductPriceCustomFieldAction.php index c97915a6ce5..9e0ec601375 100644 --- a/lib/commercetools-api/src/Models/Product/ProductSetProductPriceCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Product/ProductSetProductPriceCustomFieldAction.php @@ -44,7 +44,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Product/ProductSetProductPriceCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Product/ProductSetProductPriceCustomFieldActionBuilder.php index b4b78ecc487..54081ea1bbb 100644 --- a/lib/commercetools-api/src/Models/Product/ProductSetProductPriceCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Product/ProductSetProductPriceCustomFieldActionBuilder.php @@ -79,7 +79,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Product/ProductSetProductPriceCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Product/ProductSetProductPriceCustomFieldActionModel.php index 45444ee7910..1c6459ea949 100644 --- a/lib/commercetools-api/src/Models/Product/ProductSetProductPriceCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Product/ProductSetProductPriceCustomFieldActionModel.php @@ -148,7 +148,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/ProductDiscount/ProductDiscountUpdate.php b/lib/commercetools-api/src/Models/ProductDiscount/ProductDiscountUpdate.php index c42d5e903f0..73c9603efec 100644 --- a/lib/commercetools-api/src/Models/ProductDiscount/ProductDiscountUpdate.php +++ b/lib/commercetools-api/src/Models/ProductDiscount/ProductDiscountUpdate.php @@ -17,7 +17,7 @@ interface ProductDiscountUpdate extends JsonObject public const FIELD_ACTIONS = 'actions'; /** - *

Expected version of the ProductDiscount on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the ProductDiscount on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/ProductDiscount/ProductDiscountUpdateBuilder.php b/lib/commercetools-api/src/Models/ProductDiscount/ProductDiscountUpdateBuilder.php index 6cc217cb425..683d88f2172 100644 --- a/lib/commercetools-api/src/Models/ProductDiscount/ProductDiscountUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/ProductDiscount/ProductDiscountUpdateBuilder.php @@ -33,7 +33,7 @@ final class ProductDiscountUpdateBuilder implements Builder private $actions; /** - *

Expected version of the ProductDiscount on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the ProductDiscount on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/ProductDiscount/ProductDiscountUpdateModel.php b/lib/commercetools-api/src/Models/ProductDiscount/ProductDiscountUpdateModel.php index d392efa1a60..2c1ccb518a8 100644 --- a/lib/commercetools-api/src/Models/ProductDiscount/ProductDiscountUpdateModel.php +++ b/lib/commercetools-api/src/Models/ProductDiscount/ProductDiscountUpdateModel.php @@ -44,7 +44,7 @@ public function __construct( } /** - *

Expected version of the ProductDiscount on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the ProductDiscount on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * * @return null|int diff --git a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionSetCustomFieldAction.php b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionSetCustomFieldAction.php index bdcc5ecf3e1..e52f6deef61 100644 --- a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionSetCustomFieldActionBuilder.php index a9802cd4961..9f49475fd42 100644 --- a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionSetCustomFieldActionModel.php index 8c11e937c1b..364cca6a95b 100644 --- a/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/ProductSelection/ProductSelectionSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/ProductType/AttributeDefinition.php b/lib/commercetools-api/src/Models/ProductType/AttributeDefinition.php index 61d38b538fd..93fd8f41052 100644 --- a/lib/commercetools-api/src/Models/ProductType/AttributeDefinition.php +++ b/lib/commercetools-api/src/Models/ProductType/AttributeDefinition.php @@ -84,7 +84,7 @@ public function getInputHint(); *

Which exact features are available with this flag depends on the specific AttributeType. * The maximum size of a searchable field is restricted by the Field content size limit. * This constraint is enforced at both Product creation and Product update. - * If the length of the input exceeds the maximum size, an InvalidFieldError is returned.

+ * If the length of the input exceeds the maximum size, an InvalidField error is returned.

* * @return null|bool diff --git a/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionBuilder.php b/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionBuilder.php index ce61c02e999..173006ee6af 100644 --- a/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionBuilder.php +++ b/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionBuilder.php @@ -152,7 +152,7 @@ public function getInputHint() *

Which exact features are available with this flag depends on the specific AttributeType. * The maximum size of a searchable field is restricted by the Field content size limit. * This constraint is enforced at both Product creation and Product update. - * If the length of the input exceeds the maximum size, an InvalidFieldError is returned.

+ * If the length of the input exceeds the maximum size, an InvalidField error is returned.

* * @return null|bool diff --git a/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionDraft.php b/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionDraft.php index ec12923ca3e..d1c3e583494 100644 --- a/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionDraft.php +++ b/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionDraft.php @@ -25,6 +25,7 @@ interface AttributeDefinitionDraft extends JsonObject /** *

Describes the Type of the Attribute.

+ *

When the type is different for an AttributeDefinition using the same name in multiple ProductTypes, an AttributeDefinitionTypeConflict error is returned.

* * @return null|AttributeType @@ -32,8 +33,8 @@ interface AttributeDefinitionDraft extends JsonObject public function getType(); /** - *

User-defined name of the Attribute that is unique with the Project. - * When using the same name for an Attribute in multiple ProductTypes, all fields of the AttributeDefinition of this Attribute must be the same across the ProductTypes. Otherwise an AttributeDefinitionAlreadyExistsError will be returned. + *

User-defined name of the Attribute that is unique with the Project.

+ *

When using the same name for an Attribute in multiple ProductTypes, all fields of the AttributeDefinition of this Attribute must be the same across the ProductTypes, else an AttributeDefinitionAlreadyExists error is returned. * An exception to this are the values of an enum or lenum Type and sets thereof.

* diff --git a/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionDraftBuilder.php b/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionDraftBuilder.php index 062cf396874..86c4084d7ca 100644 --- a/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionDraftBuilder.php +++ b/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionDraftBuilder.php @@ -72,6 +72,7 @@ final class AttributeDefinitionDraftBuilder implements Builder /** *

Describes the Type of the Attribute.

+ *

When the type is different for an AttributeDefinition using the same name in multiple ProductTypes, an AttributeDefinitionTypeConflict error is returned.

* * @return null|AttributeType @@ -82,8 +83,8 @@ public function getType() } /** - *

User-defined name of the Attribute that is unique with the Project. - * When using the same name for an Attribute in multiple ProductTypes, all fields of the AttributeDefinition of this Attribute must be the same across the ProductTypes. Otherwise an AttributeDefinitionAlreadyExistsError will be returned. + *

User-defined name of the Attribute that is unique with the Project.

+ *

When using the same name for an Attribute in multiple ProductTypes, all fields of the AttributeDefinition of this Attribute must be the same across the ProductTypes, else an AttributeDefinitionAlreadyExists error is returned. * An exception to this are the values of an enum or lenum Type and sets thereof.

* diff --git a/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionDraftModel.php b/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionDraftModel.php index 9da4d37d7b9..41fe8573bd1 100644 --- a/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionDraftModel.php +++ b/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionDraftModel.php @@ -95,6 +95,7 @@ public function __construct( /** *

Describes the Type of the Attribute.

+ *

When the type is different for an AttributeDefinition using the same name in multiple ProductTypes, an AttributeDefinitionTypeConflict error is returned.

* * * @return null|AttributeType @@ -115,8 +116,8 @@ public function getType() } /** - *

User-defined name of the Attribute that is unique with the Project. - * When using the same name for an Attribute in multiple ProductTypes, all fields of the AttributeDefinition of this Attribute must be the same across the ProductTypes. Otherwise an AttributeDefinitionAlreadyExistsError will be returned. + *

User-defined name of the Attribute that is unique with the Project.

+ *

When using the same name for an Attribute in multiple ProductTypes, all fields of the AttributeDefinition of this Attribute must be the same across the ProductTypes, else an AttributeDefinitionAlreadyExists error is returned. * An exception to this are the values of an enum or lenum Type and sets thereof.

* * diff --git a/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionModel.php b/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionModel.php index 0de18dec9bc..52150c4d705 100644 --- a/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionModel.php +++ b/lib/commercetools-api/src/Models/ProductType/AttributeDefinitionModel.php @@ -241,7 +241,7 @@ public function getInputHint() *

Which exact features are available with this flag depends on the specific AttributeType. * The maximum size of a searchable field is restricted by the Field content size limit. * This constraint is enforced at both Product creation and Product update. - * If the length of the input exceeds the maximum size, an InvalidFieldError is returned.

+ * If the length of the input exceeds the maximum size, an InvalidField error is returned.

* * * @return null|bool diff --git a/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeAttributeNameAction.php b/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeAttributeNameAction.php index b1ae07831eb..1def34da416 100644 --- a/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeAttributeNameAction.php +++ b/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeAttributeNameAction.php @@ -25,8 +25,8 @@ interface ProductTypeChangeAttributeNameAction extends ProductTypeUpdateAction public function getAttributeName(); /** - *

New user-defined name of the Attribute that is unique with the Project. - * When using the same name for an Attribute in two or more ProductTypes all fields of the AttributeDefinition of this Attribute need to be the same across the ProductTypes, otherwise an AttributeDefinitionAlreadyExistsError will be returned. + *

New user-defined name of the Attribute that is unique with the Project.

+ *

When using the same name for an Attribute in two or more ProductTypes, all fields of the AttributeDefinition of this Attribute must be the same across the ProductTypes. If not, an AttributeDefinitionAlreadyExists error is returned. * An exception to this are the values of an enum or lenum type and sets thereof.

* diff --git a/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeAttributeNameActionBuilder.php b/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeAttributeNameActionBuilder.php index 30e99373331..63ba02f750a 100644 --- a/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeAttributeNameActionBuilder.php +++ b/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeAttributeNameActionBuilder.php @@ -44,8 +44,8 @@ public function getAttributeName() } /** - *

New user-defined name of the Attribute that is unique with the Project. - * When using the same name for an Attribute in two or more ProductTypes all fields of the AttributeDefinition of this Attribute need to be the same across the ProductTypes, otherwise an AttributeDefinitionAlreadyExistsError will be returned. + *

New user-defined name of the Attribute that is unique with the Project.

+ *

When using the same name for an Attribute in two or more ProductTypes, all fields of the AttributeDefinition of this Attribute must be the same across the ProductTypes. If not, an AttributeDefinitionAlreadyExists error is returned. * An exception to this are the values of an enum or lenum type and sets thereof.

* diff --git a/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeAttributeNameActionModel.php b/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeAttributeNameActionModel.php index 49981afa3d1..3c8f8cf0fbb 100644 --- a/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeAttributeNameActionModel.php +++ b/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeAttributeNameActionModel.php @@ -91,8 +91,8 @@ public function getAttributeName() } /** - *

New user-defined name of the Attribute that is unique with the Project. - * When using the same name for an Attribute in two or more ProductTypes all fields of the AttributeDefinition of this Attribute need to be the same across the ProductTypes, otherwise an AttributeDefinitionAlreadyExistsError will be returned. + *

New user-defined name of the Attribute that is unique with the Project.

+ *

When using the same name for an Attribute in two or more ProductTypes, all fields of the AttributeDefinition of this Attribute must be the same across the ProductTypes. If not, an AttributeDefinitionAlreadyExists error is returned. * An exception to this are the values of an enum or lenum type and sets thereof.

* * diff --git a/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeLocalizedEnumValueOrderAction.php b/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeLocalizedEnumValueOrderAction.php index c362865bcfd..a54147960c4 100644 --- a/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeLocalizedEnumValueOrderAction.php +++ b/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeLocalizedEnumValueOrderAction.php @@ -25,7 +25,7 @@ interface ProductTypeChangeLocalizedEnumValueOrderAction extends ProductTypeUpda public function getAttributeName(); /** - *

Values must be equal to the values of the Attribute enum values (except for the order). If not, an EnumValuesMustMatch error code will be returned.

+ *

Values must be equal to the values of the Attribute enum values (except for the order). If not, an EnumValuesMustMatch error is returned.

* * @return null|AttributeLocalizedEnumValueCollection diff --git a/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeLocalizedEnumValueOrderActionBuilder.php b/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeLocalizedEnumValueOrderActionBuilder.php index f7e68091fb7..f32bfdfe904 100644 --- a/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeLocalizedEnumValueOrderActionBuilder.php +++ b/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeLocalizedEnumValueOrderActionBuilder.php @@ -44,7 +44,7 @@ public function getAttributeName() } /** - *

Values must be equal to the values of the Attribute enum values (except for the order). If not, an EnumValuesMustMatch error code will be returned.

+ *

Values must be equal to the values of the Attribute enum values (except for the order). If not, an EnumValuesMustMatch error is returned.

* * @return null|AttributeLocalizedEnumValueCollection diff --git a/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeLocalizedEnumValueOrderActionModel.php b/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeLocalizedEnumValueOrderActionModel.php index 2fb5d2a45e8..d63ff47cede 100644 --- a/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeLocalizedEnumValueOrderActionModel.php +++ b/lib/commercetools-api/src/Models/ProductType/ProductTypeChangeLocalizedEnumValueOrderActionModel.php @@ -91,7 +91,7 @@ public function getAttributeName() } /** - *

Values must be equal to the values of the Attribute enum values (except for the order). If not, an EnumValuesMustMatch error code will be returned.

+ *

Values must be equal to the values of the Attribute enum values (except for the order). If not, an EnumValuesMustMatch error is returned.

* * * @return null|AttributeLocalizedEnumValueCollection diff --git a/lib/commercetools-api/src/Models/ProductType/ProductTypeChangePlainEnumValueOrderAction.php b/lib/commercetools-api/src/Models/ProductType/ProductTypeChangePlainEnumValueOrderAction.php index 085454e9619..ad05de07700 100644 --- a/lib/commercetools-api/src/Models/ProductType/ProductTypeChangePlainEnumValueOrderAction.php +++ b/lib/commercetools-api/src/Models/ProductType/ProductTypeChangePlainEnumValueOrderAction.php @@ -25,7 +25,7 @@ interface ProductTypeChangePlainEnumValueOrderAction extends ProductTypeUpdateAc public function getAttributeName(); /** - *

Values must be equal to the values of the Attribute enum values (except for the order). If not, an EnumValuesMustMatch error code will be returned.

+ *

Values must be equal to the values of the Attribute enum values (except for the order). If not, an EnumValuesMustMatch error is returned.

* * @return null|AttributePlainEnumValueCollection diff --git a/lib/commercetools-api/src/Models/ProductType/ProductTypeChangePlainEnumValueOrderActionBuilder.php b/lib/commercetools-api/src/Models/ProductType/ProductTypeChangePlainEnumValueOrderActionBuilder.php index 9204df48569..a8fed6d5e54 100644 --- a/lib/commercetools-api/src/Models/ProductType/ProductTypeChangePlainEnumValueOrderActionBuilder.php +++ b/lib/commercetools-api/src/Models/ProductType/ProductTypeChangePlainEnumValueOrderActionBuilder.php @@ -44,7 +44,7 @@ public function getAttributeName() } /** - *

Values must be equal to the values of the Attribute enum values (except for the order). If not, an EnumValuesMustMatch error code will be returned.

+ *

Values must be equal to the values of the Attribute enum values (except for the order). If not, an EnumValuesMustMatch error is returned.

* * @return null|AttributePlainEnumValueCollection diff --git a/lib/commercetools-api/src/Models/ProductType/ProductTypeChangePlainEnumValueOrderActionModel.php b/lib/commercetools-api/src/Models/ProductType/ProductTypeChangePlainEnumValueOrderActionModel.php index 1dfc65f10de..5ad51a2b123 100644 --- a/lib/commercetools-api/src/Models/ProductType/ProductTypeChangePlainEnumValueOrderActionModel.php +++ b/lib/commercetools-api/src/Models/ProductType/ProductTypeChangePlainEnumValueOrderActionModel.php @@ -91,7 +91,7 @@ public function getAttributeName() } /** - *

Values must be equal to the values of the Attribute enum values (except for the order). If not, an EnumValuesMustMatch error code will be returned.

+ *

Values must be equal to the values of the Attribute enum values (except for the order). If not, an EnumValuesMustMatch error is returned.

* * * @return null|AttributePlainEnumValueCollection diff --git a/lib/commercetools-api/src/Models/ProductType/ProductTypeUpdate.php b/lib/commercetools-api/src/Models/ProductType/ProductTypeUpdate.php index aebf6ca8cb0..968bc3200b9 100644 --- a/lib/commercetools-api/src/Models/ProductType/ProductTypeUpdate.php +++ b/lib/commercetools-api/src/Models/ProductType/ProductTypeUpdate.php @@ -17,7 +17,7 @@ interface ProductTypeUpdate extends JsonObject public const FIELD_ACTIONS = 'actions'; /** - *

Expected version of the ProductType on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the ProductType on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/ProductType/ProductTypeUpdateBuilder.php b/lib/commercetools-api/src/Models/ProductType/ProductTypeUpdateBuilder.php index bab62682a2e..9b256f9593d 100644 --- a/lib/commercetools-api/src/Models/ProductType/ProductTypeUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/ProductType/ProductTypeUpdateBuilder.php @@ -33,7 +33,7 @@ final class ProductTypeUpdateBuilder implements Builder private $actions; /** - *

Expected version of the ProductType on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the ProductType on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/ProductType/ProductTypeUpdateModel.php b/lib/commercetools-api/src/Models/ProductType/ProductTypeUpdateModel.php index abc5682b076..0500e44656c 100644 --- a/lib/commercetools-api/src/Models/ProductType/ProductTypeUpdateModel.php +++ b/lib/commercetools-api/src/Models/ProductType/ProductTypeUpdateModel.php @@ -44,7 +44,7 @@ public function __construct( } /** - *

Expected version of the ProductType on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the ProductType on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * * @return null|int diff --git a/lib/commercetools-api/src/Models/Project/ProjectChangeProductSearchIndexingEnabledAction.php b/lib/commercetools-api/src/Models/Project/ProjectChangeProductSearchIndexingEnabledAction.php index a89c375aa58..e5b2011e7bf 100644 --- a/lib/commercetools-api/src/Models/Project/ProjectChangeProductSearchIndexingEnabledAction.php +++ b/lib/commercetools-api/src/Models/Project/ProjectChangeProductSearchIndexingEnabledAction.php @@ -16,8 +16,10 @@ interface ProjectChangeProductSearchIndexingEnabledAction extends ProjectUpdateA public const FIELD_ENABLED = 'enabled'; /** - *

If false, the indexing of Product information will stop and the Product Projection Search as well as the Product Suggestions endpoint will not be available anymore for this Project. The Project's SearchIndexingConfiguration status for products will be changed to "Deactivated".

- *

If true, the indexing of Product information will start and the Product Projection Search as well as the Product Suggestions endpoint will become available soon after for this Project. Proportional to the amount of information being indexed, the Project's SearchIndexingConfiguration status for products will be shown as "Indexing" during this time. As soon as the indexing has finished, the configuration status will be changed to "Activated" making the aforementioned endpoints fully available for this Project.

+ *
    + *
  • If false, the indexing of Product information will stop and the Product Projection Search as well as the Product Suggestions endpoint will not be available anymore for this Project. The Project's SearchIndexingConfiguration status for products will be changed to "Deactivated".
  • + *
  • If true, the indexing of Product information will start and the Product Projection Search as well as the Product Suggestions endpoint will become available soon after for this Project. Proportional to the amount of information being indexed, the Project's SearchIndexingConfiguration status for products will be shown as "Indexing" during this time. As soon as the indexing has finished, the configuration status will be changed to "Activated" making the aforementioned endpoints fully available for this Project.
  • + *
* * @return null|bool diff --git a/lib/commercetools-api/src/Models/Project/ProjectChangeProductSearchIndexingEnabledActionBuilder.php b/lib/commercetools-api/src/Models/Project/ProjectChangeProductSearchIndexingEnabledActionBuilder.php index a5a2c719335..2bb41b920b7 100644 --- a/lib/commercetools-api/src/Models/Project/ProjectChangeProductSearchIndexingEnabledActionBuilder.php +++ b/lib/commercetools-api/src/Models/Project/ProjectChangeProductSearchIndexingEnabledActionBuilder.php @@ -27,8 +27,10 @@ final class ProjectChangeProductSearchIndexingEnabledActionBuilder implements Bu private $enabled; /** - *

If false, the indexing of Product information will stop and the Product Projection Search as well as the Product Suggestions endpoint will not be available anymore for this Project. The Project's SearchIndexingConfiguration status for products will be changed to "Deactivated".

- *

If true, the indexing of Product information will start and the Product Projection Search as well as the Product Suggestions endpoint will become available soon after for this Project. Proportional to the amount of information being indexed, the Project's SearchIndexingConfiguration status for products will be shown as "Indexing" during this time. As soon as the indexing has finished, the configuration status will be changed to "Activated" making the aforementioned endpoints fully available for this Project.

+ *
    + *
  • If false, the indexing of Product information will stop and the Product Projection Search as well as the Product Suggestions endpoint will not be available anymore for this Project. The Project's SearchIndexingConfiguration status for products will be changed to "Deactivated".
  • + *
  • If true, the indexing of Product information will start and the Product Projection Search as well as the Product Suggestions endpoint will become available soon after for this Project. Proportional to the amount of information being indexed, the Project's SearchIndexingConfiguration status for products will be shown as "Indexing" during this time. As soon as the indexing has finished, the configuration status will be changed to "Activated" making the aforementioned endpoints fully available for this Project.
  • + *
* * @return null|bool diff --git a/lib/commercetools-api/src/Models/Project/ProjectChangeProductSearchIndexingEnabledActionModel.php b/lib/commercetools-api/src/Models/Project/ProjectChangeProductSearchIndexingEnabledActionModel.php index 771b9615ab5..ac2318d59b8 100644 --- a/lib/commercetools-api/src/Models/Project/ProjectChangeProductSearchIndexingEnabledActionModel.php +++ b/lib/commercetools-api/src/Models/Project/ProjectChangeProductSearchIndexingEnabledActionModel.php @@ -63,8 +63,10 @@ public function getAction() } /** - *

If false, the indexing of Product information will stop and the Product Projection Search as well as the Product Suggestions endpoint will not be available anymore for this Project. The Project's SearchIndexingConfiguration status for products will be changed to "Deactivated".

- *

If true, the indexing of Product information will start and the Product Projection Search as well as the Product Suggestions endpoint will become available soon after for this Project. Proportional to the amount of information being indexed, the Project's SearchIndexingConfiguration status for products will be shown as "Indexing" during this time. As soon as the indexing has finished, the configuration status will be changed to "Activated" making the aforementioned endpoints fully available for this Project.

+ *
    + *
  • If false, the indexing of Product information will stop and the Product Projection Search as well as the Product Suggestions endpoint will not be available anymore for this Project. The Project's SearchIndexingConfiguration status for products will be changed to "Deactivated".
  • + *
  • If true, the indexing of Product information will start and the Product Projection Search as well as the Product Suggestions endpoint will become available soon after for this Project. Proportional to the amount of information being indexed, the Project's SearchIndexingConfiguration status for products will be shown as "Indexing" during this time. As soon as the indexing has finished, the configuration status will be changed to "Activated" making the aforementioned endpoints fully available for this Project.
  • + *
* * * @return null|bool diff --git a/lib/commercetools-api/src/Models/Project/ProjectUpdate.php b/lib/commercetools-api/src/Models/Project/ProjectUpdate.php index 34a76fe5135..28fb525ac9f 100644 --- a/lib/commercetools-api/src/Models/Project/ProjectUpdate.php +++ b/lib/commercetools-api/src/Models/Project/ProjectUpdate.php @@ -17,7 +17,7 @@ interface ProjectUpdate extends JsonObject public const FIELD_ACTIONS = 'actions'; /** - *

Expected version of the Project on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the Project on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/Project/ProjectUpdateBuilder.php b/lib/commercetools-api/src/Models/Project/ProjectUpdateBuilder.php index 123a7006a97..e8354022375 100644 --- a/lib/commercetools-api/src/Models/Project/ProjectUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/Project/ProjectUpdateBuilder.php @@ -33,7 +33,7 @@ final class ProjectUpdateBuilder implements Builder private $actions; /** - *

Expected version of the Project on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the Project on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/Project/ProjectUpdateModel.php b/lib/commercetools-api/src/Models/Project/ProjectUpdateModel.php index 860a482b811..286d9ac8203 100644 --- a/lib/commercetools-api/src/Models/Project/ProjectUpdateModel.php +++ b/lib/commercetools-api/src/Models/Project/ProjectUpdateModel.php @@ -44,7 +44,7 @@ public function __construct( } /** - *

Expected version of the Project on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the Project on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * * @return null|int diff --git a/lib/commercetools-api/src/Models/Quote/QuoteSetCustomFieldAction.php b/lib/commercetools-api/src/Models/Quote/QuoteSetCustomFieldAction.php index 9cdccc353c2..b0ee87d7f59 100644 --- a/lib/commercetools-api/src/Models/Quote/QuoteSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Quote/QuoteSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Quote/QuoteSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Quote/QuoteSetCustomFieldActionBuilder.php index 254176de29b..2e10df2df37 100644 --- a/lib/commercetools-api/src/Models/Quote/QuoteSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Quote/QuoteSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Quote/QuoteSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Quote/QuoteSetCustomFieldActionModel.php index 64b069b3271..ffc151d8a1c 100644 --- a/lib/commercetools-api/src/Models/Quote/QuoteSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Quote/QuoteSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/QuoteRequest/QuoteRequestSetCustomFieldAction.php b/lib/commercetools-api/src/Models/QuoteRequest/QuoteRequestSetCustomFieldAction.php index 6ca4c6910df..ab97cac713f 100644 --- a/lib/commercetools-api/src/Models/QuoteRequest/QuoteRequestSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/QuoteRequest/QuoteRequestSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/QuoteRequest/QuoteRequestSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/QuoteRequest/QuoteRequestSetCustomFieldActionBuilder.php index e8a4e6ae078..722ce7a83b4 100644 --- a/lib/commercetools-api/src/Models/QuoteRequest/QuoteRequestSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/QuoteRequest/QuoteRequestSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/QuoteRequest/QuoteRequestSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/QuoteRequest/QuoteRequestSetCustomFieldActionModel.php index f2637cf6ffe..7cd66011e06 100644 --- a/lib/commercetools-api/src/Models/QuoteRequest/QuoteRequestSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/QuoteRequest/QuoteRequestSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Review/ReviewSetCustomFieldAction.php b/lib/commercetools-api/src/Models/Review/ReviewSetCustomFieldAction.php index b24703d9e0a..2598a6289e1 100644 --- a/lib/commercetools-api/src/Models/Review/ReviewSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Review/ReviewSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Review/ReviewSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Review/ReviewSetCustomFieldActionBuilder.php index 0be775c8a46..f18fac22c56 100644 --- a/lib/commercetools-api/src/Models/Review/ReviewSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Review/ReviewSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Review/ReviewSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Review/ReviewSetCustomFieldActionModel.php index ae328b7bdb5..b232b3d5bda 100644 --- a/lib/commercetools-api/src/Models/Review/ReviewSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Review/ReviewSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/ShippingMethod/ShippingMethodSetCustomFieldAction.php b/lib/commercetools-api/src/Models/ShippingMethod/ShippingMethodSetCustomFieldAction.php index a76271bf462..cb3533a8a5e 100644 --- a/lib/commercetools-api/src/Models/ShippingMethod/ShippingMethodSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/ShippingMethod/ShippingMethodSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/ShippingMethod/ShippingMethodSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/ShippingMethod/ShippingMethodSetCustomFieldActionBuilder.php index d92b60dd16f..494f21d4711 100644 --- a/lib/commercetools-api/src/Models/ShippingMethod/ShippingMethodSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShippingMethod/ShippingMethodSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/ShippingMethod/ShippingMethodSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/ShippingMethod/ShippingMethodSetCustomFieldActionModel.php index 4cfb66c38dc..8ddbf7ce9d9 100644 --- a/lib/commercetools-api/src/Models/ShippingMethod/ShippingMethodSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/ShippingMethod/ShippingMethodSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomFieldAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomFieldAction.php index 1155ae0d586..80feac8adc1 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomFieldActionBuilder.php index 68f46182bae..a3e203470ea 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomFieldActionModel.php index 59b11715e16..14eaf7f16eb 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldAction.php index 2e6a7dafc8c..1a4a0f84667 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldAction.php @@ -33,7 +33,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldActionBuilder.php index 3a2251d7df8..5aec1dd36fe 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldActionBuilder.php @@ -60,7 +60,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldActionModel.php index 40a91abc683..7baaa1e4910 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldActionModel.php @@ -118,7 +118,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldAction.php index a7fe64883b7..5bc029b673c 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldAction.php @@ -33,7 +33,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldActionBuilder.php index 5ba6e69cc9c..6200be2cdff 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldActionBuilder.php @@ -60,7 +60,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldActionModel.php index 1a7c78910ed..1e456924794 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldActionModel.php @@ -118,7 +118,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/StagedQuote/StagedQuoteSetCustomFieldAction.php b/lib/commercetools-api/src/Models/StagedQuote/StagedQuoteSetCustomFieldAction.php index 5130fb57d0d..23d4c4f6bbe 100644 --- a/lib/commercetools-api/src/Models/StagedQuote/StagedQuoteSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/StagedQuote/StagedQuoteSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/StagedQuote/StagedQuoteSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/StagedQuote/StagedQuoteSetCustomFieldActionBuilder.php index 8b176d61678..3eabfbc3ac5 100644 --- a/lib/commercetools-api/src/Models/StagedQuote/StagedQuoteSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/StagedQuote/StagedQuoteSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/StagedQuote/StagedQuoteSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/StagedQuote/StagedQuoteSetCustomFieldActionModel.php index 924909a404a..dd1ce1a1aea 100644 --- a/lib/commercetools-api/src/Models/StagedQuote/StagedQuoteSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/StagedQuote/StagedQuoteSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceSetCustomFieldAction.php b/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceSetCustomFieldAction.php index d2a7c4fd9c7..3ef2b0f0931 100644 --- a/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceSetCustomFieldActionBuilder.php index 4e62ddfc078..cd814b42885 100644 --- a/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceSetCustomFieldActionModel.php index 55d059d3e64..f8bb9478296 100644 --- a/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceUpdate.php b/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceUpdate.php index b37f22ffbb2..005ee4e4f3a 100644 --- a/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceUpdate.php +++ b/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceUpdate.php @@ -17,7 +17,7 @@ interface StandalonePriceUpdate extends JsonObject public const FIELD_ACTIONS = 'actions'; /** - *

Expected version of the StandalonePrice on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict error will be returned.

+ *

Expected version of the StandalonePrice on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceUpdateBuilder.php b/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceUpdateBuilder.php index 4c45c0a4d29..a0ba8a5e842 100644 --- a/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceUpdateBuilder.php @@ -33,7 +33,7 @@ final class StandalonePriceUpdateBuilder implements Builder private $actions; /** - *

Expected version of the StandalonePrice on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict error will be returned.

+ *

Expected version of the StandalonePrice on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceUpdateModel.php b/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceUpdateModel.php index c9e4e326cee..1478d44c50e 100644 --- a/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceUpdateModel.php +++ b/lib/commercetools-api/src/Models/StandalonePrice/StandalonePriceUpdateModel.php @@ -44,7 +44,7 @@ public function __construct( } /** - *

Expected version of the StandalonePrice on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict error will be returned.

+ *

Expected version of the StandalonePrice on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * * @return null|int diff --git a/lib/commercetools-api/src/Models/State/StateUpdate.php b/lib/commercetools-api/src/Models/State/StateUpdate.php index 17c3e499407..a1473beb797 100644 --- a/lib/commercetools-api/src/Models/State/StateUpdate.php +++ b/lib/commercetools-api/src/Models/State/StateUpdate.php @@ -17,7 +17,7 @@ interface StateUpdate extends JsonObject public const FIELD_ACTIONS = 'actions'; /** - *

Expected version of the State on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the State on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/State/StateUpdateBuilder.php b/lib/commercetools-api/src/Models/State/StateUpdateBuilder.php index a33c0e320e7..2ae1adb2169 100644 --- a/lib/commercetools-api/src/Models/State/StateUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/State/StateUpdateBuilder.php @@ -33,7 +33,7 @@ final class StateUpdateBuilder implements Builder private $actions; /** - *

Expected version of the State on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the State on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/State/StateUpdateModel.php b/lib/commercetools-api/src/Models/State/StateUpdateModel.php index 8a51647ac67..4fc1e850e84 100644 --- a/lib/commercetools-api/src/Models/State/StateUpdateModel.php +++ b/lib/commercetools-api/src/Models/State/StateUpdateModel.php @@ -44,7 +44,7 @@ public function __construct( } /** - *

Expected version of the State on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the State on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * * @return null|int diff --git a/lib/commercetools-api/src/Models/Store/Store.php b/lib/commercetools-api/src/Models/Store/Store.php index 92bac6fa5c0..590e69f8303 100644 --- a/lib/commercetools-api/src/Models/Store/Store.php +++ b/lib/commercetools-api/src/Models/Store/Store.php @@ -13,6 +13,7 @@ use Commercetools\Api\Models\Common\CreatedBy; use Commercetools\Api\Models\Common\LastModifiedBy; use Commercetools\Api\Models\Common\LocalizedString; +use Commercetools\Api\Models\StoreCountry\StoreCountryCollection; use Commercetools\Api\Models\Type\CustomFields; use Commercetools\Base\DateTimeImmutableCollection; use Commercetools\Base\JsonObject; @@ -25,6 +26,7 @@ interface Store extends BaseResource public const FIELD_KEY = 'key'; public const FIELD_NAME = 'name'; public const FIELD_LANGUAGES = 'languages'; + public const FIELD_COUNTRIES = 'countries'; public const FIELD_DISTRIBUTION_CHANNELS = 'distributionChannels'; public const FIELD_SUPPLY_CHANNELS = 'supplyChannels'; public const FIELD_PRODUCT_SELECTIONS = 'productSelections'; @@ -102,6 +104,14 @@ public function getName(); */ public function getLanguages(); + /** + *

Countries defined for the Store.

+ * + + * @return null|StoreCountryCollection + */ + public function getCountries(); + /** *

Product Distribution Channels allowed for the Store.

* @@ -183,6 +193,11 @@ public function setName(?LocalizedString $name): void; */ public function setLanguages(?array $languages): void; + /** + * @param ?StoreCountryCollection $countries + */ + public function setCountries(?StoreCountryCollection $countries): void; + /** * @param ?ChannelReferenceCollection $distributionChannels */ diff --git a/lib/commercetools-api/src/Models/Store/StoreAddCountryAction.php b/lib/commercetools-api/src/Models/Store/StoreAddCountryAction.php new file mode 100644 index 00000000000..17cefcb6ba7 --- /dev/null +++ b/lib/commercetools-api/src/Models/Store/StoreAddCountryAction.php @@ -0,0 +1,31 @@ +Value to append to countries.

+ * + + * @return null|StoreCountry + */ + public function getCountry(); + + /** + * @param ?StoreCountry $country + */ + public function setCountry(?StoreCountry $country): void; +} diff --git a/lib/commercetools-api/src/Models/Store/StoreAddCountryActionBuilder.php b/lib/commercetools-api/src/Models/Store/StoreAddCountryActionBuilder.php new file mode 100644 index 00000000000..8a7482c9723 --- /dev/null +++ b/lib/commercetools-api/src/Models/Store/StoreAddCountryActionBuilder.php @@ -0,0 +1,75 @@ + + */ +final class StoreAddCountryActionBuilder implements Builder +{ + /** + + * @var null|StoreCountry|StoreCountryBuilder + */ + private $country; + + /** + *

Value to append to countries.

+ * + + * @return null|StoreCountry + */ + public function getCountry() + { + return $this->country instanceof StoreCountryBuilder ? $this->country->build() : $this->country; + } + + /** + * @param ?StoreCountry $country + * @return $this + */ + public function withCountry(?StoreCountry $country) + { + $this->country = $country; + + return $this; + } + + /** + * @deprecated use withCountry() instead + * @return $this + */ + public function withCountryBuilder(?StoreCountryBuilder $country) + { + $this->country = $country; + + return $this; + } + + public function build(): StoreAddCountryAction + { + return new StoreAddCountryActionModel( + $this->country instanceof StoreCountryBuilder ? $this->country->build() : $this->country + ); + } + + public static function of(): StoreAddCountryActionBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Store/StoreAddCountryActionCollection.php b/lib/commercetools-api/src/Models/Store/StoreAddCountryActionCollection.php new file mode 100644 index 00000000000..82e26118e62 --- /dev/null +++ b/lib/commercetools-api/src/Models/Store/StoreAddCountryActionCollection.php @@ -0,0 +1,56 @@ + + * @method StoreAddCountryAction current() + * @method StoreAddCountryAction end() + * @method StoreAddCountryAction at($offset) + */ +class StoreAddCountryActionCollection extends StoreUpdateActionCollection +{ + /** + * @psalm-assert StoreAddCountryAction $value + * @psalm-param StoreAddCountryAction|stdClass $value + * @throws InvalidArgumentException + * + * @return StoreAddCountryActionCollection + */ + public function add($value) + { + if (!$value instanceof StoreAddCountryAction) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?StoreAddCountryAction + */ + protected function mapper() + { + return function (?int $index): ?StoreAddCountryAction { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var StoreAddCountryAction $data */ + $data = StoreAddCountryActionModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Store/StoreAddCountryActionModel.php b/lib/commercetools-api/src/Models/Store/StoreAddCountryActionModel.php new file mode 100644 index 00000000000..e575367d307 --- /dev/null +++ b/lib/commercetools-api/src/Models/Store/StoreAddCountryActionModel.php @@ -0,0 +1,96 @@ +country = $country; + $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; + } + + /** + *

Value to append to countries.

+ * + * + * @return null|StoreCountry + */ + public function getCountry() + { + if (is_null($this->country)) { + /** @psalm-var stdClass|array|null $data */ + $data = $this->raw(self::FIELD_COUNTRY); + if (is_null($data)) { + return null; + } + + $this->country = StoreCountryModel::of($data); + } + + return $this->country; + } + + + /** + * @param ?StoreCountry $country + */ + public function setCountry(?StoreCountry $country): void + { + $this->country = $country; + } +} diff --git a/lib/commercetools-api/src/Models/Store/StoreAddDistributionChannelAction.php b/lib/commercetools-api/src/Models/Store/StoreAddDistributionChannelAction.php index 14d7d797315..f4b84279923 100644 --- a/lib/commercetools-api/src/Models/Store/StoreAddDistributionChannelAction.php +++ b/lib/commercetools-api/src/Models/Store/StoreAddDistributionChannelAction.php @@ -17,7 +17,7 @@ interface StoreAddDistributionChannelAction extends StoreUpdateAction public const FIELD_DISTRIBUTION_CHANNEL = 'distributionChannel'; /** - *

Value to append. Any attempt to use Channel without the ProductDistribution ChannelRoleEnum will fail with a MissingRoleOnChannelError error.

+ *

Value to append.

* * @return null|ChannelResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Store/StoreAddDistributionChannelActionBuilder.php b/lib/commercetools-api/src/Models/Store/StoreAddDistributionChannelActionBuilder.php index a7e4a625580..57c28234d7c 100644 --- a/lib/commercetools-api/src/Models/Store/StoreAddDistributionChannelActionBuilder.php +++ b/lib/commercetools-api/src/Models/Store/StoreAddDistributionChannelActionBuilder.php @@ -29,7 +29,7 @@ final class StoreAddDistributionChannelActionBuilder implements Builder private $distributionChannel; /** - *

Value to append. Any attempt to use Channel without the ProductDistribution ChannelRoleEnum will fail with a MissingRoleOnChannelError error.

+ *

Value to append.

* * @return null|ChannelResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Store/StoreAddDistributionChannelActionModel.php b/lib/commercetools-api/src/Models/Store/StoreAddDistributionChannelActionModel.php index 5adc6860ceb..9a8f5b781e8 100644 --- a/lib/commercetools-api/src/Models/Store/StoreAddDistributionChannelActionModel.php +++ b/lib/commercetools-api/src/Models/Store/StoreAddDistributionChannelActionModel.php @@ -65,7 +65,7 @@ public function getAction() } /** - *

Value to append. Any attempt to use Channel without the ProductDistribution ChannelRoleEnum will fail with a MissingRoleOnChannelError error.

+ *

Value to append.

* * * @return null|ChannelResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Store/StoreAddSupplyChannelAction.php b/lib/commercetools-api/src/Models/Store/StoreAddSupplyChannelAction.php index f1c544a3ba0..e67eda76f04 100644 --- a/lib/commercetools-api/src/Models/Store/StoreAddSupplyChannelAction.php +++ b/lib/commercetools-api/src/Models/Store/StoreAddSupplyChannelAction.php @@ -17,7 +17,7 @@ interface StoreAddSupplyChannelAction extends StoreUpdateAction public const FIELD_SUPPLY_CHANNEL = 'supplyChannel'; /** - *

Any attempt to use Channel without the InventorySupply ChannelRoleEnum will fail with a MissingRoleOnChannel error.

+ *

Value to append.

* * @return null|ChannelResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Store/StoreAddSupplyChannelActionBuilder.php b/lib/commercetools-api/src/Models/Store/StoreAddSupplyChannelActionBuilder.php index 4930a72c05e..8adcb8f6efd 100644 --- a/lib/commercetools-api/src/Models/Store/StoreAddSupplyChannelActionBuilder.php +++ b/lib/commercetools-api/src/Models/Store/StoreAddSupplyChannelActionBuilder.php @@ -29,7 +29,7 @@ final class StoreAddSupplyChannelActionBuilder implements Builder private $supplyChannel; /** - *

Any attempt to use Channel without the InventorySupply ChannelRoleEnum will fail with a MissingRoleOnChannel error.

+ *

Value to append.

* * @return null|ChannelResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Store/StoreAddSupplyChannelActionModel.php b/lib/commercetools-api/src/Models/Store/StoreAddSupplyChannelActionModel.php index a57ae83c360..0f96c2e2c2c 100644 --- a/lib/commercetools-api/src/Models/Store/StoreAddSupplyChannelActionModel.php +++ b/lib/commercetools-api/src/Models/Store/StoreAddSupplyChannelActionModel.php @@ -65,7 +65,7 @@ public function getAction() } /** - *

Any attempt to use Channel without the InventorySupply ChannelRoleEnum will fail with a MissingRoleOnChannel error.

+ *

Value to append.

* * * @return null|ChannelResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Store/StoreBuilder.php b/lib/commercetools-api/src/Models/Store/StoreBuilder.php index fd17f34139a..03f510d074b 100644 --- a/lib/commercetools-api/src/Models/Store/StoreBuilder.php +++ b/lib/commercetools-api/src/Models/Store/StoreBuilder.php @@ -17,6 +17,7 @@ use Commercetools\Api\Models\Common\LastModifiedByBuilder; use Commercetools\Api\Models\Common\LocalizedString; use Commercetools\Api\Models\Common\LocalizedStringBuilder; +use Commercetools\Api\Models\StoreCountry\StoreCountryCollection; use Commercetools\Api\Models\Type\CustomFields; use Commercetools\Api\Models\Type\CustomFieldsBuilder; use Commercetools\Base\Builder; @@ -86,6 +87,12 @@ final class StoreBuilder implements Builder */ private $languages; + /** + + * @var ?StoreCountryCollection + */ + private $countries; + /** * @var ?ChannelReferenceCollection @@ -209,6 +216,17 @@ public function getLanguages() return $this->languages; } + /** + *

Countries defined for the Store.

+ * + + * @return null|StoreCountryCollection + */ + public function getCountries() + { + return $this->countries; + } + /** *

Product Distribution Channels allowed for the Store.

* @@ -356,6 +374,17 @@ public function withLanguages(?array $languages) return $this; } + /** + * @param ?StoreCountryCollection $countries + * @return $this + */ + public function withCountries(?StoreCountryCollection $countries) + { + $this->countries = $countries; + + return $this; + } + /** * @param ?ChannelReferenceCollection $distributionChannels * @return $this @@ -456,6 +485,7 @@ public function build(): Store $this->key, $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name, $this->languages, + $this->countries, $this->distributionChannels, $this->supplyChannels, $this->productSelections, diff --git a/lib/commercetools-api/src/Models/Store/StoreDraft.php b/lib/commercetools-api/src/Models/Store/StoreDraft.php index a55cbea5a5b..85426baeb3d 100644 --- a/lib/commercetools-api/src/Models/Store/StoreDraft.php +++ b/lib/commercetools-api/src/Models/Store/StoreDraft.php @@ -10,6 +10,7 @@ use Commercetools\Api\Models\Channel\ChannelResourceIdentifierCollection; use Commercetools\Api\Models\Common\LocalizedString; +use Commercetools\Api\Models\StoreCountry\StoreCountryCollection; use Commercetools\Api\Models\Type\CustomFieldsDraft; use Commercetools\Base\DateTimeImmutableCollection; use Commercetools\Base\JsonObject; @@ -19,6 +20,7 @@ interface StoreDraft extends JsonObject public const FIELD_KEY = 'key'; public const FIELD_NAME = 'name'; public const FIELD_LANGUAGES = 'languages'; + public const FIELD_COUNTRIES = 'countries'; public const FIELD_DISTRIBUTION_CHANNELS = 'distributionChannels'; public const FIELD_SUPPLY_CHANNELS = 'supplyChannels'; public const FIELD_PRODUCT_SELECTIONS = 'productSelections'; @@ -49,6 +51,14 @@ public function getName(); */ public function getLanguages(); + /** + *

Countries defined for the Store.

+ * + + * @return null|StoreCountryCollection + */ + public function getCountries(); + /** *

ResourceIdentifier of a Channel with ProductDistribution ChannelRoleEnum.

* @@ -100,6 +110,11 @@ public function setName(?LocalizedString $name): void; */ public function setLanguages(?array $languages): void; + /** + * @param ?StoreCountryCollection $countries + */ + public function setCountries(?StoreCountryCollection $countries): void; + /** * @param ?ChannelResourceIdentifierCollection $distributionChannels */ diff --git a/lib/commercetools-api/src/Models/Store/StoreDraftBuilder.php b/lib/commercetools-api/src/Models/Store/StoreDraftBuilder.php index cc0c1e8f294..32eef965787 100644 --- a/lib/commercetools-api/src/Models/Store/StoreDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Store/StoreDraftBuilder.php @@ -11,6 +11,7 @@ use Commercetools\Api\Models\Channel\ChannelResourceIdentifierCollection; use Commercetools\Api\Models\Common\LocalizedString; use Commercetools\Api\Models\Common\LocalizedStringBuilder; +use Commercetools\Api\Models\StoreCountry\StoreCountryCollection; use Commercetools\Api\Models\Type\CustomFieldsDraft; use Commercetools\Api\Models\Type\CustomFieldsDraftBuilder; use Commercetools\Base\Builder; @@ -43,6 +44,12 @@ final class StoreDraftBuilder implements Builder */ private $languages; + /** + + * @var ?StoreCountryCollection + */ + private $countries; + /** * @var ?ChannelResourceIdentifierCollection @@ -101,6 +108,17 @@ public function getLanguages() return $this->languages; } + /** + *

Countries defined for the Store.

+ * + + * @return null|StoreCountryCollection + */ + public function getCountries() + { + return $this->countries; + } + /** *

ResourceIdentifier of a Channel with ProductDistribution ChannelRoleEnum.

* @@ -182,6 +200,17 @@ public function withLanguages(?array $languages) return $this; } + /** + * @param ?StoreCountryCollection $countries + * @return $this + */ + public function withCountries(?StoreCountryCollection $countries) + { + $this->countries = $countries; + + return $this; + } + /** * @param ?ChannelResourceIdentifierCollection $distributionChannels * @return $this @@ -254,6 +283,7 @@ public function build(): StoreDraft $this->key, $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name, $this->languages, + $this->countries, $this->distributionChannels, $this->supplyChannels, $this->productSelections, diff --git a/lib/commercetools-api/src/Models/Store/StoreDraftModel.php b/lib/commercetools-api/src/Models/Store/StoreDraftModel.php index 7953882741c..75a0dd0738a 100644 --- a/lib/commercetools-api/src/Models/Store/StoreDraftModel.php +++ b/lib/commercetools-api/src/Models/Store/StoreDraftModel.php @@ -11,6 +11,7 @@ use Commercetools\Api\Models\Channel\ChannelResourceIdentifierCollection; use Commercetools\Api\Models\Common\LocalizedString; use Commercetools\Api\Models\Common\LocalizedStringModel; +use Commercetools\Api\Models\StoreCountry\StoreCountryCollection; use Commercetools\Api\Models\Type\CustomFieldsDraft; use Commercetools\Api\Models\Type\CustomFieldsDraftModel; use Commercetools\Base\DateTimeImmutableCollection; @@ -42,6 +43,12 @@ final class StoreDraftModel extends JsonObjectModel implements StoreDraft */ protected $languages; + /** + * + * @var ?StoreCountryCollection + */ + protected $countries; + /** * * @var ?ChannelResourceIdentifierCollection @@ -74,6 +81,7 @@ public function __construct( ?string $key = null, ?LocalizedString $name = null, ?array $languages = null, + ?StoreCountryCollection $countries = null, ?ChannelResourceIdentifierCollection $distributionChannels = null, ?ChannelResourceIdentifierCollection $supplyChannels = null, ?ProductSelectionSettingDraftCollection $productSelections = null, @@ -82,6 +90,7 @@ public function __construct( $this->key = $key; $this->name = $name; $this->languages = $languages; + $this->countries = $countries; $this->distributionChannels = $distributionChannels; $this->supplyChannels = $supplyChannels; $this->productSelections = $productSelections; @@ -150,6 +159,26 @@ public function getLanguages() return $this->languages; } + /** + *

Countries defined for the Store.

+ * + * + * @return null|StoreCountryCollection + */ + public function getCountries() + { + if (is_null($this->countries)) { + /** @psalm-var ?list $data */ + $data = $this->raw(self::FIELD_COUNTRIES); + if (is_null($data)) { + return null; + } + $this->countries = StoreCountryCollection::fromArray($data); + } + + return $this->countries; + } + /** *

ResourceIdentifier of a Channel with ProductDistribution ChannelRoleEnum.

* @@ -260,6 +289,14 @@ public function setLanguages(?array $languages): void $this->languages = $languages; } + /** + * @param ?StoreCountryCollection $countries + */ + public function setCountries(?StoreCountryCollection $countries): void + { + $this->countries = $countries; + } + /** * @param ?ChannelResourceIdentifierCollection $distributionChannels */ diff --git a/lib/commercetools-api/src/Models/Store/StoreModel.php b/lib/commercetools-api/src/Models/Store/StoreModel.php index 13616dc06f9..bbd18cb6cd8 100644 --- a/lib/commercetools-api/src/Models/Store/StoreModel.php +++ b/lib/commercetools-api/src/Models/Store/StoreModel.php @@ -17,6 +17,7 @@ use Commercetools\Api\Models\Common\LastModifiedByModel; use Commercetools\Api\Models\Common\LocalizedString; use Commercetools\Api\Models\Common\LocalizedStringModel; +use Commercetools\Api\Models\StoreCountry\StoreCountryCollection; use Commercetools\Api\Models\Type\CustomFields; use Commercetools\Api\Models\Type\CustomFieldsModel; use Commercetools\Base\DateTimeImmutableCollection; @@ -85,6 +86,12 @@ final class StoreModel extends JsonObjectModel implements Store */ protected $languages; + /** + * + * @var ?StoreCountryCollection + */ + protected $countries; + /** * * @var ?ChannelReferenceCollection @@ -123,6 +130,7 @@ public function __construct( ?string $key = null, ?LocalizedString $name = null, ?array $languages = null, + ?StoreCountryCollection $countries = null, ?ChannelReferenceCollection $distributionChannels = null, ?ChannelReferenceCollection $supplyChannels = null, ?ProductSelectionSettingCollection $productSelections = null, @@ -137,6 +145,7 @@ public function __construct( $this->key = $key; $this->name = $name; $this->languages = $languages; + $this->countries = $countries; $this->distributionChannels = $distributionChannels; $this->supplyChannels = $supplyChannels; $this->productSelections = $productSelections; @@ -334,6 +343,26 @@ public function getLanguages() return $this->languages; } + /** + *

Countries defined for the Store.

+ * + * + * @return null|StoreCountryCollection + */ + public function getCountries() + { + if (is_null($this->countries)) { + /** @psalm-var ?list $data */ + $data = $this->raw(self::FIELD_COUNTRIES); + if (is_null($data)) { + return null; + } + $this->countries = StoreCountryCollection::fromArray($data); + } + + return $this->countries; + } + /** *

Product Distribution Channels allowed for the Store.

* @@ -492,6 +521,14 @@ public function setLanguages(?array $languages): void $this->languages = $languages; } + /** + * @param ?StoreCountryCollection $countries + */ + public function setCountries(?StoreCountryCollection $countries): void + { + $this->countries = $countries; + } + /** * @param ?ChannelReferenceCollection $distributionChannels */ diff --git a/lib/commercetools-api/src/Models/Store/StoreRemoveCountryAction.php b/lib/commercetools-api/src/Models/Store/StoreRemoveCountryAction.php new file mode 100644 index 00000000000..ed92a11f1e8 --- /dev/null +++ b/lib/commercetools-api/src/Models/Store/StoreRemoveCountryAction.php @@ -0,0 +1,31 @@ +Value to remove from countries.

+ * + + * @return null|StoreCountry + */ + public function getCountry(); + + /** + * @param ?StoreCountry $country + */ + public function setCountry(?StoreCountry $country): void; +} diff --git a/lib/commercetools-api/src/Models/Store/StoreRemoveCountryActionBuilder.php b/lib/commercetools-api/src/Models/Store/StoreRemoveCountryActionBuilder.php new file mode 100644 index 00000000000..b732dddcb51 --- /dev/null +++ b/lib/commercetools-api/src/Models/Store/StoreRemoveCountryActionBuilder.php @@ -0,0 +1,75 @@ + + */ +final class StoreRemoveCountryActionBuilder implements Builder +{ + /** + + * @var null|StoreCountry|StoreCountryBuilder + */ + private $country; + + /** + *

Value to remove from countries.

+ * + + * @return null|StoreCountry + */ + public function getCountry() + { + return $this->country instanceof StoreCountryBuilder ? $this->country->build() : $this->country; + } + + /** + * @param ?StoreCountry $country + * @return $this + */ + public function withCountry(?StoreCountry $country) + { + $this->country = $country; + + return $this; + } + + /** + * @deprecated use withCountry() instead + * @return $this + */ + public function withCountryBuilder(?StoreCountryBuilder $country) + { + $this->country = $country; + + return $this; + } + + public function build(): StoreRemoveCountryAction + { + return new StoreRemoveCountryActionModel( + $this->country instanceof StoreCountryBuilder ? $this->country->build() : $this->country + ); + } + + public static function of(): StoreRemoveCountryActionBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Store/StoreRemoveCountryActionCollection.php b/lib/commercetools-api/src/Models/Store/StoreRemoveCountryActionCollection.php new file mode 100644 index 00000000000..e5104801937 --- /dev/null +++ b/lib/commercetools-api/src/Models/Store/StoreRemoveCountryActionCollection.php @@ -0,0 +1,56 @@ + + * @method StoreRemoveCountryAction current() + * @method StoreRemoveCountryAction end() + * @method StoreRemoveCountryAction at($offset) + */ +class StoreRemoveCountryActionCollection extends StoreUpdateActionCollection +{ + /** + * @psalm-assert StoreRemoveCountryAction $value + * @psalm-param StoreRemoveCountryAction|stdClass $value + * @throws InvalidArgumentException + * + * @return StoreRemoveCountryActionCollection + */ + public function add($value) + { + if (!$value instanceof StoreRemoveCountryAction) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?StoreRemoveCountryAction + */ + protected function mapper() + { + return function (?int $index): ?StoreRemoveCountryAction { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var StoreRemoveCountryAction $data */ + $data = StoreRemoveCountryActionModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Store/StoreRemoveCountryActionModel.php b/lib/commercetools-api/src/Models/Store/StoreRemoveCountryActionModel.php new file mode 100644 index 00000000000..fd406fa5208 --- /dev/null +++ b/lib/commercetools-api/src/Models/Store/StoreRemoveCountryActionModel.php @@ -0,0 +1,96 @@ +country = $country; + $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; + } + + /** + *

Value to remove from countries.

+ * + * + * @return null|StoreCountry + */ + public function getCountry() + { + if (is_null($this->country)) { + /** @psalm-var stdClass|array|null $data */ + $data = $this->raw(self::FIELD_COUNTRY); + if (is_null($data)) { + return null; + } + + $this->country = StoreCountryModel::of($data); + } + + return $this->country; + } + + + /** + * @param ?StoreCountry $country + */ + public function setCountry(?StoreCountry $country): void + { + $this->country = $country; + } +} diff --git a/lib/commercetools-api/src/Models/Store/StoreSetCountriesAction.php b/lib/commercetools-api/src/Models/Store/StoreSetCountriesAction.php new file mode 100644 index 00000000000..aff8de31924 --- /dev/null +++ b/lib/commercetools-api/src/Models/Store/StoreSetCountriesAction.php @@ -0,0 +1,31 @@ +New value to set.

+ * + + * @return null|StoreCountryCollection + */ + public function getCountries(); + + /** + * @param ?StoreCountryCollection $countries + */ + public function setCountries(?StoreCountryCollection $countries): void; +} diff --git a/lib/commercetools-api/src/Models/Store/StoreSetCountriesActionBuilder.php b/lib/commercetools-api/src/Models/Store/StoreSetCountriesActionBuilder.php new file mode 100644 index 00000000000..295fa56933a --- /dev/null +++ b/lib/commercetools-api/src/Models/Store/StoreSetCountriesActionBuilder.php @@ -0,0 +1,64 @@ + + */ +final class StoreSetCountriesActionBuilder implements Builder +{ + /** + + * @var ?StoreCountryCollection + */ + private $countries; + + /** + *

New value to set.

+ * + + * @return null|StoreCountryCollection + */ + public function getCountries() + { + return $this->countries; + } + + /** + * @param ?StoreCountryCollection $countries + * @return $this + */ + public function withCountries(?StoreCountryCollection $countries) + { + $this->countries = $countries; + + return $this; + } + + + public function build(): StoreSetCountriesAction + { + return new StoreSetCountriesActionModel( + $this->countries + ); + } + + public static function of(): StoreSetCountriesActionBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Store/StoreSetCountriesActionCollection.php b/lib/commercetools-api/src/Models/Store/StoreSetCountriesActionCollection.php new file mode 100644 index 00000000000..ade178806cd --- /dev/null +++ b/lib/commercetools-api/src/Models/Store/StoreSetCountriesActionCollection.php @@ -0,0 +1,56 @@ + + * @method StoreSetCountriesAction current() + * @method StoreSetCountriesAction end() + * @method StoreSetCountriesAction at($offset) + */ +class StoreSetCountriesActionCollection extends StoreUpdateActionCollection +{ + /** + * @psalm-assert StoreSetCountriesAction $value + * @psalm-param StoreSetCountriesAction|stdClass $value + * @throws InvalidArgumentException + * + * @return StoreSetCountriesActionCollection + */ + public function add($value) + { + if (!$value instanceof StoreSetCountriesAction) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?StoreSetCountriesAction + */ + protected function mapper() + { + return function (?int $index): ?StoreSetCountriesAction { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var StoreSetCountriesAction $data */ + $data = StoreSetCountriesActionModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Store/StoreSetCountriesActionModel.php b/lib/commercetools-api/src/Models/Store/StoreSetCountriesActionModel.php new file mode 100644 index 00000000000..71f58b0bf07 --- /dev/null +++ b/lib/commercetools-api/src/Models/Store/StoreSetCountriesActionModel.php @@ -0,0 +1,94 @@ +countries = $countries; + $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; + } + + /** + *

New value to set.

+ * + * + * @return null|StoreCountryCollection + */ + public function getCountries() + { + if (is_null($this->countries)) { + /** @psalm-var ?list $data */ + $data = $this->raw(self::FIELD_COUNTRIES); + if (is_null($data)) { + return null; + } + $this->countries = StoreCountryCollection::fromArray($data); + } + + return $this->countries; + } + + + /** + * @param ?StoreCountryCollection $countries + */ + public function setCountries(?StoreCountryCollection $countries): void + { + $this->countries = $countries; + } +} diff --git a/lib/commercetools-api/src/Models/Store/StoreSetCustomFieldAction.php b/lib/commercetools-api/src/Models/Store/StoreSetCustomFieldAction.php index 923e284d96c..792f184105f 100644 --- a/lib/commercetools-api/src/Models/Store/StoreSetCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Store/StoreSetCustomFieldAction.php @@ -26,7 +26,7 @@ public function getName(); /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Store/StoreSetCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Store/StoreSetCustomFieldActionBuilder.php index 51cfe7ecd35..9983ad4e31a 100644 --- a/lib/commercetools-api/src/Models/Store/StoreSetCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Store/StoreSetCustomFieldActionBuilder.php @@ -45,7 +45,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* diff --git a/lib/commercetools-api/src/Models/Store/StoreSetCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Store/StoreSetCustomFieldActionModel.php index 51aa7313df8..d12e871253f 100644 --- a/lib/commercetools-api/src/Models/Store/StoreSetCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Store/StoreSetCustomFieldActionModel.php @@ -92,7 +92,7 @@ public function getName() /** *

If value is absent or null, this field will be removed if it exists. - * Trying to remove a field that does not exist will fail with an InvalidOperation error. + * Removing a field that does not exist returns an InvalidOperation error. * If value is provided, it is set for the field defined by name.

* * diff --git a/lib/commercetools-api/src/Models/Store/StoreSetDistributionChannelsAction.php b/lib/commercetools-api/src/Models/Store/StoreSetDistributionChannelsAction.php index d4dc0b55415..3221258e282 100644 --- a/lib/commercetools-api/src/Models/Store/StoreSetDistributionChannelsAction.php +++ b/lib/commercetools-api/src/Models/Store/StoreSetDistributionChannelsAction.php @@ -18,8 +18,7 @@ interface StoreSetDistributionChannelsAction extends StoreUpdateAction /** *

Value to set. - * If not defined, the Store's distributionChannels are unset. - * Any attempt to use Channel without the ProductDistribution ChannelRoleEnum will fail with a MissingRoleOnChannel error.

+ * If not defined, the Store's distributionChannels are unset.

* * @return null|ChannelResourceIdentifierCollection diff --git a/lib/commercetools-api/src/Models/Store/StoreSetDistributionChannelsActionBuilder.php b/lib/commercetools-api/src/Models/Store/StoreSetDistributionChannelsActionBuilder.php index f52cd1434c2..be948d9eb71 100644 --- a/lib/commercetools-api/src/Models/Store/StoreSetDistributionChannelsActionBuilder.php +++ b/lib/commercetools-api/src/Models/Store/StoreSetDistributionChannelsActionBuilder.php @@ -29,8 +29,7 @@ final class StoreSetDistributionChannelsActionBuilder implements Builder /** *

Value to set. - * If not defined, the Store's distributionChannels are unset. - * Any attempt to use Channel without the ProductDistribution ChannelRoleEnum will fail with a MissingRoleOnChannel error.

+ * If not defined, the Store's distributionChannels are unset.

* * @return null|ChannelResourceIdentifierCollection diff --git a/lib/commercetools-api/src/Models/Store/StoreSetDistributionChannelsActionModel.php b/lib/commercetools-api/src/Models/Store/StoreSetDistributionChannelsActionModel.php index 1815d255dd6..ba1b35b7f6c 100644 --- a/lib/commercetools-api/src/Models/Store/StoreSetDistributionChannelsActionModel.php +++ b/lib/commercetools-api/src/Models/Store/StoreSetDistributionChannelsActionModel.php @@ -65,8 +65,7 @@ public function getAction() /** *

Value to set. - * If not defined, the Store's distributionChannels are unset. - * Any attempt to use Channel without the ProductDistribution ChannelRoleEnum will fail with a MissingRoleOnChannel error.

+ * If not defined, the Store's distributionChannels are unset.

* * * @return null|ChannelResourceIdentifierCollection diff --git a/lib/commercetools-api/src/Models/Store/StoreSetLanguagesAction.php b/lib/commercetools-api/src/Models/Store/StoreSetLanguagesAction.php index bbf359947ea..08f75ba513c 100644 --- a/lib/commercetools-api/src/Models/Store/StoreSetLanguagesAction.php +++ b/lib/commercetools-api/src/Models/Store/StoreSetLanguagesAction.php @@ -16,8 +16,7 @@ interface StoreSetLanguagesAction extends StoreUpdateAction public const FIELD_LANGUAGES = 'languages'; /** - *

Value to set. - * Any attempt to use languages other than the ones defined in the Project will fail with a ProjectNotConfiguredForLanguages error.

+ *

Value to set.

* * @return null|array diff --git a/lib/commercetools-api/src/Models/Store/StoreSetLanguagesActionBuilder.php b/lib/commercetools-api/src/Models/Store/StoreSetLanguagesActionBuilder.php index f9aaeaa83cc..52da9b4aec0 100644 --- a/lib/commercetools-api/src/Models/Store/StoreSetLanguagesActionBuilder.php +++ b/lib/commercetools-api/src/Models/Store/StoreSetLanguagesActionBuilder.php @@ -27,8 +27,7 @@ final class StoreSetLanguagesActionBuilder implements Builder private $languages; /** - *

Value to set. - * Any attempt to use languages other than the ones defined in the Project will fail with a ProjectNotConfiguredForLanguages error.

+ *

Value to set.

* * @return null|array diff --git a/lib/commercetools-api/src/Models/Store/StoreSetLanguagesActionModel.php b/lib/commercetools-api/src/Models/Store/StoreSetLanguagesActionModel.php index cba0b62ad88..6c53989ae4d 100644 --- a/lib/commercetools-api/src/Models/Store/StoreSetLanguagesActionModel.php +++ b/lib/commercetools-api/src/Models/Store/StoreSetLanguagesActionModel.php @@ -63,8 +63,7 @@ public function getAction() } /** - *

Value to set. - * Any attempt to use languages other than the ones defined in the Project will fail with a ProjectNotConfiguredForLanguages error.

+ *

Value to set.

* * * @return null|array diff --git a/lib/commercetools-api/src/Models/Store/StoreSetSupplyChannelsAction.php b/lib/commercetools-api/src/Models/Store/StoreSetSupplyChannelsAction.php index 2b60b9f34a9..47362717e31 100644 --- a/lib/commercetools-api/src/Models/Store/StoreSetSupplyChannelsAction.php +++ b/lib/commercetools-api/src/Models/Store/StoreSetSupplyChannelsAction.php @@ -18,8 +18,7 @@ interface StoreSetSupplyChannelsAction extends StoreUpdateAction /** *

Value to set. - * If not defined, the Store's supplyChannels are unset. - * Any attempt to use Channel without the InventorySupply ChannelRoleEnum will fail with a MissingRoleOnChannel error.

+ * If not defined, the Store's supplyChannels are unset.

* * @return null|ChannelResourceIdentifierCollection diff --git a/lib/commercetools-api/src/Models/Store/StoreSetSupplyChannelsActionBuilder.php b/lib/commercetools-api/src/Models/Store/StoreSetSupplyChannelsActionBuilder.php index 5fc022c5e29..3c8ceae5fb2 100644 --- a/lib/commercetools-api/src/Models/Store/StoreSetSupplyChannelsActionBuilder.php +++ b/lib/commercetools-api/src/Models/Store/StoreSetSupplyChannelsActionBuilder.php @@ -29,8 +29,7 @@ final class StoreSetSupplyChannelsActionBuilder implements Builder /** *

Value to set. - * If not defined, the Store's supplyChannels are unset. - * Any attempt to use Channel without the InventorySupply ChannelRoleEnum will fail with a MissingRoleOnChannel error.

+ * If not defined, the Store's supplyChannels are unset.

* * @return null|ChannelResourceIdentifierCollection diff --git a/lib/commercetools-api/src/Models/Store/StoreSetSupplyChannelsActionModel.php b/lib/commercetools-api/src/Models/Store/StoreSetSupplyChannelsActionModel.php index 110e4260e85..84a3c9902ab 100644 --- a/lib/commercetools-api/src/Models/Store/StoreSetSupplyChannelsActionModel.php +++ b/lib/commercetools-api/src/Models/Store/StoreSetSupplyChannelsActionModel.php @@ -65,8 +65,7 @@ public function getAction() /** *

Value to set. - * If not defined, the Store's supplyChannels are unset. - * Any attempt to use Channel without the InventorySupply ChannelRoleEnum will fail with a MissingRoleOnChannel error.

+ * If not defined, the Store's supplyChannels are unset.

* * * @return null|ChannelResourceIdentifierCollection diff --git a/lib/commercetools-api/src/Models/Store/StoreUpdate.php b/lib/commercetools-api/src/Models/Store/StoreUpdate.php index 31187a867e0..0ec7f79dddf 100644 --- a/lib/commercetools-api/src/Models/Store/StoreUpdate.php +++ b/lib/commercetools-api/src/Models/Store/StoreUpdate.php @@ -17,7 +17,7 @@ interface StoreUpdate extends JsonObject public const FIELD_ACTIONS = 'actions'; /** - *

Expected version of the Store on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the Store on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/Store/StoreUpdateActionModel.php b/lib/commercetools-api/src/Models/Store/StoreUpdateActionModel.php index 8842b9ee343..31445d104af 100644 --- a/lib/commercetools-api/src/Models/Store/StoreUpdateActionModel.php +++ b/lib/commercetools-api/src/Models/Store/StoreUpdateActionModel.php @@ -31,13 +31,16 @@ final class StoreUpdateActionModel extends JsonObjectModel implements StoreUpdat * */ private static $discriminatorClasses = [ + 'addCountry' => StoreAddCountryActionModel::class, 'addDistributionChannel' => StoreAddDistributionChannelActionModel::class, 'addProductSelection' => StoreAddProductSelectionActionModel::class, 'addSupplyChannel' => StoreAddSupplyChannelActionModel::class, 'changeProductSelectionActive' => StoreChangeProductSelectionActionModel::class, + 'removeCountry' => StoreRemoveCountryActionModel::class, 'removeDistributionChannel' => StoreRemoveDistributionChannelActionModel::class, 'removeProductSelection' => StoreRemoveProductSelectionActionModel::class, 'removeSupplyChannel' => StoreRemoveSupplyChannelActionModel::class, + 'setCountries' => StoreSetCountriesActionModel::class, 'setCustomField' => StoreSetCustomFieldActionModel::class, 'setCustomType' => StoreSetCustomTypeActionModel::class, 'setDistributionChannels' => StoreSetDistributionChannelsActionModel::class, diff --git a/lib/commercetools-api/src/Models/Store/StoreUpdateBuilder.php b/lib/commercetools-api/src/Models/Store/StoreUpdateBuilder.php index 449d42c9d2e..fadfd67431e 100644 --- a/lib/commercetools-api/src/Models/Store/StoreUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/Store/StoreUpdateBuilder.php @@ -33,7 +33,7 @@ final class StoreUpdateBuilder implements Builder private $actions; /** - *

Expected version of the Store on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the Store on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/Store/StoreUpdateModel.php b/lib/commercetools-api/src/Models/Store/StoreUpdateModel.php index 7b9e07da855..e6f0f003e16 100644 --- a/lib/commercetools-api/src/Models/Store/StoreUpdateModel.php +++ b/lib/commercetools-api/src/Models/Store/StoreUpdateModel.php @@ -44,7 +44,7 @@ public function __construct( } /** - *

Expected version of the Store on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the Store on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * * @return null|int diff --git a/lib/commercetools-api/src/Models/StoreCountry/StoreCountry.php b/lib/commercetools-api/src/Models/StoreCountry/StoreCountry.php new file mode 100644 index 00000000000..c16845e9eac --- /dev/null +++ b/lib/commercetools-api/src/Models/StoreCountry/StoreCountry.php @@ -0,0 +1,30 @@ +Two-digit country code as per ISO 3166-1 alpha-2.

+ * + + * @return null|string + */ + public function getCode(); + + /** + * @param ?string $code + */ + public function setCode(?string $code): void; +} diff --git a/lib/commercetools-api/src/Models/StoreCountry/StoreCountryBuilder.php b/lib/commercetools-api/src/Models/StoreCountry/StoreCountryBuilder.php new file mode 100644 index 00000000000..38bc0ba45eb --- /dev/null +++ b/lib/commercetools-api/src/Models/StoreCountry/StoreCountryBuilder.php @@ -0,0 +1,63 @@ + + */ +final class StoreCountryBuilder implements Builder +{ + /** + + * @var ?string + */ + private $code; + + /** + *

Two-digit country code as per ISO 3166-1 alpha-2.

+ * + + * @return null|string + */ + public function getCode() + { + return $this->code; + } + + /** + * @param ?string $code + * @return $this + */ + public function withCode(?string $code) + { + $this->code = $code; + + return $this; + } + + + public function build(): StoreCountry + { + return new StoreCountryModel( + $this->code + ); + } + + public static function of(): StoreCountryBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/StoreCountry/StoreCountryCollection.php b/lib/commercetools-api/src/Models/StoreCountry/StoreCountryCollection.php new file mode 100644 index 00000000000..7c90290a235 --- /dev/null +++ b/lib/commercetools-api/src/Models/StoreCountry/StoreCountryCollection.php @@ -0,0 +1,56 @@ + + * @method StoreCountry current() + * @method StoreCountry end() + * @method StoreCountry at($offset) + */ +class StoreCountryCollection extends MapperSequence +{ + /** + * @psalm-assert StoreCountry $value + * @psalm-param StoreCountry|stdClass $value + * @throws InvalidArgumentException + * + * @return StoreCountryCollection + */ + public function add($value) + { + if (!$value instanceof StoreCountry) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?StoreCountry + */ + protected function mapper() + { + return function (?int $index): ?StoreCountry { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var StoreCountry $data */ + $data = StoreCountryModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/StoreCountry/StoreCountryModel.php b/lib/commercetools-api/src/Models/StoreCountry/StoreCountryModel.php new file mode 100644 index 00000000000..fbb4a1f9dd3 --- /dev/null +++ b/lib/commercetools-api/src/Models/StoreCountry/StoreCountryModel.php @@ -0,0 +1,66 @@ +code = $code; + } + + /** + *

Two-digit country code as per ISO 3166-1 alpha-2.

+ * + * + * @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; + } + + + /** + * @param ?string $code + */ + public function setCode(?string $code): void + { + $this->code = $code; + } +} diff --git a/lib/commercetools-api/src/Models/TaxCategory/TaxCategoryUpdate.php b/lib/commercetools-api/src/Models/TaxCategory/TaxCategoryUpdate.php index 768ad2ab7d6..911adc6c240 100644 --- a/lib/commercetools-api/src/Models/TaxCategory/TaxCategoryUpdate.php +++ b/lib/commercetools-api/src/Models/TaxCategory/TaxCategoryUpdate.php @@ -17,7 +17,7 @@ interface TaxCategoryUpdate extends JsonObject public const FIELD_ACTIONS = 'actions'; /** - *

Expected version of the TaxCategory on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the TaxCategory on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/TaxCategory/TaxCategoryUpdateBuilder.php b/lib/commercetools-api/src/Models/TaxCategory/TaxCategoryUpdateBuilder.php index 723cbb90909..9a122af401d 100644 --- a/lib/commercetools-api/src/Models/TaxCategory/TaxCategoryUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/TaxCategory/TaxCategoryUpdateBuilder.php @@ -33,7 +33,7 @@ final class TaxCategoryUpdateBuilder implements Builder private $actions; /** - *

Expected version of the TaxCategory on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the TaxCategory on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/TaxCategory/TaxCategoryUpdateModel.php b/lib/commercetools-api/src/Models/TaxCategory/TaxCategoryUpdateModel.php index 40d08053301..df077a181b7 100644 --- a/lib/commercetools-api/src/Models/TaxCategory/TaxCategoryUpdateModel.php +++ b/lib/commercetools-api/src/Models/TaxCategory/TaxCategoryUpdateModel.php @@ -44,7 +44,7 @@ public function __construct( } /** - *

Expected version of the TaxCategory on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the TaxCategory on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * * @return null|int diff --git a/lib/commercetools-api/src/Models/Type/TypeUpdate.php b/lib/commercetools-api/src/Models/Type/TypeUpdate.php index 753ce16a043..3498dedb0d9 100644 --- a/lib/commercetools-api/src/Models/Type/TypeUpdate.php +++ b/lib/commercetools-api/src/Models/Type/TypeUpdate.php @@ -18,7 +18,7 @@ interface TypeUpdate extends JsonObject /** *

Expected version of the type on which the changes should be applied. - * If the expected version does not match the actual version, a 409 Conflict will be returned.

+ * If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/Type/TypeUpdateBuilder.php b/lib/commercetools-api/src/Models/Type/TypeUpdateBuilder.php index ce0cd748a1f..750783acaf5 100644 --- a/lib/commercetools-api/src/Models/Type/TypeUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/Type/TypeUpdateBuilder.php @@ -34,7 +34,7 @@ final class TypeUpdateBuilder implements Builder /** *

Expected version of the type on which the changes should be applied. - * If the expected version does not match the actual version, a 409 Conflict will be returned.

+ * If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/Type/TypeUpdateModel.php b/lib/commercetools-api/src/Models/Type/TypeUpdateModel.php index 8c191fa786e..8b62a7b09be 100644 --- a/lib/commercetools-api/src/Models/Type/TypeUpdateModel.php +++ b/lib/commercetools-api/src/Models/Type/TypeUpdateModel.php @@ -45,7 +45,7 @@ public function __construct( /** *

Expected version of the type on which the changes should be applied. - * If the expected version does not match the actual version, a 409 Conflict will be returned.

+ * If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * * @return null|int diff --git a/lib/commercetools-api/src/Models/Zone/ZoneUpdate.php b/lib/commercetools-api/src/Models/Zone/ZoneUpdate.php index d46557fbe68..654a0e4ab91 100644 --- a/lib/commercetools-api/src/Models/Zone/ZoneUpdate.php +++ b/lib/commercetools-api/src/Models/Zone/ZoneUpdate.php @@ -17,7 +17,7 @@ interface ZoneUpdate extends JsonObject public const FIELD_ACTIONS = 'actions'; /** - *

Expected version of the Zone on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the Zone on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/Zone/ZoneUpdateBuilder.php b/lib/commercetools-api/src/Models/Zone/ZoneUpdateBuilder.php index 9a062e673f5..2b8954f3b56 100644 --- a/lib/commercetools-api/src/Models/Zone/ZoneUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/Zone/ZoneUpdateBuilder.php @@ -33,7 +33,7 @@ final class ZoneUpdateBuilder implements Builder private $actions; /** - *

Expected version of the Zone on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the Zone on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/Zone/ZoneUpdateModel.php b/lib/commercetools-api/src/Models/Zone/ZoneUpdateModel.php index 7c9b36015e7..c9e604a5062 100644 --- a/lib/commercetools-api/src/Models/Zone/ZoneUpdateModel.php +++ b/lib/commercetools-api/src/Models/Zone/ZoneUpdateModel.php @@ -44,7 +44,7 @@ public function __construct( } /** - *

Expected version of the Zone on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

+ *

Expected version of the Zone on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error is returned.

* * * @return null|int diff --git a/reference.txt b/reference.txt new file mode 100644 index 00000000000..27c98f429ef --- /dev/null +++ b/reference.txt @@ -0,0 +1 @@ +f4e40ad8d21c065b9d77c5c76bcbb1dab8a06018 From 26e25bf09e634a5b36e870969f454467fa983834 Mon Sep 17 00:00:00 2001 From: Auto Mation Date: Wed, 16 Nov 2022 09:10:55 +0000 Subject: [PATCH 2/4] TASK: Updating SDK --- changes.md | 2 + ...reKeyByStoreKeyMeShoppingListsByIDTest.php | 18 +- ...yByStoreKeyMeShoppingListsKeyByKeyTest.php | 18 +- ...toreKeyByStoreKeyShoppingListsByIDTest.php | 18 +- ...KeyByStoreKeyShoppingListsKeyByKeyTest.php | 18 +- ...rceByProjectKeyMeShoppingListsByIDTest.php | 12 +- ...yProjectKeyMeShoppingListsKeyByKeyTest.php | 12 +- ...ourceByProjectKeyShoppingListsByIDTest.php | 18 +- ...eByProjectKeyShoppingListsKeyByKeyTest.php | 18 +- lib/commercetools-api/docs/RequestBuilder.md | 59 ++- ...KeyByStoreKeyMeShoppingListsByIDDelete.php | 18 +- ...yStoreKeyMeShoppingListsKeyByKeyDelete.php | 18 +- ...reKeyByStoreKeyShoppingListsByIDDelete.php | 18 +- ...yByStoreKeyShoppingListsKeyByKeyDelete.php | 18 +- .../ByProjectKeyMeShoppingListsByIDDelete.php | 12 +- ...rojectKeyMeShoppingListsKeyByKeyDelete.php | 12 +- .../ByProjectKeyShoppingListsByIDDelete.php | 18 +- ...yProjectKeyShoppingListsKeyByKeyDelete.php | 18 +- .../Me/MyShoppingListAddLineItemAction.php | 12 +- ...MyShoppingListAddLineItemActionBuilder.php | 12 +- .../MyShoppingListAddLineItemActionModel.php | 12 +- .../MyShoppingListAddTextLineItemAction.php | 10 +- ...oppingListAddTextLineItemActionBuilder.php | 10 +- ...ShoppingListAddTextLineItemActionModel.php | 10 +- ...oppingListChangeLineItemQuantityAction.php | 4 + ...istChangeLineItemQuantityActionBuilder.php | 4 + ...gListChangeLineItemQuantityActionModel.php | 4 + ...ShoppingListChangeLineItemsOrderAction.php | 2 + ...gListChangeLineItemsOrderActionBuilder.php | 2 + ...ingListChangeLineItemsOrderActionModel.php | 2 + .../Me/MyShoppingListChangeNameAction.php | 2 +- .../MyShoppingListChangeNameActionBuilder.php | 2 +- .../MyShoppingListChangeNameActionModel.php | 2 +- ...oppingListChangeTextLineItemNameAction.php | 4 +- ...istChangeTextLineItemNameActionBuilder.php | 4 +- ...gListChangeTextLineItemNameActionModel.php | 4 +- ...ngListChangeTextLineItemQuantityAction.php | 4 + ...hangeTextLineItemQuantityActionBuilder.php | 4 + ...tChangeTextLineItemQuantityActionModel.php | 4 + ...pingListChangeTextLineItemsOrderAction.php | 2 + ...tChangeTextLineItemsOrderActionBuilder.php | 2 + ...istChangeTextLineItemsOrderActionModel.php | 2 + .../src/Models/Me/MyShoppingListDraft.php | 14 +- .../Models/Me/MyShoppingListDraftBuilder.php | 14 +- .../Models/Me/MyShoppingListDraftModel.php | 14 +- .../Me/MyShoppingListRemoveLineItemAction.php | 4 + ...hoppingListRemoveLineItemActionBuilder.php | 4 + ...yShoppingListRemoveLineItemActionModel.php | 4 + ...MyShoppingListRemoveTextLineItemAction.php | 4 + ...ingListRemoveTextLineItemActionBuilder.php | 4 + ...ppingListRemoveTextLineItemActionModel.php | 4 + ...tDeleteDaysAfterLastModificationAction.php | 2 + ...DaysAfterLastModificationActionBuilder.php | 2 + ...teDaysAfterLastModificationActionModel.php | 2 + .../Me/MyShoppingListSetDescriptionAction.php | 2 +- ...hoppingListSetDescriptionActionBuilder.php | 2 +- ...yShoppingListSetDescriptionActionModel.php | 2 +- ...oppingListSetLineItemCustomFieldAction.php | 2 + ...istSetLineItemCustomFieldActionBuilder.php | 2 + ...gListSetLineItemCustomFieldActionModel.php | 2 + ...hoppingListSetLineItemCustomTypeAction.php | 8 +- ...ListSetLineItemCustomTypeActionBuilder.php | 8 +- ...ngListSetLineItemCustomTypeActionModel.php | 8 +- ...ngListSetTextLineItemCustomFieldAction.php | 2 + ...etTextLineItemCustomFieldActionBuilder.php | 2 + ...tSetTextLineItemCustomFieldActionModel.php | 2 + ...ingListSetTextLineItemCustomTypeAction.php | 2 + ...SetTextLineItemCustomTypeActionBuilder.php | 2 + ...stSetTextLineItemCustomTypeActionModel.php | 2 + ...ngListSetTextLineItemDescriptionAction.php | 4 +- ...etTextLineItemDescriptionActionBuilder.php | 4 +- ...tSetTextLineItemDescriptionActionModel.php | 4 +- .../src/Models/Me/MyShoppingListUpdate.php | 4 + .../Models/Me/MyShoppingListUpdateBuilder.php | 4 + .../Models/Me/MyShoppingListUpdateModel.php | 4 + .../src/Models/ShoppingList/ShoppingList.php | 168 ++++---- .../ShoppingListAddLineItemAction.php | 12 +- .../ShoppingListAddLineItemActionBuilder.php | 12 +- .../ShoppingListAddLineItemActionModel.php | 12 +- .../ShoppingListAddTextLineItemAction.php | 10 +- ...oppingListAddTextLineItemActionBuilder.php | 10 +- ...ShoppingListAddTextLineItemActionModel.php | 10 +- .../ShoppingList/ShoppingListBuilder.php | 306 ++++++++------- ...oppingListChangeLineItemQuantityAction.php | 4 + ...istChangeLineItemQuantityActionBuilder.php | 4 + ...gListChangeLineItemQuantityActionModel.php | 4 + ...ShoppingListChangeLineItemsOrderAction.php | 2 + ...gListChangeLineItemsOrderActionBuilder.php | 2 + ...ingListChangeLineItemsOrderActionModel.php | 2 + .../ShoppingListChangeNameAction.php | 2 + .../ShoppingListChangeNameActionBuilder.php | 2 + .../ShoppingListChangeNameActionModel.php | 2 + ...oppingListChangeTextLineItemNameAction.php | 4 +- ...istChangeTextLineItemNameActionBuilder.php | 4 +- ...gListChangeTextLineItemNameActionModel.php | 4 +- ...ngListChangeTextLineItemQuantityAction.php | 4 + ...hangeTextLineItemQuantityActionBuilder.php | 4 + ...tChangeTextLineItemQuantityActionModel.php | 4 + ...pingListChangeTextLineItemsOrderAction.php | 2 + ...tChangeTextLineItemsOrderActionBuilder.php | 2 + ...istChangeTextLineItemsOrderActionModel.php | 2 + .../Models/ShoppingList/ShoppingListDraft.php | 112 +++--- .../ShoppingList/ShoppingListDraftBuilder.php | 222 ++++++----- .../ShoppingList/ShoppingListDraftModel.php | 276 ++++++------- .../ShoppingList/ShoppingListLineItem.php | 58 ++- .../ShoppingListLineItemBuilder.php | 108 +++--- .../ShoppingListLineItemDraft.php | 56 +-- .../ShoppingListLineItemDraftBuilder.php | 96 ++--- .../ShoppingListLineItemDraftModel.php | 146 +++---- .../ShoppingListLineItemModel.php | 122 +++--- .../Models/ShoppingList/ShoppingListModel.php | 364 +++++++++--------- .../ShoppingListPagedQueryResponse.php | 10 + .../ShoppingListPagedQueryResponseBuilder.php | 10 + .../ShoppingListPagedQueryResponseModel.php | 10 + .../ShoppingListRemoveLineItemAction.php | 4 + ...hoppingListRemoveLineItemActionBuilder.php | 4 + .../ShoppingListRemoveLineItemActionModel.php | 4 + .../ShoppingListRemoveTextLineItemAction.php | 4 + ...ingListRemoveTextLineItemActionBuilder.php | 4 + ...ppingListRemoveTextLineItemActionModel.php | 4 + .../ShoppingListSetAnonymousIdAction.php | 3 +- ...hoppingListSetAnonymousIdActionBuilder.php | 3 +- .../ShoppingListSetAnonymousIdActionModel.php | 3 +- .../ShoppingListSetCustomerAction.php | 2 + .../ShoppingListSetCustomerActionBuilder.php | 2 + .../ShoppingListSetCustomerActionModel.php | 2 + ...tDeleteDaysAfterLastModificationAction.php | 2 + ...DaysAfterLastModificationActionBuilder.php | 2 + ...teDaysAfterLastModificationActionModel.php | 2 + .../ShoppingListSetDescriptionAction.php | 2 + ...hoppingListSetDescriptionActionBuilder.php | 2 + .../ShoppingListSetDescriptionActionModel.php | 2 + .../ShoppingList/ShoppingListSetKeyAction.php | 2 +- .../ShoppingListSetKeyActionBuilder.php | 2 +- .../ShoppingListSetKeyActionModel.php | 2 +- ...oppingListSetLineItemCustomFieldAction.php | 2 + ...istSetLineItemCustomFieldActionBuilder.php | 2 + ...gListSetLineItemCustomFieldActionModel.php | 2 + ...hoppingListSetLineItemCustomTypeAction.php | 8 +- ...ListSetLineItemCustomTypeActionBuilder.php | 8 +- ...ngListSetLineItemCustomTypeActionModel.php | 8 +- .../ShoppingListSetSlugAction.php | 2 + .../ShoppingListSetSlugActionBuilder.php | 2 + .../ShoppingListSetSlugActionModel.php | 2 + .../ShoppingListSetStoreAction.php | 2 + .../ShoppingListSetStoreActionBuilder.php | 2 + .../ShoppingListSetStoreActionModel.php | 2 + ...ngListSetTextLineItemCustomFieldAction.php | 2 + ...etTextLineItemCustomFieldActionBuilder.php | 2 + ...tSetTextLineItemCustomFieldActionModel.php | 2 + ...ingListSetTextLineItemCustomTypeAction.php | 2 + ...SetTextLineItemCustomTypeActionBuilder.php | 2 + ...stSetTextLineItemCustomTypeActionModel.php | 2 + ...ngListSetTextLineItemDescriptionAction.php | 4 +- ...etTextLineItemDescriptionActionBuilder.php | 4 +- ...tSetTextLineItemDescriptionActionModel.php | 4 +- .../ShoppingList/ShoppingListUpdate.php | 4 + .../ShoppingListUpdateBuilder.php | 4 + .../ShoppingList/ShoppingListUpdateModel.php | 4 + .../src/Models/ShoppingList/TextLineItem.php | 10 +- .../ShoppingList/TextLineItemBuilder.php | 10 +- .../Models/ShoppingList/TextLineItemDraft.php | 10 +- .../ShoppingList/TextLineItemDraftBuilder.php | 10 +- .../ShoppingList/TextLineItemDraftModel.php | 10 +- .../Models/ShoppingList/TextLineItemModel.php | 10 +- 165 files changed, 1799 insertions(+), 1169 deletions(-) diff --git a/changes.md b/changes.md index 9f9e98b72db..4b33fc66006 100644 --- a/changes.md +++ b/changes.md @@ -38,6 +38,8 @@ - :warning: changed property `country` of type `OverlappingStandalonePriceValidityError` from type `string` to `CountryCode` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/OverlappingStandalonePriceValidityError.raml:29:2) - :warning: changed property `field` of type `DuplicateFieldError` to be required (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/DuplicateFieldError.raml:14:2) - :warning: changed property `duplicateValue` of type `DuplicateFieldError` to be required (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/DuplicateFieldError.raml:18:2) +- :warning: changed property `lineItems` of type `ShoppingList` to be required (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/shopping-list/ShoppingList.raml:41:2) +- :warning: changed property `textLineItems` of type `ShoppingList` to be required (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/shopping-list/ShoppingList.raml:45:2) diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDTest.php index 7d746192715..c216f861386 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDTest.php @@ -146,7 +146,7 @@ function (ApiRequestBuilder $builder): RequestInterface { 'post', 'test_projectKey/in-store/key=test_storeKey/me/shopping-lists/test_ID', ], - 'ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDDelete_withDataErasure' => [ + 'ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDDelete_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') @@ -155,12 +155,12 @@ function (ApiRequestBuilder $builder): RequestInterface { ->shoppingLists() ->withId('test_ID') ->delete() - ->withDataErasure('dataErasure'); + ->withExpand('expand'); }, 'delete', - 'test_projectKey/in-store/key=test_storeKey/me/shopping-lists/test_ID?dataErasure=dataErasure', + 'test_projectKey/in-store/key=test_storeKey/me/shopping-lists/test_ID?expand=expand', ], - 'ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDDelete_withVersion' => [ + 'ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDDelete_withDataErasure' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') @@ -169,12 +169,12 @@ function (ApiRequestBuilder $builder): RequestInterface { ->shoppingLists() ->withId('test_ID') ->delete() - ->withVersion('version'); + ->withDataErasure('dataErasure'); }, 'delete', - 'test_projectKey/in-store/key=test_storeKey/me/shopping-lists/test_ID?version=version', + 'test_projectKey/in-store/key=test_storeKey/me/shopping-lists/test_ID?dataErasure=dataErasure', ], - 'ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDDelete_withExpand' => [ + 'ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDDelete_withVersion' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') @@ -183,10 +183,10 @@ function (ApiRequestBuilder $builder): RequestInterface { ->shoppingLists() ->withId('test_ID') ->delete() - ->withExpand('expand'); + ->withVersion('version'); }, 'delete', - 'test_projectKey/in-store/key=test_storeKey/me/shopping-lists/test_ID?expand=expand', + 'test_projectKey/in-store/key=test_storeKey/me/shopping-lists/test_ID?version=version', ], 'ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDDelete' => [ function (ApiRequestBuilder $builder): RequestInterface { diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyTest.php index 17e410f898a..86334ba6c54 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyTest.php @@ -146,7 +146,7 @@ function (ApiRequestBuilder $builder): RequestInterface { 'post', 'test_projectKey/in-store/key=test_storeKey/me/shopping-lists/key=test_key', ], - 'ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyDelete_withDataErasure' => [ + 'ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyDelete_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') @@ -155,12 +155,12 @@ function (ApiRequestBuilder $builder): RequestInterface { ->shoppingLists() ->withKey('test_key') ->delete() - ->withDataErasure('dataErasure'); + ->withExpand('expand'); }, 'delete', - 'test_projectKey/in-store/key=test_storeKey/me/shopping-lists/key=test_key?dataErasure=dataErasure', + 'test_projectKey/in-store/key=test_storeKey/me/shopping-lists/key=test_key?expand=expand', ], - 'ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyDelete_withVersion' => [ + 'ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyDelete_withDataErasure' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') @@ -169,12 +169,12 @@ function (ApiRequestBuilder $builder): RequestInterface { ->shoppingLists() ->withKey('test_key') ->delete() - ->withVersion('version'); + ->withDataErasure('dataErasure'); }, 'delete', - 'test_projectKey/in-store/key=test_storeKey/me/shopping-lists/key=test_key?version=version', + 'test_projectKey/in-store/key=test_storeKey/me/shopping-lists/key=test_key?dataErasure=dataErasure', ], - 'ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyDelete_withExpand' => [ + 'ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyDelete_withVersion' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') @@ -183,10 +183,10 @@ function (ApiRequestBuilder $builder): RequestInterface { ->shoppingLists() ->withKey('test_key') ->delete() - ->withExpand('expand'); + ->withVersion('version'); }, 'delete', - 'test_projectKey/in-store/key=test_storeKey/me/shopping-lists/key=test_key?expand=expand', + 'test_projectKey/in-store/key=test_storeKey/me/shopping-lists/key=test_key?version=version', ], 'ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyDelete' => [ function (ApiRequestBuilder $builder): RequestInterface { diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDTest.php index 19d22b50d2d..183304c01e8 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDTest.php @@ -142,7 +142,7 @@ function (ApiRequestBuilder $builder): RequestInterface { 'post', 'test_projectKey/in-store/key=test_storeKey/shopping-lists/test_ID', ], - 'ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDDelete_withDataErasure' => [ + 'ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDDelete_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') @@ -150,12 +150,12 @@ function (ApiRequestBuilder $builder): RequestInterface { ->shoppingLists() ->withId('test_ID') ->delete() - ->withDataErasure('dataErasure'); + ->withExpand('expand'); }, 'delete', - 'test_projectKey/in-store/key=test_storeKey/shopping-lists/test_ID?dataErasure=dataErasure', + 'test_projectKey/in-store/key=test_storeKey/shopping-lists/test_ID?expand=expand', ], - 'ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDDelete_withVersion' => [ + 'ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDDelete_withDataErasure' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') @@ -163,12 +163,12 @@ function (ApiRequestBuilder $builder): RequestInterface { ->shoppingLists() ->withId('test_ID') ->delete() - ->withVersion('version'); + ->withDataErasure('dataErasure'); }, 'delete', - 'test_projectKey/in-store/key=test_storeKey/shopping-lists/test_ID?version=version', + 'test_projectKey/in-store/key=test_storeKey/shopping-lists/test_ID?dataErasure=dataErasure', ], - 'ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDDelete_withExpand' => [ + 'ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDDelete_withVersion' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') @@ -176,10 +176,10 @@ function (ApiRequestBuilder $builder): RequestInterface { ->shoppingLists() ->withId('test_ID') ->delete() - ->withExpand('expand'); + ->withVersion('version'); }, 'delete', - 'test_projectKey/in-store/key=test_storeKey/shopping-lists/test_ID?expand=expand', + 'test_projectKey/in-store/key=test_storeKey/shopping-lists/test_ID?version=version', ], 'ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDDelete' => [ function (ApiRequestBuilder $builder): RequestInterface { diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyTest.php index cc3bec9d460..6aa599a6688 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyTest.php @@ -142,7 +142,7 @@ function (ApiRequestBuilder $builder): RequestInterface { 'post', 'test_projectKey/in-store/key=test_storeKey/shopping-lists/key=test_key', ], - 'ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyDelete_withDataErasure' => [ + 'ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyDelete_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') @@ -150,12 +150,12 @@ function (ApiRequestBuilder $builder): RequestInterface { ->shoppingLists() ->withKey('test_key') ->delete() - ->withDataErasure('dataErasure'); + ->withExpand('expand'); }, 'delete', - 'test_projectKey/in-store/key=test_storeKey/shopping-lists/key=test_key?dataErasure=dataErasure', + 'test_projectKey/in-store/key=test_storeKey/shopping-lists/key=test_key?expand=expand', ], - 'ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyDelete_withVersion' => [ + 'ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyDelete_withDataErasure' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') @@ -163,12 +163,12 @@ function (ApiRequestBuilder $builder): RequestInterface { ->shoppingLists() ->withKey('test_key') ->delete() - ->withVersion('version'); + ->withDataErasure('dataErasure'); }, 'delete', - 'test_projectKey/in-store/key=test_storeKey/shopping-lists/key=test_key?version=version', + 'test_projectKey/in-store/key=test_storeKey/shopping-lists/key=test_key?dataErasure=dataErasure', ], - 'ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyDelete_withExpand' => [ + 'ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyDelete_withVersion' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') @@ -176,10 +176,10 @@ function (ApiRequestBuilder $builder): RequestInterface { ->shoppingLists() ->withKey('test_key') ->delete() - ->withExpand('expand'); + ->withVersion('version'); }, 'delete', - 'test_projectKey/in-store/key=test_storeKey/shopping-lists/key=test_key?expand=expand', + 'test_projectKey/in-store/key=test_storeKey/shopping-lists/key=test_key?version=version', ], 'ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyDelete' => [ function (ApiRequestBuilder $builder): RequestInterface { diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyMeShoppingListsByIDTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyMeShoppingListsByIDTest.php index 6efe4d55e81..d8fa8631cbb 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyMeShoppingListsByIDTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyMeShoppingListsByIDTest.php @@ -142,7 +142,7 @@ function (ApiRequestBuilder $builder): RequestInterface { 'post', 'test_projectKey/me/shopping-lists/test_ID', ], - 'ByProjectKeyMeShoppingListsByIDDelete_withVersion' => [ + 'ByProjectKeyMeShoppingListsByIDDelete_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') @@ -150,12 +150,12 @@ function (ApiRequestBuilder $builder): RequestInterface { ->shoppingLists() ->withId('test_ID') ->delete() - ->withVersion('version'); + ->withExpand('expand'); }, 'delete', - 'test_projectKey/me/shopping-lists/test_ID?version=version', + 'test_projectKey/me/shopping-lists/test_ID?expand=expand', ], - 'ByProjectKeyMeShoppingListsByIDDelete_withExpand' => [ + 'ByProjectKeyMeShoppingListsByIDDelete_withVersion' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') @@ -163,10 +163,10 @@ function (ApiRequestBuilder $builder): RequestInterface { ->shoppingLists() ->withId('test_ID') ->delete() - ->withExpand('expand'); + ->withVersion('version'); }, 'delete', - 'test_projectKey/me/shopping-lists/test_ID?expand=expand', + 'test_projectKey/me/shopping-lists/test_ID?version=version', ], 'ByProjectKeyMeShoppingListsByIDDelete' => [ function (ApiRequestBuilder $builder): RequestInterface { diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyMeShoppingListsKeyByKeyTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyMeShoppingListsKeyByKeyTest.php index 66e2c8af5e6..8d0e45f2e24 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyMeShoppingListsKeyByKeyTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyMeShoppingListsKeyByKeyTest.php @@ -142,7 +142,7 @@ function (ApiRequestBuilder $builder): RequestInterface { 'post', 'test_projectKey/me/shopping-lists/key=test_key', ], - 'ByProjectKeyMeShoppingListsKeyByKeyDelete_withVersion' => [ + 'ByProjectKeyMeShoppingListsKeyByKeyDelete_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') @@ -150,12 +150,12 @@ function (ApiRequestBuilder $builder): RequestInterface { ->shoppingLists() ->withKey('test_key') ->delete() - ->withVersion('version'); + ->withExpand('expand'); }, 'delete', - 'test_projectKey/me/shopping-lists/key=test_key?version=version', + 'test_projectKey/me/shopping-lists/key=test_key?expand=expand', ], - 'ByProjectKeyMeShoppingListsKeyByKeyDelete_withExpand' => [ + 'ByProjectKeyMeShoppingListsKeyByKeyDelete_withVersion' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') @@ -163,10 +163,10 @@ function (ApiRequestBuilder $builder): RequestInterface { ->shoppingLists() ->withKey('test_key') ->delete() - ->withExpand('expand'); + ->withVersion('version'); }, 'delete', - 'test_projectKey/me/shopping-lists/key=test_key?expand=expand', + 'test_projectKey/me/shopping-lists/key=test_key?version=version', ], 'ByProjectKeyMeShoppingListsKeyByKeyDelete' => [ function (ApiRequestBuilder $builder): RequestInterface { diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyShoppingListsByIDTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyShoppingListsByIDTest.php index d1f8372d750..18159a10b70 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyShoppingListsByIDTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyShoppingListsByIDTest.php @@ -138,41 +138,41 @@ function (ApiRequestBuilder $builder): RequestInterface { 'post', 'test_projectKey/shopping-lists/test_ID', ], - 'ByProjectKeyShoppingListsByIDDelete_withDataErasure' => [ + 'ByProjectKeyShoppingListsByIDDelete_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') ->shoppingLists() ->withId('test_ID') ->delete() - ->withDataErasure('dataErasure'); + ->withExpand('expand'); }, 'delete', - 'test_projectKey/shopping-lists/test_ID?dataErasure=dataErasure', + 'test_projectKey/shopping-lists/test_ID?expand=expand', ], - 'ByProjectKeyShoppingListsByIDDelete_withVersion' => [ + 'ByProjectKeyShoppingListsByIDDelete_withDataErasure' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') ->shoppingLists() ->withId('test_ID') ->delete() - ->withVersion('version'); + ->withDataErasure('dataErasure'); }, 'delete', - 'test_projectKey/shopping-lists/test_ID?version=version', + 'test_projectKey/shopping-lists/test_ID?dataErasure=dataErasure', ], - 'ByProjectKeyShoppingListsByIDDelete_withExpand' => [ + 'ByProjectKeyShoppingListsByIDDelete_withVersion' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') ->shoppingLists() ->withId('test_ID') ->delete() - ->withExpand('expand'); + ->withVersion('version'); }, 'delete', - 'test_projectKey/shopping-lists/test_ID?expand=expand', + 'test_projectKey/shopping-lists/test_ID?version=version', ], 'ByProjectKeyShoppingListsByIDDelete' => [ function (ApiRequestBuilder $builder): RequestInterface { diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyShoppingListsKeyByKeyTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyShoppingListsKeyByKeyTest.php index 597a138c8a5..652ddaf1054 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyShoppingListsKeyByKeyTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyShoppingListsKeyByKeyTest.php @@ -138,41 +138,41 @@ function (ApiRequestBuilder $builder): RequestInterface { 'post', 'test_projectKey/shopping-lists/key=test_key', ], - 'ByProjectKeyShoppingListsKeyByKeyDelete_withDataErasure' => [ + 'ByProjectKeyShoppingListsKeyByKeyDelete_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') ->shoppingLists() ->withKey('test_key') ->delete() - ->withDataErasure('dataErasure'); + ->withExpand('expand'); }, 'delete', - 'test_projectKey/shopping-lists/key=test_key?dataErasure=dataErasure', + 'test_projectKey/shopping-lists/key=test_key?expand=expand', ], - 'ByProjectKeyShoppingListsKeyByKeyDelete_withVersion' => [ + 'ByProjectKeyShoppingListsKeyByKeyDelete_withDataErasure' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') ->shoppingLists() ->withKey('test_key') ->delete() - ->withVersion('version'); + ->withDataErasure('dataErasure'); }, 'delete', - 'test_projectKey/shopping-lists/key=test_key?version=version', + 'test_projectKey/shopping-lists/key=test_key?dataErasure=dataErasure', ], - 'ByProjectKeyShoppingListsKeyByKeyDelete_withExpand' => [ + 'ByProjectKeyShoppingListsKeyByKeyDelete_withVersion' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder ->withProjectKey('test_projectKey') ->shoppingLists() ->withKey('test_key') ->delete() - ->withExpand('expand'); + ->withVersion('version'); }, 'delete', - 'test_projectKey/shopping-lists/key=test_key?expand=expand', + 'test_projectKey/shopping-lists/key=test_key?version=version', ], 'ByProjectKeyShoppingListsKeyByKeyDelete' => [ function (ApiRequestBuilder $builder): RequestInterface { diff --git a/lib/commercetools-api/docs/RequestBuilder.md b/lib/commercetools-api/docs/RequestBuilder.md index defb3e25634..2c349ff99fa 100644 --- a/lib/commercetools-api/docs/RequestBuilder.md +++ b/lib/commercetools-api/docs/RequestBuilder.md @@ -2214,7 +2214,8 @@ $request = $builder ``` ## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->me()->shoppingLists()->post(null)` -null +When using this endpoint, the `store` field of a ShoppingList is always set to the Store specified in the path parameter. + ### Example ```php @@ -2230,7 +2231,9 @@ $request = $builder ``` ## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->me()->shoppingLists()->withId("ID")->get()` -Gets a shopping list by ID. +If a ShoppingList exists in a Project but does _not_ have the `store` field, or the `store` field references a different Store, +the [ResourceNotFound](/errors#404-not-found-1) error is returned. + ### Example ```php @@ -2247,7 +2250,9 @@ $request = $builder ``` ## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->me()->shoppingLists()->withId("ID")->post(null)` -null +If a ShoppingList exists in a Project but does _not_ have the `store` field, or the `store` field references a different Store, +the [ResourceNotFound](/errors#404-not-found-1) error is returned. + ### Example ```php @@ -2264,7 +2269,9 @@ $request = $builder ``` ## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->me()->shoppingLists()->withId("ID")->delete()` -null +If a ShoppingList exists in a Project but does _not_ have the `store` field, or the `store` field references a different Store, +the [ResourceNotFound](/errors#404-not-found-1) error is returned. + ### Example ```php @@ -2281,7 +2288,8 @@ $request = $builder ``` ## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->me()->shoppingLists()->withKey("key")->get()` -Gets a shopping list by Key. +If a ShoppingList exists in a Project but does _not_ have the `store` field, or the `store` field references a different Store, the [ResourceNotFound](/errors#404-not-found-1) error is returned. + ### Example ```php @@ -2298,7 +2306,9 @@ $request = $builder ``` ## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->me()->shoppingLists()->withKey("key")->post(null)` -Update a shopping list found by its Key. +If a ShoppingList exists in a Project but does _not_ have the `store` field, or the `store` field references a different Store, +the [ResourceNotFound](/errors#404-not-found-1) error is returned. + ### Example ```php @@ -2315,7 +2325,9 @@ $request = $builder ``` ## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->me()->shoppingLists()->withKey("key")->delete()` -null +If a ShoppingList exists in a Project but does _not_ have the `store` field, or the `store` field references a different Store, +the [ResourceNotFound](/errors#404-not-found-1) error is returned. + ### Example ```php @@ -2585,7 +2597,8 @@ $request = $builder ``` ## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->shoppingLists()->post(null)` -null +When using this endpoint, the `store` field of a ShoppingList is always set to the Store specified in the path parameter. + ### Example ```php @@ -2600,7 +2613,9 @@ $request = $builder ``` ## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->shoppingLists()->withId("ID")->get()` -Gets a shopping list by ID. +If a ShoppingList exists in a Project but does _not_ have the `store` field, or the `store` field references a different Store, +the [ResourceNotFound](/errors#404-not-found-1) error is returned. + ### Example ```php @@ -2616,7 +2631,9 @@ $request = $builder ``` ## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->shoppingLists()->withId("ID")->post(null)` -null +If a ShoppingList exists in a Project but does _not_ have the `store` field, or the `store` field references a different Store, +the [ResourceNotFound](/errors#404-not-found-1) error is returned. + ### Example ```php @@ -2632,7 +2649,9 @@ $request = $builder ``` ## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->shoppingLists()->withId("ID")->delete()` -null +If a ShoppingList exists in a Project but does _not_ have the `store` field, or the `store` field references a different Store, +the [ResourceNotFound](/errors#404-not-found-1) error is returned. + ### Example ```php @@ -2648,7 +2667,9 @@ $request = $builder ``` ## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->shoppingLists()->withKey("key")->get()` -Gets a shopping list by Key. +If a ShoppingList exists in a Project but does _not_ have the `store` field, or the `store` field references a different Store, +the [ResourceNotFound](/errors#404-not-found-1) error is returned. + ### Example ```php @@ -2664,7 +2685,9 @@ $request = $builder ``` ## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->shoppingLists()->withKey("key")->post(null)` -Update a shopping list found by its Key. +If a ShoppingList exists in a Project but does _not_ have the `store` field, or the `store` field references a different Store, +the [ResourceNotFound](/errors#404-not-found-1) error is returned. + ### Example ```php @@ -2680,7 +2703,9 @@ $request = $builder ``` ## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->shoppingLists()->withKey("key")->delete()` -null +If a ShoppingList exists in a Project but does _not_ have the `store` field, or the `store` field references a different Store, +the [ResourceNotFound](/errors#404-not-found-1) error is returned. + ### Example ```php @@ -5550,7 +5575,7 @@ $request = $builder ``` ## `withProjectKey("projectKey")->shoppingLists()->withId("ID")->get()` -Gets a shopping list by ID. +null ### Example ```php @@ -5595,7 +5620,7 @@ $request = $builder ``` ## `withProjectKey("projectKey")->shoppingLists()->withKey("key")->get()` -Gets a shopping list by Key. +null ### Example ```php @@ -5610,7 +5635,7 @@ $request = $builder ``` ## `withProjectKey("projectKey")->shoppingLists()->withKey("key")->post(null)` -Update a shopping list found by its Key. +null ### Example ```php diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDDelete.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDDelete.php index c281b74cfa6..d05088d642d 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDDelete.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDDelete.php @@ -153,28 +153,28 @@ function (RequestException $e) use ($resultType) { /** * - * @psalm-param scalar|scalar[] $dataErasure + * @psalm-param scalar|scalar[] $expand */ - public function withDataErasure($dataErasure): ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDDelete + public function withExpand($expand): ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDDelete { - return $this->withQueryParam('dataErasure', $dataErasure); + return $this->withQueryParam('expand', $expand); } /** * - * @psalm-param scalar|scalar[] $version + * @psalm-param scalar|scalar[] $dataErasure */ - public function withVersion($version): ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDDelete + public function withDataErasure($dataErasure): ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDDelete { - return $this->withQueryParam('version', $version); + return $this->withQueryParam('dataErasure', $dataErasure); } /** * - * @psalm-param scalar|scalar[] $expand + * @psalm-param scalar|scalar[] $version */ - public function withExpand($expand): ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDDelete + public function withVersion($version): ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDDelete { - return $this->withQueryParam('expand', $expand); + return $this->withQueryParam('version', $version); } } diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyDelete.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyDelete.php index 859bd9d603c..718e7e3adcc 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyDelete.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyDelete.php @@ -153,28 +153,28 @@ function (RequestException $e) use ($resultType) { /** * - * @psalm-param scalar|scalar[] $dataErasure + * @psalm-param scalar|scalar[] $expand */ - public function withDataErasure($dataErasure): ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyDelete + public function withExpand($expand): ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyDelete { - return $this->withQueryParam('dataErasure', $dataErasure); + return $this->withQueryParam('expand', $expand); } /** * - * @psalm-param scalar|scalar[] $version + * @psalm-param scalar|scalar[] $dataErasure */ - public function withVersion($version): ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyDelete + public function withDataErasure($dataErasure): ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyDelete { - return $this->withQueryParam('version', $version); + return $this->withQueryParam('dataErasure', $dataErasure); } /** * - * @psalm-param scalar|scalar[] $expand + * @psalm-param scalar|scalar[] $version */ - public function withExpand($expand): ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyDelete + public function withVersion($version): ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyDelete { - return $this->withQueryParam('expand', $expand); + return $this->withQueryParam('version', $version); } } diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDDelete.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDDelete.php index 786ca836ccb..a4df1ab479c 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDDelete.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDDelete.php @@ -153,28 +153,28 @@ function (RequestException $e) use ($resultType) { /** * - * @psalm-param scalar|scalar[] $dataErasure + * @psalm-param scalar|scalar[] $expand */ - public function withDataErasure($dataErasure): ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDDelete + public function withExpand($expand): ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDDelete { - return $this->withQueryParam('dataErasure', $dataErasure); + return $this->withQueryParam('expand', $expand); } /** * - * @psalm-param scalar|scalar[] $version + * @psalm-param scalar|scalar[] $dataErasure */ - public function withVersion($version): ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDDelete + public function withDataErasure($dataErasure): ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDDelete { - return $this->withQueryParam('version', $version); + return $this->withQueryParam('dataErasure', $dataErasure); } /** * - * @psalm-param scalar|scalar[] $expand + * @psalm-param scalar|scalar[] $version */ - public function withExpand($expand): ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDDelete + public function withVersion($version): ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDDelete { - return $this->withQueryParam('expand', $expand); + return $this->withQueryParam('version', $version); } } diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyDelete.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyDelete.php index 28bd4e2c1cf..11e628840b2 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyDelete.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyDelete.php @@ -153,28 +153,28 @@ function (RequestException $e) use ($resultType) { /** * - * @psalm-param scalar|scalar[] $dataErasure + * @psalm-param scalar|scalar[] $expand */ - public function withDataErasure($dataErasure): ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyDelete + public function withExpand($expand): ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyDelete { - return $this->withQueryParam('dataErasure', $dataErasure); + return $this->withQueryParam('expand', $expand); } /** * - * @psalm-param scalar|scalar[] $version + * @psalm-param scalar|scalar[] $dataErasure */ - public function withVersion($version): ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyDelete + public function withDataErasure($dataErasure): ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyDelete { - return $this->withQueryParam('version', $version); + return $this->withQueryParam('dataErasure', $dataErasure); } /** * - * @psalm-param scalar|scalar[] $expand + * @psalm-param scalar|scalar[] $version */ - public function withExpand($expand): ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyDelete + public function withVersion($version): ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyDelete { - return $this->withQueryParam('expand', $expand); + return $this->withQueryParam('version', $version); } } diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyMeShoppingListsByIDDelete.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyMeShoppingListsByIDDelete.php index 13f049d6c3b..82c0e4bf3c0 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyMeShoppingListsByIDDelete.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyMeShoppingListsByIDDelete.php @@ -152,19 +152,19 @@ function (RequestException $e) use ($resultType) { /** * - * @psalm-param scalar|scalar[] $version + * @psalm-param scalar|scalar[] $expand */ - public function withVersion($version): ByProjectKeyMeShoppingListsByIDDelete + public function withExpand($expand): ByProjectKeyMeShoppingListsByIDDelete { - return $this->withQueryParam('version', $version); + return $this->withQueryParam('expand', $expand); } /** * - * @psalm-param scalar|scalar[] $expand + * @psalm-param scalar|scalar[] $version */ - public function withExpand($expand): ByProjectKeyMeShoppingListsByIDDelete + public function withVersion($version): ByProjectKeyMeShoppingListsByIDDelete { - return $this->withQueryParam('expand', $expand); + return $this->withQueryParam('version', $version); } } diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyMeShoppingListsKeyByKeyDelete.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyMeShoppingListsKeyByKeyDelete.php index d768ac622c0..a1308b3dd00 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyMeShoppingListsKeyByKeyDelete.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyMeShoppingListsKeyByKeyDelete.php @@ -152,19 +152,19 @@ function (RequestException $e) use ($resultType) { /** * - * @psalm-param scalar|scalar[] $version + * @psalm-param scalar|scalar[] $expand */ - public function withVersion($version): ByProjectKeyMeShoppingListsKeyByKeyDelete + public function withExpand($expand): ByProjectKeyMeShoppingListsKeyByKeyDelete { - return $this->withQueryParam('version', $version); + return $this->withQueryParam('expand', $expand); } /** * - * @psalm-param scalar|scalar[] $expand + * @psalm-param scalar|scalar[] $version */ - public function withExpand($expand): ByProjectKeyMeShoppingListsKeyByKeyDelete + public function withVersion($version): ByProjectKeyMeShoppingListsKeyByKeyDelete { - return $this->withQueryParam('expand', $expand); + return $this->withQueryParam('version', $version); } } diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyShoppingListsByIDDelete.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyShoppingListsByIDDelete.php index fc0a3f6db4b..c807bcc347a 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyShoppingListsByIDDelete.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyShoppingListsByIDDelete.php @@ -153,28 +153,28 @@ function (RequestException $e) use ($resultType) { /** * - * @psalm-param scalar|scalar[] $dataErasure + * @psalm-param scalar|scalar[] $expand */ - public function withDataErasure($dataErasure): ByProjectKeyShoppingListsByIDDelete + public function withExpand($expand): ByProjectKeyShoppingListsByIDDelete { - return $this->withQueryParam('dataErasure', $dataErasure); + return $this->withQueryParam('expand', $expand); } /** * - * @psalm-param scalar|scalar[] $version + * @psalm-param scalar|scalar[] $dataErasure */ - public function withVersion($version): ByProjectKeyShoppingListsByIDDelete + public function withDataErasure($dataErasure): ByProjectKeyShoppingListsByIDDelete { - return $this->withQueryParam('version', $version); + return $this->withQueryParam('dataErasure', $dataErasure); } /** * - * @psalm-param scalar|scalar[] $expand + * @psalm-param scalar|scalar[] $version */ - public function withExpand($expand): ByProjectKeyShoppingListsByIDDelete + public function withVersion($version): ByProjectKeyShoppingListsByIDDelete { - return $this->withQueryParam('expand', $expand); + return $this->withQueryParam('version', $version); } } diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyShoppingListsKeyByKeyDelete.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyShoppingListsKeyByKeyDelete.php index 340f3e88f3f..10faa9f846f 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyShoppingListsKeyByKeyDelete.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyShoppingListsKeyByKeyDelete.php @@ -153,28 +153,28 @@ function (RequestException $e) use ($resultType) { /** * - * @psalm-param scalar|scalar[] $dataErasure + * @psalm-param scalar|scalar[] $expand */ - public function withDataErasure($dataErasure): ByProjectKeyShoppingListsKeyByKeyDelete + public function withExpand($expand): ByProjectKeyShoppingListsKeyByKeyDelete { - return $this->withQueryParam('dataErasure', $dataErasure); + return $this->withQueryParam('expand', $expand); } /** * - * @psalm-param scalar|scalar[] $version + * @psalm-param scalar|scalar[] $dataErasure */ - public function withVersion($version): ByProjectKeyShoppingListsKeyByKeyDelete + public function withDataErasure($dataErasure): ByProjectKeyShoppingListsKeyByKeyDelete { - return $this->withQueryParam('version', $version); + return $this->withQueryParam('dataErasure', $dataErasure); } /** * - * @psalm-param scalar|scalar[] $expand + * @psalm-param scalar|scalar[] $version */ - public function withExpand($expand): ByProjectKeyShoppingListsKeyByKeyDelete + public function withVersion($version): ByProjectKeyShoppingListsKeyByKeyDelete { - return $this->withQueryParam('expand', $expand); + return $this->withQueryParam('version', $version); } } diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListAddLineItemAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListAddLineItemAction.php index eaea2a6ea22..e55c486b721 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListAddLineItemAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListAddLineItemAction.php @@ -23,37 +23,47 @@ interface MyShoppingListAddLineItemAction extends MyShoppingListUpdateAction public const FIELD_CUSTOM = 'custom'; /** + *

sku of the ProductVariant.

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

Unique identifier of a Product.

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

id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

+ * * @return null|int */ public function getVariantId(); /** + *

Number of Products in the ShoppingListLineItem.

+ * * @return null|int */ public function getQuantity(); /** + *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ * * @return null|DateTimeImmutable */ public function getAddedAt(); /** - *

The representation used when creating or updating a customizable data type with Custom Fields.

+ *

Custom Fields defined for the ShoppingListLineItem.

* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListAddLineItemActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListAddLineItemActionBuilder.php index cc1069ad9d6..24361069dd4 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListAddLineItemActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListAddLineItemActionBuilder.php @@ -60,6 +60,8 @@ final class MyShoppingListAddLineItemActionBuilder implements Builder private $custom; /** + *

sku of the ProductVariant.

+ * * @return null|string */ @@ -69,6 +71,8 @@ public function getSku() } /** + *

Unique identifier of a Product.

+ * * @return null|string */ @@ -78,6 +82,8 @@ public function getProductId() } /** + *

id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

+ * * @return null|int */ @@ -87,6 +93,8 @@ public function getVariantId() } /** + *

Number of Products in the ShoppingListLineItem.

+ * * @return null|int */ @@ -96,6 +104,8 @@ public function getQuantity() } /** + *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ * * @return null|DateTimeImmutable */ @@ -105,7 +115,7 @@ public function getAddedAt() } /** - *

The representation used when creating or updating a customizable data type with Custom Fields.

+ *

Custom Fields defined for the ShoppingListLineItem.

* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListAddLineItemActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListAddLineItemActionModel.php index d6ac7a814f2..82bfe5f6880 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListAddLineItemActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListAddLineItemActionModel.php @@ -106,6 +106,8 @@ public function getAction() } /** + *

sku of the ProductVariant.

+ * * * @return null|string */ @@ -124,6 +126,8 @@ public function getSku() } /** + *

Unique identifier of a Product.

+ * * * @return null|string */ @@ -142,6 +146,8 @@ public function getProductId() } /** + *

id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

+ * * * @return null|int */ @@ -160,6 +166,8 @@ public function getVariantId() } /** + *

Number of Products in the ShoppingListLineItem.

+ * * * @return null|int */ @@ -178,6 +186,8 @@ public function getQuantity() } /** + *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ * * * @return null|DateTimeImmutable */ @@ -200,7 +210,7 @@ public function getAddedAt() } /** - *

The representation used when creating or updating a customizable data type with Custom Fields.

+ *

Custom Fields defined for the ShoppingListLineItem.

* * * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemAction.php index f134b1f64c9..d9825bce130 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemAction.php @@ -23,7 +23,7 @@ interface MyShoppingListAddTextLineItemAction extends MyShoppingListUpdateAction public const FIELD_CUSTOM = 'custom'; /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Name of the TextLineItem.

* * @return null|LocalizedString @@ -31,7 +31,7 @@ interface MyShoppingListAddTextLineItemAction extends MyShoppingListUpdateAction public function getName(); /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Description of the TextLineItem.

* * @return null|LocalizedString @@ -39,19 +39,23 @@ public function getName(); public function getDescription(); /** + *

Number of entries in the TextLineItem.

+ * * @return null|int */ public function getQuantity(); /** + *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ * * @return null|DateTimeImmutable */ public function getAddedAt(); /** - *

The representation used when creating or updating a customizable data type with Custom Fields.

+ *

Custom Fields defined for the TextLineItem.

* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemActionBuilder.php index 4b7335885e2..4a9a153efc3 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemActionBuilder.php @@ -56,7 +56,7 @@ final class MyShoppingListAddTextLineItemActionBuilder implements Builder private $custom; /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Name of the TextLineItem.

* * @return null|LocalizedString @@ -67,7 +67,7 @@ public function getName() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Description of the TextLineItem.

* * @return null|LocalizedString @@ -78,6 +78,8 @@ public function getDescription() } /** + *

Number of entries in the TextLineItem.

+ * * @return null|int */ @@ -87,6 +89,8 @@ public function getQuantity() } /** + *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ * * @return null|DateTimeImmutable */ @@ -96,7 +100,7 @@ public function getAddedAt() } /** - *

The representation used when creating or updating a customizable data type with Custom Fields.

+ *

Custom Fields defined for the TextLineItem.

* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemActionModel.php index fb897190a75..5a94cfc1c0b 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListAddTextLineItemActionModel.php @@ -100,7 +100,7 @@ public function getAction() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Name of the TextLineItem.

* * * @return null|LocalizedString @@ -121,7 +121,7 @@ public function getName() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Description of the TextLineItem.

* * * @return null|LocalizedString @@ -142,6 +142,8 @@ public function getDescription() } /** + *

Number of entries in the TextLineItem.

+ * * * @return null|int */ @@ -160,6 +162,8 @@ public function getQuantity() } /** + *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ * * * @return null|DateTimeImmutable */ @@ -182,7 +186,7 @@ public function getAddedAt() } /** - *

The representation used when creating or updating a customizable data type with Custom Fields.

+ *

Custom Fields defined for the TextLineItem.

* * * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemQuantityAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemQuantityAction.php index 2141b6cc77d..f69870d4445 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemQuantityAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemQuantityAction.php @@ -17,12 +17,16 @@ interface MyShoppingListChangeLineItemQuantityAction extends MyShoppingListUpdat public const FIELD_QUANTITY = 'quantity'; /** + *

The id of the ShoppingListLineItem to update.

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

New value to set. If 0, the ShoppingListLineItem is removed from the ShoppingList.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemQuantityActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemQuantityActionBuilder.php index a43b198d083..f545015771a 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemQuantityActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemQuantityActionBuilder.php @@ -33,6 +33,8 @@ final class MyShoppingListChangeLineItemQuantityActionBuilder implements Builder private $quantity; /** + *

The id of the ShoppingListLineItem to update.

+ * * @return null|string */ @@ -42,6 +44,8 @@ public function getLineItemId() } /** + *

New value to set. If 0, the ShoppingListLineItem is removed from the ShoppingList.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemQuantityActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemQuantityActionModel.php index 13adc0f74e1..2a8517891f3 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemQuantityActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemQuantityActionModel.php @@ -71,6 +71,8 @@ public function getAction() } /** + *

The id of the ShoppingListLineItem to update.

+ * * * @return null|string */ @@ -89,6 +91,8 @@ public function getLineItemId() } /** + *

New value to set. If 0, the ShoppingListLineItem is removed from the ShoppingList.

+ * * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemsOrderAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemsOrderAction.php index a2ce28049d5..926b9098f66 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemsOrderAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemsOrderAction.php @@ -16,6 +16,8 @@ interface MyShoppingListChangeLineItemsOrderAction extends MyShoppingListUpdateA public const FIELD_LINE_ITEM_ORDER = 'lineItemOrder'; /** + *

All existing ShoppingListLineItem ids of the ShoppingList in the desired new order.

+ * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemsOrderActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemsOrderActionBuilder.php index affb44fc6c4..9a7edaac52d 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemsOrderActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemsOrderActionBuilder.php @@ -27,6 +27,8 @@ final class MyShoppingListChangeLineItemsOrderActionBuilder implements Builder private $lineItemOrder; /** + *

All existing ShoppingListLineItem ids of the ShoppingList in the desired new order.

+ * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemsOrderActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemsOrderActionModel.php index a7daa51b7c8..a4b82a07217 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemsOrderActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeLineItemsOrderActionModel.php @@ -63,6 +63,8 @@ public function getAction() } /** + *

All existing ShoppingListLineItem ids of the ShoppingList in the desired new order.

+ * * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeNameAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeNameAction.php index abc226ef70c..8f0f74499d1 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeNameAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeNameAction.php @@ -17,7 +17,7 @@ interface MyShoppingListChangeNameAction extends MyShoppingListUpdateAction public const FIELD_NAME = 'name'; /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

New value to set. Must not be empty.

* * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeNameActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeNameActionBuilder.php index fce2bf23a23..d35952ba1d2 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeNameActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeNameActionBuilder.php @@ -29,7 +29,7 @@ final class MyShoppingListChangeNameActionBuilder implements Builder private $name; /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

New value to set. Must not be empty.

* * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeNameActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeNameActionModel.php index 578b52f4f8e..fd3e35a72b6 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeNameActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeNameActionModel.php @@ -65,7 +65,7 @@ public function getAction() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

New value to set. Must not be empty.

* * * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameAction.php index 331ad0c4b85..a2909f46a2d 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameAction.php @@ -18,13 +18,15 @@ interface MyShoppingListChangeTextLineItemNameAction extends MyShoppingListUpdat public const FIELD_NAME = 'name'; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ public function getTextLineItemId(); /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

New value to set. Must not be empty.

* * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameActionBuilder.php index 7994e038f0f..85b7ceefdd5 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameActionBuilder.php @@ -35,6 +35,8 @@ final class MyShoppingListChangeTextLineItemNameActionBuilder implements Builder private $name; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ @@ -44,7 +46,7 @@ public function getTextLineItemId() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

New value to set. Must not be empty.

* * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameActionModel.php index 5df7e2dd8d1..8ef910790b5 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemNameActionModel.php @@ -73,6 +73,8 @@ public function getAction() } /** + *

The id of the TextLineItem to update.

+ * * * @return null|string */ @@ -91,7 +93,7 @@ public function getTextLineItemId() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

New value to set. Must not be empty.

* * * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemQuantityAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemQuantityAction.php index 74377d88800..a91ed4a2e89 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemQuantityAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemQuantityAction.php @@ -17,12 +17,16 @@ interface MyShoppingListChangeTextLineItemQuantityAction extends MyShoppingListU public const FIELD_QUANTITY = 'quantity'; /** + *

The id of the TextLineItem to update.

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

New value to set. If 0, the TextLineItem is removed from the ShoppingList.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemQuantityActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemQuantityActionBuilder.php index 93d57343cb2..b1a4cd1b792 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemQuantityActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemQuantityActionBuilder.php @@ -33,6 +33,8 @@ final class MyShoppingListChangeTextLineItemQuantityActionBuilder implements Bui private $quantity; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ @@ -42,6 +44,8 @@ public function getTextLineItemId() } /** + *

New value to set. If 0, the TextLineItem is removed from the ShoppingList.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemQuantityActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemQuantityActionModel.php index ca675a2f614..425b0ff612b 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemQuantityActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemQuantityActionModel.php @@ -71,6 +71,8 @@ public function getAction() } /** + *

The id of the TextLineItem to update.

+ * * * @return null|string */ @@ -89,6 +91,8 @@ public function getTextLineItemId() } /** + *

New value to set. If 0, the TextLineItem is removed from the ShoppingList.

+ * * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemsOrderAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemsOrderAction.php index 6361316e78b..621c7d8f0c1 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemsOrderAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemsOrderAction.php @@ -16,6 +16,8 @@ interface MyShoppingListChangeTextLineItemsOrderAction extends MyShoppingListUpd public const FIELD_TEXT_LINE_ITEM_ORDER = 'textLineItemOrder'; /** + *

All existing TextLineItem ids in the desired new order.

+ * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemsOrderActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemsOrderActionBuilder.php index 1af04336886..8a6eedaa959 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemsOrderActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemsOrderActionBuilder.php @@ -27,6 +27,8 @@ final class MyShoppingListChangeTextLineItemsOrderActionBuilder implements Build private $textLineItemOrder; /** + *

All existing TextLineItem ids in the desired new order.

+ * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemsOrderActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemsOrderActionModel.php index 056c488694d..d57079bbcd0 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemsOrderActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListChangeTextLineItemsOrderActionModel.php @@ -63,6 +63,8 @@ public function getAction() } /** + *

All existing TextLineItem ids in the desired new order.

+ * * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListDraft.php b/lib/commercetools-api/src/Models/Me/MyShoppingListDraft.php index ff8f3a95ea7..11cc5e83ed5 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListDraft.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListDraft.php @@ -27,31 +27,39 @@ interface MyShoppingListDraft extends JsonObject public const FIELD_STORE = 'store'; /** + *

Name of the ShoppingList.

+ * * @return null|LocalizedString */ public function getName(); /** + *

Description of the ShoppingList.

+ * * @return null|LocalizedString */ public function getDescription(); /** + *

Line Items (containing Products) to add to the ShoppingList.

+ * * @return null|ShoppingListLineItemDraftCollection */ public function getLineItems(); /** + *

Line Items (containing text values) to add to the ShoppingList.

+ * * @return null|TextLineItemDraftCollection */ public function getTextLineItems(); /** - *

The custom fields.

+ *

Custom Fields defined for the ShoppingList.

* * @return null|CustomFieldsDraft @@ -59,7 +67,7 @@ public function getTextLineItems(); public function getCustom(); /** - *

The shopping list will be deleted automatically if it hasn't been modified for the specified amount of days.

+ *

Number of days after which the ShoppingList will be automatically deleted if it has not been modified. If not set, the default value configured in the Project is used.

* * @return null|int @@ -67,6 +75,8 @@ public function getCustom(); public function getDeleteDaysAfterLastModification(); /** + *

Assigns the new ShoppingList to the Store. The Store assignment can not be modified.

+ * * @return null|StoreResourceIdentifier */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListDraftBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListDraftBuilder.php index c630ca310fb..81e9273dbf4 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListDraftBuilder.php @@ -71,6 +71,8 @@ final class MyShoppingListDraftBuilder implements Builder private $store; /** + *

Name of the ShoppingList.

+ * * @return null|LocalizedString */ @@ -80,6 +82,8 @@ public function getName() } /** + *

Description of the ShoppingList.

+ * * @return null|LocalizedString */ @@ -89,6 +93,8 @@ public function getDescription() } /** + *

Line Items (containing Products) to add to the ShoppingList.

+ * * @return null|ShoppingListLineItemDraftCollection */ @@ -98,6 +104,8 @@ public function getLineItems() } /** + *

Line Items (containing text values) to add to the ShoppingList.

+ * * @return null|TextLineItemDraftCollection */ @@ -107,7 +115,7 @@ public function getTextLineItems() } /** - *

The custom fields.

+ *

Custom Fields defined for the ShoppingList.

* * @return null|CustomFieldsDraft @@ -118,7 +126,7 @@ public function getCustom() } /** - *

The shopping list will be deleted automatically if it hasn't been modified for the specified amount of days.

+ *

Number of days after which the ShoppingList will be automatically deleted if it has not been modified. If not set, the default value configured in the Project is used.

* * @return null|int @@ -129,6 +137,8 @@ public function getDeleteDaysAfterLastModification() } /** + *

Assigns the new ShoppingList to the Store. The Store assignment can not be modified.

+ * * @return null|StoreResourceIdentifier */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListDraftModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListDraftModel.php index 1d9b285dbb6..48187d31e55 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListDraftModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListDraftModel.php @@ -92,6 +92,8 @@ public function __construct( } /** + *

Name of the ShoppingList.

+ * * * @return null|LocalizedString */ @@ -111,6 +113,8 @@ public function getName() } /** + *

Description of the ShoppingList.

+ * * * @return null|LocalizedString */ @@ -130,6 +134,8 @@ public function getDescription() } /** + *

Line Items (containing Products) to add to the ShoppingList.

+ * * * @return null|ShoppingListLineItemDraftCollection */ @@ -148,6 +154,8 @@ public function getLineItems() } /** + *

Line Items (containing text values) to add to the ShoppingList.

+ * * * @return null|TextLineItemDraftCollection */ @@ -166,7 +174,7 @@ public function getTextLineItems() } /** - *

The custom fields.

+ *

Custom Fields defined for the ShoppingList.

* * * @return null|CustomFieldsDraft @@ -187,7 +195,7 @@ public function getCustom() } /** - *

The shopping list will be deleted automatically if it hasn't been modified for the specified amount of days.

+ *

Number of days after which the ShoppingList will be automatically deleted if it has not been modified. If not set, the default value configured in the Project is used.

* * * @return null|int @@ -207,6 +215,8 @@ public function getDeleteDaysAfterLastModification() } /** + *

Assigns the new ShoppingList to the Store. The Store assignment can not be modified.

+ * * * @return null|StoreResourceIdentifier */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveLineItemAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveLineItemAction.php index b4fe834e390..05f139b3b48 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveLineItemAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveLineItemAction.php @@ -17,12 +17,16 @@ interface MyShoppingListRemoveLineItemAction extends MyShoppingListUpdateAction public const FIELD_QUANTITY = 'quantity'; /** + *

The id of the ShoppingListLineItem to update.

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

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.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveLineItemActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveLineItemActionBuilder.php index 178ef68c9e8..76366855a09 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveLineItemActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveLineItemActionBuilder.php @@ -33,6 +33,8 @@ final class MyShoppingListRemoveLineItemActionBuilder implements Builder private $quantity; /** + *

The id of the ShoppingListLineItem to update.

+ * * @return null|string */ @@ -42,6 +44,8 @@ public function getLineItemId() } /** + *

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.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveLineItemActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveLineItemActionModel.php index a620e90dbcf..34052136e84 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveLineItemActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveLineItemActionModel.php @@ -71,6 +71,8 @@ public function getAction() } /** + *

The id of the ShoppingListLineItem to update.

+ * * * @return null|string */ @@ -89,6 +91,8 @@ public function getLineItemId() } /** + *

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.

+ * * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveTextLineItemAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveTextLineItemAction.php index 195cd47d206..031a819eb7d 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveTextLineItemAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveTextLineItemAction.php @@ -17,12 +17,16 @@ interface MyShoppingListRemoveTextLineItemAction extends MyShoppingListUpdateAct public const FIELD_QUANTITY = 'quantity'; /** + *

The id of the TextLineItem to update.

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

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.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveTextLineItemActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveTextLineItemActionBuilder.php index fc5c3b28455..83db696c1fc 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveTextLineItemActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveTextLineItemActionBuilder.php @@ -33,6 +33,8 @@ final class MyShoppingListRemoveTextLineItemActionBuilder implements Builder private $quantity; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ @@ -42,6 +44,8 @@ public function getTextLineItemId() } /** + *

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.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveTextLineItemActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveTextLineItemActionModel.php index 9b555994ab4..73c12ea46e4 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveTextLineItemActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListRemoveTextLineItemActionModel.php @@ -71,6 +71,8 @@ public function getAction() } /** + *

The id of the TextLineItem to update.

+ * * * @return null|string */ @@ -89,6 +91,8 @@ public function getTextLineItemId() } /** + *

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.

+ * * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetDeleteDaysAfterLastModificationAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetDeleteDaysAfterLastModificationAction.php index 63e6c025704..371cf6415ea 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetDeleteDaysAfterLastModificationAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetDeleteDaysAfterLastModificationAction.php @@ -16,6 +16,8 @@ interface MyShoppingListSetDeleteDaysAfterLastModificationAction extends MyShopp public const FIELD_DELETE_DAYS_AFTER_LAST_MODIFICATION = 'deleteDaysAfterLastModification'; /** + *

Value to set. If empty, any existing value will be removed.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetDeleteDaysAfterLastModificationActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetDeleteDaysAfterLastModificationActionBuilder.php index 7a08c56f24c..30c4f35a1e5 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetDeleteDaysAfterLastModificationActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetDeleteDaysAfterLastModificationActionBuilder.php @@ -27,6 +27,8 @@ final class MyShoppingListSetDeleteDaysAfterLastModificationActionBuilder implem private $deleteDaysAfterLastModification; /** + *

Value to set. If empty, any existing value will be removed.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetDeleteDaysAfterLastModificationActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetDeleteDaysAfterLastModificationActionModel.php index f035245077e..ad194cbb8a1 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetDeleteDaysAfterLastModificationActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetDeleteDaysAfterLastModificationActionModel.php @@ -63,6 +63,8 @@ public function getAction() } /** + *

Value to set. If empty, any existing value will be removed.

+ * * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetDescriptionAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetDescriptionAction.php index e094bfaf19e..a93a656aae7 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetDescriptionAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetDescriptionAction.php @@ -17,7 +17,7 @@ interface MyShoppingListSetDescriptionAction extends MyShoppingListUpdateAction public const FIELD_DESCRIPTION = 'description'; /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Value to set. If empty, any existing value will be removed.

* * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetDescriptionActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetDescriptionActionBuilder.php index 13bdf8c04ec..9e445ed7e5e 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetDescriptionActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetDescriptionActionBuilder.php @@ -29,7 +29,7 @@ final class MyShoppingListSetDescriptionActionBuilder implements Builder private $description; /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Value to set. If empty, any existing value will be removed.

* * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetDescriptionActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetDescriptionActionModel.php index bfdc7436067..32b3d3fad92 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetDescriptionActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetDescriptionActionModel.php @@ -65,7 +65,7 @@ public function getAction() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Value to set. If empty, any existing value will be removed.

* * * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldAction.php index 036f19e67c5..f276bbd817e 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldAction.php @@ -18,6 +18,8 @@ interface MyShoppingListSetLineItemCustomFieldAction extends MyShoppingListUpdat public const FIELD_VALUE = 'value'; /** + *

Unique identifier of an existing ShoppingListLineItem in the ShoppingList.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionBuilder.php index 49724bb023d..45593ffac6d 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionBuilder.php @@ -39,6 +39,8 @@ final class MyShoppingListSetLineItemCustomFieldActionBuilder implements Builder private $value; /** + *

Unique identifier of an existing ShoppingListLineItem in the ShoppingList.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionModel.php index 90d4eeb50f8..5a67607a971 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomFieldActionModel.php @@ -79,6 +79,8 @@ public function getAction() } /** + *

Unique identifier of an existing ShoppingListLineItem in the ShoppingList.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomTypeAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomTypeAction.php index defca6b1a5f..1d4cc3d973d 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomTypeAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomTypeAction.php @@ -20,14 +20,16 @@ interface MyShoppingListSetLineItemCustomTypeAction extends MyShoppingListUpdate public const FIELD_FIELDS = 'fields'; /** + *

Unique identifier of an existing ShoppingListLineItem in the ShoppingList.

+ * * @return null|string */ public function getLineItemId(); /** - *

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 ShoppingListLineItem with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the ShoppingListLineItem.

* * @return null|TypeResourceIdentifier @@ -35,7 +37,7 @@ public function getLineItemId(); public function getType(); /** - *

Sets the Custom Fields fields for the LineItem.

+ *

Sets the Custom Fields fields for the ShoppingListLineItem.

* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomTypeActionBuilder.php index ee1da5bceb7..7cc3dc3249c 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomTypeActionBuilder.php @@ -43,6 +43,8 @@ final class MyShoppingListSetLineItemCustomTypeActionBuilder implements Builder private $fields; /** + *

Unique identifier of an existing ShoppingListLineItem in the ShoppingList.

+ * * @return null|string */ @@ -52,8 +54,8 @@ public function getLineItemId() } /** - *

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 ShoppingListLineItem with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the ShoppingListLineItem.

* * @return null|TypeResourceIdentifier @@ -64,7 +66,7 @@ public function getType() } /** - *

Sets the Custom Fields fields for the LineItem.

+ *

Sets the Custom Fields fields for the ShoppingListLineItem.

* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomTypeActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomTypeActionModel.php index 75375d6b9b1..bfb6dfb809e 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetLineItemCustomTypeActionModel.php @@ -83,6 +83,8 @@ public function getAction() } /** + *

Unique identifier of an existing ShoppingListLineItem in the ShoppingList.

+ * * * @return null|string */ @@ -101,8 +103,8 @@ public function getLineItemId() } /** - *

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 ShoppingListLineItem with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the ShoppingListLineItem.

* * * @return null|TypeResourceIdentifier @@ -123,7 +125,7 @@ public function getType() } /** - *

Sets the Custom Fields fields for the LineItem.

+ *

Sets the Custom Fields fields for the ShoppingListLineItem.

* * * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldAction.php index cf44aea3fed..36cd871083e 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldAction.php @@ -18,6 +18,8 @@ interface MyShoppingListSetTextLineItemCustomFieldAction extends MyShoppingListU public const FIELD_VALUE = 'value'; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionBuilder.php index 55fd3356084..6acd6c920a3 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionBuilder.php @@ -39,6 +39,8 @@ final class MyShoppingListSetTextLineItemCustomFieldActionBuilder implements Bui private $value; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionModel.php index 7dfda9c3063..ba1fff0bd46 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomFieldActionModel.php @@ -79,6 +79,8 @@ public function getAction() } /** + *

The id of the TextLineItem to update.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeAction.php index 26d50bf2cf8..81201fdbd4b 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeAction.php @@ -20,6 +20,8 @@ interface MyShoppingListSetTextLineItemCustomTypeAction extends MyShoppingListUp public const FIELD_FIELDS = 'fields'; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeActionBuilder.php index 499f70b280a..1207bf0530e 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeActionBuilder.php @@ -43,6 +43,8 @@ final class MyShoppingListSetTextLineItemCustomTypeActionBuilder implements Buil private $fields; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeActionModel.php index 21cd5dbc0f4..ab8efdbc003 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemCustomTypeActionModel.php @@ -83,6 +83,8 @@ public function getAction() } /** + *

The id of the TextLineItem to update.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionAction.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionAction.php index 1cb9455571a..61a9468220e 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionAction.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionAction.php @@ -18,13 +18,15 @@ interface MyShoppingListSetTextLineItemDescriptionAction extends MyShoppingListU public const FIELD_DESCRIPTION = 'description'; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ public function getTextLineItemId(); /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Value to set. If empty, any existing value will be removed.

* * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionActionBuilder.php index ed4101bbe7c..346b5c94083 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionActionBuilder.php @@ -35,6 +35,8 @@ final class MyShoppingListSetTextLineItemDescriptionActionBuilder implements Bui private $description; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ @@ -44,7 +46,7 @@ public function getTextLineItemId() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Value to set. If empty, any existing value will be removed.

* * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionActionModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionActionModel.php index 2c5baefaef6..cb219db368f 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListSetTextLineItemDescriptionActionModel.php @@ -73,6 +73,8 @@ public function getAction() } /** + *

The id of the TextLineItem to update.

+ * * * @return null|string */ @@ -91,7 +93,7 @@ public function getTextLineItemId() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Value to set. If empty, any existing value will be removed.

* * * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListUpdate.php b/lib/commercetools-api/src/Models/Me/MyShoppingListUpdate.php index ae58ea51a40..43a2bbe8b21 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListUpdate.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListUpdate.php @@ -17,12 +17,16 @@ interface MyShoppingListUpdate extends JsonObject public const FIELD_ACTIONS = 'actions'; /** + *

Expected version of the ShoppingList 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(); /** + *

List of update actions to be performed on the ShoppingList.

+ * * @return null|MyShoppingListUpdateActionCollection */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListUpdateBuilder.php b/lib/commercetools-api/src/Models/Me/MyShoppingListUpdateBuilder.php index 858bef0eedd..2711fd4c8ec 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListUpdateBuilder.php @@ -33,6 +33,8 @@ final class MyShoppingListUpdateBuilder implements Builder private $actions; /** + *

Expected version of the ShoppingList 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 */ @@ -42,6 +44,8 @@ public function getVersion() } /** + *

List of update actions to be performed on the ShoppingList.

+ * * @return null|MyShoppingListUpdateActionCollection */ diff --git a/lib/commercetools-api/src/Models/Me/MyShoppingListUpdateModel.php b/lib/commercetools-api/src/Models/Me/MyShoppingListUpdateModel.php index ac99836e5d7..847124aa287 100644 --- a/lib/commercetools-api/src/Models/Me/MyShoppingListUpdateModel.php +++ b/lib/commercetools-api/src/Models/Me/MyShoppingListUpdateModel.php @@ -44,6 +44,8 @@ public function __construct( } /** + *

Expected version of the ShoppingList 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 */ @@ -62,6 +64,8 @@ public function getVersion() } /** + *

List of update actions to be performed on the ShoppingList.

+ * * * @return null|MyShoppingListUpdateActionCollection */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingList.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingList.php index 8e1dd7a6441..c08be0bd288 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingList.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingList.php @@ -21,19 +21,19 @@ interface ShoppingList extends BaseResource { - public const FIELD_LAST_MODIFIED_BY = 'lastModifiedBy'; - public const FIELD_CREATED_BY = 'createdBy'; - public const FIELD_CUSTOM = 'custom'; + public const FIELD_NAME = 'name'; + public const FIELD_KEY = 'key'; public const FIELD_CUSTOMER = 'customer'; - public const FIELD_DELETE_DAYS_AFTER_LAST_MODIFICATION = 'deleteDaysAfterLastModification'; + public const FIELD_SLUG = 'slug'; public const FIELD_DESCRIPTION = 'description'; - public const FIELD_KEY = 'key'; public const FIELD_LINE_ITEMS = 'lineItems'; - public const FIELD_NAME = 'name'; - public const FIELD_SLUG = 'slug'; public const FIELD_TEXT_LINE_ITEMS = 'textLineItems'; + public const FIELD_DELETE_DAYS_AFTER_LAST_MODIFICATION = 'deleteDaysAfterLastModification'; public const FIELD_ANONYMOUS_ID = 'anonymousId'; public const FIELD_STORE = 'store'; + public const FIELD_CUSTOM = 'custom'; + public const FIELD_LAST_MODIFIED_BY = 'lastModifiedBy'; + public const FIELD_CREATED_BY = 'createdBy'; /** *

Unique identifier of the ShoppingList.

@@ -44,7 +44,7 @@ interface ShoppingList extends BaseResource public function getId(); /** - *

The current version of the shopping list.

+ *

Current version of the ShoppingList.

* * @return null|int @@ -52,108 +52,126 @@ public function getId(); public function getVersion(); /** + *

Name of the ShoppingList.

+ * - * @return null|DateTimeImmutable + * @return null|LocalizedString */ - public function getCreatedAt(); + public function getName(); /** + *

User-defined unique identifier of the ShoppingList.

+ * - * @return null|DateTimeImmutable + * @return null|string */ - public function getLastModifiedAt(); + public function getKey(); /** - *

Present on resources created after 1 February 2019 except for events not tracked.

+ *

Reference to a Customer associated with the ShoppingList.

* - * @return null|LastModifiedBy + * @return null|CustomerReference */ - public function getLastModifiedBy(); + public function getCustomer(); /** - *

Present on resources created after 1 February 2019 except for events not tracked.

+ *

Human-readable identifiers usually used as deep-link URL to the related ShoppingList. + * Each slug is unique across a Project, but a ShoppingList can have the same slug for different languages. + * The slug must match the pattern [a-zA-Z0-9_-]{2,256}. For good performance, indexes are provided for the first 15 languages set on the Project.

* - * @return null|CreatedBy + * @return null|LocalizedString */ - public function getCreatedBy(); + public function getSlug(); /** + *

Description of the ShoppingList.

+ * - * @return null|CustomFields + * @return null|LocalizedString */ - public function getCustom(); + public function getDescription(); /** + *

Line Items (containing Products) of the ShoppingList.

+ * - * @return null|CustomerReference + * @return null|ShoppingListLineItemCollection */ - public function getCustomer(); + public function getLineItems(); /** - *

The shopping list will be deleted automatically if it hasn't been modified for the specified amount of days.

+ *

Line Items (containing text values) of the ShoppingList.

* - * @return null|int + * @return null|TextLineItemCollection */ - public function getDeleteDaysAfterLastModification(); + public function getTextLineItems(); /** + *

Number of days after which the ShoppingList will be automatically deleted if it has not been modified.

+ * - * @return null|LocalizedString + * @return null|int */ - public function getDescription(); + public function getDeleteDaysAfterLastModification(); /** - *

User-defined unique identifier of the ShoppingList.

+ *

Identifies ShoppingLists belonging to an anonymous session.

* * @return null|string */ - public function getKey(); + public function getAnonymousId(); /** + *

Store to which the ShoppingList is assigned.

+ * - * @return null|ShoppingListLineItemCollection + * @return null|StoreKeyReference */ - public function getLineItems(); + public function getStore(); /** + *

Custom Fields defined for the ShoppingList.

+ * - * @return null|LocalizedString + * @return null|CustomFields */ - public function getName(); + public function getCustom(); /** - *

Human-readable identifiers usually used as deep-link URL to the related shopping list. - * Each slug is unique across a project, but a shopping list can have the same slug for different languages. - * The slug must match the pattern [a-zA-Z0-9_-]{2,256}.

+ *

Date and time (UTC) the ShoppingList was initially created.

* - * @return null|LocalizedString + * @return null|DateTimeImmutable */ - public function getSlug(); + public function getCreatedAt(); /** + *

Date and time (UTC) the ShoppingList was last updated.

+ * - * @return null|TextLineItemCollection + * @return null|DateTimeImmutable */ - public function getTextLineItems(); + public function getLastModifiedAt(); /** - *

Identifies shopping lists belonging to an anonymous session (the customer has not signed up/in yet).

+ *

Present on resources created after 1 February 2019 except for events not tracked.

* - * @return null|string + * @return null|LastModifiedBy */ - public function getAnonymousId(); + public function getLastModifiedBy(); /** + *

Present on resources created after 1 February 2019 except for events not tracked.

+ * - * @return null|StoreKeyReference + * @return null|CreatedBy */ - public function getStore(); + public function getCreatedBy(); /** * @param ?string $id @@ -166,77 +184,77 @@ public function setId(?string $id): void; public function setVersion(?int $version): void; /** - * @param ?DateTimeImmutable $createdAt + * @param ?LocalizedString $name */ - public function setCreatedAt(?DateTimeImmutable $createdAt): void; + public function setName(?LocalizedString $name): void; /** - * @param ?DateTimeImmutable $lastModifiedAt + * @param ?string $key */ - public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void; + public function setKey(?string $key): void; /** - * @param ?LastModifiedBy $lastModifiedBy + * @param ?CustomerReference $customer */ - public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void; + public function setCustomer(?CustomerReference $customer): void; /** - * @param ?CreatedBy $createdBy + * @param ?LocalizedString $slug */ - public function setCreatedBy(?CreatedBy $createdBy): void; + public function setSlug(?LocalizedString $slug): void; /** - * @param ?CustomFields $custom + * @param ?LocalizedString $description */ - public function setCustom(?CustomFields $custom): void; + public function setDescription(?LocalizedString $description): void; /** - * @param ?CustomerReference $customer + * @param ?ShoppingListLineItemCollection $lineItems */ - public function setCustomer(?CustomerReference $customer): void; + public function setLineItems(?ShoppingListLineItemCollection $lineItems): void; /** - * @param ?int $deleteDaysAfterLastModification + * @param ?TextLineItemCollection $textLineItems */ - public function setDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification): void; + public function setTextLineItems(?TextLineItemCollection $textLineItems): void; /** - * @param ?LocalizedString $description + * @param ?int $deleteDaysAfterLastModification */ - public function setDescription(?LocalizedString $description): void; + public function setDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification): void; /** - * @param ?string $key + * @param ?string $anonymousId */ - public function setKey(?string $key): void; + public function setAnonymousId(?string $anonymousId): void; /** - * @param ?ShoppingListLineItemCollection $lineItems + * @param ?StoreKeyReference $store */ - public function setLineItems(?ShoppingListLineItemCollection $lineItems): void; + public function setStore(?StoreKeyReference $store): void; /** - * @param ?LocalizedString $name + * @param ?CustomFields $custom */ - public function setName(?LocalizedString $name): void; + public function setCustom(?CustomFields $custom): void; /** - * @param ?LocalizedString $slug + * @param ?DateTimeImmutable $createdAt */ - public function setSlug(?LocalizedString $slug): void; + public function setCreatedAt(?DateTimeImmutable $createdAt): void; /** - * @param ?TextLineItemCollection $textLineItems + * @param ?DateTimeImmutable $lastModifiedAt */ - public function setTextLineItems(?TextLineItemCollection $textLineItems): void; + public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void; /** - * @param ?string $anonymousId + * @param ?LastModifiedBy $lastModifiedBy */ - public function setAnonymousId(?string $anonymousId): void; + public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void; /** - * @param ?StoreKeyReference $store + * @param ?CreatedBy $createdBy */ - public function setStore(?StoreKeyReference $store): void; + public function setCreatedBy(?CreatedBy $createdBy): void; } diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddLineItemAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddLineItemAction.php index 5fa996fba07..23271440d7e 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddLineItemAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddLineItemAction.php @@ -23,37 +23,47 @@ interface ShoppingListAddLineItemAction extends ShoppingListUpdateAction public const FIELD_CUSTOM = 'custom'; /** + *

sku of the ProductVariant.

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

Unique identifier of a Product.

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

id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

+ * * @return null|int */ public function getVariantId(); /** + *

Number of Products in the ShoppingListLineItem.

+ * * @return null|int */ public function getQuantity(); /** + *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ * * @return null|DateTimeImmutable */ public function getAddedAt(); /** - *

The representation used when creating or updating a customizable data type with Custom Fields.

+ *

Custom Fields defined for the ShoppingListLineItem.

* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddLineItemActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddLineItemActionBuilder.php index 799a807a86c..adc07d10a8e 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddLineItemActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddLineItemActionBuilder.php @@ -60,6 +60,8 @@ final class ShoppingListAddLineItemActionBuilder implements Builder private $custom; /** + *

sku of the ProductVariant.

+ * * @return null|string */ @@ -69,6 +71,8 @@ public function getSku() } /** + *

Unique identifier of a Product.

+ * * @return null|string */ @@ -78,6 +82,8 @@ public function getProductId() } /** + *

id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

+ * * @return null|int */ @@ -87,6 +93,8 @@ public function getVariantId() } /** + *

Number of Products in the ShoppingListLineItem.

+ * * @return null|int */ @@ -96,6 +104,8 @@ public function getQuantity() } /** + *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ * * @return null|DateTimeImmutable */ @@ -105,7 +115,7 @@ public function getAddedAt() } /** - *

The representation used when creating or updating a customizable data type with Custom Fields.

+ *

Custom Fields defined for the ShoppingListLineItem.

* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddLineItemActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddLineItemActionModel.php index 24ab86569f9..923a2b8a3e5 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddLineItemActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddLineItemActionModel.php @@ -106,6 +106,8 @@ public function getAction() } /** + *

sku of the ProductVariant.

+ * * * @return null|string */ @@ -124,6 +126,8 @@ public function getSku() } /** + *

Unique identifier of a Product.

+ * * * @return null|string */ @@ -142,6 +146,8 @@ public function getProductId() } /** + *

id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

+ * * * @return null|int */ @@ -160,6 +166,8 @@ public function getVariantId() } /** + *

Number of Products in the ShoppingListLineItem.

+ * * * @return null|int */ @@ -178,6 +186,8 @@ public function getQuantity() } /** + *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ * * * @return null|DateTimeImmutable */ @@ -200,7 +210,7 @@ public function getAddedAt() } /** - *

The representation used when creating or updating a customizable data type with Custom Fields.

+ *

Custom Fields defined for the ShoppingListLineItem.

* * * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddTextLineItemAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddTextLineItemAction.php index ffcd59e96cd..cb049ae8aa2 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddTextLineItemAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddTextLineItemAction.php @@ -23,7 +23,7 @@ interface ShoppingListAddTextLineItemAction extends ShoppingListUpdateAction public const FIELD_CUSTOM = 'custom'; /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Name of the TextLineItem.

* * @return null|LocalizedString @@ -31,7 +31,7 @@ interface ShoppingListAddTextLineItemAction extends ShoppingListUpdateAction public function getName(); /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Description of the TextLineItem.

* * @return null|LocalizedString @@ -39,19 +39,23 @@ public function getName(); public function getDescription(); /** + *

Number of entries in the TextLineItem.

+ * * @return null|int */ public function getQuantity(); /** + *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ * * @return null|DateTimeImmutable */ public function getAddedAt(); /** - *

The representation used when creating or updating a customizable data type with Custom Fields.

+ *

Custom Fields defined for the TextLineItem.

* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddTextLineItemActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddTextLineItemActionBuilder.php index 2c8d25833d2..989095a5e1c 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddTextLineItemActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddTextLineItemActionBuilder.php @@ -56,7 +56,7 @@ final class ShoppingListAddTextLineItemActionBuilder implements Builder private $custom; /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Name of the TextLineItem.

* * @return null|LocalizedString @@ -67,7 +67,7 @@ public function getName() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Description of the TextLineItem.

* * @return null|LocalizedString @@ -78,6 +78,8 @@ public function getDescription() } /** + *

Number of entries in the TextLineItem.

+ * * @return null|int */ @@ -87,6 +89,8 @@ public function getQuantity() } /** + *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ * * @return null|DateTimeImmutable */ @@ -96,7 +100,7 @@ public function getAddedAt() } /** - *

The representation used when creating or updating a customizable data type with Custom Fields.

+ *

Custom Fields defined for the TextLineItem.

* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddTextLineItemActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddTextLineItemActionModel.php index 1d5e9973da0..f0717f1364b 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddTextLineItemActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListAddTextLineItemActionModel.php @@ -100,7 +100,7 @@ public function getAction() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Name of the TextLineItem.

* * * @return null|LocalizedString @@ -121,7 +121,7 @@ public function getName() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Description of the TextLineItem.

* * * @return null|LocalizedString @@ -142,6 +142,8 @@ public function getDescription() } /** + *

Number of entries in the TextLineItem.

+ * * * @return null|int */ @@ -160,6 +162,8 @@ public function getQuantity() } /** + *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ * * * @return null|DateTimeImmutable */ @@ -182,7 +186,7 @@ public function getAddedAt() } /** - *

The representation used when creating or updating a customizable data type with Custom Fields.

+ *

Custom Fields defined for the TextLineItem.

* * * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListBuilder.php index 49fafc54399..b5a9d89dd25 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListBuilder.php @@ -61,21 +61,15 @@ final class ShoppingListBuilder implements Builder /** - * @var null|LastModifiedBy|LastModifiedByBuilder - */ - private $lastModifiedBy; - - /** - - * @var null|CreatedBy|CreatedByBuilder + * @var null|LocalizedString|LocalizedStringBuilder */ - private $createdBy; + private $name; /** - * @var null|CustomFields|CustomFieldsBuilder + * @var ?string */ - private $custom; + private $key; /** @@ -85,9 +79,9 @@ final class ShoppingListBuilder implements Builder /** - * @var ?int + * @var null|LocalizedString|LocalizedStringBuilder */ - private $deleteDaysAfterLastModification; + private $slug; /** @@ -97,45 +91,51 @@ final class ShoppingListBuilder implements Builder /** - * @var ?string + * @var ?ShoppingListLineItemCollection */ - private $key; + private $lineItems; /** - * @var ?ShoppingListLineItemCollection + * @var ?TextLineItemCollection */ - private $lineItems; + private $textLineItems; /** - * @var null|LocalizedString|LocalizedStringBuilder + * @var ?int */ - private $name; + private $deleteDaysAfterLastModification; /** - * @var null|LocalizedString|LocalizedStringBuilder + * @var ?string */ - private $slug; + private $anonymousId; /** - * @var ?TextLineItemCollection + * @var null|StoreKeyReference|StoreKeyReferenceBuilder */ - private $textLineItems; + private $store; /** - * @var ?string + * @var null|CustomFields|CustomFieldsBuilder */ - private $anonymousId; + private $custom; /** - * @var null|StoreKeyReference|StoreKeyReferenceBuilder + * @var null|LastModifiedBy|LastModifiedByBuilder */ - private $store; + private $lastModifiedBy; + + /** + + * @var null|CreatedBy|CreatedByBuilder + */ + private $createdBy; /** *

Unique identifier of the ShoppingList.

@@ -149,7 +149,7 @@ public function getId() } /** - *

The current version of the shopping list.

+ *

Current version of the ShoppingList.

* * @return null|int @@ -160,6 +160,8 @@ public function getVersion() } /** + *

Date and time (UTC) the ShoppingList was initially created.

+ * * @return null|DateTimeImmutable */ @@ -169,6 +171,8 @@ public function getCreatedAt() } /** + *

Date and time (UTC) the ShoppingList was last updated.

+ * * @return null|DateTimeImmutable */ @@ -178,37 +182,30 @@ public function getLastModifiedAt() } /** - *

Present on resources created after 1 February 2019 except for events not tracked.

+ *

Name of the ShoppingList.

* - * @return null|LastModifiedBy + * @return null|LocalizedString */ - public function getLastModifiedBy() + public function getName() { - return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy; + return $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name; } /** - *

Present on resources created after 1 February 2019 except for events not tracked.

+ *

User-defined unique identifier of the ShoppingList.

* - * @return null|CreatedBy - */ - public function getCreatedBy() - { - return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy; - } - - /** - - * @return null|CustomFields + * @return null|string */ - public function getCustom() + public function getKey() { - return $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom; + return $this->key; } /** + *

Reference to a Customer associated with the ShoppingList.

+ * * @return null|CustomerReference */ @@ -218,17 +215,21 @@ public function getCustomer() } /** - *

The shopping list will be deleted automatically if it hasn't been modified for the specified amount of days.

+ *

Human-readable identifiers usually used as deep-link URL to the related ShoppingList. + * Each slug is unique across a Project, but a ShoppingList can have the same slug for different languages. + * The slug must match the pattern [a-zA-Z0-9_-]{2,256}. For good performance, indexes are provided for the first 15 languages set on the Project.

* - * @return null|int + * @return null|LocalizedString */ - public function getDeleteDaysAfterLastModification() + public function getSlug() { - return $this->deleteDaysAfterLastModification; + return $this->slug instanceof LocalizedStringBuilder ? $this->slug->build() : $this->slug; } /** + *

Description of the ShoppingList.

+ * * @return null|LocalizedString */ @@ -238,74 +239,91 @@ public function getDescription() } /** - *

User-defined unique identifier of the ShoppingList.

+ *

Line Items (containing Products) of the ShoppingList.

* - * @return null|string + * @return null|ShoppingListLineItemCollection */ - public function getKey() + public function getLineItems() { - return $this->key; + return $this->lineItems; } /** + *

Line Items (containing text values) of the ShoppingList.

+ * - * @return null|ShoppingListLineItemCollection + * @return null|TextLineItemCollection */ - public function getLineItems() + public function getTextLineItems() { - return $this->lineItems; + return $this->textLineItems; } /** + *

Number of days after which the ShoppingList will be automatically deleted if it has not been modified.

+ * - * @return null|LocalizedString + * @return null|int */ - public function getName() + public function getDeleteDaysAfterLastModification() { - return $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name; + return $this->deleteDaysAfterLastModification; } /** - *

Human-readable identifiers usually used as deep-link URL to the related shopping list. - * Each slug is unique across a project, but a shopping list can have the same slug for different languages. - * The slug must match the pattern [a-zA-Z0-9_-]{2,256}.

+ *

Identifies ShoppingLists belonging to an anonymous session.

* - * @return null|LocalizedString + * @return null|string */ - public function getSlug() + public function getAnonymousId() { - return $this->slug instanceof LocalizedStringBuilder ? $this->slug->build() : $this->slug; + return $this->anonymousId; } /** + *

Store to which the ShoppingList is assigned.

+ * - * @return null|TextLineItemCollection + * @return null|StoreKeyReference */ - public function getTextLineItems() + public function getStore() { - return $this->textLineItems; + return $this->store instanceof StoreKeyReferenceBuilder ? $this->store->build() : $this->store; } /** - *

Identifies shopping lists belonging to an anonymous session (the customer has not signed up/in yet).

+ *

Custom Fields defined for the ShoppingList.

* - * @return null|string + * @return null|CustomFields */ - public function getAnonymousId() + public function getCustom() { - return $this->anonymousId; + return $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom; } /** + *

Present on resources created after 1 February 2019 except for events not tracked.

+ * - * @return null|StoreKeyReference + * @return null|LastModifiedBy */ - public function getStore() + public function getLastModifiedBy() { - return $this->store instanceof StoreKeyReferenceBuilder ? $this->store->build() : $this->store; + 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; } /** @@ -353,34 +371,23 @@ public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt) } /** - * @param ?LastModifiedBy $lastModifiedBy - * @return $this - */ - public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) - { - $this->lastModifiedBy = $lastModifiedBy; - - return $this; - } - - /** - * @param ?CreatedBy $createdBy + * @param ?LocalizedString $name * @return $this */ - public function withCreatedBy(?CreatedBy $createdBy) + public function withName(?LocalizedString $name) { - $this->createdBy = $createdBy; + $this->name = $name; return $this; } /** - * @param ?CustomFields $custom + * @param ?string $key * @return $this */ - public function withCustom(?CustomFields $custom) + public function withKey(?string $key) { - $this->custom = $custom; + $this->key = $key; return $this; } @@ -397,12 +404,12 @@ public function withCustomer(?CustomerReference $customer) } /** - * @param ?int $deleteDaysAfterLastModification + * @param ?LocalizedString $slug * @return $this */ - public function withDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification) + public function withSlug(?LocalizedString $slug) { - $this->deleteDaysAfterLastModification = $deleteDaysAfterLastModification; + $this->slug = $slug; return $this; } @@ -418,17 +425,6 @@ public function withDescription(?LocalizedString $description) return $this; } - /** - * @param ?string $key - * @return $this - */ - public function withKey(?string $key) - { - $this->key = $key; - - return $this; - } - /** * @param ?ShoppingListLineItemCollection $lineItems * @return $this @@ -441,65 +437,65 @@ public function withLineItems(?ShoppingListLineItemCollection $lineItems) } /** - * @param ?LocalizedString $name + * @param ?TextLineItemCollection $textLineItems * @return $this */ - public function withName(?LocalizedString $name) + public function withTextLineItems(?TextLineItemCollection $textLineItems) { - $this->name = $name; + $this->textLineItems = $textLineItems; return $this; } /** - * @param ?LocalizedString $slug + * @param ?int $deleteDaysAfterLastModification * @return $this */ - public function withSlug(?LocalizedString $slug) + public function withDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification) { - $this->slug = $slug; + $this->deleteDaysAfterLastModification = $deleteDaysAfterLastModification; return $this; } /** - * @param ?TextLineItemCollection $textLineItems + * @param ?string $anonymousId * @return $this */ - public function withTextLineItems(?TextLineItemCollection $textLineItems) + public function withAnonymousId(?string $anonymousId) { - $this->textLineItems = $textLineItems; + $this->anonymousId = $anonymousId; return $this; } /** - * @param ?string $anonymousId + * @param ?StoreKeyReference $store * @return $this */ - public function withAnonymousId(?string $anonymousId) + public function withStore(?StoreKeyReference $store) { - $this->anonymousId = $anonymousId; + $this->store = $store; return $this; } /** - * @param ?StoreKeyReference $store + * @param ?CustomFields $custom * @return $this */ - public function withStore(?StoreKeyReference $store) + public function withCustom(?CustomFields $custom) { - $this->store = $store; + $this->custom = $custom; return $this; } /** - * @deprecated use withLastModifiedBy() instead + * @param ?LastModifiedBy $lastModifiedBy * @return $this */ - public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) + public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy) { $this->lastModifiedBy = $lastModifiedBy; @@ -507,10 +503,10 @@ 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; @@ -518,12 +514,12 @@ public function withCreatedByBuilder(?CreatedByBuilder $createdBy) } /** - * @deprecated use withCustom() instead + * @deprecated use withName() instead * @return $this */ - public function withCustomBuilder(?CustomFieldsBuilder $custom) + public function withNameBuilder(?LocalizedStringBuilder $name) { - $this->custom = $custom; + $this->name = $name; return $this; } @@ -539,6 +535,17 @@ public function withCustomerBuilder(?CustomerReferenceBuilder $customer) return $this; } + /** + * @deprecated use withSlug() instead + * @return $this + */ + public function withSlugBuilder(?LocalizedStringBuilder $slug) + { + $this->slug = $slug; + + return $this; + } + /** * @deprecated use withDescription() instead * @return $this @@ -551,34 +558,45 @@ public function withDescriptionBuilder(?LocalizedStringBuilder $description) } /** - * @deprecated use withName() instead + * @deprecated use withStore() instead * @return $this */ - public function withNameBuilder(?LocalizedStringBuilder $name) + public function withStoreBuilder(?StoreKeyReferenceBuilder $store) { - $this->name = $name; + $this->store = $store; return $this; } /** - * @deprecated use withSlug() instead + * @deprecated use withCustom() instead * @return $this */ - public function withSlugBuilder(?LocalizedStringBuilder $slug) + public function withCustomBuilder(?CustomFieldsBuilder $custom) { - $this->slug = $slug; + $this->custom = $custom; return $this; } /** - * @deprecated use withStore() instead + * @deprecated use withLastModifiedBy() instead * @return $this */ - public function withStoreBuilder(?StoreKeyReferenceBuilder $store) + public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy) { - $this->store = $store; + $this->lastModifiedBy = $lastModifiedBy; + + return $this; + } + + /** + * @deprecated use withCreatedBy() instead + * @return $this + */ + public function withCreatedByBuilder(?CreatedByBuilder $createdBy) + { + $this->createdBy = $createdBy; return $this; } @@ -590,19 +608,19 @@ public function build(): ShoppingList $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->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom, + $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name, + $this->key, $this->customer instanceof CustomerReferenceBuilder ? $this->customer->build() : $this->customer, - $this->deleteDaysAfterLastModification, + $this->slug instanceof LocalizedStringBuilder ? $this->slug->build() : $this->slug, $this->description instanceof LocalizedStringBuilder ? $this->description->build() : $this->description, - $this->key, $this->lineItems, - $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name, - $this->slug instanceof LocalizedStringBuilder ? $this->slug->build() : $this->slug, $this->textLineItems, + $this->deleteDaysAfterLastModification, $this->anonymousId, - $this->store instanceof StoreKeyReferenceBuilder ? $this->store->build() : $this->store + $this->store instanceof StoreKeyReferenceBuilder ? $this->store->build() : $this->store, + $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/ShoppingList/ShoppingListChangeLineItemQuantityAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemQuantityAction.php index 0fd82cc9d3e..5f000f3d759 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemQuantityAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemQuantityAction.php @@ -17,12 +17,16 @@ interface ShoppingListChangeLineItemQuantityAction extends ShoppingListUpdateAct public const FIELD_QUANTITY = 'quantity'; /** + *

The id of the ShoppingListLineItem to update.

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

New value to set. If 0, the ShoppingListLineItem is removed from the ShoppingList.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemQuantityActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemQuantityActionBuilder.php index 14045814176..814ab102ba9 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemQuantityActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemQuantityActionBuilder.php @@ -33,6 +33,8 @@ final class ShoppingListChangeLineItemQuantityActionBuilder implements Builder private $quantity; /** + *

The id of the ShoppingListLineItem to update.

+ * * @return null|string */ @@ -42,6 +44,8 @@ public function getLineItemId() } /** + *

New value to set. If 0, the ShoppingListLineItem is removed from the ShoppingList.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemQuantityActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemQuantityActionModel.php index bdb8ae6f3ed..648a4f00763 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemQuantityActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemQuantityActionModel.php @@ -71,6 +71,8 @@ public function getAction() } /** + *

The id of the ShoppingListLineItem to update.

+ * * * @return null|string */ @@ -89,6 +91,8 @@ public function getLineItemId() } /** + *

New value to set. If 0, the ShoppingListLineItem is removed from the ShoppingList.

+ * * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemsOrderAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemsOrderAction.php index d945168dc77..1c091fecc20 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemsOrderAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemsOrderAction.php @@ -16,6 +16,8 @@ interface ShoppingListChangeLineItemsOrderAction extends ShoppingListUpdateActio public const FIELD_LINE_ITEM_ORDER = 'lineItemOrder'; /** + *

All existing ShoppingListLineItem ids in the desired new order.

+ * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemsOrderActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemsOrderActionBuilder.php index f5c54f5b45f..c25b498a6d1 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemsOrderActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemsOrderActionBuilder.php @@ -27,6 +27,8 @@ final class ShoppingListChangeLineItemsOrderActionBuilder implements Builder private $lineItemOrder; /** + *

All existing ShoppingListLineItem ids in the desired new order.

+ * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemsOrderActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemsOrderActionModel.php index 998ee14d44a..8024cae1584 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemsOrderActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeLineItemsOrderActionModel.php @@ -63,6 +63,8 @@ public function getAction() } /** + *

All existing ShoppingListLineItem ids in the desired new order.

+ * * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeNameAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeNameAction.php index 6a37905b2d7..def5792d101 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeNameAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeNameAction.php @@ -17,6 +17,8 @@ interface ShoppingListChangeNameAction extends ShoppingListUpdateAction public const FIELD_NAME = 'name'; /** + *

New value to set. Must not be empty.

+ * * @return null|LocalizedString */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeNameActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeNameActionBuilder.php index 70fe97154fd..7ad89183ece 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeNameActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeNameActionBuilder.php @@ -29,6 +29,8 @@ final class ShoppingListChangeNameActionBuilder implements Builder private $name; /** + *

New value to set. Must not be empty.

+ * * @return null|LocalizedString */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeNameActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeNameActionModel.php index e23c9b8d5e0..da0691bb586 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeNameActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeNameActionModel.php @@ -65,6 +65,8 @@ public function getAction() } /** + *

New value to set. Must not be empty.

+ * * * @return null|LocalizedString */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemNameAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemNameAction.php index d7741c266a3..aa0d9a11b6e 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemNameAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemNameAction.php @@ -18,13 +18,15 @@ interface ShoppingListChangeTextLineItemNameAction extends ShoppingListUpdateAct public const FIELD_NAME = 'name'; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ public function getTextLineItemId(); /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

New value to set. Must not be empty.

* * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemNameActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemNameActionBuilder.php index f2784a4e117..529a0702072 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemNameActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemNameActionBuilder.php @@ -35,6 +35,8 @@ final class ShoppingListChangeTextLineItemNameActionBuilder implements Builder private $name; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ @@ -44,7 +46,7 @@ public function getTextLineItemId() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

New value to set. Must not be empty.

* * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemNameActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemNameActionModel.php index e1b25729a75..2981c850aab 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemNameActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemNameActionModel.php @@ -73,6 +73,8 @@ public function getAction() } /** + *

The id of the TextLineItem to update.

+ * * * @return null|string */ @@ -91,7 +93,7 @@ public function getTextLineItemId() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

New value to set. Must not be empty.

* * * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemQuantityAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemQuantityAction.php index db831383584..0486230c8d1 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemQuantityAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemQuantityAction.php @@ -17,12 +17,16 @@ interface ShoppingListChangeTextLineItemQuantityAction extends ShoppingListUpdat public const FIELD_QUANTITY = 'quantity'; /** + *

The id of the TextLineItem to update.

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

New value to set. If 0, the TextLineItem is removed from the ShoppingList.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemQuantityActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemQuantityActionBuilder.php index c8a1d6a9f9e..b7f02d6e21c 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemQuantityActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemQuantityActionBuilder.php @@ -33,6 +33,8 @@ final class ShoppingListChangeTextLineItemQuantityActionBuilder implements Build private $quantity; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ @@ -42,6 +44,8 @@ public function getTextLineItemId() } /** + *

New value to set. If 0, the TextLineItem is removed from the ShoppingList.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemQuantityActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemQuantityActionModel.php index 4b087e373d7..19d5c3e637f 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemQuantityActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemQuantityActionModel.php @@ -71,6 +71,8 @@ public function getAction() } /** + *

The id of the TextLineItem to update.

+ * * * @return null|string */ @@ -89,6 +91,8 @@ public function getTextLineItemId() } /** + *

New value to set. If 0, the TextLineItem is removed from the ShoppingList.

+ * * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemsOrderAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemsOrderAction.php index 8e91d9fc91c..77504892125 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemsOrderAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemsOrderAction.php @@ -16,6 +16,8 @@ interface ShoppingListChangeTextLineItemsOrderAction extends ShoppingListUpdateA public const FIELD_TEXT_LINE_ITEM_ORDER = 'textLineItemOrder'; /** + *

Must contain all existing TextLineItem ids in the desired new order.

+ * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemsOrderActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemsOrderActionBuilder.php index 2cf2786c86d..5966eb33de9 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemsOrderActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemsOrderActionBuilder.php @@ -27,6 +27,8 @@ final class ShoppingListChangeTextLineItemsOrderActionBuilder implements Builder private $textLineItemOrder; /** + *

Must contain all existing TextLineItem ids in the desired new order.

+ * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemsOrderActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemsOrderActionModel.php index 96681fababc..fd88f743c96 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemsOrderActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListChangeTextLineItemsOrderActionModel.php @@ -63,6 +63,8 @@ public function getAction() } /** + *

Must contain all existing TextLineItem ids in the desired new order.

+ * * * @return null|array */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListDraft.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListDraft.php index 9ab7cb06f03..78f41c17c7b 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListDraft.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListDraft.php @@ -17,100 +17,117 @@ interface ShoppingListDraft extends JsonObject { - public const FIELD_CUSTOM = 'custom'; + public const FIELD_NAME = 'name'; + public const FIELD_SLUG = 'slug'; public const FIELD_CUSTOMER = 'customer'; - public const FIELD_DELETE_DAYS_AFTER_LAST_MODIFICATION = 'deleteDaysAfterLastModification'; - public const FIELD_DESCRIPTION = 'description'; public const FIELD_KEY = 'key'; + public const FIELD_DESCRIPTION = 'description'; + public const FIELD_ANONYMOUS_ID = 'anonymousId'; + public const FIELD_DELETE_DAYS_AFTER_LAST_MODIFICATION = 'deleteDaysAfterLastModification'; public const FIELD_LINE_ITEMS = 'lineItems'; - public const FIELD_NAME = 'name'; - public const FIELD_SLUG = 'slug'; public const FIELD_TEXT_LINE_ITEMS = 'textLineItems'; - public const FIELD_ANONYMOUS_ID = 'anonymousId'; public const FIELD_STORE = 'store'; + public const FIELD_CUSTOM = 'custom'; /** - *

The custom fields.

+ *

Name of the ShoppingList.

* - * @return null|CustomFieldsDraft + * @return null|LocalizedString */ - public function getCustom(); + public function getName(); + + /** + *

Human-readable identifiers usually used as deep-link URL to the related ShoppingList. + * Each slug is unique across a Project, but a ShoppingList can have the same slug for different languages. + * The slug must match the pattern [a-zA-Z0-9_-]{2,256}.

+ * + + * @return null|LocalizedString + */ + public function getSlug(); /** + *

The Customer the ShoppingList should be associated to.

+ * * @return null|CustomerResourceIdentifier */ public function getCustomer(); /** - *

The shopping list will be deleted automatically if it hasn't been modified for the specified amount of days.

+ *

User-defined unique identifier for the ShoppingList.

* - * @return null|int + * @return null|string */ - public function getDeleteDaysAfterLastModification(); + public function getKey(); /** + *

Description of the ShoppingList.

+ * * @return null|LocalizedString */ public function getDescription(); /** - *

User-defined unique identifier for the ShoppingList.

+ *

Identifies ShoppingLists belonging to an anonymous session.

* * @return null|string */ - public function getKey(); + public function getAnonymousId(); /** + *

Number of days after which the ShoppingList will be automatically deleted if it has not been modified. If not set, the default value configured in the Project is used.

+ * - * @return null|ShoppingListLineItemDraftCollection + * @return null|int */ - public function getLineItems(); + public function getDeleteDaysAfterLastModification(); /** + *

Line Items (containing Products) to add to the ShoppingList.

+ * - * @return null|LocalizedString + * @return null|ShoppingListLineItemDraftCollection */ - public function getName(); + public function getLineItems(); /** - *

Human-readable identifiers usually used as deep-link URL to the related shopping list. - * Each slug is unique across a project, but a shopping list can have the same slug for different languages. - * The slug must match the pattern [a-zA-Z0-9_-]{2,256}.

+ *

Line Items (containing text values) to add to the ShoppingList.

* - * @return null|LocalizedString + * @return null|TextLineItemDraftCollection */ - public function getSlug(); + public function getTextLineItems(); /** + *

Assigns the new ShoppingList to the Store.

+ * - * @return null|TextLineItemDraftCollection + * @return null|StoreResourceIdentifier */ - public function getTextLineItems(); + public function getStore(); /** - *

Identifies shopping lists belonging to an anonymous session (the customer has not signed up/in yet).

+ *

Custom Fields defined for the ShoppingList.

* - * @return null|string + * @return null|CustomFieldsDraft */ - public function getAnonymousId(); + public function getCustom(); /** - - * @return null|StoreResourceIdentifier + * @param ?LocalizedString $name */ - public function getStore(); + public function setName(?LocalizedString $name): void; /** - * @param ?CustomFieldsDraft $custom + * @param ?LocalizedString $slug */ - public function setCustom(?CustomFieldsDraft $custom): void; + public function setSlug(?LocalizedString $slug): void; /** * @param ?CustomerResourceIdentifier $customer @@ -118,9 +135,9 @@ public function setCustom(?CustomFieldsDraft $custom): void; public function setCustomer(?CustomerResourceIdentifier $customer): void; /** - * @param ?int $deleteDaysAfterLastModification + * @param ?string $key */ - public function setDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification): void; + public function setKey(?string $key): void; /** * @param ?LocalizedString $description @@ -128,24 +145,19 @@ public function setDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModi public function setDescription(?LocalizedString $description): void; /** - * @param ?string $key - */ - public function setKey(?string $key): void; - - /** - * @param ?ShoppingListLineItemDraftCollection $lineItems + * @param ?string $anonymousId */ - public function setLineItems(?ShoppingListLineItemDraftCollection $lineItems): void; + public function setAnonymousId(?string $anonymousId): void; /** - * @param ?LocalizedString $name + * @param ?int $deleteDaysAfterLastModification */ - public function setName(?LocalizedString $name): void; + public function setDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification): void; /** - * @param ?LocalizedString $slug + * @param ?ShoppingListLineItemDraftCollection $lineItems */ - public function setSlug(?LocalizedString $slug): void; + public function setLineItems(?ShoppingListLineItemDraftCollection $lineItems): void; /** * @param ?TextLineItemDraftCollection $textLineItems @@ -153,12 +165,12 @@ public function setSlug(?LocalizedString $slug): void; public function setTextLineItems(?TextLineItemDraftCollection $textLineItems): void; /** - * @param ?string $anonymousId + * @param ?StoreResourceIdentifier $store */ - public function setAnonymousId(?string $anonymousId): void; + public function setStore(?StoreResourceIdentifier $store): void; /** - * @param ?StoreResourceIdentifier $store + * @param ?CustomFieldsDraft $custom */ - public function setStore(?StoreResourceIdentifier $store): void; + public function setCustom(?CustomFieldsDraft $custom): void; } diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListDraftBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListDraftBuilder.php index 228e3086f59..36358b6e5b9 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListDraftBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListDraftBuilder.php @@ -30,9 +30,15 @@ final class ShoppingListDraftBuilder implements Builder { /** - * @var null|CustomFieldsDraft|CustomFieldsDraftBuilder + * @var null|LocalizedString|LocalizedStringBuilder */ - private $custom; + private $name; + + /** + + * @var null|LocalizedString|LocalizedStringBuilder + */ + private $slug; /** @@ -42,9 +48,9 @@ final class ShoppingListDraftBuilder implements Builder /** - * @var ?int + * @var ?string */ - private $deleteDaysAfterLastModification; + private $key; /** @@ -56,56 +62,65 @@ final class ShoppingListDraftBuilder implements Builder * @var ?string */ - private $key; + private $anonymousId; /** - * @var ?ShoppingListLineItemDraftCollection + * @var ?int */ - private $lineItems; + private $deleteDaysAfterLastModification; /** - * @var null|LocalizedString|LocalizedStringBuilder + * @var ?ShoppingListLineItemDraftCollection */ - private $name; + private $lineItems; /** - * @var null|LocalizedString|LocalizedStringBuilder + * @var ?TextLineItemDraftCollection */ - private $slug; + private $textLineItems; /** - * @var ?TextLineItemDraftCollection + * @var null|StoreResourceIdentifier|StoreResourceIdentifierBuilder */ - private $textLineItems; + private $store; /** - * @var ?string + * @var null|CustomFieldsDraft|CustomFieldsDraftBuilder */ - private $anonymousId; + private $custom; /** + *

Name of the ShoppingList.

+ * - * @var null|StoreResourceIdentifier|StoreResourceIdentifierBuilder + * @return null|LocalizedString */ - private $store; + public function getName() + { + return $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name; + } /** - *

The custom fields.

+ *

Human-readable identifiers usually used as deep-link URL to the related ShoppingList. + * Each slug is unique across a Project, but a ShoppingList can have the same slug for different languages. + * The slug must match the pattern [a-zA-Z0-9_-]{2,256}.

* - * @return null|CustomFieldsDraft + * @return null|LocalizedString */ - public function getCustom() + public function getSlug() { - return $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom; + return $this->slug instanceof LocalizedStringBuilder ? $this->slug->build() : $this->slug; } /** + *

The Customer the ShoppingList should be associated to.

+ * * @return null|CustomerResourceIdentifier */ @@ -115,17 +130,19 @@ public function getCustomer() } /** - *

The shopping list will be deleted automatically if it hasn't been modified for the specified amount of days.

+ *

User-defined unique identifier for the ShoppingList.

* - * @return null|int + * @return null|string */ - public function getDeleteDaysAfterLastModification() + public function getKey() { - return $this->deleteDaysAfterLastModification; + return $this->key; } /** + *

Description of the ShoppingList.

+ * * @return null|LocalizedString */ @@ -135,83 +152,89 @@ public function getDescription() } /** - *

User-defined unique identifier for the ShoppingList.

+ *

Identifies ShoppingLists belonging to an anonymous session.

* * @return null|string */ - public function getKey() + public function getAnonymousId() { - return $this->key; + return $this->anonymousId; } /** + *

Number of days after which the ShoppingList will be automatically deleted if it has not been modified. If not set, the default value configured in the Project is used.

+ * - * @return null|ShoppingListLineItemDraftCollection + * @return null|int */ - public function getLineItems() + public function getDeleteDaysAfterLastModification() { - return $this->lineItems; + return $this->deleteDaysAfterLastModification; } /** + *

Line Items (containing Products) to add to the ShoppingList.

+ * - * @return null|LocalizedString + * @return null|ShoppingListLineItemDraftCollection */ - public function getName() + public function getLineItems() { - return $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name; + return $this->lineItems; } /** - *

Human-readable identifiers usually used as deep-link URL to the related shopping list. - * Each slug is unique across a project, but a shopping list can have the same slug for different languages. - * The slug must match the pattern [a-zA-Z0-9_-]{2,256}.

+ *

Line Items (containing text values) to add to the ShoppingList.

* - * @return null|LocalizedString + * @return null|TextLineItemDraftCollection */ - public function getSlug() + public function getTextLineItems() { - return $this->slug instanceof LocalizedStringBuilder ? $this->slug->build() : $this->slug; + return $this->textLineItems; } /** + *

Assigns the new ShoppingList to the Store.

+ * - * @return null|TextLineItemDraftCollection + * @return null|StoreResourceIdentifier */ - public function getTextLineItems() + public function getStore() { - return $this->textLineItems; + return $this->store instanceof StoreResourceIdentifierBuilder ? $this->store->build() : $this->store; } /** - *

Identifies shopping lists belonging to an anonymous session (the customer has not signed up/in yet).

+ *

Custom Fields defined for the ShoppingList.

* - * @return null|string + * @return null|CustomFieldsDraft */ - public function getAnonymousId() + public function getCustom() { - return $this->anonymousId; + return $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom; } /** - - * @return null|StoreResourceIdentifier + * @param ?LocalizedString $name + * @return $this */ - public function getStore() + public function withName(?LocalizedString $name) { - return $this->store instanceof StoreResourceIdentifierBuilder ? $this->store->build() : $this->store; + $this->name = $name; + + return $this; } /** - * @param ?CustomFieldsDraft $custom + * @param ?LocalizedString $slug * @return $this */ - public function withCustom(?CustomFieldsDraft $custom) + public function withSlug(?LocalizedString $slug) { - $this->custom = $custom; + $this->slug = $slug; return $this; } @@ -228,12 +251,12 @@ public function withCustomer(?CustomerResourceIdentifier $customer) } /** - * @param ?int $deleteDaysAfterLastModification + * @param ?string $key * @return $this */ - public function withDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification) + public function withKey(?string $key) { - $this->deleteDaysAfterLastModification = $deleteDaysAfterLastModification; + $this->key = $key; return $this; } @@ -250,89 +273,89 @@ public function withDescription(?LocalizedString $description) } /** - * @param ?string $key + * @param ?string $anonymousId * @return $this */ - public function withKey(?string $key) + public function withAnonymousId(?string $anonymousId) { - $this->key = $key; + $this->anonymousId = $anonymousId; return $this; } /** - * @param ?ShoppingListLineItemDraftCollection $lineItems + * @param ?int $deleteDaysAfterLastModification * @return $this */ - public function withLineItems(?ShoppingListLineItemDraftCollection $lineItems) + public function withDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification) { - $this->lineItems = $lineItems; + $this->deleteDaysAfterLastModification = $deleteDaysAfterLastModification; return $this; } /** - * @param ?LocalizedString $name + * @param ?ShoppingListLineItemDraftCollection $lineItems * @return $this */ - public function withName(?LocalizedString $name) + public function withLineItems(?ShoppingListLineItemDraftCollection $lineItems) { - $this->name = $name; + $this->lineItems = $lineItems; return $this; } /** - * @param ?LocalizedString $slug + * @param ?TextLineItemDraftCollection $textLineItems * @return $this */ - public function withSlug(?LocalizedString $slug) + public function withTextLineItems(?TextLineItemDraftCollection $textLineItems) { - $this->slug = $slug; + $this->textLineItems = $textLineItems; return $this; } /** - * @param ?TextLineItemDraftCollection $textLineItems + * @param ?StoreResourceIdentifier $store * @return $this */ - public function withTextLineItems(?TextLineItemDraftCollection $textLineItems) + public function withStore(?StoreResourceIdentifier $store) { - $this->textLineItems = $textLineItems; + $this->store = $store; return $this; } /** - * @param ?string $anonymousId + * @param ?CustomFieldsDraft $custom * @return $this */ - public function withAnonymousId(?string $anonymousId) + public function withCustom(?CustomFieldsDraft $custom) { - $this->anonymousId = $anonymousId; + $this->custom = $custom; return $this; } /** - * @param ?StoreResourceIdentifier $store + * @deprecated use withName() instead * @return $this */ - public function withStore(?StoreResourceIdentifier $store) + public function withNameBuilder(?LocalizedStringBuilder $name) { - $this->store = $store; + $this->name = $name; return $this; } /** - * @deprecated use withCustom() instead + * @deprecated use withSlug() instead * @return $this */ - public function withCustomBuilder(?CustomFieldsDraftBuilder $custom) + public function withSlugBuilder(?LocalizedStringBuilder $slug) { - $this->custom = $custom; + $this->slug = $slug; return $this; } @@ -360,34 +383,23 @@ public function withDescriptionBuilder(?LocalizedStringBuilder $description) } /** - * @deprecated use withName() instead - * @return $this - */ - public function withNameBuilder(?LocalizedStringBuilder $name) - { - $this->name = $name; - - return $this; - } - - /** - * @deprecated use withSlug() instead + * @deprecated use withStore() instead * @return $this */ - public function withSlugBuilder(?LocalizedStringBuilder $slug) + public function withStoreBuilder(?StoreResourceIdentifierBuilder $store) { - $this->slug = $slug; + $this->store = $store; 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; } @@ -395,17 +407,17 @@ public function withStoreBuilder(?StoreResourceIdentifierBuilder $store) public function build(): ShoppingListDraft { return new ShoppingListDraftModel( - $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom, + $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name, + $this->slug instanceof LocalizedStringBuilder ? $this->slug->build() : $this->slug, $this->customer instanceof CustomerResourceIdentifierBuilder ? $this->customer->build() : $this->customer, - $this->deleteDaysAfterLastModification, - $this->description instanceof LocalizedStringBuilder ? $this->description->build() : $this->description, $this->key, + $this->description instanceof LocalizedStringBuilder ? $this->description->build() : $this->description, + $this->anonymousId, + $this->deleteDaysAfterLastModification, $this->lineItems, - $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name, - $this->slug instanceof LocalizedStringBuilder ? $this->slug->build() : $this->slug, $this->textLineItems, - $this->anonymousId, - $this->store instanceof StoreResourceIdentifierBuilder ? $this->store->build() : $this->store + $this->store instanceof StoreResourceIdentifierBuilder ? $this->store->build() : $this->store, + $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom ); } diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListDraftModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListDraftModel.php index 708bc3f7d4e..6a6f7a7deed 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListDraftModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListDraftModel.php @@ -29,9 +29,15 @@ final class ShoppingListDraftModel extends JsonObjectModel implements ShoppingLi { /** * - * @var ?CustomFieldsDraft + * @var ?LocalizedString */ - protected $custom; + protected $name; + + /** + * + * @var ?LocalizedString + */ + protected $slug; /** * @@ -41,9 +47,9 @@ final class ShoppingListDraftModel extends JsonObjectModel implements ShoppingLi /** * - * @var ?int + * @var ?string */ - protected $deleteDaysAfterLastModification; + protected $key; /** * @@ -55,25 +61,19 @@ final class ShoppingListDraftModel extends JsonObjectModel implements ShoppingLi * * @var ?string */ - protected $key; - - /** - * - * @var ?ShoppingListLineItemDraftCollection - */ - protected $lineItems; + protected $anonymousId; /** * - * @var ?LocalizedString + * @var ?int */ - protected $name; + protected $deleteDaysAfterLastModification; /** * - * @var ?LocalizedString + * @var ?ShoppingListLineItemDraftCollection */ - protected $slug; + protected $lineItems; /** * @@ -83,68 +83,93 @@ final class ShoppingListDraftModel extends JsonObjectModel implements ShoppingLi /** * - * @var ?string + * @var ?StoreResourceIdentifier */ - protected $anonymousId; + protected $store; /** * - * @var ?StoreResourceIdentifier + * @var ?CustomFieldsDraft */ - protected $store; + protected $custom; /** * @psalm-suppress MissingParamType */ public function __construct( - ?CustomFieldsDraft $custom = null, + ?LocalizedString $name = null, + ?LocalizedString $slug = null, ?CustomerResourceIdentifier $customer = null, - ?int $deleteDaysAfterLastModification = null, - ?LocalizedString $description = null, ?string $key = null, + ?LocalizedString $description = null, + ?string $anonymousId = null, + ?int $deleteDaysAfterLastModification = null, ?ShoppingListLineItemDraftCollection $lineItems = null, - ?LocalizedString $name = null, - ?LocalizedString $slug = null, ?TextLineItemDraftCollection $textLineItems = null, - ?string $anonymousId = null, - ?StoreResourceIdentifier $store = null + ?StoreResourceIdentifier $store = null, + ?CustomFieldsDraft $custom = null ) { - $this->custom = $custom; + $this->name = $name; + $this->slug = $slug; $this->customer = $customer; - $this->deleteDaysAfterLastModification = $deleteDaysAfterLastModification; - $this->description = $description; $this->key = $key; + $this->description = $description; + $this->anonymousId = $anonymousId; + $this->deleteDaysAfterLastModification = $deleteDaysAfterLastModification; $this->lineItems = $lineItems; - $this->name = $name; - $this->slug = $slug; $this->textLineItems = $textLineItems; - $this->anonymousId = $anonymousId; $this->store = $store; + $this->custom = $custom; } /** - *

The custom fields.

+ *

Name of the ShoppingList.

* * - * @return null|CustomFieldsDraft + * @return null|LocalizedString */ - public function getCustom() + public function getName() { - if (is_null($this->custom)) { + if (is_null($this->name)) { /** @psalm-var stdClass|array|null $data */ - $data = $this->raw(self::FIELD_CUSTOM); + $data = $this->raw(self::FIELD_NAME); if (is_null($data)) { return null; } - $this->custom = CustomFieldsDraftModel::of($data); + $this->name = LocalizedStringModel::of($data); } - return $this->custom; + return $this->name; + } + + /** + *

Human-readable identifiers usually used as deep-link URL to the related ShoppingList. + * Each slug is unique across a Project, but a ShoppingList can have the same slug for different languages. + * The slug must match the pattern [a-zA-Z0-9_-]{2,256}.

+ * + * + * @return null|LocalizedString + */ + public function getSlug() + { + if (is_null($this->slug)) { + /** @psalm-var stdClass|array|null $data */ + $data = $this->raw(self::FIELD_SLUG); + if (is_null($data)) { + return null; + } + + $this->slug = LocalizedStringModel::of($data); + } + + return $this->slug; } /** + *

The Customer the ShoppingList should be associated to.

+ * * * @return null|CustomerResourceIdentifier */ @@ -164,26 +189,28 @@ public function getCustomer() } /** - *

The shopping list will be deleted automatically if it hasn't been modified for the specified amount of days.

+ *

User-defined unique identifier for the ShoppingList.

* * - * @return null|int + * @return null|string */ - public function getDeleteDaysAfterLastModification() + public function getKey() { - if (is_null($this->deleteDaysAfterLastModification)) { - /** @psalm-var ?int $data */ - $data = $this->raw(self::FIELD_DELETE_DAYS_AFTER_LAST_MODIFICATION); + if (is_null($this->key)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_KEY); if (is_null($data)) { return null; } - $this->deleteDaysAfterLastModification = (int) $data; + $this->key = (string) $data; } - return $this->deleteDaysAfterLastModification; + return $this->key; } /** + *

Description of the ShoppingList.

+ * * * @return null|LocalizedString */ @@ -203,86 +230,68 @@ public function getDescription() } /** - *

User-defined unique identifier for the ShoppingList.

+ *

Identifies ShoppingLists belonging to an anonymous session.

* * * @return null|string */ - public function getKey() + public function getAnonymousId() { - if (is_null($this->key)) { + if (is_null($this->anonymousId)) { /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_KEY); + $data = $this->raw(self::FIELD_ANONYMOUS_ID); if (is_null($data)) { return null; } - $this->key = (string) $data; + $this->anonymousId = (string) $data; } - return $this->key; + return $this->anonymousId; } /** + *

Number of days after which the ShoppingList will be automatically deleted if it has not been modified. If not set, the default value configured in the Project is used.

* - * @return null|ShoppingListLineItemDraftCollection - */ - public function getLineItems() - { - if (is_null($this->lineItems)) { - /** @psalm-var ?list $data */ - $data = $this->raw(self::FIELD_LINE_ITEMS); - if (is_null($data)) { - return null; - } - $this->lineItems = ShoppingListLineItemDraftCollection::fromArray($data); - } - - return $this->lineItems; - } - - /** * - * @return null|LocalizedString + * @return null|int */ - public function getName() + public function getDeleteDaysAfterLastModification() { - if (is_null($this->name)) { - /** @psalm-var stdClass|array|null $data */ - $data = $this->raw(self::FIELD_NAME); + if (is_null($this->deleteDaysAfterLastModification)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_DELETE_DAYS_AFTER_LAST_MODIFICATION); if (is_null($data)) { return null; } - - $this->name = LocalizedStringModel::of($data); + $this->deleteDaysAfterLastModification = (int) $data; } - return $this->name; + return $this->deleteDaysAfterLastModification; } /** - *

Human-readable identifiers usually used as deep-link URL to the related shopping list. - * Each slug is unique across a project, but a shopping list can have the same slug for different languages. - * The slug must match the pattern [a-zA-Z0-9_-]{2,256}.

+ *

Line Items (containing Products) to add to the ShoppingList.

* * - * @return null|LocalizedString + * @return null|ShoppingListLineItemDraftCollection */ - public function getSlug() + public function getLineItems() { - if (is_null($this->slug)) { - /** @psalm-var stdClass|array|null $data */ - $data = $this->raw(self::FIELD_SLUG); + if (is_null($this->lineItems)) { + /** @psalm-var ?list $data */ + $data = $this->raw(self::FIELD_LINE_ITEMS); if (is_null($data)) { return null; } - - $this->slug = LocalizedStringModel::of($data); + $this->lineItems = ShoppingListLineItemDraftCollection::fromArray($data); } - return $this->slug; + return $this->lineItems; } /** + *

Line Items (containing text values) to add to the ShoppingList.

+ * * * @return null|TextLineItemDraftCollection */ @@ -301,51 +310,62 @@ public function getTextLineItems() } /** - *

Identifies shopping lists belonging to an anonymous session (the customer has not signed up/in yet).

+ *

Assigns the new ShoppingList to the Store.

* * - * @return null|string + * @return null|StoreResourceIdentifier */ - public function getAnonymousId() + public function getStore() { - if (is_null($this->anonymousId)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_ANONYMOUS_ID); + if (is_null($this->store)) { + /** @psalm-var stdClass|array|null $data */ + $data = $this->raw(self::FIELD_STORE); if (is_null($data)) { return null; } - $this->anonymousId = (string) $data; + + $this->store = StoreResourceIdentifierModel::of($data); } - return $this->anonymousId; + return $this->store; } /** + *

Custom Fields defined for the ShoppingList.

* - * @return null|StoreResourceIdentifier + * + * @return null|CustomFieldsDraft */ - public function getStore() + public function getCustom() { - if (is_null($this->store)) { + if (is_null($this->custom)) { /** @psalm-var stdClass|array|null $data */ - $data = $this->raw(self::FIELD_STORE); + $data = $this->raw(self::FIELD_CUSTOM); if (is_null($data)) { return null; } - $this->store = StoreResourceIdentifierModel::of($data); + $this->custom = CustomFieldsDraftModel::of($data); } - return $this->store; + return $this->custom; } /** - * @param ?CustomFieldsDraft $custom + * @param ?LocalizedString $name */ - public function setCustom(?CustomFieldsDraft $custom): void + public function setName(?LocalizedString $name): void { - $this->custom = $custom; + $this->name = $name; + } + + /** + * @param ?LocalizedString $slug + */ + public function setSlug(?LocalizedString $slug): void + { + $this->slug = $slug; } /** @@ -357,11 +377,11 @@ public function setCustomer(?CustomerResourceIdentifier $customer): void } /** - * @param ?int $deleteDaysAfterLastModification + * @param ?string $key */ - public function setDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification): void + public function setKey(?string $key): void { - $this->deleteDaysAfterLastModification = $deleteDaysAfterLastModification; + $this->key = $key; } /** @@ -373,35 +393,27 @@ public function setDescription(?LocalizedString $description): void } /** - * @param ?string $key - */ - public function setKey(?string $key): void - { - $this->key = $key; - } - - /** - * @param ?ShoppingListLineItemDraftCollection $lineItems + * @param ?string $anonymousId */ - public function setLineItems(?ShoppingListLineItemDraftCollection $lineItems): void + public function setAnonymousId(?string $anonymousId): void { - $this->lineItems = $lineItems; + $this->anonymousId = $anonymousId; } /** - * @param ?LocalizedString $name + * @param ?int $deleteDaysAfterLastModification */ - public function setName(?LocalizedString $name): void + public function setDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification): void { - $this->name = $name; + $this->deleteDaysAfterLastModification = $deleteDaysAfterLastModification; } /** - * @param ?LocalizedString $slug + * @param ?ShoppingListLineItemDraftCollection $lineItems */ - public function setSlug(?LocalizedString $slug): void + public function setLineItems(?ShoppingListLineItemDraftCollection $lineItems): void { - $this->slug = $slug; + $this->lineItems = $lineItems; } /** @@ -413,18 +425,18 @@ public function setTextLineItems(?TextLineItemDraftCollection $textLineItems): v } /** - * @param ?string $anonymousId + * @param ?StoreResourceIdentifier $store */ - public function setAnonymousId(?string $anonymousId): void + public function setStore(?StoreResourceIdentifier $store): void { - $this->anonymousId = $anonymousId; + $this->store = $store; } /** - * @param ?StoreResourceIdentifier $store + * @param ?CustomFieldsDraft $custom */ - public function setStore(?StoreResourceIdentifier $store): void + public function setCustom(?CustomFieldsDraft $custom): void { - $this->store = $store; + $this->custom = $custom; } } diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItem.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItem.php index 18261ee0b0f..57fcef37d2e 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItem.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItem.php @@ -24,20 +24,22 @@ interface ShoppingListLineItem extends JsonObject public const FIELD_ID = 'id'; public const FIELD_NAME = 'name'; public const FIELD_PRODUCT_ID = 'productId'; - public const FIELD_PRODUCT_SLUG = 'productSlug'; public const FIELD_PRODUCT_TYPE = 'productType'; public const FIELD_QUANTITY = 'quantity'; - public const FIELD_VARIANT = 'variant'; public const FIELD_VARIANT_ID = 'variantId'; + public const FIELD_VARIANT = 'variant'; + public const FIELD_PRODUCT_SLUG = 'productSlug'; /** + *

Date and time (UTC) the ShoppingListLineItem was added to the ShoppingList.

+ * * @return null|DateTimeImmutable */ public function getAddedAt(); /** - *

Serves as value of the custom field on a resource or data type customized with a Type.

+ *

Custom Fields of the ShoppingListLineItem.

* * @return null|CustomFields @@ -45,6 +47,9 @@ public function getAddedAt(); public function getCustom(); /** + *

If the Product or Product Variant is deleted, deactivatedAt is the date and time (UTC) of deletion.

+ *

This data is updated in an eventual consistent manner when the Product Variant cannot be ordered anymore.

+ * * @return null|DateTimeImmutable */ @@ -59,7 +64,8 @@ public function getDeactivatedAt(); public function getId(); /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Name of the Product.

+ *

This data is updated in an eventual consistent manner when the Product's name changes.

* * @return null|LocalizedString @@ -67,35 +73,41 @@ public function getId(); public function getName(); /** + *

Unique identifier of a Product.

+ * * @return null|string */ public function getProductId(); /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

The Product Type defining the Attributes of the Product.

* - * @return null|LocalizedString + * @return null|ProductTypeReference */ - public function getProductSlug(); + public function getProductType(); /** - *

Reference to a ProductType.

+ *

Number of Products in the ShoppingListLineItem.

* - * @return null|ProductTypeReference + * @return null|int */ - public function getProductType(); + public function getQuantity(); /** + *

id of the ProductVariant the ShoppingListLineItem refers to. If not set, the ShoppingListLineItem refers to the Master Variant.

+ * * @return null|int */ - public function getQuantity(); + public function getVariantId(); /** - *

A concrete sellable good for which inventory can be tracked. Product Variants are generally mapped to specific SKUs.

+ *

Data of the ProductVariant. + * Returned when expanded using expand=lineItems[*].variant.

+ *

Limitation: expand=lineItems[0].variant is not supported.

* * @return null|ProductVariant @@ -103,10 +115,14 @@ public function getQuantity(); public function getVariant(); /** + *

Slug of the current ProductData. + * Only returned when expanded using expand=lineItems[*].productSlug.

+ *

Limitation: expand=lineItems[0].productSlug is not supported.

+ * - * @return null|int + * @return null|LocalizedString */ - public function getVariantId(); + public function getProductSlug(); /** * @param ?DateTimeImmutable $addedAt @@ -138,11 +154,6 @@ public function setName(?LocalizedString $name): void; */ public function setProductId(?string $productId): void; - /** - * @param ?LocalizedString $productSlug - */ - public function setProductSlug(?LocalizedString $productSlug): void; - /** * @param ?ProductTypeReference $productType */ @@ -153,13 +164,18 @@ public function setProductType(?ProductTypeReference $productType): void; */ public function setQuantity(?int $quantity): void; + /** + * @param ?int $variantId + */ + public function setVariantId(?int $variantId): void; + /** * @param ?ProductVariant $variant */ public function setVariant(?ProductVariant $variant): void; /** - * @param ?int $variantId + * @param ?LocalizedString $productSlug */ - public function setVariantId(?int $variantId): void; + public function setProductSlug(?LocalizedString $productSlug): void; } diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemBuilder.php index 1e69ed137c7..ae79cb5a126 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemBuilder.php @@ -67,21 +67,21 @@ final class ShoppingListLineItemBuilder implements Builder /** - * @var null|LocalizedString|LocalizedStringBuilder + * @var null|ProductTypeReference|ProductTypeReferenceBuilder */ - private $productSlug; + private $productType; /** - * @var null|ProductTypeReference|ProductTypeReferenceBuilder + * @var ?int */ - private $productType; + private $quantity; /** * @var ?int */ - private $quantity; + private $variantId; /** @@ -91,11 +91,13 @@ final class ShoppingListLineItemBuilder implements Builder /** - * @var ?int + * @var null|LocalizedString|LocalizedStringBuilder */ - private $variantId; + private $productSlug; /** + *

Date and time (UTC) the ShoppingListLineItem was added to the ShoppingList.

+ * * @return null|DateTimeImmutable */ @@ -105,7 +107,7 @@ public function getAddedAt() } /** - *

Serves as value of the custom field on a resource or data type customized with a Type.

+ *

Custom Fields of the ShoppingListLineItem.

* * @return null|CustomFields @@ -116,6 +118,9 @@ public function getCustom() } /** + *

If the Product or Product Variant is deleted, deactivatedAt is the date and time (UTC) of deletion.

+ *

This data is updated in an eventual consistent manner when the Product Variant cannot be ordered anymore.

+ * * @return null|DateTimeImmutable */ @@ -136,7 +141,8 @@ public function getId() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Name of the Product.

+ *

This data is updated in an eventual consistent manner when the Product's name changes.

* * @return null|LocalizedString @@ -147,6 +153,8 @@ public function getName() } /** + *

Unique identifier of a Product.

+ * * @return null|string */ @@ -156,38 +164,42 @@ public function getProductId() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

The Product Type defining the Attributes of the Product.

* - * @return null|LocalizedString + * @return null|ProductTypeReference */ - public function getProductSlug() + public function getProductType() { - return $this->productSlug instanceof LocalizedStringBuilder ? $this->productSlug->build() : $this->productSlug; + return $this->productType instanceof ProductTypeReferenceBuilder ? $this->productType->build() : $this->productType; } /** - *

Reference to a ProductType.

+ *

Number of Products in the ShoppingListLineItem.

* - * @return null|ProductTypeReference + * @return null|int */ - public function getProductType() + public function getQuantity() { - return $this->productType instanceof ProductTypeReferenceBuilder ? $this->productType->build() : $this->productType; + return $this->quantity; } /** + *

id of the ProductVariant the ShoppingListLineItem refers to. If not set, the ShoppingListLineItem refers to the Master Variant.

+ * * @return null|int */ - public function getQuantity() + public function getVariantId() { - return $this->quantity; + return $this->variantId; } /** - *

A concrete sellable good for which inventory can be tracked. Product Variants are generally mapped to specific SKUs.

+ *

Data of the ProductVariant. + * Returned when expanded using expand=lineItems[*].variant.

+ *

Limitation: expand=lineItems[0].variant is not supported.

* * @return null|ProductVariant @@ -198,12 +210,16 @@ public function getVariant() } /** + *

Slug of the current ProductData. + * Only returned when expanded using expand=lineItems[*].productSlug.

+ *

Limitation: expand=lineItems[0].productSlug is not supported.

+ * - * @return null|int + * @return null|LocalizedString */ - public function getVariantId() + public function getProductSlug() { - return $this->variantId; + return $this->productSlug instanceof LocalizedStringBuilder ? $this->productSlug->build() : $this->productSlug; } /** @@ -273,34 +289,34 @@ public function withProductId(?string $productId) } /** - * @param ?LocalizedString $productSlug + * @param ?ProductTypeReference $productType * @return $this */ - public function withProductSlug(?LocalizedString $productSlug) + public function withProductType(?ProductTypeReference $productType) { - $this->productSlug = $productSlug; + $this->productType = $productType; return $this; } /** - * @param ?ProductTypeReference $productType + * @param ?int $quantity * @return $this */ - public function withProductType(?ProductTypeReference $productType) + public function withQuantity(?int $quantity) { - $this->productType = $productType; + $this->quantity = $quantity; return $this; } /** - * @param ?int $quantity + * @param ?int $variantId * @return $this */ - public function withQuantity(?int $quantity) + public function withVariantId(?int $variantId) { - $this->quantity = $quantity; + $this->variantId = $variantId; return $this; } @@ -317,12 +333,12 @@ public function withVariant(?ProductVariant $variant) } /** - * @param ?int $variantId + * @param ?LocalizedString $productSlug * @return $this */ - public function withVariantId(?int $variantId) + public function withProductSlug(?LocalizedString $productSlug) { - $this->variantId = $variantId; + $this->productSlug = $productSlug; return $this; } @@ -350,34 +366,34 @@ public function withNameBuilder(?LocalizedStringBuilder $name) } /** - * @deprecated use withProductSlug() instead + * @deprecated use withProductType() instead * @return $this */ - public function withProductSlugBuilder(?LocalizedStringBuilder $productSlug) + public function withProductTypeBuilder(?ProductTypeReferenceBuilder $productType) { - $this->productSlug = $productSlug; + $this->productType = $productType; return $this; } /** - * @deprecated use withProductType() instead + * @deprecated use withVariant() instead * @return $this */ - public function withProductTypeBuilder(?ProductTypeReferenceBuilder $productType) + public function withVariantBuilder(?ProductVariantBuilder $variant) { - $this->productType = $productType; + $this->variant = $variant; return $this; } /** - * @deprecated use withVariant() instead + * @deprecated use withProductSlug() instead * @return $this */ - public function withVariantBuilder(?ProductVariantBuilder $variant) + public function withProductSlugBuilder(?LocalizedStringBuilder $productSlug) { - $this->variant = $variant; + $this->productSlug = $productSlug; return $this; } @@ -391,11 +407,11 @@ public function build(): ShoppingListLineItem $this->id, $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name, $this->productId, - $this->productSlug instanceof LocalizedStringBuilder ? $this->productSlug->build() : $this->productSlug, $this->productType instanceof ProductTypeReferenceBuilder ? $this->productType->build() : $this->productType, $this->quantity, + $this->variantId, $this->variant instanceof ProductVariantBuilder ? $this->variant->build() : $this->variant, - $this->variantId + $this->productSlug instanceof LocalizedStringBuilder ? $this->productSlug->build() : $this->productSlug ); } diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemDraft.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemDraft.php index e3c0f452e65..306391d1c74 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemDraft.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemDraft.php @@ -15,60 +15,70 @@ interface ShoppingListLineItemDraft extends JsonObject { + public const FIELD_PRODUCT_ID = 'productId'; + public const FIELD_VARIANT_ID = 'variantId'; + public const FIELD_SKU = 'sku'; public const FIELD_ADDED_AT = 'addedAt'; public const FIELD_CUSTOM = 'custom'; - public const FIELD_SKU = 'sku'; - public const FIELD_PRODUCT_ID = 'productId'; public const FIELD_QUANTITY = 'quantity'; - public const FIELD_VARIANT_ID = 'variantId'; /** + *

Unique identifier of a Product.

+ * - * @return null|DateTimeImmutable + * @return null|string */ - public function getAddedAt(); + public function getProductId(); /** - *

The representation used when creating or updating a customizable data type with Custom Fields.

+ *

id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

* - * @return null|CustomFieldsDraft + * @return null|int */ - public function getCustom(); + public function getVariantId(); /** + *

sku of the ProductVariant.

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

Date and time the ShoppingListLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ * - * @return null|string + * @return null|DateTimeImmutable */ - public function getProductId(); + public function getAddedAt(); /** + *

Custom Fields of the ShoppingListLineItem.

+ * - * @return null|int + * @return null|CustomFieldsDraft */ - public function getQuantity(); + public function getCustom(); /** + *

Number of Products in the ShoppingListLineItem.

+ * * @return null|int */ - public function getVariantId(); + public function getQuantity(); /** - * @param ?DateTimeImmutable $addedAt + * @param ?string $productId */ - public function setAddedAt(?DateTimeImmutable $addedAt): void; + public function setProductId(?string $productId): void; /** - * @param ?CustomFieldsDraft $custom + * @param ?int $variantId */ - public function setCustom(?CustomFieldsDraft $custom): void; + public function setVariantId(?int $variantId): void; /** * @param ?string $sku @@ -76,17 +86,17 @@ public function setCustom(?CustomFieldsDraft $custom): void; public function setSku(?string $sku): void; /** - * @param ?string $productId + * @param ?DateTimeImmutable $addedAt */ - public function setProductId(?string $productId): void; + public function setAddedAt(?DateTimeImmutable $addedAt): void; /** - * @param ?int $quantity + * @param ?CustomFieldsDraft $custom */ - public function setQuantity(?int $quantity): void; + public function setCustom(?CustomFieldsDraft $custom): void; /** - * @param ?int $variantId + * @param ?int $quantity */ - public function setVariantId(?int $variantId): void; + public function setQuantity(?int $quantity): void; } diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemDraftBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemDraftBuilder.php index 45dc4b96613..eab3edc3a9e 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemDraftBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemDraftBuilder.php @@ -25,15 +25,15 @@ final class ShoppingListLineItemDraftBuilder implements Builder { /** - * @var ?DateTimeImmutable + * @var ?string */ - private $addedAt; + private $productId; /** - * @var null|CustomFieldsDraft|CustomFieldsDraftBuilder + * @var ?int */ - private $custom; + private $variantId; /** @@ -43,43 +43,47 @@ final class ShoppingListLineItemDraftBuilder implements Builder /** - * @var ?string + * @var ?DateTimeImmutable */ - private $productId; + private $addedAt; /** - * @var ?int + * @var null|CustomFieldsDraft|CustomFieldsDraftBuilder */ - private $quantity; + private $custom; /** * @var ?int */ - private $variantId; + private $quantity; /** + *

Unique identifier of a Product.

+ * - * @return null|DateTimeImmutable + * @return null|string */ - public function getAddedAt() + public function getProductId() { - return $this->addedAt; + return $this->productId; } /** - *

The representation used when creating or updating a customizable data type with Custom Fields.

+ *

id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

* - * @return null|CustomFieldsDraft + * @return null|int */ - public function getCustom() + public function getVariantId() { - return $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom; + return $this->variantId; } /** + *

sku of the ProductVariant.

+ * * @return null|string */ @@ -89,50 +93,56 @@ public function getSku() } /** + *

Date and time the ShoppingListLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

+ * - * @return null|string + * @return null|DateTimeImmutable */ - public function getProductId() + public function getAddedAt() { - return $this->productId; + return $this->addedAt; } /** + *

Custom Fields of the ShoppingListLineItem.

+ * - * @return null|int + * @return null|CustomFieldsDraft */ - public function getQuantity() + public function getCustom() { - return $this->quantity; + return $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom; } /** + *

Number of Products in the ShoppingListLineItem.

+ * * @return null|int */ - public function getVariantId() + public function getQuantity() { - return $this->variantId; + return $this->quantity; } /** - * @param ?DateTimeImmutable $addedAt + * @param ?string $productId * @return $this */ - public function withAddedAt(?DateTimeImmutable $addedAt) + public function withProductId(?string $productId) { - $this->addedAt = $addedAt; + $this->productId = $productId; return $this; } /** - * @param ?CustomFieldsDraft $custom + * @param ?int $variantId * @return $this */ - public function withCustom(?CustomFieldsDraft $custom) + public function withVariantId(?int $variantId) { - $this->custom = $custom; + $this->variantId = $variantId; return $this; } @@ -149,34 +159,34 @@ public function withSku(?string $sku) } /** - * @param ?string $productId + * @param ?DateTimeImmutable $addedAt * @return $this */ - public function withProductId(?string $productId) + public function withAddedAt(?DateTimeImmutable $addedAt) { - $this->productId = $productId; + $this->addedAt = $addedAt; return $this; } /** - * @param ?int $quantity + * @param ?CustomFieldsDraft $custom * @return $this */ - public function withQuantity(?int $quantity) + public function withCustom(?CustomFieldsDraft $custom) { - $this->quantity = $quantity; + $this->custom = $custom; return $this; } /** - * @param ?int $variantId + * @param ?int $quantity * @return $this */ - public function withVariantId(?int $variantId) + public function withQuantity(?int $quantity) { - $this->variantId = $variantId; + $this->quantity = $quantity; return $this; } @@ -195,12 +205,12 @@ public function withCustomBuilder(?CustomFieldsDraftBuilder $custom) public function build(): ShoppingListLineItemDraft { return new ShoppingListLineItemDraftModel( + $this->productId, + $this->variantId, + $this->sku, $this->addedAt, $this->custom instanceof CustomFieldsDraftBuilder ? $this->custom->build() : $this->custom, - $this->sku, - $this->productId, - $this->quantity, - $this->variantId + $this->quantity ); } diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemDraftModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemDraftModel.php index f8f69ca779e..54fc1029572 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemDraftModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemDraftModel.php @@ -24,15 +24,15 @@ final class ShoppingListLineItemDraftModel extends JsonObjectModel implements Sh { /** * - * @var ?DateTimeImmutable + * @var ?string */ - protected $addedAt; + protected $productId; /** * - * @var ?CustomFieldsDraft + * @var ?int */ - protected $custom; + protected $variantId; /** * @@ -42,86 +42,85 @@ final class ShoppingListLineItemDraftModel extends JsonObjectModel implements Sh /** * - * @var ?string + * @var ?DateTimeImmutable */ - protected $productId; + protected $addedAt; /** * - * @var ?int + * @var ?CustomFieldsDraft */ - protected $quantity; + protected $custom; /** * * @var ?int */ - protected $variantId; + protected $quantity; /** * @psalm-suppress MissingParamType */ public function __construct( + ?string $productId = null, + ?int $variantId = null, + ?string $sku = null, ?DateTimeImmutable $addedAt = null, ?CustomFieldsDraft $custom = null, - ?string $sku = null, - ?string $productId = null, - ?int $quantity = null, - ?int $variantId = null + ?int $quantity = null ) { + $this->productId = $productId; + $this->variantId = $variantId; + $this->sku = $sku; $this->addedAt = $addedAt; $this->custom = $custom; - $this->sku = $sku; - $this->productId = $productId; $this->quantity = $quantity; - $this->variantId = $variantId; } /** + *

Unique identifier of a Product.

* - * @return null|DateTimeImmutable + * + * @return null|string */ - public function getAddedAt() + public function getProductId() { - if (is_null($this->addedAt)) { + if (is_null($this->productId)) { /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_ADDED_AT); + $data = $this->raw(self::FIELD_PRODUCT_ID); if (is_null($data)) { return null; } - $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); - if (false === $data) { - return null; - } - $this->addedAt = $data; + $this->productId = (string) $data; } - return $this->addedAt; + return $this->productId; } /** - *

The representation used when creating or updating a customizable data type with Custom Fields.

+ *

id of the ProductVariant. If not set, the ShoppingListLineItem refers to the Master Variant.

* * - * @return null|CustomFieldsDraft + * @return null|int */ - public function getCustom() + public function getVariantId() { - if (is_null($this->custom)) { - /** @psalm-var stdClass|array|null $data */ - $data = $this->raw(self::FIELD_CUSTOM); + if (is_null($this->variantId)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_VARIANT_ID); if (is_null($data)) { return null; } - - $this->custom = CustomFieldsDraftModel::of($data); + $this->variantId = (int) $data; } - return $this->custom; + return $this->variantId; } /** + *

sku of the ProductVariant.

+ * * * @return null|string */ @@ -140,74 +139,85 @@ public function getSku() } /** + *

Date and time the ShoppingListLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

* - * @return null|string + * + * @return null|DateTimeImmutable */ - public function getProductId() + public function getAddedAt() { - if (is_null($this->productId)) { + if (is_null($this->addedAt)) { /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_PRODUCT_ID); + $data = $this->raw(self::FIELD_ADDED_AT); if (is_null($data)) { return null; } - $this->productId = (string) $data; + $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data); + if (false === $data) { + return null; + } + $this->addedAt = $data; } - return $this->productId; + return $this->addedAt; } /** + *

Custom Fields of the ShoppingListLineItem.

* - * @return null|int + * + * @return null|CustomFieldsDraft */ - public function getQuantity() + public function getCustom() { - if (is_null($this->quantity)) { - /** @psalm-var ?int $data */ - $data = $this->raw(self::FIELD_QUANTITY); + if (is_null($this->custom)) { + /** @psalm-var stdClass|array|null $data */ + $data = $this->raw(self::FIELD_CUSTOM); if (is_null($data)) { return null; } - $this->quantity = (int) $data; + + $this->custom = CustomFieldsDraftModel::of($data); } - return $this->quantity; + return $this->custom; } /** + *

Number of Products in the ShoppingListLineItem.

+ * * * @return null|int */ - public function getVariantId() + public function getQuantity() { - if (is_null($this->variantId)) { + if (is_null($this->quantity)) { /** @psalm-var ?int $data */ - $data = $this->raw(self::FIELD_VARIANT_ID); + $data = $this->raw(self::FIELD_QUANTITY); if (is_null($data)) { return null; } - $this->variantId = (int) $data; + $this->quantity = (int) $data; } - return $this->variantId; + return $this->quantity; } /** - * @param ?DateTimeImmutable $addedAt + * @param ?string $productId */ - public function setAddedAt(?DateTimeImmutable $addedAt): void + public function setProductId(?string $productId): void { - $this->addedAt = $addedAt; + $this->productId = $productId; } /** - * @param ?CustomFieldsDraft $custom + * @param ?int $variantId */ - public function setCustom(?CustomFieldsDraft $custom): void + public function setVariantId(?int $variantId): void { - $this->custom = $custom; + $this->variantId = $variantId; } /** @@ -219,27 +229,27 @@ public function setSku(?string $sku): void } /** - * @param ?string $productId + * @param ?DateTimeImmutable $addedAt */ - public function setProductId(?string $productId): void + public function setAddedAt(?DateTimeImmutable $addedAt): void { - $this->productId = $productId; + $this->addedAt = $addedAt; } /** - * @param ?int $quantity + * @param ?CustomFieldsDraft $custom */ - public function setQuantity(?int $quantity): void + public function setCustom(?CustomFieldsDraft $custom): void { - $this->quantity = $quantity; + $this->custom = $custom; } /** - * @param ?int $variantId + * @param ?int $quantity */ - public function setVariantId(?int $variantId): void + public function setQuantity(?int $quantity): void { - $this->variantId = $variantId; + $this->quantity = $quantity; } diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemModel.php index 3de7569cf68..143a76b0b7f 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListLineItemModel.php @@ -66,21 +66,21 @@ final class ShoppingListLineItemModel extends JsonObjectModel implements Shoppin /** * - * @var ?LocalizedString + * @var ?ProductTypeReference */ - protected $productSlug; + protected $productType; /** * - * @var ?ProductTypeReference + * @var ?int */ - protected $productType; + protected $quantity; /** * * @var ?int */ - protected $quantity; + protected $variantId; /** * @@ -90,9 +90,9 @@ final class ShoppingListLineItemModel extends JsonObjectModel implements Shoppin /** * - * @var ?int + * @var ?LocalizedString */ - protected $variantId; + protected $productSlug; /** @@ -105,11 +105,11 @@ public function __construct( ?string $id = null, ?LocalizedString $name = null, ?string $productId = null, - ?LocalizedString $productSlug = null, ?ProductTypeReference $productType = null, ?int $quantity = null, + ?int $variantId = null, ?ProductVariant $variant = null, - ?int $variantId = null + ?LocalizedString $productSlug = null ) { $this->addedAt = $addedAt; $this->custom = $custom; @@ -117,14 +117,16 @@ public function __construct( $this->id = $id; $this->name = $name; $this->productId = $productId; - $this->productSlug = $productSlug; $this->productType = $productType; $this->quantity = $quantity; - $this->variant = $variant; $this->variantId = $variantId; + $this->variant = $variant; + $this->productSlug = $productSlug; } /** + *

Date and time (UTC) the ShoppingListLineItem was added to the ShoppingList.

+ * * * @return null|DateTimeImmutable */ @@ -147,7 +149,7 @@ public function getAddedAt() } /** - *

Serves as value of the custom field on a resource or data type customized with a Type.

+ *

Custom Fields of the ShoppingListLineItem.

* * * @return null|CustomFields @@ -168,6 +170,9 @@ public function getCustom() } /** + *

If the Product or Product Variant is deleted, deactivatedAt is the date and time (UTC) of deletion.

+ *

This data is updated in an eventual consistent manner when the Product Variant cannot be ordered anymore.

+ * * * @return null|DateTimeImmutable */ @@ -210,7 +215,8 @@ public function getId() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Name of the Product.

+ *

This data is updated in an eventual consistent manner when the Product's name changes.

* * * @return null|LocalizedString @@ -231,6 +237,8 @@ public function getName() } /** + *

Unique identifier of a Product.

+ * * * @return null|string */ @@ -249,67 +257,70 @@ public function getProductId() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

The Product Type defining the Attributes of the Product.

* * - * @return null|LocalizedString + * @return null|ProductTypeReference */ - public function getProductSlug() + public function getProductType() { - if (is_null($this->productSlug)) { + if (is_null($this->productType)) { /** @psalm-var stdClass|array|null $data */ - $data = $this->raw(self::FIELD_PRODUCT_SLUG); + $data = $this->raw(self::FIELD_PRODUCT_TYPE); if (is_null($data)) { return null; } - $this->productSlug = LocalizedStringModel::of($data); + $this->productType = ProductTypeReferenceModel::of($data); } - return $this->productSlug; + return $this->productType; } /** - *

Reference to a ProductType.

+ *

Number of Products in the ShoppingListLineItem.

* * - * @return null|ProductTypeReference + * @return null|int */ - public function getProductType() + public function getQuantity() { - if (is_null($this->productType)) { - /** @psalm-var stdClass|array|null $data */ - $data = $this->raw(self::FIELD_PRODUCT_TYPE); + if (is_null($this->quantity)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_QUANTITY); if (is_null($data)) { return null; } - - $this->productType = ProductTypeReferenceModel::of($data); + $this->quantity = (int) $data; } - return $this->productType; + return $this->quantity; } /** + *

id of the ProductVariant the ShoppingListLineItem refers to. If not set, the ShoppingListLineItem refers to the Master Variant.

+ * * * @return null|int */ - public function getQuantity() + public function getVariantId() { - if (is_null($this->quantity)) { + if (is_null($this->variantId)) { /** @psalm-var ?int $data */ - $data = $this->raw(self::FIELD_QUANTITY); + $data = $this->raw(self::FIELD_VARIANT_ID); if (is_null($data)) { return null; } - $this->quantity = (int) $data; + $this->variantId = (int) $data; } - return $this->quantity; + return $this->variantId; } /** - *

A concrete sellable good for which inventory can be tracked. Product Variants are generally mapped to specific SKUs.

+ *

Data of the ProductVariant. + * Returned when expanded using expand=lineItems[*].variant.

+ *

Limitation: expand=lineItems[0].variant is not supported.

* * * @return null|ProductVariant @@ -330,21 +341,26 @@ public function getVariant() } /** + *

Slug of the current ProductData. + * Only returned when expanded using expand=lineItems[*].productSlug.

+ *

Limitation: expand=lineItems[0].productSlug is not supported.

* - * @return null|int + * + * @return null|LocalizedString */ - public function getVariantId() + public function getProductSlug() { - if (is_null($this->variantId)) { - /** @psalm-var ?int $data */ - $data = $this->raw(self::FIELD_VARIANT_ID); + if (is_null($this->productSlug)) { + /** @psalm-var stdClass|array|null $data */ + $data = $this->raw(self::FIELD_PRODUCT_SLUG); if (is_null($data)) { return null; } - $this->variantId = (int) $data; + + $this->productSlug = LocalizedStringModel::of($data); } - return $this->variantId; + return $this->productSlug; } @@ -396,14 +412,6 @@ public function setProductId(?string $productId): void $this->productId = $productId; } - /** - * @param ?LocalizedString $productSlug - */ - public function setProductSlug(?LocalizedString $productSlug): void - { - $this->productSlug = $productSlug; - } - /** * @param ?ProductTypeReference $productType */ @@ -420,6 +428,14 @@ public function setQuantity(?int $quantity): void $this->quantity = $quantity; } + /** + * @param ?int $variantId + */ + public function setVariantId(?int $variantId): void + { + $this->variantId = $variantId; + } + /** * @param ?ProductVariant $variant */ @@ -429,11 +445,11 @@ public function setVariant(?ProductVariant $variant): void } /** - * @param ?int $variantId + * @param ?LocalizedString $productSlug */ - public function setVariantId(?int $variantId): void + public function setProductSlug(?LocalizedString $productSlug): void { - $this->variantId = $variantId; + $this->productSlug = $productSlug; } diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListModel.php index 7b9b3a07036..607f32a0ebb 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListModel.php @@ -60,21 +60,15 @@ final class ShoppingListModel extends JsonObjectModel implements ShoppingList /** * - * @var ?LastModifiedBy - */ - protected $lastModifiedBy; - - /** - * - * @var ?CreatedBy + * @var ?LocalizedString */ - protected $createdBy; + protected $name; /** * - * @var ?CustomFields + * @var ?string */ - protected $custom; + protected $key; /** * @@ -84,9 +78,9 @@ final class ShoppingListModel extends JsonObjectModel implements ShoppingList /** * - * @var ?int + * @var ?LocalizedString */ - protected $deleteDaysAfterLastModification; + protected $slug; /** * @@ -96,45 +90,51 @@ final class ShoppingListModel extends JsonObjectModel implements ShoppingList /** * - * @var ?string + * @var ?ShoppingListLineItemCollection */ - protected $key; + protected $lineItems; /** * - * @var ?ShoppingListLineItemCollection + * @var ?TextLineItemCollection */ - protected $lineItems; + protected $textLineItems; /** * - * @var ?LocalizedString + * @var ?int */ - protected $name; + protected $deleteDaysAfterLastModification; /** * - * @var ?LocalizedString + * @var ?string */ - protected $slug; + protected $anonymousId; /** * - * @var ?TextLineItemCollection + * @var ?StoreKeyReference */ - protected $textLineItems; + protected $store; /** * - * @var ?string + * @var ?CustomFields */ - protected $anonymousId; + protected $custom; /** * - * @var ?StoreKeyReference + * @var ?LastModifiedBy */ - protected $store; + protected $lastModifiedBy; + + /** + * + * @var ?CreatedBy + */ + protected $createdBy; /** @@ -145,37 +145,37 @@ public function __construct( ?int $version = null, ?DateTimeImmutable $createdAt = null, ?DateTimeImmutable $lastModifiedAt = null, - ?LastModifiedBy $lastModifiedBy = null, - ?CreatedBy $createdBy = null, - ?CustomFields $custom = null, + ?LocalizedString $name = null, + ?string $key = null, ?CustomerReference $customer = null, - ?int $deleteDaysAfterLastModification = null, + ?LocalizedString $slug = null, ?LocalizedString $description = null, - ?string $key = null, ?ShoppingListLineItemCollection $lineItems = null, - ?LocalizedString $name = null, - ?LocalizedString $slug = null, ?TextLineItemCollection $textLineItems = null, + ?int $deleteDaysAfterLastModification = null, ?string $anonymousId = null, - ?StoreKeyReference $store = null + ?StoreKeyReference $store = 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->custom = $custom; + $this->name = $name; + $this->key = $key; $this->customer = $customer; - $this->deleteDaysAfterLastModification = $deleteDaysAfterLastModification; + $this->slug = $slug; $this->description = $description; - $this->key = $key; $this->lineItems = $lineItems; - $this->name = $name; - $this->slug = $slug; $this->textLineItems = $textLineItems; + $this->deleteDaysAfterLastModification = $deleteDaysAfterLastModification; $this->anonymousId = $anonymousId; $this->store = $store; + $this->custom = $custom; + $this->lastModifiedBy = $lastModifiedBy; + $this->createdBy = $createdBy; } /** @@ -199,7 +199,7 @@ public function getId() } /** - *

The current version of the shopping list.

+ *

Current version of the ShoppingList.

* * * @return null|int @@ -219,6 +219,8 @@ public function getVersion() } /** + *

Date and time (UTC) the ShoppingList was initially created.

+ * * * @return null|DateTimeImmutable */ @@ -241,6 +243,8 @@ public function getCreatedAt() } /** + *

Date and time (UTC) the ShoppingList was last updated.

+ * * * @return null|DateTimeImmutable */ @@ -263,67 +267,49 @@ public function getLastModifiedAt() } /** - *

Present on resources created after 1 February 2019 except for events not tracked.

+ *

Name of the ShoppingList.

* * - * @return null|LastModifiedBy + * @return null|LocalizedString */ - public function getLastModifiedBy() + public function getName() { - if (is_null($this->lastModifiedBy)) { + if (is_null($this->name)) { /** @psalm-var stdClass|array|null $data */ - $data = $this->raw(self::FIELD_LAST_MODIFIED_BY); + $data = $this->raw(self::FIELD_NAME); if (is_null($data)) { return null; } - $this->lastModifiedBy = LastModifiedByModel::of($data); + $this->name = LocalizedStringModel::of($data); } - return $this->lastModifiedBy; + return $this->name; } /** - *

Present on resources created after 1 February 2019 except for events not tracked.

+ *

User-defined unique identifier of the ShoppingList.

* * - * @return null|CreatedBy + * @return null|string */ - public function getCreatedBy() + public function getKey() { - if (is_null($this->createdBy)) { - /** @psalm-var stdClass|array|null $data */ - $data = $this->raw(self::FIELD_CREATED_BY); + if (is_null($this->key)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_KEY); if (is_null($data)) { return null; } - - $this->createdBy = CreatedByModel::of($data); + $this->key = (string) $data; } - return $this->createdBy; + return $this->key; } /** + *

Reference to a Customer associated with the ShoppingList.

* - * @return null|CustomFields - */ - public function getCustom() - { - if (is_null($this->custom)) { - /** @psalm-var stdClass|array|null $data */ - $data = $this->raw(self::FIELD_CUSTOM); - if (is_null($data)) { - return null; - } - - $this->custom = CustomFieldsModel::of($data); - } - - return $this->custom; - } - - /** * * @return null|CustomerReference */ @@ -343,26 +329,31 @@ public function getCustomer() } /** - *

The shopping list will be deleted automatically if it hasn't been modified for the specified amount of days.

+ *

Human-readable identifiers usually used as deep-link URL to the related ShoppingList. + * Each slug is unique across a Project, but a ShoppingList can have the same slug for different languages. + * The slug must match the pattern [a-zA-Z0-9_-]{2,256}. For good performance, indexes are provided for the first 15 languages set on the Project.

* * - * @return null|int + * @return null|LocalizedString */ - public function getDeleteDaysAfterLastModification() + public function getSlug() { - if (is_null($this->deleteDaysAfterLastModification)) { - /** @psalm-var ?int $data */ - $data = $this->raw(self::FIELD_DELETE_DAYS_AFTER_LAST_MODIFICATION); + if (is_null($this->slug)) { + /** @psalm-var stdClass|array|null $data */ + $data = $this->raw(self::FIELD_SLUG); if (is_null($data)) { return null; } - $this->deleteDaysAfterLastModification = (int) $data; + + $this->slug = LocalizedStringModel::of($data); } - return $this->deleteDaysAfterLastModification; + return $this->slug; } /** + *

Description of the ShoppingList.

+ * * * @return null|LocalizedString */ @@ -382,140 +373,167 @@ public function getDescription() } /** - *

User-defined unique identifier of the ShoppingList.

+ *

Line Items (containing Products) of the ShoppingList.

* * - * @return null|string + * @return null|ShoppingListLineItemCollection */ - public function getKey() + public function getLineItems() { - if (is_null($this->key)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_KEY); + if (is_null($this->lineItems)) { + /** @psalm-var ?list $data */ + $data = $this->raw(self::FIELD_LINE_ITEMS); if (is_null($data)) { return null; } - $this->key = (string) $data; + $this->lineItems = ShoppingListLineItemCollection::fromArray($data); } - return $this->key; + return $this->lineItems; } /** + *

Line Items (containing text values) of the ShoppingList.

* - * @return null|ShoppingListLineItemCollection + * + * @return null|TextLineItemCollection */ - public function getLineItems() + public function getTextLineItems() { - if (is_null($this->lineItems)) { + if (is_null($this->textLineItems)) { /** @psalm-var ?list $data */ - $data = $this->raw(self::FIELD_LINE_ITEMS); + $data = $this->raw(self::FIELD_TEXT_LINE_ITEMS); if (is_null($data)) { return null; } - $this->lineItems = ShoppingListLineItemCollection::fromArray($data); + $this->textLineItems = TextLineItemCollection::fromArray($data); } - return $this->lineItems; + return $this->textLineItems; } /** + *

Number of days after which the ShoppingList will be automatically deleted if it has not been modified.

* - * @return null|LocalizedString + * + * @return null|int */ - public function getName() + public function getDeleteDaysAfterLastModification() { - if (is_null($this->name)) { - /** @psalm-var stdClass|array|null $data */ - $data = $this->raw(self::FIELD_NAME); + if (is_null($this->deleteDaysAfterLastModification)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_DELETE_DAYS_AFTER_LAST_MODIFICATION); if (is_null($data)) { return null; } + $this->deleteDaysAfterLastModification = (int) $data; + } - $this->name = LocalizedStringModel::of($data); + return $this->deleteDaysAfterLastModification; + } + + /** + *

Identifies ShoppingLists belonging to an anonymous session.

+ * + * + * @return null|string + */ + public function getAnonymousId() + { + if (is_null($this->anonymousId)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_ANONYMOUS_ID); + if (is_null($data)) { + return null; + } + $this->anonymousId = (string) $data; } - return $this->name; + return $this->anonymousId; } /** - *

Human-readable identifiers usually used as deep-link URL to the related shopping list. - * Each slug is unique across a project, but a shopping list can have the same slug for different languages. - * The slug must match the pattern [a-zA-Z0-9_-]{2,256}.

+ *

Store to which the ShoppingList is assigned.

* * - * @return null|LocalizedString + * @return null|StoreKeyReference */ - public function getSlug() + public function getStore() { - if (is_null($this->slug)) { + if (is_null($this->store)) { /** @psalm-var stdClass|array|null $data */ - $data = $this->raw(self::FIELD_SLUG); + $data = $this->raw(self::FIELD_STORE); if (is_null($data)) { return null; } - $this->slug = LocalizedStringModel::of($data); + $this->store = StoreKeyReferenceModel::of($data); } - return $this->slug; + return $this->store; } /** + *

Custom Fields defined for the ShoppingList.

* - * @return null|TextLineItemCollection + * + * @return null|CustomFields */ - public function getTextLineItems() + public function getCustom() { - if (is_null($this->textLineItems)) { - /** @psalm-var ?list $data */ - $data = $this->raw(self::FIELD_TEXT_LINE_ITEMS); + if (is_null($this->custom)) { + /** @psalm-var stdClass|array|null $data */ + $data = $this->raw(self::FIELD_CUSTOM); if (is_null($data)) { return null; } - $this->textLineItems = TextLineItemCollection::fromArray($data); + + $this->custom = CustomFieldsModel::of($data); } - return $this->textLineItems; + return $this->custom; } /** - *

Identifies shopping lists belonging to an anonymous session (the customer has not signed up/in yet).

+ *

Present on resources created after 1 February 2019 except for events not tracked.

* * - * @return null|string + * @return null|LastModifiedBy */ - public function getAnonymousId() + public function getLastModifiedBy() { - if (is_null($this->anonymousId)) { - /** @psalm-var ?string $data */ - $data = $this->raw(self::FIELD_ANONYMOUS_ID); + if (is_null($this->lastModifiedBy)) { + /** @psalm-var stdClass|array|null $data */ + $data = $this->raw(self::FIELD_LAST_MODIFIED_BY); if (is_null($data)) { return null; } - $this->anonymousId = (string) $data; + + $this->lastModifiedBy = LastModifiedByModel::of($data); } - return $this->anonymousId; + return $this->lastModifiedBy; } /** + *

Present on resources created after 1 February 2019 except for events not tracked.

* - * @return null|StoreKeyReference + * + * @return null|CreatedBy */ - public function getStore() + public function getCreatedBy() { - if (is_null($this->store)) { + if (is_null($this->createdBy)) { /** @psalm-var stdClass|array|null $data */ - $data = $this->raw(self::FIELD_STORE); + $data = $this->raw(self::FIELD_CREATED_BY); if (is_null($data)) { return null; } - $this->store = StoreKeyReferenceModel::of($data); + $this->createdBy = CreatedByModel::of($data); } - return $this->store; + return $this->createdBy; } @@ -552,27 +570,19 @@ public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void } /** - * @param ?LastModifiedBy $lastModifiedBy - */ - public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void - { - $this->lastModifiedBy = $lastModifiedBy; - } - - /** - * @param ?CreatedBy $createdBy + * @param ?LocalizedString $name */ - public function setCreatedBy(?CreatedBy $createdBy): void + public function setName(?LocalizedString $name): void { - $this->createdBy = $createdBy; + $this->name = $name; } /** - * @param ?CustomFields $custom + * @param ?string $key */ - public function setCustom(?CustomFields $custom): void + public function setKey(?string $key): void { - $this->custom = $custom; + $this->key = $key; } /** @@ -584,11 +594,11 @@ public function setCustomer(?CustomerReference $customer): void } /** - * @param ?int $deleteDaysAfterLastModification + * @param ?LocalizedString $slug */ - public function setDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification): void + public function setSlug(?LocalizedString $slug): void { - $this->deleteDaysAfterLastModification = $deleteDaysAfterLastModification; + $this->slug = $slug; } /** @@ -600,59 +610,67 @@ public function setDescription(?LocalizedString $description): void } /** - * @param ?string $key + * @param ?ShoppingListLineItemCollection $lineItems */ - public function setKey(?string $key): void + public function setLineItems(?ShoppingListLineItemCollection $lineItems): void { - $this->key = $key; + $this->lineItems = $lineItems; } /** - * @param ?ShoppingListLineItemCollection $lineItems + * @param ?TextLineItemCollection $textLineItems */ - public function setLineItems(?ShoppingListLineItemCollection $lineItems): void + public function setTextLineItems(?TextLineItemCollection $textLineItems): void { - $this->lineItems = $lineItems; + $this->textLineItems = $textLineItems; } /** - * @param ?LocalizedString $name + * @param ?int $deleteDaysAfterLastModification */ - public function setName(?LocalizedString $name): void + public function setDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification): void { - $this->name = $name; + $this->deleteDaysAfterLastModification = $deleteDaysAfterLastModification; } /** - * @param ?LocalizedString $slug + * @param ?string $anonymousId */ - public function setSlug(?LocalizedString $slug): void + public function setAnonymousId(?string $anonymousId): void { - $this->slug = $slug; + $this->anonymousId = $anonymousId; } /** - * @param ?TextLineItemCollection $textLineItems + * @param ?StoreKeyReference $store */ - public function setTextLineItems(?TextLineItemCollection $textLineItems): void + public function setStore(?StoreKeyReference $store): void { - $this->textLineItems = $textLineItems; + $this->store = $store; } /** - * @param ?string $anonymousId + * @param ?CustomFields $custom */ - public function setAnonymousId(?string $anonymousId): void + public function setCustom(?CustomFields $custom): void { - $this->anonymousId = $anonymousId; + $this->custom = $custom; } /** - * @param ?StoreKeyReference $store + * @param ?LastModifiedBy $lastModifiedBy */ - public function setStore(?StoreKeyReference $store): void + public function setLastModifiedBy(?LastModifiedBy $lastModifiedBy): void { - $this->store = $store; + $this->lastModifiedBy = $lastModifiedBy; + } + + /** + * @param ?CreatedBy $createdBy + */ + public function setCreatedBy(?CreatedBy $createdBy): void + { + $this->createdBy = $createdBy; } diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListPagedQueryResponse.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListPagedQueryResponse.php index 8beecdcab34..b45d0fff5d9 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListPagedQueryResponse.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListPagedQueryResponse.php @@ -28,12 +28,20 @@ interface ShoppingListPagedQueryResponse extends JsonObject public function getLimit(); /** + *

Actual number of results returned.

+ * * @return null|int */ public function getCount(); /** + *

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.

+ * * @return null|int */ @@ -48,6 +56,8 @@ public function getTotal(); public function getOffset(); /** + *

ShoppingLists matching the query.

+ * * @return null|ShoppingListCollection */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListPagedQueryResponseBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListPagedQueryResponseBuilder.php index a8f2c7d9add..afd04f2dda6 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListPagedQueryResponseBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListPagedQueryResponseBuilder.php @@ -62,6 +62,8 @@ public function getLimit() } /** + *

Actual number of results returned.

+ * * @return null|int */ @@ -71,6 +73,12 @@ public function getCount() } /** + *

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.

+ * * @return null|int */ @@ -91,6 +99,8 @@ public function getOffset() } /** + *

ShoppingLists matching the query.

+ * * @return null|ShoppingListCollection */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListPagedQueryResponseModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListPagedQueryResponseModel.php index fd88b143c0a..0d8755f74d8 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListPagedQueryResponseModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListPagedQueryResponseModel.php @@ -88,6 +88,8 @@ public function getLimit() } /** + *

Actual number of results returned.

+ * * * @return null|int */ @@ -106,6 +108,12 @@ public function getCount() } /** + *

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.

+ * * * @return null|int */ @@ -144,6 +152,8 @@ public function getOffset() } /** + *

ShoppingLists matching the query.

+ * * * @return null|ShoppingListCollection */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveLineItemAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveLineItemAction.php index ed80e2692ad..52c1af29f7b 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveLineItemAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveLineItemAction.php @@ -17,12 +17,16 @@ interface ShoppingListRemoveLineItemAction extends ShoppingListUpdateAction public const FIELD_QUANTITY = 'quantity'; /** + *

The id of the ShoppingListLineItem to update.

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

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.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveLineItemActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveLineItemActionBuilder.php index 1272c22267e..0e157ff3949 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveLineItemActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveLineItemActionBuilder.php @@ -33,6 +33,8 @@ final class ShoppingListRemoveLineItemActionBuilder implements Builder private $quantity; /** + *

The id of the ShoppingListLineItem to update.

+ * * @return null|string */ @@ -42,6 +44,8 @@ public function getLineItemId() } /** + *

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.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveLineItemActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveLineItemActionModel.php index 00c4e6b8564..2102ca39077 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveLineItemActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveLineItemActionModel.php @@ -71,6 +71,8 @@ public function getAction() } /** + *

The id of the ShoppingListLineItem to update.

+ * * * @return null|string */ @@ -89,6 +91,8 @@ public function getLineItemId() } /** + *

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.

+ * * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveTextLineItemAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveTextLineItemAction.php index 9e60cbffb3c..85dc609edd6 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveTextLineItemAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveTextLineItemAction.php @@ -17,12 +17,16 @@ interface ShoppingListRemoveTextLineItemAction extends ShoppingListUpdateAction public const FIELD_QUANTITY = 'quantity'; /** + *

The id of the TextLineItem to update.

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

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.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveTextLineItemActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveTextLineItemActionBuilder.php index 7552e238ccf..5b2a2d21c04 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveTextLineItemActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveTextLineItemActionBuilder.php @@ -33,6 +33,8 @@ final class ShoppingListRemoveTextLineItemActionBuilder implements Builder private $quantity; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ @@ -42,6 +44,8 @@ public function getTextLineItemId() } /** + *

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.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveTextLineItemActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveTextLineItemActionModel.php index e70e9c07e1d..93f06d4f619 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveTextLineItemActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListRemoveTextLineItemActionModel.php @@ -71,6 +71,8 @@ public function getAction() } /** + *

The id of the TextLineItem to update.

+ * * * @return null|string */ @@ -89,6 +91,8 @@ public function getTextLineItemId() } /** + *

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.

+ * * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetAnonymousIdAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetAnonymousIdAction.php index b1f473a9263..a3e0f7b7bcf 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetAnonymousIdAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetAnonymousIdAction.php @@ -16,8 +16,7 @@ interface ShoppingListSetAnonymousIdAction extends ShoppingListUpdateAction public const FIELD_ANONYMOUS_ID = 'anonymousId'; /** - *

Anonymous ID of the anonymous customer that this shopping list belongs to. - * If this field is not set any existing anonymousId is removed.

+ *

Value to set. If empty, any existing value will be removed.

* * @return null|string diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetAnonymousIdActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetAnonymousIdActionBuilder.php index 4e1a6a3e6e1..4d71ef8ba3b 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetAnonymousIdActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetAnonymousIdActionBuilder.php @@ -27,8 +27,7 @@ final class ShoppingListSetAnonymousIdActionBuilder implements Builder private $anonymousId; /** - *

Anonymous ID of the anonymous customer that this shopping list belongs to. - * If this field is not set any existing anonymousId is removed.

+ *

Value to set. If empty, any existing value will be removed.

* * @return null|string diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetAnonymousIdActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetAnonymousIdActionModel.php index c2307e48c04..9df60835675 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetAnonymousIdActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetAnonymousIdActionModel.php @@ -63,8 +63,7 @@ public function getAction() } /** - *

Anonymous ID of the anonymous customer that this shopping list belongs to. - * If this field is not set any existing anonymousId is removed.

+ *

Value to set. If empty, any existing value will be removed.

* * * @return null|string diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomerAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomerAction.php index ce67b3225c0..7826b439976 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomerAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomerAction.php @@ -17,6 +17,8 @@ interface ShoppingListSetCustomerAction extends ShoppingListUpdateAction public const FIELD_CUSTOMER = 'customer'; /** + *

The Customer the ShoppingList should be associated to. If empty, any existing value will be removed.

+ * * @return null|CustomerResourceIdentifier */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomerActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomerActionBuilder.php index 6765870e86a..02e851513a3 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomerActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomerActionBuilder.php @@ -29,6 +29,8 @@ final class ShoppingListSetCustomerActionBuilder implements Builder private $customer; /** + *

The Customer the ShoppingList should be associated to. If empty, any existing value will be removed.

+ * * @return null|CustomerResourceIdentifier */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomerActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomerActionModel.php index 9e58e61a799..c136d00488c 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomerActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetCustomerActionModel.php @@ -65,6 +65,8 @@ public function getAction() } /** + *

The Customer the ShoppingList should be associated to. If empty, any existing value will be removed.

+ * * * @return null|CustomerResourceIdentifier */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDeleteDaysAfterLastModificationAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDeleteDaysAfterLastModificationAction.php index 336b0857047..8b2e149534c 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDeleteDaysAfterLastModificationAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDeleteDaysAfterLastModificationAction.php @@ -16,6 +16,8 @@ interface ShoppingListSetDeleteDaysAfterLastModificationAction extends ShoppingL public const FIELD_DELETE_DAYS_AFTER_LAST_MODIFICATION = 'deleteDaysAfterLastModification'; /** + *

Value to set. If empty, any existing value will be removed.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDeleteDaysAfterLastModificationActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDeleteDaysAfterLastModificationActionBuilder.php index e11f1413e13..faa29c223f8 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDeleteDaysAfterLastModificationActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDeleteDaysAfterLastModificationActionBuilder.php @@ -27,6 +27,8 @@ final class ShoppingListSetDeleteDaysAfterLastModificationActionBuilder implemen private $deleteDaysAfterLastModification; /** + *

Value to set. If empty, any existing value will be removed.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDeleteDaysAfterLastModificationActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDeleteDaysAfterLastModificationActionModel.php index 720aa91d903..5e22b1acc61 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDeleteDaysAfterLastModificationActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDeleteDaysAfterLastModificationActionModel.php @@ -63,6 +63,8 @@ public function getAction() } /** + *

Value to set. If empty, any existing value will be removed.

+ * * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDescriptionAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDescriptionAction.php index 36d1016971c..13535c6d475 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDescriptionAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDescriptionAction.php @@ -17,6 +17,8 @@ interface ShoppingListSetDescriptionAction extends ShoppingListUpdateAction public const FIELD_DESCRIPTION = 'description'; /** + *

Value to set. If empty, any existing value will be removed.

+ * * @return null|LocalizedString */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDescriptionActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDescriptionActionBuilder.php index f4c18a84a3a..f542ec8672d 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDescriptionActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDescriptionActionBuilder.php @@ -29,6 +29,8 @@ final class ShoppingListSetDescriptionActionBuilder implements Builder private $description; /** + *

Value to set. If empty, any existing value will be removed.

+ * * @return null|LocalizedString */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDescriptionActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDescriptionActionModel.php index e7af298678b..fb99ff215df 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDescriptionActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetDescriptionActionModel.php @@ -65,6 +65,8 @@ public function getAction() } /** + *

Value to set. If empty, any existing value will be removed.

+ * * * @return null|LocalizedString */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetKeyAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetKeyAction.php index 3e63ff2a247..ca5677616f0 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetKeyAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetKeyAction.php @@ -16,7 +16,7 @@ interface ShoppingListSetKeyAction extends ShoppingListUpdateAction public const FIELD_KEY = 'key'; /** - *

User-specific unique identifier for the shopping list.

+ *

Value to set. If empty, any existing value will be removed.

* * @return null|string diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetKeyActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetKeyActionBuilder.php index 3e39393c345..59aad40678c 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetKeyActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetKeyActionBuilder.php @@ -27,7 +27,7 @@ final class ShoppingListSetKeyActionBuilder implements Builder private $key; /** - *

User-specific unique identifier for the shopping list.

+ *

Value to set. If empty, any existing value will be removed.

* * @return null|string diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetKeyActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetKeyActionModel.php index 7aa3328d492..144f5498b05 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetKeyActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetKeyActionModel.php @@ -63,7 +63,7 @@ public function getAction() } /** - *

User-specific unique identifier for the shopping list.

+ *

Value to set. If empty, any existing value will be removed.

* * * @return null|string diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldAction.php index 1a4a0f84667..e11753d2320 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldAction.php @@ -18,6 +18,8 @@ interface ShoppingListSetLineItemCustomFieldAction extends ShoppingListUpdateAct public const FIELD_VALUE = 'value'; /** + *

The id of the ShoppingListLineItem to update.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldActionBuilder.php index 5aec1dd36fe..a7a66fd8f33 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldActionBuilder.php @@ -39,6 +39,8 @@ final class ShoppingListSetLineItemCustomFieldActionBuilder implements Builder private $value; /** + *

The id of the ShoppingListLineItem to update.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldActionModel.php index 7baaa1e4910..4a22f49c0fb 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomFieldActionModel.php @@ -79,6 +79,8 @@ public function getAction() } /** + *

The id of the ShoppingListLineItem to update.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomTypeAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomTypeAction.php index 0acdad98c8e..1e8cee323c0 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomTypeAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomTypeAction.php @@ -20,14 +20,16 @@ interface ShoppingListSetLineItemCustomTypeAction extends ShoppingListUpdateActi public const FIELD_FIELDS = 'fields'; /** + *

The id of the ShoppingListLineItem to update.

+ * * @return null|string */ public function getLineItemId(); /** - *

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 ShoppingListLineItem with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the ShoppingListLineItem.

* * @return null|TypeResourceIdentifier @@ -35,7 +37,7 @@ public function getLineItemId(); public function getType(); /** - *

Sets the Custom Fields fields for the LineItem.

+ *

Sets the Custom Fields fields for the ShoppingListLineItem.

* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomTypeActionBuilder.php index 93c1708fdb5..8d533933d9a 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomTypeActionBuilder.php @@ -43,6 +43,8 @@ final class ShoppingListSetLineItemCustomTypeActionBuilder implements Builder private $fields; /** + *

The id of the ShoppingListLineItem to update.

+ * * @return null|string */ @@ -52,8 +54,8 @@ public function getLineItemId() } /** - *

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 ShoppingListLineItem with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the ShoppingListLineItem.

* * @return null|TypeResourceIdentifier @@ -64,7 +66,7 @@ public function getType() } /** - *

Sets the Custom Fields fields for the LineItem.

+ *

Sets the Custom Fields fields for the ShoppingListLineItem.

* * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomTypeActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomTypeActionModel.php index 06eb86e32d0..e13ddde0935 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetLineItemCustomTypeActionModel.php @@ -83,6 +83,8 @@ public function getAction() } /** + *

The id of the ShoppingListLineItem to update.

+ * * * @return null|string */ @@ -101,8 +103,8 @@ public function getLineItemId() } /** - *

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 ShoppingListLineItem with Custom Fields. + * If absent, any existing Type and Custom Fields are removed from the ShoppingListLineItem.

* * * @return null|TypeResourceIdentifier @@ -123,7 +125,7 @@ public function getType() } /** - *

Sets the Custom Fields fields for the LineItem.

+ *

Sets the Custom Fields fields for the ShoppingListLineItem.

* * * @return null|FieldContainer diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetSlugAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetSlugAction.php index af942894140..8703a769c08 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetSlugAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetSlugAction.php @@ -17,6 +17,8 @@ interface ShoppingListSetSlugAction extends ShoppingListUpdateAction public const FIELD_SLUG = 'slug'; /** + *

Value to set. If empty, any existing value will be removed. Each slug is unique across a Project, but a ShoppingList can have the same slug for different languages. Must match the pattern ^[A-Za-z0-9_-]{2,256}+$

+ * * @return null|LocalizedString */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetSlugActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetSlugActionBuilder.php index d0f435e6034..bb5e2fa1c14 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetSlugActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetSlugActionBuilder.php @@ -29,6 +29,8 @@ final class ShoppingListSetSlugActionBuilder implements Builder private $slug; /** + *

Value to set. If empty, any existing value will be removed. Each slug is unique across a Project, but a ShoppingList can have the same slug for different languages. Must match the pattern ^[A-Za-z0-9_-]{2,256}+$

+ * * @return null|LocalizedString */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetSlugActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetSlugActionModel.php index 1e455f073b4..5d04bc0c9b0 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetSlugActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetSlugActionModel.php @@ -65,6 +65,8 @@ public function getAction() } /** + *

Value to set. If empty, any existing value will be removed. Each slug is unique across a Project, but a ShoppingList can have the same slug for different languages. Must match the pattern ^[A-Za-z0-9_-]{2,256}+$

+ * * * @return null|LocalizedString */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetStoreAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetStoreAction.php index 87a19469223..c41afb0caae 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetStoreAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetStoreAction.php @@ -17,6 +17,8 @@ interface ShoppingListSetStoreAction extends ShoppingListUpdateAction public const FIELD_STORE = 'store'; /** + *

The Store the ShoppingList should be assigned to. If empty, any existing value will be removed.

+ * * @return null|StoreResourceIdentifier */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetStoreActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetStoreActionBuilder.php index 086c3029aaa..06483fe9545 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetStoreActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetStoreActionBuilder.php @@ -29,6 +29,8 @@ final class ShoppingListSetStoreActionBuilder implements Builder private $store; /** + *

The Store the ShoppingList should be assigned to. If empty, any existing value will be removed.

+ * * @return null|StoreResourceIdentifier */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetStoreActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetStoreActionModel.php index 06e060569dd..8f3c5ec08c5 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetStoreActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetStoreActionModel.php @@ -65,6 +65,8 @@ public function getAction() } /** + *

The Store the ShoppingList should be assigned to. If empty, any existing value will be removed.

+ * * * @return null|StoreResourceIdentifier */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldAction.php index 5bc029b673c..32b84944021 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldAction.php @@ -18,6 +18,8 @@ interface ShoppingListSetTextLineItemCustomFieldAction extends ShoppingListUpdat public const FIELD_VALUE = 'value'; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldActionBuilder.php index 6200be2cdff..670e97a4040 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldActionBuilder.php @@ -39,6 +39,8 @@ final class ShoppingListSetTextLineItemCustomFieldActionBuilder implements Build private $value; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldActionModel.php index 1e456924794..35df7fb1a7b 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomFieldActionModel.php @@ -79,6 +79,8 @@ public function getAction() } /** + *

The id of the TextLineItem to update.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomTypeAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomTypeAction.php index da21492202b..c12b04d290d 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomTypeAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomTypeAction.php @@ -20,6 +20,8 @@ interface ShoppingListSetTextLineItemCustomTypeAction extends ShoppingListUpdate public const FIELD_FIELDS = 'fields'; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomTypeActionBuilder.php index 4a0e79a0215..2a6c06224c0 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomTypeActionBuilder.php @@ -43,6 +43,8 @@ final class ShoppingListSetTextLineItemCustomTypeActionBuilder implements Builde private $fields; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomTypeActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomTypeActionModel.php index 5a271e252b1..a5d8c9b609a 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemCustomTypeActionModel.php @@ -83,6 +83,8 @@ public function getAction() } /** + *

The id of the TextLineItem to update.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemDescriptionAction.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemDescriptionAction.php index a4a0269aae7..ba0be619c9f 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemDescriptionAction.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemDescriptionAction.php @@ -18,13 +18,15 @@ interface ShoppingListSetTextLineItemDescriptionAction extends ShoppingListUpdat public const FIELD_DESCRIPTION = 'description'; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ public function getTextLineItemId(); /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Value to set. If empty, any existing value will be removed.

* * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemDescriptionActionBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemDescriptionActionBuilder.php index cb4d55786ff..f0ca66fe2e0 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemDescriptionActionBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemDescriptionActionBuilder.php @@ -35,6 +35,8 @@ final class ShoppingListSetTextLineItemDescriptionActionBuilder implements Build private $description; /** + *

The id of the TextLineItem to update.

+ * * @return null|string */ @@ -44,7 +46,7 @@ public function getTextLineItemId() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Value to set. If empty, any existing value will be removed.

* * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemDescriptionActionModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemDescriptionActionModel.php index b09eeffecbd..35302bfed1c 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemDescriptionActionModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListSetTextLineItemDescriptionActionModel.php @@ -73,6 +73,8 @@ public function getAction() } /** + *

The id of the TextLineItem to update.

+ * * * @return null|string */ @@ -91,7 +93,7 @@ public function getTextLineItemId() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Value to set. If empty, any existing value will be removed.

* * * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListUpdate.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListUpdate.php index f5334afec16..54a0eb3ca0f 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListUpdate.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListUpdate.php @@ -17,12 +17,16 @@ interface ShoppingListUpdate extends JsonObject public const FIELD_ACTIONS = 'actions'; /** + *

Expected version of the ShoppingList 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(); /** + *

List of update actions to be performed on the ShoppingList.

+ * * @return null|ShoppingListUpdateActionCollection */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListUpdateBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListUpdateBuilder.php index 226717835b5..2244a892766 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListUpdateBuilder.php @@ -33,6 +33,8 @@ final class ShoppingListUpdateBuilder implements Builder private $actions; /** + *

Expected version of the ShoppingList 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 */ @@ -42,6 +44,8 @@ public function getVersion() } /** + *

List of update actions to be performed on the ShoppingList.

+ * * @return null|ShoppingListUpdateActionCollection */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListUpdateModel.php b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListUpdateModel.php index 5a726d592a9..e498edbd783 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/ShoppingListUpdateModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/ShoppingListUpdateModel.php @@ -44,6 +44,8 @@ public function __construct( } /** + *

Expected version of the ShoppingList 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 */ @@ -62,6 +64,8 @@ public function getVersion() } /** + *

List of update actions to be performed on the ShoppingList.

+ * * * @return null|ShoppingListUpdateActionCollection */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/TextLineItem.php b/lib/commercetools-api/src/Models/ShoppingList/TextLineItem.php index 5b2c9195161..0390247cd42 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/TextLineItem.php +++ b/lib/commercetools-api/src/Models/ShoppingList/TextLineItem.php @@ -24,7 +24,7 @@ interface TextLineItem extends JsonObject public const FIELD_QUANTITY = 'quantity'; /** - *

When the text line item was added to the shopping list.

+ *

Date and time (UTC) the TextLineItem was added to the ShoppingList.

* * @return null|DateTimeImmutable @@ -32,12 +32,16 @@ interface TextLineItem extends JsonObject public function getAddedAt(); /** + *

Custom Fields of the TextLineItem.

+ * * @return null|CustomFields */ public function getCustom(); /** + *

Description of the TextLineItem.

+ * * @return null|LocalizedString */ @@ -52,12 +56,16 @@ public function getDescription(); public function getId(); /** + *

Name of the TextLineItem.

+ * * @return null|LocalizedString */ public function getName(); /** + *

Number of entries in the TextLineItem.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/TextLineItemBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/TextLineItemBuilder.php index bd6f7463c32..ded427948c8 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/TextLineItemBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/TextLineItemBuilder.php @@ -62,7 +62,7 @@ final class TextLineItemBuilder implements Builder private $quantity; /** - *

When the text line item was added to the shopping list.

+ *

Date and time (UTC) the TextLineItem was added to the ShoppingList.

* * @return null|DateTimeImmutable @@ -73,6 +73,8 @@ public function getAddedAt() } /** + *

Custom Fields of the TextLineItem.

+ * * @return null|CustomFields */ @@ -82,6 +84,8 @@ public function getCustom() } /** + *

Description of the TextLineItem.

+ * * @return null|LocalizedString */ @@ -102,6 +106,8 @@ public function getId() } /** + *

Name of the TextLineItem.

+ * * @return null|LocalizedString */ @@ -111,6 +117,8 @@ public function getName() } /** + *

Number of entries in the TextLineItem.

+ * * @return null|int */ diff --git a/lib/commercetools-api/src/Models/ShoppingList/TextLineItemDraft.php b/lib/commercetools-api/src/Models/ShoppingList/TextLineItemDraft.php index 5d646151c91..f4817b0d61d 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/TextLineItemDraft.php +++ b/lib/commercetools-api/src/Models/ShoppingList/TextLineItemDraft.php @@ -23,7 +23,7 @@ interface TextLineItemDraft extends JsonObject public const FIELD_QUANTITY = 'quantity'; /** - *

Defaults to the current date and time.

+ *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

* * @return null|DateTimeImmutable @@ -31,7 +31,7 @@ interface TextLineItemDraft extends JsonObject public function getAddedAt(); /** - *

The custom fields.

+ *

Custom Fields for the TextLineItem.

* * @return null|CustomFieldsDraft @@ -39,19 +39,23 @@ public function getAddedAt(); public function getCustom(); /** + *

Description of the TextLineItem.

+ * * @return null|LocalizedString */ public function getDescription(); /** + *

Name of the TextLineItem.

+ * * @return null|LocalizedString */ public function getName(); /** - *

Defaults to 1.

+ *

Number of entries in the TextLineItem.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/ShoppingList/TextLineItemDraftBuilder.php b/lib/commercetools-api/src/Models/ShoppingList/TextLineItemDraftBuilder.php index c127737b6a6..d3ce18af5e8 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/TextLineItemDraftBuilder.php +++ b/lib/commercetools-api/src/Models/ShoppingList/TextLineItemDraftBuilder.php @@ -56,7 +56,7 @@ final class TextLineItemDraftBuilder implements Builder private $quantity; /** - *

Defaults to the current date and time.

+ *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

* * @return null|DateTimeImmutable @@ -67,7 +67,7 @@ public function getAddedAt() } /** - *

The custom fields.

+ *

Custom Fields for the TextLineItem.

* * @return null|CustomFieldsDraft @@ -78,6 +78,8 @@ public function getCustom() } /** + *

Description of the TextLineItem.

+ * * @return null|LocalizedString */ @@ -87,6 +89,8 @@ public function getDescription() } /** + *

Name of the TextLineItem.

+ * * @return null|LocalizedString */ @@ -96,7 +100,7 @@ public function getName() } /** - *

Defaults to 1.

+ *

Number of entries in the TextLineItem.

* * @return null|int diff --git a/lib/commercetools-api/src/Models/ShoppingList/TextLineItemDraftModel.php b/lib/commercetools-api/src/Models/ShoppingList/TextLineItemDraftModel.php index d6f0a78f600..72d75028d0d 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/TextLineItemDraftModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/TextLineItemDraftModel.php @@ -73,7 +73,7 @@ public function __construct( } /** - *

Defaults to the current date and time.

+ *

Date and time the TextLineItem is added to the ShoppingList. If not set, the current date and time (UTC) is used.

* * * @return null|DateTimeImmutable @@ -97,7 +97,7 @@ public function getAddedAt() } /** - *

The custom fields.

+ *

Custom Fields for the TextLineItem.

* * * @return null|CustomFieldsDraft @@ -118,6 +118,8 @@ public function getCustom() } /** + *

Description of the TextLineItem.

+ * * * @return null|LocalizedString */ @@ -137,6 +139,8 @@ public function getDescription() } /** + *

Name of the TextLineItem.

+ * * * @return null|LocalizedString */ @@ -156,7 +160,7 @@ public function getName() } /** - *

Defaults to 1.

+ *

Number of entries in the TextLineItem.

* * * @return null|int diff --git a/lib/commercetools-api/src/Models/ShoppingList/TextLineItemModel.php b/lib/commercetools-api/src/Models/ShoppingList/TextLineItemModel.php index 0bb64d146e3..e145c6e08ec 100644 --- a/lib/commercetools-api/src/Models/ShoppingList/TextLineItemModel.php +++ b/lib/commercetools-api/src/Models/ShoppingList/TextLineItemModel.php @@ -81,7 +81,7 @@ public function __construct( } /** - *

When the text line item was added to the shopping list.

+ *

Date and time (UTC) the TextLineItem was added to the ShoppingList.

* * * @return null|DateTimeImmutable @@ -105,6 +105,8 @@ public function getAddedAt() } /** + *

Custom Fields of the TextLineItem.

+ * * * @return null|CustomFields */ @@ -124,6 +126,8 @@ public function getCustom() } /** + *

Description of the TextLineItem.

+ * * * @return null|LocalizedString */ @@ -163,6 +167,8 @@ public function getId() } /** + *

Name of the TextLineItem.

+ * * * @return null|LocalizedString */ @@ -182,6 +188,8 @@ public function getName() } /** + *

Number of entries in the TextLineItem.

+ * * * @return null|int */ From 336236df111a4a6e03238490bc64cc55d8f465f9 Mon Sep 17 00:00:00 2001 From: Auto Mation Date: Tue, 22 Nov 2022 09:49:51 +0000 Subject: [PATCH 3/4] TASK: Updating SDK --- changes.md | 17 ++++ ...eyByStoreKeyProductProjectionsByIDTest.php | 13 +++ ...StoreKeyProductProjectionsKeyByKeyTest.php | 13 +++ ...ProjectKeyProductProjectionsSearchTest.php | 24 ++--- ...rojectKeyProductProjectionsSuggestTest.php | 24 ++--- .../ResourceByProjectKeyProductsByIDTest.php | 36 +++++++ ...sourceByProjectKeyProductsKeyByKeyTest.php | 36 +++++++ .../ResourceByProjectKeyProductsTest.php | 22 +++++ lib/commercetools-api/docs/RequestBuilder.md | 32 ++++--- ...KeyByStoreKeyProductProjectionsByIDGet.php | 12 ++- ...yStoreKeyProductProjectionsKeyByKeyGet.php | 12 ++- .../ByProjectKeyProductProjectionsByIDGet.php | 3 +- .../ByProjectKeyProductProjectionsGet.php | 3 +- ...rojectKeyProductProjectionsKeyByKeyGet.php | 3 +- ...yProjectKeyProductProjectionsSearchGet.php | 21 +++-- ...ProjectKeyProductProjectionsSuggestGet.php | 21 +++-- .../ByProjectKeyProductsByIDDelete.php | 9 ++ .../Resource/ByProjectKeyProductsByIDGet.php | 9 ++ .../Resource/ByProjectKeyProductsByIDPost.php | 9 ++ .../Resource/ByProjectKeyProductsGet.php | 9 ++ .../ByProjectKeyProductsKeyByKeyDelete.php | 9 ++ .../ByProjectKeyProductsKeyByKeyGet.php | 9 ++ .../ByProjectKeyProductsKeyByKeyPost.php | 9 ++ .../Resource/ByProjectKeyProductsPost.php | 9 ++ .../src/Client/Resource/PriceSelecting.php | 6 ++ .../Client/Resource/ProjectionSelecting.php | 24 +++++ .../src/Models/Product/ProductProjection.php | 84 ++++++++++++++++- .../Product/ProductProjectionBuilder.php | 78 ++++++++++++++-- .../Models/Product/ProductProjectionModel.php | 93 +++++++++++++++++-- .../ProductProjectionPagedQueryResponse.php | 10 ++ ...uctProjectionPagedQueryResponseBuilder.php | 10 ++ ...oductProjectionPagedQueryResponseModel.php | 10 ++ 32 files changed, 598 insertions(+), 81 deletions(-) create mode 100644 lib/commercetools-api/src/Client/Resource/ProjectionSelecting.php diff --git a/changes.md b/changes.md index 4b33fc66006..a0a539a3415 100644 --- a/changes.md +++ b/changes.md @@ -11,6 +11,7 @@ - added property `extensionKey` to type `ExtensionBadResponseError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/ExtensionBadResponseError.raml:36:2) - added property `extensionErrors` to type `ExtensionUpdateActionsFailedError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/ExtensionUpdateActionsFailedError.raml:24:2) - added property `detailedErrorMessage` to type `InvalidJsonInputError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/InvalidJsonInputError.raml:17:2) +- added property `priceMode` to type `ProductProjection` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/product/ProductProjection.raml:103:2) @@ -62,3 +63,19 @@ - :warning: removed type `WeakPasswordError` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference-previous/api-specs/api/types/types.raml:478:0) + +
+Added QueryParameter(s) + +- added query parameter `localeProjection` to method `get /{projectKey}/products` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/traits/price-selecting.raml:23:2) +- added query parameter `localeProjection` to method `post /{projectKey}/products` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/traits/price-selecting.raml:23:2) +- added query parameter `localeProjection` to method `get /{projectKey}/products/key={key}` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/traits/price-selecting.raml:23:2) +- added query parameter `localeProjection` to method `post /{projectKey}/products/key={key}` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/traits/price-selecting.raml:23:2) +- added query parameter `localeProjection` to method `delete /{projectKey}/products/key={key}` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/traits/price-selecting.raml:23:2) +- added query parameter `localeProjection` to method `get /{projectKey}/products/{ID}` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/traits/price-selecting.raml:23:2) +- added query parameter `localeProjection` to method `post /{projectKey}/products/{ID}` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/traits/price-selecting.raml:23:2) +- added query parameter `localeProjection` to method `delete /{projectKey}/products/{ID}` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/traits/price-selecting.raml:23:2) +- added query parameter `staged` to method `get /{projectKey}/in-store/key={storeKey}/product-projections/key={key}` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/traits/projection-selecting.raml:3:2) +- added query parameter `staged` to method `get /{projectKey}/in-store/key={storeKey}/product-projections/{ID}` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/traits/projection-selecting.raml:3:2) +
+ diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDTest.php index 075e7d09567..52fec367721 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDTest.php @@ -90,6 +90,19 @@ public function testExecuteServerException(callable $builderFunction) public function getRequests() { return [ + 'ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet_withStaged' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->inStoreKeyWithStoreKeyValue('test_storeKey') + ->productProjections() + ->withId('test_ID') + ->get() + ->withStaged('staged'); + }, + 'get', + 'test_projectKey/in-store/key=test_storeKey/product-projections/test_ID?staged=staged', + ], 'ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet_withPriceCurrency' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyTest.php index 982c0e05f20..d0f65ab2634 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyTest.php @@ -90,6 +90,19 @@ public function testExecuteServerException(callable $builderFunction) public function getRequests() { return [ + 'ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet_withStaged' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->inStoreKeyWithStoreKeyValue('test_storeKey') + ->productProjections() + ->withKey('test_key') + ->get() + ->withStaged('staged'); + }, + 'get', + 'test_projectKey/in-store/key=test_storeKey/product-projections/key=test_key?staged=staged', + ], 'ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet_withPriceCurrency' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsSearchTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsSearchTest.php index 24361b6a695..13a67a2b62f 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsSearchTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsSearchTest.php @@ -138,18 +138,6 @@ function (ApiRequestBuilder $builder): RequestInterface { 'get', 'test_projectKey/product-projections/search?markMatchingVariants=markMatchingVariants', ], - 'ByProjectKeyProductProjectionsSearchGet_withStaged' => [ - function (ApiRequestBuilder $builder): RequestInterface { - return $builder - ->withProjectKey('test_projectKey') - ->productProjections() - ->search() - ->get() - ->withStaged('staged'); - }, - 'get', - 'test_projectKey/product-projections/search?staged=staged', - ], 'ByProjectKeyProductProjectionsSearchGet_withFilter' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder @@ -258,6 +246,18 @@ function (ApiRequestBuilder $builder): RequestInterface { 'get', 'test_projectKey/product-projections/search?withTotal=withTotal', ], + 'ByProjectKeyProductProjectionsSearchGet_withStaged' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->productProjections() + ->search() + ->get() + ->withStaged('staged'); + }, + 'get', + 'test_projectKey/product-projections/search?staged=staged', + ], 'ByProjectKeyProductProjectionsSearchGet_withPriceCurrency' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsSuggestTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsSuggestTest.php index e35d67354c3..850780b1614 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsSuggestTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsSuggestTest.php @@ -102,18 +102,6 @@ function (ApiRequestBuilder $builder): RequestInterface { 'get', 'test_projectKey/product-projections/suggest?fuzzy=fuzzy', ], - 'ByProjectKeyProductProjectionsSuggestGet_withStaged' => [ - function (ApiRequestBuilder $builder): RequestInterface { - return $builder - ->withProjectKey('test_projectKey') - ->productProjections() - ->suggest() - ->get() - ->withStaged('staged'); - }, - 'get', - 'test_projectKey/product-projections/suggest?staged=staged', - ], 'ByProjectKeyProductProjectionsSuggestGet_withSearchKeywords' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder @@ -174,6 +162,18 @@ function (ApiRequestBuilder $builder): RequestInterface { 'get', 'test_projectKey/product-projections/suggest?withTotal=withTotal', ], + 'ByProjectKeyProductProjectionsSuggestGet_withStaged' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->productProjections() + ->suggest() + ->get() + ->withStaged('staged'); + }, + 'get', + 'test_projectKey/product-projections/suggest?staged=staged', + ], 'ByProjectKeyProductProjectionsSuggestGet' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductsByIDTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductsByIDTest.php index 128cb648afa..7fb7dfdc2a7 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductsByIDTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductsByIDTest.php @@ -152,6 +152,18 @@ function (ApiRequestBuilder $builder): RequestInterface { 'get', 'test_projectKey/products/test_ID?priceChannel=priceChannel', ], + 'ByProjectKeyProductsByIDGet_withLocaleProjection' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->products() + ->withId('test_ID') + ->get() + ->withLocaleProjection('localeProjection'); + }, + 'get', + 'test_projectKey/products/test_ID?localeProjection=localeProjection', + ], 'ByProjectKeyProductsByIDGet_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder @@ -234,6 +246,18 @@ function (ApiRequestBuilder $builder): RequestInterface { 'post', 'test_projectKey/products/test_ID?priceChannel=priceChannel', ], + 'ByProjectKeyProductsByIDPost_withLocaleProjection' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->products() + ->withId('test_ID') + ->post(null) + ->withLocaleProjection('localeProjection'); + }, + 'post', + 'test_projectKey/products/test_ID?localeProjection=localeProjection', + ], 'ByProjectKeyProductsByIDPost_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder @@ -305,6 +329,18 @@ function (ApiRequestBuilder $builder): RequestInterface { 'delete', 'test_projectKey/products/test_ID?priceChannel=priceChannel', ], + 'ByProjectKeyProductsByIDDelete_withLocaleProjection' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->products() + ->withId('test_ID') + ->delete() + ->withLocaleProjection('localeProjection'); + }, + 'delete', + 'test_projectKey/products/test_ID?localeProjection=localeProjection', + ], 'ByProjectKeyProductsByIDDelete_withVersion' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductsKeyByKeyTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductsKeyByKeyTest.php index 267d0316128..9fedf7c0079 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductsKeyByKeyTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductsKeyByKeyTest.php @@ -151,6 +151,18 @@ function (ApiRequestBuilder $builder): RequestInterface { 'get', 'test_projectKey/products/key=test_key?priceChannel=priceChannel', ], + 'ByProjectKeyProductsKeyByKeyGet_withLocaleProjection' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->products() + ->withKey('test_key') + ->get() + ->withLocaleProjection('localeProjection'); + }, + 'get', + 'test_projectKey/products/key=test_key?localeProjection=localeProjection', + ], 'ByProjectKeyProductsKeyByKeyGet_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder @@ -233,6 +245,18 @@ function (ApiRequestBuilder $builder): RequestInterface { 'post', 'test_projectKey/products/key=test_key?priceChannel=priceChannel', ], + 'ByProjectKeyProductsKeyByKeyPost_withLocaleProjection' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->products() + ->withKey('test_key') + ->post(null) + ->withLocaleProjection('localeProjection'); + }, + 'post', + 'test_projectKey/products/key=test_key?localeProjection=localeProjection', + ], 'ByProjectKeyProductsKeyByKeyPost_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder @@ -304,6 +328,18 @@ function (ApiRequestBuilder $builder): RequestInterface { 'delete', 'test_projectKey/products/key=test_key?priceChannel=priceChannel', ], + 'ByProjectKeyProductsKeyByKeyDelete_withLocaleProjection' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->products() + ->withKey('test_key') + ->delete() + ->withLocaleProjection('localeProjection'); + }, + 'delete', + 'test_projectKey/products/key=test_key?localeProjection=localeProjection', + ], 'ByProjectKeyProductsKeyByKeyDelete_withVersion' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductsTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductsTest.php index 04b85b8bbef..e7e86996e56 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductsTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductsTest.php @@ -158,6 +158,17 @@ function (ApiRequestBuilder $builder): RequestInterface { 'get', 'test_projectKey/products?priceChannel=priceChannel', ], + 'ByProjectKeyProductsGet_withLocaleProjection' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->products() + ->get() + ->withLocaleProjection('localeProjection'); + }, + 'get', + 'test_projectKey/products?localeProjection=localeProjection', + ], 'ByProjectKeyProductsGet_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder @@ -299,6 +310,17 @@ function (ApiRequestBuilder $builder): RequestInterface { 'post', 'test_projectKey/products?priceChannel=priceChannel', ], + 'ByProjectKeyProductsPost_withLocaleProjection' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->products() + ->post(null) + ->withLocaleProjection('localeProjection'); + }, + 'post', + 'test_projectKey/products?localeProjection=localeProjection', + ], 'ByProjectKeyProductsPost_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder diff --git a/lib/commercetools-api/docs/RequestBuilder.md b/lib/commercetools-api/docs/RequestBuilder.md index 2c349ff99fa..d68818fd02a 100644 --- a/lib/commercetools-api/docs/RequestBuilder.md +++ b/lib/commercetools-api/docs/RequestBuilder.md @@ -2510,7 +2510,13 @@ $request = $builder ``` ## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->productProjections()->withId("ID")->get()` -Gets the current or staged representation of a [Product](ctp:api:type:Product) by its ID from the specified Store. +Gets the current or staged representation of a [Product](ctp:api:type:Product) by its ID from the specified [Store](ctp:api:type:Store). +If the Store has defined some languages, countries, distribution or supply Channels, +they are used for projections based on [locale](ctp:api:type:ProductProjectionLocales), [price](ctp:api:type:ProductProjectionPrices) +and [inventory](ctp:api:type:ProductProjectionInventoryEntries). + +When used with an API Client that has the `view_published_products:{projectKey}` scope, this endpoint only returns published (current) Product Projections. + ### Example ```php @@ -2526,7 +2532,13 @@ $request = $builder ``` ## `withProjectKey("projectKey")->inStoreKeyWithStoreKeyValue("storeKey")->productProjections()->withKey("key")->get()` -Gets the current or staged representation of a [Product](ctp:api:type:Product) by its key from the specified Store. +Gets the current or staged representation of a [Product](ctp:api:type:Product) by its key from the specified [Store](ctp:api:type:Store). +If the Store has defined some languages, countries, distribution or supply Channels, +they are used for projections based on [locale](ctp:api:type:ProductProjectionLocales), [price](ctp:api:type:ProductProjectionPrices) +and [inventory](ctp:api:type:ProductProjectionInventoryEntries). + +When used with an API Client that has the `view_published_products:{projectKey}` scope, this endpoint only returns published (current) Product Projections. + ### Example ```php @@ -4392,9 +4404,9 @@ $request = $builder ``` ## `withProjectKey("projectKey")->productProjections()->get()` -You can use the product projections query endpoint to get the current or staged representations of Products. -When used with an API client that has the view_published_products:{projectKey} scope, -this endpoint only returns published (current) product projections. +Use the Product Projections query endpoint to get the current or staged representations of Products. +When used with an API Client that has the `view_published_products:{projectKey}` scope, +this endpoint only returns published (current) Product Projections. ### Example @@ -4409,9 +4421,7 @@ $request = $builder ``` ## `withProjectKey("projectKey")->productProjections()->withId("ID")->get()` -Gets the current or staged representation of a product in a catalog by ID. -When used with an API client that has the view_published_products:{projectKey} scope, -this endpoint only returns published (current) product projections. +Gets the current or staged representation of a [Product](ctp:api:type:Product) by its ID. When used with an API Client that has the `view_published_products:{projectKey}` scope, this endpoint only returns published (current) Product Projections. ### Example @@ -4427,9 +4437,9 @@ $request = $builder ``` ## `withProjectKey("projectKey")->productProjections()->withKey("key")->get()` -Gets the current or staged representation of a product found by Key. -When used with an API client that has the view_published_products:{projectKey} scope, -this endpoint only returns published (current) product projections. +Gets the current or staged representation of a [Product](ctp:api:type:Product) found by Key. +When used with an API Client that has the `view_published_products:{projectKey}` scope, +this endpoint only returns published (current) Product Projections. ### Example diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet.php index 2a8036319e6..47d94cce366 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet.php @@ -30,13 +30,14 @@ /** * @psalm-suppress PropertyNotSetInConstructor + * @template-implements ProjectionSelecting * @template-implements PriceSelecting * @template-implements LocaleProjecting * @template-implements Expandable * @template-implements Errorable * @template-implements Deprecatable200 */ -class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet extends ApiRequest implements PriceSelecting, LocaleProjecting, Expandable, Errorable, Deprecatable200 +class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet extends ApiRequest implements ProjectionSelecting, PriceSelecting, LocaleProjecting, Expandable, Errorable, Deprecatable200 { /** * @param ?object|array|string $body @@ -146,6 +147,15 @@ function (RequestException $e) use ($resultType) { ); } + /** + * + * @psalm-param scalar|scalar[] $staged + */ + public function withStaged($staged): ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet + { + return $this->withQueryParam('staged', $staged); + } + /** * * @psalm-param scalar|scalar[] $priceCurrency diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet.php index 93f5b938f96..919b22d5375 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet.php @@ -30,13 +30,14 @@ /** * @psalm-suppress PropertyNotSetInConstructor + * @template-implements ProjectionSelecting * @template-implements PriceSelecting * @template-implements LocaleProjecting * @template-implements Expandable * @template-implements Errorable * @template-implements Deprecatable200 */ -class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet extends ApiRequest implements PriceSelecting, LocaleProjecting, Expandable, Errorable, Deprecatable200 +class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet extends ApiRequest implements ProjectionSelecting, PriceSelecting, LocaleProjecting, Expandable, Errorable, Deprecatable200 { /** * @param ?object|array|string $body @@ -146,6 +147,15 @@ function (RequestException $e) use ($resultType) { ); } + /** + * + * @psalm-param scalar|scalar[] $staged + */ + public function withStaged($staged): ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet + { + return $this->withQueryParam('staged', $staged); + } + /** * * @psalm-param scalar|scalar[] $priceCurrency diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsByIDGet.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsByIDGet.php index 2aa78e65e4f..4b012c52d25 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsByIDGet.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsByIDGet.php @@ -30,6 +30,7 @@ /** * @psalm-suppress PropertyNotSetInConstructor + * @template-implements ProjectionSelecting * @template-implements PriceSelecting * @template-implements LocaleProjecting * @template-implements StoreProjecting @@ -37,7 +38,7 @@ * @template-implements Errorable * @template-implements Deprecatable200 */ -class ByProjectKeyProductProjectionsByIDGet extends ApiRequest implements PriceSelecting, LocaleProjecting, StoreProjecting, Expandable, Errorable, Deprecatable200 +class ByProjectKeyProductProjectionsByIDGet extends ApiRequest implements ProjectionSelecting, PriceSelecting, LocaleProjecting, StoreProjecting, Expandable, Errorable, Deprecatable200 { /** * @param ?object|array|string $body diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsGet.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsGet.php index ca0ca74c48d..e7d4c12bf18 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsGet.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsGet.php @@ -30,6 +30,7 @@ /** * @psalm-suppress PropertyNotSetInConstructor + * @template-implements ProjectionSelecting * @template-implements PriceSelecting * @template-implements LocaleProjecting * @template-implements StoreProjecting @@ -40,7 +41,7 @@ * @template-implements Errorable * @template-implements Deprecatable200 */ -class ByProjectKeyProductProjectionsGet extends ApiRequest implements PriceSelecting, LocaleProjecting, StoreProjecting, Expandable, Sortable, Paging, Query, Errorable, Deprecatable200 +class ByProjectKeyProductProjectionsGet extends ApiRequest implements ProjectionSelecting, PriceSelecting, LocaleProjecting, StoreProjecting, Expandable, Sortable, Paging, Query, Errorable, Deprecatable200 { /** * @param ?object|array|string $body diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsKeyByKeyGet.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsKeyByKeyGet.php index 3c3fa5cdfd8..a5283565274 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsKeyByKeyGet.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsKeyByKeyGet.php @@ -30,6 +30,7 @@ /** * @psalm-suppress PropertyNotSetInConstructor + * @template-implements ProjectionSelecting * @template-implements PriceSelecting * @template-implements LocaleProjecting * @template-implements StoreProjecting @@ -37,7 +38,7 @@ * @template-implements Errorable * @template-implements Deprecatable200 */ -class ByProjectKeyProductProjectionsKeyByKeyGet extends ApiRequest implements PriceSelecting, LocaleProjecting, StoreProjecting, Expandable, Errorable, Deprecatable200 +class ByProjectKeyProductProjectionsKeyByKeyGet extends ApiRequest implements ProjectionSelecting, PriceSelecting, LocaleProjecting, StoreProjecting, Expandable, Errorable, Deprecatable200 { /** * @param ?object|array|string $body diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsSearchGet.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsSearchGet.php index d639b6f6776..bc317570663 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsSearchGet.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsSearchGet.php @@ -32,6 +32,7 @@ * @psalm-suppress PropertyNotSetInConstructor * @template-implements Sortable * @template-implements Paging + * @template-implements ProjectionSelecting * @template-implements PriceSelecting * @template-implements LocaleProjecting * @template-implements StoreProjecting @@ -39,7 +40,7 @@ * @template-implements Errorable * @template-implements Deprecatable200 */ -class ByProjectKeyProductProjectionsSearchGet extends ApiRequest implements Sortable, Paging, PriceSelecting, LocaleProjecting, StoreProjecting, Expandable, Errorable, Deprecatable200 +class ByProjectKeyProductProjectionsSearchGet extends ApiRequest implements Sortable, Paging, ProjectionSelecting, PriceSelecting, LocaleProjecting, StoreProjecting, Expandable, Errorable, Deprecatable200 { /** * @param ?object|array|string $body @@ -176,15 +177,6 @@ public function withMarkMatchingVariants($markMatchingVariants): ByProjectKeyPro return $this->withQueryParam('markMatchingVariants', $markMatchingVariants); } - /** - * - * @psalm-param scalar|scalar[] $staged - */ - public function withStaged($staged): ByProjectKeyProductProjectionsSearchGet - { - return $this->withQueryParam('staged', $staged); - } - /** * * @psalm-param scalar|scalar[] $filter @@ -266,6 +258,15 @@ public function withWithTotal($withTotal): ByProjectKeyProductProjectionsSearchG return $this->withQueryParam('withTotal', $withTotal); } + /** + * + * @psalm-param scalar|scalar[] $staged + */ + public function withStaged($staged): ByProjectKeyProductProjectionsSearchGet + { + return $this->withQueryParam('staged', $staged); + } + /** * * @psalm-param scalar|scalar[] $priceCurrency diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsSuggestGet.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsSuggestGet.php index cb368c88f63..a7a3c073682 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsSuggestGet.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsSuggestGet.php @@ -32,10 +32,11 @@ * @psalm-suppress PropertyNotSetInConstructor * @template-implements Sortable * @template-implements Paging + * @template-implements ProjectionSelecting * @template-implements Errorable * @template-implements Deprecatable200 */ -class ByProjectKeyProductProjectionsSuggestGet extends ApiRequest implements Sortable, Paging, Errorable, Deprecatable200 +class ByProjectKeyProductProjectionsSuggestGet extends ApiRequest implements Sortable, Paging, ProjectionSelecting, Errorable, Deprecatable200 { /** * @param ?object|array|string $body @@ -154,15 +155,6 @@ public function withFuzzy($fuzzy): ByProjectKeyProductProjectionsSuggestGet return $this->withQueryParam('fuzzy', $fuzzy); } - /** - * - * @psalm-param scalar|scalar[] $staged - */ - public function withStaged($staged): ByProjectKeyProductProjectionsSuggestGet - { - return $this->withQueryParam('staged', $staged); - } - /** * @psalm-param string $locale * @psalm-param scalar|scalar[] $searchKeywords @@ -207,4 +199,13 @@ public function withWithTotal($withTotal): ByProjectKeyProductProjectionsSuggest { return $this->withQueryParam('withTotal', $withTotal); } + + /** + * + * @psalm-param scalar|scalar[] $staged + */ + public function withStaged($staged): ByProjectKeyProductProjectionsSuggestGet + { + return $this->withQueryParam('staged', $staged); + } } diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsByIDDelete.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsByIDDelete.php index bd618cd742b..e54cae7dacc 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsByIDDelete.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsByIDDelete.php @@ -187,6 +187,15 @@ public function withPriceChannel($priceChannel): ByProjectKeyProductsByIDDelete return $this->withQueryParam('priceChannel', $priceChannel); } + /** + * + * @psalm-param scalar|scalar[] $localeProjection + */ + public function withLocaleProjection($localeProjection): ByProjectKeyProductsByIDDelete + { + return $this->withQueryParam('localeProjection', $localeProjection); + } + /** * * @psalm-param scalar|scalar[] $version diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsByIDGet.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsByIDGet.php index 3d1f0804649..640dfa94c54 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsByIDGet.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsByIDGet.php @@ -181,6 +181,15 @@ public function withPriceChannel($priceChannel): ByProjectKeyProductsByIDGet return $this->withQueryParam('priceChannel', $priceChannel); } + /** + * + * @psalm-param scalar|scalar[] $localeProjection + */ + public function withLocaleProjection($localeProjection): ByProjectKeyProductsByIDGet + { + return $this->withQueryParam('localeProjection', $localeProjection); + } + /** * * @psalm-param scalar|scalar[] $expand diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsByIDPost.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsByIDPost.php index 0b0d1ef6f29..68387db0835 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsByIDPost.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsByIDPost.php @@ -186,6 +186,15 @@ public function withPriceChannel($priceChannel): ByProjectKeyProductsByIDPost return $this->withQueryParam('priceChannel', $priceChannel); } + /** + * + * @psalm-param scalar|scalar[] $localeProjection + */ + public function withLocaleProjection($localeProjection): ByProjectKeyProductsByIDPost + { + return $this->withQueryParam('localeProjection', $localeProjection); + } + /** * * @psalm-param scalar|scalar[] $expand diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsGet.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsGet.php index 24b493a7681..00c48105527 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsGet.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsGet.php @@ -193,6 +193,15 @@ public function withPriceChannel($priceChannel): ByProjectKeyProductsGet return $this->withQueryParam('priceChannel', $priceChannel); } + /** + * + * @psalm-param scalar|scalar[] $localeProjection + */ + public function withLocaleProjection($localeProjection): ByProjectKeyProductsGet + { + return $this->withQueryParam('localeProjection', $localeProjection); + } + /** * * @psalm-param scalar|scalar[] $expand diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsKeyByKeyDelete.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsKeyByKeyDelete.php index 63e8a62c0fc..3bab7756af6 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsKeyByKeyDelete.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsKeyByKeyDelete.php @@ -187,6 +187,15 @@ public function withPriceChannel($priceChannel): ByProjectKeyProductsKeyByKeyDel return $this->withQueryParam('priceChannel', $priceChannel); } + /** + * + * @psalm-param scalar|scalar[] $localeProjection + */ + public function withLocaleProjection($localeProjection): ByProjectKeyProductsKeyByKeyDelete + { + return $this->withQueryParam('localeProjection', $localeProjection); + } + /** * * @psalm-param scalar|scalar[] $version diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsKeyByKeyGet.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsKeyByKeyGet.php index 3f6e494d036..2f67e2e789c 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsKeyByKeyGet.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsKeyByKeyGet.php @@ -181,6 +181,15 @@ public function withPriceChannel($priceChannel): ByProjectKeyProductsKeyByKeyGet return $this->withQueryParam('priceChannel', $priceChannel); } + /** + * + * @psalm-param scalar|scalar[] $localeProjection + */ + public function withLocaleProjection($localeProjection): ByProjectKeyProductsKeyByKeyGet + { + return $this->withQueryParam('localeProjection', $localeProjection); + } + /** * * @psalm-param scalar|scalar[] $expand diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsKeyByKeyPost.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsKeyByKeyPost.php index 28d9a74006c..9cbcd63e51a 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsKeyByKeyPost.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsKeyByKeyPost.php @@ -186,6 +186,15 @@ public function withPriceChannel($priceChannel): ByProjectKeyProductsKeyByKeyPos return $this->withQueryParam('priceChannel', $priceChannel); } + /** + * + * @psalm-param scalar|scalar[] $localeProjection + */ + public function withLocaleProjection($localeProjection): ByProjectKeyProductsKeyByKeyPost + { + return $this->withQueryParam('localeProjection', $localeProjection); + } + /** * * @psalm-param scalar|scalar[] $expand diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsPost.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsPost.php index 27034c93110..bf30e097aa7 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsPost.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductsPost.php @@ -181,6 +181,15 @@ public function withPriceChannel($priceChannel): ByProjectKeyProductsPost return $this->withQueryParam('priceChannel', $priceChannel); } + /** + * + * @psalm-param scalar|scalar[] $localeProjection + */ + public function withLocaleProjection($localeProjection): ByProjectKeyProductsPost + { + return $this->withQueryParam('localeProjection', $localeProjection); + } + /** * * @psalm-param scalar|scalar[] $expand diff --git a/lib/commercetools-api/src/Client/Resource/PriceSelecting.php b/lib/commercetools-api/src/Client/Resource/PriceSelecting.php index 5f48d221e3d..49f233702eb 100644 --- a/lib/commercetools-api/src/Client/Resource/PriceSelecting.php +++ b/lib/commercetools-api/src/Client/Resource/PriceSelecting.php @@ -39,4 +39,10 @@ public function withPriceCustomerGroup(string $priceCustomerGroup); * @psalm-return T */ public function withPriceChannel(string $priceChannel); + + /** + * @return ApiRequestInterface + * @psalm-return T + */ + public function withLocaleProjection(string $localeProjection); } diff --git a/lib/commercetools-api/src/Client/Resource/ProjectionSelecting.php b/lib/commercetools-api/src/Client/Resource/ProjectionSelecting.php new file mode 100644 index 00000000000..b3256c65cfa --- /dev/null +++ b/lib/commercetools-api/src/Client/Resource/ProjectionSelecting.php @@ -0,0 +1,24 @@ + + */ +interface ProjectionSelecting extends ApiRequestInterface +{ + /** + * @return ApiRequestInterface + * @psalm-return T + */ + public function withStaged(bool $staged); +} diff --git a/lib/commercetools-api/src/Models/Product/ProductProjection.php b/lib/commercetools-api/src/Models/Product/ProductProjection.php index b0a4dfd4fdf..14bbb55dc79 100644 --- a/lib/commercetools-api/src/Models/Product/ProductProjection.php +++ b/lib/commercetools-api/src/Models/Product/ProductProjection.php @@ -17,6 +17,7 @@ use Commercetools\Api\Models\TaxCategory\TaxCategoryReference; use Commercetools\Base\DateTimeImmutableCollection; use Commercetools\Base\JsonObject; +use DateTimeImmutable; interface ProductProjection extends BaseResource { @@ -38,9 +39,10 @@ interface ProductProjection extends BaseResource public const FIELD_TAX_CATEGORY = 'taxCategory'; public const FIELD_STATE = 'state'; public const FIELD_REVIEW_RATING_STATISTICS = 'reviewRatingStatistics'; + public const FIELD_PRICE_MODE = 'priceMode'; /** - *

The unique ID of the Product.

+ *

Unique identifier of the Product.

* * @return null|string @@ -48,7 +50,7 @@ interface ProductProjection extends BaseResource public function getId(); /** - *

The current version of the Product.

+ *

Current version of the Product.

* * @return null|int @@ -56,7 +58,7 @@ public function getId(); public function getVersion(); /** - *

User-specific unique identifier of the Product.

+ *

User-defined unique identifier of the Product.

* * @return null|string @@ -64,31 +66,58 @@ public function getVersion(); public function getKey(); /** + *

Date and time (UTC) the ProductProjection was initially created.

+ * + + * @return null|DateTimeImmutable + */ + public function getCreatedAt(); + + /** + *

Date and time (UTC) the ProductProjection was last updated.

+ * + + * @return null|DateTimeImmutable + */ + public function getLastModifiedAt(); + + /** + *

The ProductType defining the Attributes of the Product.

+ * * @return null|ProductTypeReference */ public function getProductType(); /** + *

Name of the Product.

+ * * @return null|LocalizedString */ public function getName(); /** + *

Description of the Product.

+ * * @return null|LocalizedString */ public function getDescription(); /** + *

User-defined identifier used in a deep-link URL for the Product. + * Must be unique across a Project, but can be the same for Products in different locales. + * Matches the pattern [a-zA-Z0-9_-]{2,256}. + * For good performance, indexes are provided for the first 15 languages set in the Project.

+ * * @return null|LocalizedString */ public function getSlug(); /** - *

References to categories the product is in.

+ *

Categories assigned to the Product.

* * @return null|CategoryReferenceCollection @@ -96,79 +125,109 @@ public function getSlug(); public function getCategories(); /** + *

Order of Product in Categories.

+ * * @return null|CategoryOrderHints */ public function getCategoryOrderHints(); /** + *

Title of the Product displayed in search results.

+ * * @return null|LocalizedString */ public function getMetaTitle(); /** + *

Description of the Product displayed in search results below the meta title.

+ * * @return null|LocalizedString */ public function getMetaDescription(); /** + *

Keywords that give additional information about the Product to search engines.

+ * * @return null|LocalizedString */ public function getMetaKeywords(); /** + *

Used by Product Suggestions, but is also considered for a full text search.

+ * * @return null|SearchKeywords */ public function getSearchKeywords(); /** + *

true if the staged data is different from the current data.

+ * * @return null|bool */ public function getHasStagedChanges(); /** + *

true if the Product is published.

+ * * @return null|bool */ public function getPublished(); /** + *

The Master Variant of the Product.

+ * * @return null|ProductVariant */ public function getMasterVariant(); /** + *

Additional Product Variants.

+ * * @return null|ProductVariantCollection */ public function getVariants(); /** + *

The TaxCategory of the Product.

+ * * @return null|TaxCategoryReference */ public function getTaxCategory(); /** + *

State of the Product.

+ * * @return null|StateReference */ public function getState(); /** - *

Statistics about the review ratings taken into account for this product.

+ *

Review statistics of the Product.

* * @return null|ReviewRatingStatistics */ public function getReviewRatingStatistics(); + /** + *

Indicates whether the Prices of the Product Projection are embedded or standalone. Projecting Prices only works with Embedded, there is currently no support for Standalone.

+ * + + * @return null|string + */ + public function getPriceMode(); + /** * @param ?string $id */ @@ -184,6 +243,16 @@ public function setVersion(?int $version): void; */ public function setKey(?string $key): void; + /** + * @param ?DateTimeImmutable $createdAt + */ + public function setCreatedAt(?DateTimeImmutable $createdAt): void; + + /** + * @param ?DateTimeImmutable $lastModifiedAt + */ + public function setLastModifiedAt(?DateTimeImmutable $lastModifiedAt): void; + /** * @param ?ProductTypeReference $productType */ @@ -268,4 +337,9 @@ public function setState(?StateReference $state): void; * @param ?ReviewRatingStatistics $reviewRatingStatistics */ public function setReviewRatingStatistics(?ReviewRatingStatistics $reviewRatingStatistics): void; + + /** + * @param ?string $priceMode + */ + public function setPriceMode(?string $priceMode): void; } diff --git a/lib/commercetools-api/src/Models/Product/ProductProjectionBuilder.php b/lib/commercetools-api/src/Models/Product/ProductProjectionBuilder.php index 61c7f9856e8..828dda2e57e 100644 --- a/lib/commercetools-api/src/Models/Product/ProductProjectionBuilder.php +++ b/lib/commercetools-api/src/Models/Product/ProductProjectionBuilder.php @@ -167,7 +167,13 @@ final class ProductProjectionBuilder implements Builder private $reviewRatingStatistics; /** - *

The unique ID of the Product.

+ + * @var ?string + */ + private $priceMode; + + /** + *

Unique identifier of the Product.

* * @return null|string @@ -178,7 +184,7 @@ public function getId() } /** - *

The current version of the Product.

+ *

Current version of the Product.

* * @return null|int @@ -189,6 +195,8 @@ public function getVersion() } /** + *

Date and time (UTC) the ProductProjection was initially created.

+ * * @return null|DateTimeImmutable */ @@ -198,6 +206,8 @@ public function getCreatedAt() } /** + *

Date and time (UTC) the ProductProjection was last updated.

+ * * @return null|DateTimeImmutable */ @@ -207,7 +217,7 @@ public function getLastModifiedAt() } /** - *

User-specific unique identifier of the Product.

+ *

User-defined unique identifier of the Product.

* * @return null|string @@ -218,6 +228,8 @@ public function getKey() } /** + *

The ProductType defining the Attributes of the Product.

+ * * @return null|ProductTypeReference */ @@ -227,6 +239,8 @@ public function getProductType() } /** + *

Name of the Product.

+ * * @return null|LocalizedString */ @@ -236,6 +250,8 @@ public function getName() } /** + *

Description of the Product.

+ * * @return null|LocalizedString */ @@ -245,6 +261,11 @@ public function getDescription() } /** + *

User-defined identifier used in a deep-link URL for the Product. + * Must be unique across a Project, but can be the same for Products in different locales. + * Matches the pattern [a-zA-Z0-9_-]{2,256}. + * For good performance, indexes are provided for the first 15 languages set in the Project.

+ * * @return null|LocalizedString */ @@ -254,7 +275,7 @@ public function getSlug() } /** - *

References to categories the product is in.

+ *

Categories assigned to the Product.

* * @return null|CategoryReferenceCollection @@ -265,6 +286,8 @@ public function getCategories() } /** + *

Order of Product in Categories.

+ * * @return null|CategoryOrderHints */ @@ -274,6 +297,8 @@ public function getCategoryOrderHints() } /** + *

Title of the Product displayed in search results.

+ * * @return null|LocalizedString */ @@ -283,6 +308,8 @@ public function getMetaTitle() } /** + *

Description of the Product displayed in search results below the meta title.

+ * * @return null|LocalizedString */ @@ -292,6 +319,8 @@ public function getMetaDescription() } /** + *

Keywords that give additional information about the Product to search engines.

+ * * @return null|LocalizedString */ @@ -301,6 +330,8 @@ public function getMetaKeywords() } /** + *

Used by Product Suggestions, but is also considered for a full text search.

+ * * @return null|SearchKeywords */ @@ -310,6 +341,8 @@ public function getSearchKeywords() } /** + *

true if the staged data is different from the current data.

+ * * @return null|bool */ @@ -319,6 +352,8 @@ public function getHasStagedChanges() } /** + *

true if the Product is published.

+ * * @return null|bool */ @@ -328,6 +363,8 @@ public function getPublished() } /** + *

The Master Variant of the Product.

+ * * @return null|ProductVariant */ @@ -337,6 +374,8 @@ public function getMasterVariant() } /** + *

Additional Product Variants.

+ * * @return null|ProductVariantCollection */ @@ -346,6 +385,8 @@ public function getVariants() } /** + *

The TaxCategory of the Product.

+ * * @return null|TaxCategoryReference */ @@ -355,6 +396,8 @@ public function getTaxCategory() } /** + *

State of the Product.

+ * * @return null|StateReference */ @@ -364,7 +407,7 @@ public function getState() } /** - *

Statistics about the review ratings taken into account for this product.

+ *

Review statistics of the Product.

* * @return null|ReviewRatingStatistics @@ -374,6 +417,17 @@ public function getReviewRatingStatistics() return $this->reviewRatingStatistics instanceof ReviewRatingStatisticsBuilder ? $this->reviewRatingStatistics->build() : $this->reviewRatingStatistics; } + /** + *

Indicates whether the Prices of the Product Projection are embedded or standalone. Projecting Prices only works with Embedded, there is currently no support for Standalone.

+ * + + * @return null|string + */ + public function getPriceMode() + { + return $this->priceMode; + } + /** * @param ?string $id * @return $this @@ -616,6 +670,17 @@ public function withReviewRatingStatistics(?ReviewRatingStatistics $reviewRating return $this; } + /** + * @param ?string $priceMode + * @return $this + */ + public function withPriceMode(?string $priceMode) + { + $this->priceMode = $priceMode; + + return $this; + } + /** * @deprecated use withProductType() instead * @return $this @@ -783,7 +848,8 @@ public function build(): ProductProjection $this->variants, $this->taxCategory instanceof TaxCategoryReferenceBuilder ? $this->taxCategory->build() : $this->taxCategory, $this->state instanceof StateReferenceBuilder ? $this->state->build() : $this->state, - $this->reviewRatingStatistics instanceof ReviewRatingStatisticsBuilder ? $this->reviewRatingStatistics->build() : $this->reviewRatingStatistics + $this->reviewRatingStatistics instanceof ReviewRatingStatisticsBuilder ? $this->reviewRatingStatistics->build() : $this->reviewRatingStatistics, + $this->priceMode ); } diff --git a/lib/commercetools-api/src/Models/Product/ProductProjectionModel.php b/lib/commercetools-api/src/Models/Product/ProductProjectionModel.php index 0b183c35892..c5f6ba0b6c1 100644 --- a/lib/commercetools-api/src/Models/Product/ProductProjectionModel.php +++ b/lib/commercetools-api/src/Models/Product/ProductProjectionModel.php @@ -165,6 +165,12 @@ final class ProductProjectionModel extends JsonObjectModel implements ProductPro */ protected $reviewRatingStatistics; + /** + * + * @var ?string + */ + protected $priceMode; + /** * @psalm-suppress MissingParamType @@ -191,7 +197,8 @@ public function __construct( ?ProductVariantCollection $variants = null, ?TaxCategoryReference $taxCategory = null, ?StateReference $state = null, - ?ReviewRatingStatistics $reviewRatingStatistics = null + ?ReviewRatingStatistics $reviewRatingStatistics = null, + ?string $priceMode = null ) { $this->id = $id; $this->version = $version; @@ -215,10 +222,11 @@ public function __construct( $this->taxCategory = $taxCategory; $this->state = $state; $this->reviewRatingStatistics = $reviewRatingStatistics; + $this->priceMode = $priceMode; } /** - *

The unique ID of the Product.

+ *

Unique identifier of the Product.

* * * @return null|string @@ -238,7 +246,7 @@ public function getId() } /** - *

The current version of the Product.

+ *

Current version of the Product.

* * * @return null|int @@ -258,6 +266,8 @@ public function getVersion() } /** + *

Date and time (UTC) the ProductProjection was initially created.

+ * * * @return null|DateTimeImmutable */ @@ -280,6 +290,8 @@ public function getCreatedAt() } /** + *

Date and time (UTC) the ProductProjection was last updated.

+ * * * @return null|DateTimeImmutable */ @@ -302,7 +314,7 @@ public function getLastModifiedAt() } /** - *

User-specific unique identifier of the Product.

+ *

User-defined unique identifier of the Product.

* * * @return null|string @@ -322,6 +334,8 @@ public function getKey() } /** + *

The ProductType defining the Attributes of the Product.

+ * * * @return null|ProductTypeReference */ @@ -341,6 +355,8 @@ public function getProductType() } /** + *

Name of the Product.

+ * * * @return null|LocalizedString */ @@ -360,6 +376,8 @@ public function getName() } /** + *

Description of the Product.

+ * * * @return null|LocalizedString */ @@ -379,6 +397,11 @@ public function getDescription() } /** + *

User-defined identifier used in a deep-link URL for the Product. + * Must be unique across a Project, but can be the same for Products in different locales. + * Matches the pattern [a-zA-Z0-9_-]{2,256}. + * For good performance, indexes are provided for the first 15 languages set in the Project.

+ * * * @return null|LocalizedString */ @@ -398,7 +421,7 @@ public function getSlug() } /** - *

References to categories the product is in.

+ *

Categories assigned to the Product.

* * * @return null|CategoryReferenceCollection @@ -418,6 +441,8 @@ public function getCategories() } /** + *

Order of Product in Categories.

+ * * * @return null|CategoryOrderHints */ @@ -437,6 +462,8 @@ public function getCategoryOrderHints() } /** + *

Title of the Product displayed in search results.

+ * * * @return null|LocalizedString */ @@ -456,6 +483,8 @@ public function getMetaTitle() } /** + *

Description of the Product displayed in search results below the meta title.

+ * * * @return null|LocalizedString */ @@ -475,6 +504,8 @@ public function getMetaDescription() } /** + *

Keywords that give additional information about the Product to search engines.

+ * * * @return null|LocalizedString */ @@ -494,6 +525,8 @@ public function getMetaKeywords() } /** + *

Used by Product Suggestions, but is also considered for a full text search.

+ * * * @return null|SearchKeywords */ @@ -513,6 +546,8 @@ public function getSearchKeywords() } /** + *

true if the staged data is different from the current data.

+ * * * @return null|bool */ @@ -531,6 +566,8 @@ public function getHasStagedChanges() } /** + *

true if the Product is published.

+ * * * @return null|bool */ @@ -549,6 +586,8 @@ public function getPublished() } /** + *

The Master Variant of the Product.

+ * * * @return null|ProductVariant */ @@ -568,6 +607,8 @@ public function getMasterVariant() } /** + *

Additional Product Variants.

+ * * * @return null|ProductVariantCollection */ @@ -586,6 +627,8 @@ public function getVariants() } /** + *

The TaxCategory of the Product.

+ * * * @return null|TaxCategoryReference */ @@ -605,6 +648,8 @@ public function getTaxCategory() } /** + *

State of the Product.

+ * * * @return null|StateReference */ @@ -624,7 +669,7 @@ public function getState() } /** - *

Statistics about the review ratings taken into account for this product.

+ *

Review statistics of the Product.

* * * @return null|ReviewRatingStatistics @@ -644,6 +689,26 @@ public function getReviewRatingStatistics() return $this->reviewRatingStatistics; } + /** + *

Indicates whether the Prices of the Product Projection are embedded or standalone. Projecting Prices only works with Embedded, there is currently no support for Standalone.

+ * + * + * @return null|string + */ + public function getPriceMode() + { + if (is_null($this->priceMode)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_PRICE_MODE); + if (is_null($data)) { + return null; + } + $this->priceMode = (string) $data; + } + + return $this->priceMode; + } + /** * @param ?string $id @@ -821,17 +886,25 @@ public function setReviewRatingStatistics(?ReviewRatingStatistics $reviewRatingS $this->reviewRatingStatistics = $reviewRatingStatistics; } + /** + * @param ?string $priceMode + */ + public function setPriceMode(?string $priceMode): void + { + $this->priceMode = $priceMode; + } + #[\ReturnTypeWillChange] public function jsonSerialize() { $data = $this->toArray(); - if (isset($data[BaseResource::FIELD_CREATED_AT]) && $data[BaseResource::FIELD_CREATED_AT] instanceof \DateTimeImmutable) { - $data[BaseResource::FIELD_CREATED_AT] = $data[BaseResource::FIELD_CREATED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + if (isset($data[ProductProjection::FIELD_CREATED_AT]) && $data[ProductProjection::FIELD_CREATED_AT] instanceof \DateTimeImmutable) { + $data[ProductProjection::FIELD_CREATED_AT] = $data[ProductProjection::FIELD_CREATED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); } - if (isset($data[BaseResource::FIELD_LAST_MODIFIED_AT]) && $data[BaseResource::FIELD_LAST_MODIFIED_AT] instanceof \DateTimeImmutable) { - $data[BaseResource::FIELD_LAST_MODIFIED_AT] = $data[BaseResource::FIELD_LAST_MODIFIED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); + if (isset($data[ProductProjection::FIELD_LAST_MODIFIED_AT]) && $data[ProductProjection::FIELD_LAST_MODIFIED_AT] instanceof \DateTimeImmutable) { + $data[ProductProjection::FIELD_LAST_MODIFIED_AT] = $data[ProductProjection::FIELD_LAST_MODIFIED_AT]->setTimeZone(new \DateTimeZone('UTC'))->format('c'); } return (object) $data; } diff --git a/lib/commercetools-api/src/Models/Product/ProductProjectionPagedQueryResponse.php b/lib/commercetools-api/src/Models/Product/ProductProjectionPagedQueryResponse.php index a6097e7ce35..b7f02a8998f 100644 --- a/lib/commercetools-api/src/Models/Product/ProductProjectionPagedQueryResponse.php +++ b/lib/commercetools-api/src/Models/Product/ProductProjectionPagedQueryResponse.php @@ -28,12 +28,20 @@ interface ProductProjectionPagedQueryResponse extends JsonObject public function getLimit(); /** + *

Actual number of results returned.

+ * * @return null|int */ public function getCount(); /** + *

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.

+ * * @return null|int */ @@ -48,6 +56,8 @@ public function getTotal(); public function getOffset(); /** + *

ProductProjections matching the query.

+ * * @return null|ProductProjectionCollection */ diff --git a/lib/commercetools-api/src/Models/Product/ProductProjectionPagedQueryResponseBuilder.php b/lib/commercetools-api/src/Models/Product/ProductProjectionPagedQueryResponseBuilder.php index 5360fe4176f..71aba4b82ef 100644 --- a/lib/commercetools-api/src/Models/Product/ProductProjectionPagedQueryResponseBuilder.php +++ b/lib/commercetools-api/src/Models/Product/ProductProjectionPagedQueryResponseBuilder.php @@ -62,6 +62,8 @@ public function getLimit() } /** + *

Actual number of results returned.

+ * * @return null|int */ @@ -71,6 +73,12 @@ public function getCount() } /** + *

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.

+ * * @return null|int */ @@ -91,6 +99,8 @@ public function getOffset() } /** + *

ProductProjections matching the query.

+ * * @return null|ProductProjectionCollection */ diff --git a/lib/commercetools-api/src/Models/Product/ProductProjectionPagedQueryResponseModel.php b/lib/commercetools-api/src/Models/Product/ProductProjectionPagedQueryResponseModel.php index 43b57d48c0e..e8fc66549a4 100644 --- a/lib/commercetools-api/src/Models/Product/ProductProjectionPagedQueryResponseModel.php +++ b/lib/commercetools-api/src/Models/Product/ProductProjectionPagedQueryResponseModel.php @@ -88,6 +88,8 @@ public function getLimit() } /** + *

Actual number of results returned.

+ * * * @return null|int */ @@ -106,6 +108,12 @@ public function getCount() } /** + *

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.

+ * * * @return null|int */ @@ -144,6 +152,8 @@ public function getOffset() } /** + *

ProductProjections matching the query.

+ * * * @return null|ProductProjectionCollection */ From b4501768f0367462ea83bd38e6a375a0ae19d161 Mon Sep 17 00:00:00 2001 From: Auto Mation Date: Tue, 22 Nov 2022 13:39:02 +0000 Subject: [PATCH 4/4] TASK: Updating SDK --- changes.md | 3 + lib/commercetools-api/docs/RequestBuilder.md | 18 +- .../src/Models/Me/MyCartAddPaymentAction.php | 2 +- .../Me/MyCartAddPaymentActionBuilder.php | 2 +- .../Models/Me/MyCartAddPaymentActionModel.php | 2 +- .../Models/Me/MyCartRemovePaymentAction.php | 2 +- .../Me/MyCartRemovePaymentActionBuilder.php | 2 +- .../Me/MyCartRemovePaymentActionModel.php | 2 +- .../src/Models/Me/MyPayment.php | 27 +- .../Me/MyPaymentAddTransactionAction.php | 2 + .../MyPaymentAddTransactionActionBuilder.php | 2 + .../Me/MyPaymentAddTransactionActionModel.php | 2 + .../src/Models/Me/MyPaymentBuilder.php | 37 +-- .../Me/MyPaymentChangeAmountPlannedAction.php | 3 +- ...aymentChangeAmountPlannedActionBuilder.php | 3 +- ...yPaymentChangeAmountPlannedActionModel.php | 3 +- .../src/Models/Me/MyPaymentDraft.php | 11 +- .../src/Models/Me/MyPaymentDraftBuilder.php | 11 +- .../src/Models/Me/MyPaymentDraftModel.php | 11 +- .../src/Models/Me/MyPaymentModel.php | 37 +-- .../Models/Me/MyPaymentPagedQueryResponse.php | 10 + .../Me/MyPaymentPagedQueryResponseBuilder.php | 10 + .../Me/MyPaymentPagedQueryResponseModel.php | 10 + .../MyPaymentSetMethodInfoInterfaceAction.php | 3 + ...entSetMethodInfoInterfaceActionBuilder.php | 3 + ...ymentSetMethodInfoInterfaceActionModel.php | 3 + .../Me/MyPaymentSetMethodInfoMethodAction.php | 3 + ...aymentSetMethodInfoMethodActionBuilder.php | 3 + ...yPaymentSetMethodInfoMethodActionModel.php | 3 + .../Me/MyPaymentSetMethodInfoNameAction.php | 3 +- ...yPaymentSetMethodInfoNameActionBuilder.php | 3 +- .../MyPaymentSetMethodInfoNameActionModel.php | 3 +- .../src/Models/Me/MyPaymentUpdate.php | 4 + .../src/Models/Me/MyPaymentUpdateBuilder.php | 4 + .../src/Models/Me/MyPaymentUpdateModel.php | 4 + .../src/Models/Me/MyTransactionDraft.php | 17 +- .../Models/Me/MyTransactionDraftBuilder.php | 17 +- .../src/Models/Me/MyTransactionDraftModel.php | 17 +- .../PaymentStatusInterfaceCodeSetMessage.php | 2 +- ...ntStatusInterfaceCodeSetMessageBuilder.php | 4 +- ...mentStatusInterfaceCodeSetMessageModel.php | 4 +- ...ntStatusInterfaceCodeSetMessagePayload.php | 2 +- ...sInterfaceCodeSetMessagePayloadBuilder.php | 4 +- ...tusInterfaceCodeSetMessagePayloadModel.php | 4 +- .../Models/Order/OrderAddPaymentAction.php | 2 +- .../Order/OrderAddPaymentActionBuilder.php | 2 +- .../Order/OrderAddPaymentActionModel.php | 2 +- .../Models/Order/OrderRemovePaymentAction.php | 2 +- .../Order/OrderRemovePaymentActionBuilder.php | 2 +- .../Order/OrderRemovePaymentActionModel.php | 2 +- .../OrderEdit/StagedOrderAddPaymentAction.php | 2 +- .../StagedOrderAddPaymentActionBuilder.php | 2 +- .../StagedOrderAddPaymentActionModel.php | 2 +- .../StagedOrderRemovePaymentAction.php | 2 +- .../StagedOrderRemovePaymentActionBuilder.php | 2 +- .../StagedOrderRemovePaymentActionModel.php | 2 +- .../src/Models/Payment/Payment.php | 113 +++++++-- .../PaymentAddInterfaceInteractionAction.php | 4 + ...ntAddInterfaceInteractionActionBuilder.php | 4 + ...mentAddInterfaceInteractionActionModel.php | 4 + .../Payment/PaymentAddTransactionAction.php | 2 + .../PaymentAddTransactionActionBuilder.php | 2 + .../PaymentAddTransactionActionModel.php | 2 + .../src/Models/Payment/PaymentBuilder.php | 230 ++++++++++++++++-- .../PaymentChangeAmountPlannedAction.php | 2 + ...aymentChangeAmountPlannedActionBuilder.php | 2 + .../PaymentChangeAmountPlannedActionModel.php | 2 + ...ntChangeTransactionInteractionIdAction.php | 4 + ...eTransactionInteractionIdActionBuilder.php | 4 + ...ngeTransactionInteractionIdActionModel.php | 4 + .../PaymentChangeTransactionStateAction.php | 4 + ...entChangeTransactionStateActionBuilder.php | 4 + ...ymentChangeTransactionStateActionModel.php | 4 + ...aymentChangeTransactionTimestampAction.php | 4 + ...hangeTransactionTimestampActionBuilder.php | 4 + ...tChangeTransactionTimestampActionModel.php | 4 + .../src/Models/Payment/PaymentDraft.php | 42 ++-- .../Models/Payment/PaymentDraftBuilder.php | 44 ++-- .../src/Models/Payment/PaymentDraftModel.php | 44 ++-- .../src/Models/Payment/PaymentMethodInfo.php | 13 +- .../Payment/PaymentMethodInfoBuilder.php | 13 +- .../Models/Payment/PaymentMethodInfoModel.php | 13 +- .../src/Models/Payment/PaymentModel.php | 205 ++++++++++++++-- .../Payment/PaymentPagedQueryResponse.php | 10 + .../PaymentPagedQueryResponseBuilder.php | 10 + .../PaymentPagedQueryResponseModel.php | 10 + .../Payment/PaymentSetAnonymousIdAction.php | 4 +- .../PaymentSetAnonymousIdActionBuilder.php | 4 +- .../PaymentSetAnonymousIdActionModel.php | 4 +- .../Payment/PaymentSetCustomerAction.php | 3 +- .../PaymentSetCustomerActionBuilder.php | 3 +- .../Payment/PaymentSetCustomerActionModel.php | 3 +- .../Payment/PaymentSetInterfaceIdAction.php | 3 + .../PaymentSetInterfaceIdActionBuilder.php | 3 + .../PaymentSetInterfaceIdActionModel.php | 3 + .../Models/Payment/PaymentSetKeyAction.php | 5 +- .../Payment/PaymentSetKeyActionBuilder.php | 5 +- .../Payment/PaymentSetKeyActionModel.php | 5 +- .../PaymentSetMethodInfoInterfaceAction.php | 3 + ...entSetMethodInfoInterfaceActionBuilder.php | 3 + ...ymentSetMethodInfoInterfaceActionModel.php | 3 + .../PaymentSetMethodInfoMethodAction.php | 3 +- ...aymentSetMethodInfoMethodActionBuilder.php | 3 +- .../PaymentSetMethodInfoMethodActionModel.php | 3 +- .../PaymentSetMethodInfoNameAction.php | 3 +- .../PaymentSetMethodInfoNameActionBuilder.php | 3 +- .../PaymentSetMethodInfoNameActionModel.php | 3 +- .../PaymentSetStatusInterfaceCodeAction.php | 2 + ...entSetStatusInterfaceCodeActionBuilder.php | 2 + ...ymentSetStatusInterfaceCodeActionModel.php | 2 + .../PaymentSetStatusInterfaceTextAction.php | 2 + ...entSetStatusInterfaceTextActionBuilder.php | 2 + ...ymentSetStatusInterfaceTextActionModel.php | 2 + ...PaymentSetTransactionCustomFieldAction.php | 5 +- ...SetTransactionCustomFieldActionBuilder.php | 5 +- ...ntSetTransactionCustomFieldActionModel.php | 5 +- .../PaymentSetTransactionCustomTypeAction.php | 2 + ...tSetTransactionCustomTypeActionBuilder.php | 2 + ...entSetTransactionCustomTypeActionModel.php | 2 + .../src/Models/Payment/PaymentStatus.php | 6 +- .../Models/Payment/PaymentStatusBuilder.php | 6 +- .../src/Models/Payment/PaymentStatusDraft.php | 6 +- .../Payment/PaymentStatusDraftBuilder.php | 6 +- .../Payment/PaymentStatusDraftModel.php | 6 +- .../src/Models/Payment/PaymentStatusModel.php | 6 +- .../Payment/PaymentTransitionStateAction.php | 4 + .../PaymentTransitionStateActionBuilder.php | 4 + .../PaymentTransitionStateActionModel.php | 4 + .../src/Models/Payment/PaymentUpdate.php | 4 + .../Models/Payment/PaymentUpdateBuilder.php | 4 + .../src/Models/Payment/PaymentUpdateModel.php | 4 + .../src/Models/Payment/Transaction.php | 14 +- .../src/Models/Payment/TransactionBuilder.php | 14 +- .../src/Models/Payment/TransactionDraft.php | 15 +- .../Payment/TransactionDraftBuilder.php | 15 +- .../Models/Payment/TransactionDraftModel.php | 15 +- .../src/Models/Payment/TransactionModel.php | 14 +- .../src/Models/Common/Transaction.php | 6 +- .../src/Models/Common/TransactionBuilder.php | 6 +- .../src/Models/Common/TransactionModel.php | 6 +- 140 files changed, 1069 insertions(+), 354 deletions(-) diff --git a/changes.md b/changes.md index a0a539a3415..dd66d6983ed 100644 --- a/changes.md +++ b/changes.md @@ -37,8 +37,11 @@ - :warning: changed property `country` of type `MissingTaxRateForCountryError` from type `string` to `CountryCode` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/MissingTaxRateForCountryError.raml:23:2) - :warning: changed property `currency` of type `OverlappingStandalonePriceValidityError` from type `string` to `CurrencyCode` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/OverlappingStandalonePriceValidityError.raml:25:2) - :warning: changed property `country` of type `OverlappingStandalonePriceValidityError` from type `string` to `CountryCode` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/OverlappingStandalonePriceValidityError.raml:29:2) +- :warning: changed property `amountPlanned` of type `MyPayment` from type `TypedMoney` to `CentPrecisionMoney` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/me/MyPayment.raml:27:2) +- :warning: changed property `amountPlanned` of type `Payment` from type `TypedMoney` to `CentPrecisionMoney` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/payment/Payment.raml:49:2) - :warning: changed property `field` of type `DuplicateFieldError` to be required (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/DuplicateFieldError.raml:14:2) - :warning: changed property `duplicateValue` of type `DuplicateFieldError` to be required (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/DuplicateFieldError.raml:18:2) +- :warning: changed property `state` of type `Transaction` to be required (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/payment/Transaction.raml:27:2) - :warning: changed property `lineItems` of type `ShoppingList` to be required (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/shopping-list/ShoppingList.raml:41:2) - :warning: changed property `textLineItems` of type `ShoppingList` to be required (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/shopping-list/ShoppingList.raml:45:2) diff --git a/lib/commercetools-api/docs/RequestBuilder.md b/lib/commercetools-api/docs/RequestBuilder.md index d68818fd02a..7f1409d0f89 100644 --- a/lib/commercetools-api/docs/RequestBuilder.md +++ b/lib/commercetools-api/docs/RequestBuilder.md @@ -3334,7 +3334,8 @@ $request = $builder ``` ## `withProjectKey("projectKey")->me()->payments()->post(null)` -null +Creating a Payment produces the [PaymentCreated](ctp:api:type:PaymentCreatedMessage) Message. + ### Example ```php @@ -3365,7 +3366,8 @@ $request = $builder ``` ## `withProjectKey("projectKey")->me()->payments()->withId("ID")->post(null)` -null +This endpoint can only update a Payment when it has no [Transactions](ctp:api:type:Transaction). + ### Example ```php @@ -3381,7 +3383,8 @@ $request = $builder ``` ## `withProjectKey("projectKey")->me()->payments()->withId("ID")->delete()` -null +This endpoint can only delete a Payment when it has no [Transactions](ctp:api:type:Transaction). + ### Example ```php @@ -3413,7 +3416,8 @@ $request = $builder ``` ## `withProjectKey("projectKey")->me()->payments()->withKey("key")->post(null)` -null +This endpoint can only update a Payment when it has no [Transactions](ctp:api:type:Transaction). + ### Example ```php @@ -3429,7 +3433,8 @@ $request = $builder ``` ## `withProjectKey("projectKey")->me()->payments()->withKey("key")->delete()` -null +This endpoint can only delete a Payment when it has no [Transactions](ctp:api:type:Transaction). + ### Example ```php @@ -4163,7 +4168,8 @@ $request = $builder ``` ## `withProjectKey("projectKey")->payments()->post(null)` -To create a payment object a payment draft object has to be given with the request. +Creating a Payment produces the [PaymentCreated](ctp:api:type:PaymentCreatedMessage) Message. + ### Example ```php diff --git a/lib/commercetools-api/src/Models/Me/MyCartAddPaymentAction.php b/lib/commercetools-api/src/Models/Me/MyCartAddPaymentAction.php index 44a433ce34c..cabd41dae59 100644 --- a/lib/commercetools-api/src/Models/Me/MyCartAddPaymentAction.php +++ b/lib/commercetools-api/src/Models/Me/MyCartAddPaymentAction.php @@ -17,7 +17,7 @@ interface MyCartAddPaymentAction extends MyCartUpdateAction public const FIELD_PAYMENT = 'payment'; /** - *

ResourceIdentifier to a Payment.

+ *

ResourceIdentifier of a Payment.

* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Me/MyCartAddPaymentActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyCartAddPaymentActionBuilder.php index 5802a295b62..7c984f07d03 100644 --- a/lib/commercetools-api/src/Models/Me/MyCartAddPaymentActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyCartAddPaymentActionBuilder.php @@ -29,7 +29,7 @@ final class MyCartAddPaymentActionBuilder implements Builder private $payment; /** - *

ResourceIdentifier to a Payment.

+ *

ResourceIdentifier of a Payment.

* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Me/MyCartAddPaymentActionModel.php b/lib/commercetools-api/src/Models/Me/MyCartAddPaymentActionModel.php index ac1e30cc9f1..438408a19aa 100644 --- a/lib/commercetools-api/src/Models/Me/MyCartAddPaymentActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyCartAddPaymentActionModel.php @@ -65,7 +65,7 @@ public function getAction() } /** - *

ResourceIdentifier to a Payment.

+ *

ResourceIdentifier of a Payment.

* * * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Me/MyCartRemovePaymentAction.php b/lib/commercetools-api/src/Models/Me/MyCartRemovePaymentAction.php index e2dcf9d5a5b..f5280703207 100644 --- a/lib/commercetools-api/src/Models/Me/MyCartRemovePaymentAction.php +++ b/lib/commercetools-api/src/Models/Me/MyCartRemovePaymentAction.php @@ -17,7 +17,7 @@ interface MyCartRemovePaymentAction extends MyCartUpdateAction public const FIELD_PAYMENT = 'payment'; /** - *

ResourceIdentifier to a Payment.

+ *

ResourceIdentifier of a Payment.

* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Me/MyCartRemovePaymentActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyCartRemovePaymentActionBuilder.php index be39f45ba60..2d0f389c6a9 100644 --- a/lib/commercetools-api/src/Models/Me/MyCartRemovePaymentActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyCartRemovePaymentActionBuilder.php @@ -29,7 +29,7 @@ final class MyCartRemovePaymentActionBuilder implements Builder private $payment; /** - *

ResourceIdentifier to a Payment.

+ *

ResourceIdentifier of a Payment.

* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Me/MyCartRemovePaymentActionModel.php b/lib/commercetools-api/src/Models/Me/MyCartRemovePaymentActionModel.php index 64525d0e16f..88521f72b15 100644 --- a/lib/commercetools-api/src/Models/Me/MyCartRemovePaymentActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyCartRemovePaymentActionModel.php @@ -65,7 +65,7 @@ public function getAction() } /** - *

ResourceIdentifier to a Payment.

+ *

ResourceIdentifier of a Payment.

* * * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Me/MyPayment.php b/lib/commercetools-api/src/Models/Me/MyPayment.php index a1e6339938c..73885c7d327 100644 --- a/lib/commercetools-api/src/Models/Me/MyPayment.php +++ b/lib/commercetools-api/src/Models/Me/MyPayment.php @@ -8,7 +8,7 @@ namespace Commercetools\Api\Models\Me; -use Commercetools\Api\Models\Common\TypedMoney; +use Commercetools\Api\Models\Common\CentPrecisionMoney; use Commercetools\Api\Models\Customer\CustomerReference; use Commercetools\Api\Models\Payment\PaymentMethodInfo; use Commercetools\Api\Models\Payment\TransactionCollection; @@ -28,7 +28,7 @@ interface MyPayment extends JsonObject public const FIELD_CUSTOM = 'custom'; /** - *

Unique identifier of the MyPayment.

+ *

Unique identifier of the Payment.

* * @return null|string @@ -36,13 +36,15 @@ interface MyPayment extends JsonObject public function getId(); /** + *

Current version of the Payment.

+ * * @return null|int */ public function getVersion(); /** - *

A reference to the customer this payment belongs to.

+ *

Reference to a Customer associated with the Payment. Set automatically with a password flow token. Either customer or anonymousId is present.

* * @return null|CustomerReference @@ -50,7 +52,7 @@ public function getVersion(); public function getCustomer(); /** - *

Identifies payments belonging to an anonymous session (the customer has not signed up/in yet).

+ *

Anonymous session associated with the Payment. Set automatically with a token for an anonymous session. Either customer or anonymousId is present.

* * @return null|string @@ -58,23 +60,24 @@ public function getCustomer(); public function getAnonymousId(); /** - *

How much money this payment intends to receive from the customer. - * The value usually matches the cart or order gross total.

+ *

Money value the Payment intends to receive from the customer. + * The value typically matches the Cart or Order gross total.

* - * @return null|TypedMoney + * @return null|CentPrecisionMoney */ public function getAmountPlanned(); /** + *

Information regarding the payment interface (for example, a PSP), and the specific payment method used.

+ * * @return null|PaymentMethodInfo */ public function getPaymentMethodInfo(); /** - *

A list of financial transactions of different TransactionTypes - * with different TransactionStates.

+ *

Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.

* * @return null|TransactionCollection @@ -82,6 +85,8 @@ public function getPaymentMethodInfo(); public function getTransactions(); /** + *

Custom Fields defined for the Payment.

+ * * @return null|CustomFields */ @@ -108,9 +113,9 @@ public function setCustomer(?CustomerReference $customer): void; public function setAnonymousId(?string $anonymousId): void; /** - * @param ?TypedMoney $amountPlanned + * @param ?CentPrecisionMoney $amountPlanned */ - public function setAmountPlanned(?TypedMoney $amountPlanned): void; + public function setAmountPlanned(?CentPrecisionMoney $amountPlanned): void; /** * @param ?PaymentMethodInfo $paymentMethodInfo diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentAddTransactionAction.php b/lib/commercetools-api/src/Models/Me/MyPaymentAddTransactionAction.php index 6208683e18a..214e9a02c12 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentAddTransactionAction.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentAddTransactionAction.php @@ -17,6 +17,8 @@ interface MyPaymentAddTransactionAction extends MyPaymentUpdateAction public const FIELD_TRANSACTION = 'transaction'; /** + *

Transaction to add to the Payment.

+ * * @return null|TransactionDraft */ diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentAddTransactionActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyPaymentAddTransactionActionBuilder.php index 3f8964e4969..9321b78a724 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentAddTransactionActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentAddTransactionActionBuilder.php @@ -29,6 +29,8 @@ final class MyPaymentAddTransactionActionBuilder implements Builder private $transaction; /** + *

Transaction to add to the Payment.

+ * * @return null|TransactionDraft */ diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentAddTransactionActionModel.php b/lib/commercetools-api/src/Models/Me/MyPaymentAddTransactionActionModel.php index effcb267e66..f3c692865c3 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentAddTransactionActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentAddTransactionActionModel.php @@ -65,6 +65,8 @@ public function getAction() } /** + *

Transaction to add to the Payment.

+ * * * @return null|TransactionDraft */ diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentBuilder.php b/lib/commercetools-api/src/Models/Me/MyPaymentBuilder.php index f95ac4a8ec8..288c9fa83df 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentBuilder.php @@ -8,8 +8,8 @@ namespace Commercetools\Api\Models\Me; -use Commercetools\Api\Models\Common\TypedMoney; -use Commercetools\Api\Models\Common\TypedMoneyBuilder; +use Commercetools\Api\Models\Common\CentPrecisionMoney; +use Commercetools\Api\Models\Common\CentPrecisionMoneyBuilder; use Commercetools\Api\Models\Customer\CustomerReference; use Commercetools\Api\Models\Customer\CustomerReferenceBuilder; use Commercetools\Api\Models\Payment\PaymentMethodInfo; @@ -55,7 +55,7 @@ final class MyPaymentBuilder implements Builder /** - * @var null|TypedMoney|TypedMoneyBuilder + * @var null|CentPrecisionMoney|CentPrecisionMoneyBuilder */ private $amountPlanned; @@ -78,7 +78,7 @@ final class MyPaymentBuilder implements Builder private $custom; /** - *

Unique identifier of the MyPayment.

+ *

Unique identifier of the Payment.

* * @return null|string @@ -89,6 +89,8 @@ public function getId() } /** + *

Current version of the Payment.

+ * * @return null|int */ @@ -98,7 +100,7 @@ public function getVersion() } /** - *

A reference to the customer this payment belongs to.

+ *

Reference to a Customer associated with the Payment. Set automatically with a password flow token. Either customer or anonymousId is present.

* * @return null|CustomerReference @@ -109,7 +111,7 @@ public function getCustomer() } /** - *

Identifies payments belonging to an anonymous session (the customer has not signed up/in yet).

+ *

Anonymous session associated with the Payment. Set automatically with a token for an anonymous session. Either customer or anonymousId is present.

* * @return null|string @@ -120,18 +122,20 @@ public function getAnonymousId() } /** - *

How much money this payment intends to receive from the customer. - * The value usually matches the cart or order gross total.

+ *

Money value the Payment intends to receive from the customer. + * The value typically matches the Cart or Order gross total.

* - * @return null|TypedMoney + * @return null|CentPrecisionMoney */ public function getAmountPlanned() { - return $this->amountPlanned instanceof TypedMoneyBuilder ? $this->amountPlanned->build() : $this->amountPlanned; + return $this->amountPlanned instanceof CentPrecisionMoneyBuilder ? $this->amountPlanned->build() : $this->amountPlanned; } /** + *

Information regarding the payment interface (for example, a PSP), and the specific payment method used.

+ * * @return null|PaymentMethodInfo */ @@ -141,8 +145,7 @@ public function getPaymentMethodInfo() } /** - *

A list of financial transactions of different TransactionTypes - * with different TransactionStates.

+ *

Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.

* * @return null|TransactionCollection @@ -153,6 +156,8 @@ public function getTransactions() } /** + *

Custom Fields defined for the Payment.

+ * * @return null|CustomFields */ @@ -206,10 +211,10 @@ public function withAnonymousId(?string $anonymousId) } /** - * @param ?TypedMoney $amountPlanned + * @param ?CentPrecisionMoney $amountPlanned * @return $this */ - public function withAmountPlanned(?TypedMoney $amountPlanned) + public function withAmountPlanned(?CentPrecisionMoney $amountPlanned) { $this->amountPlanned = $amountPlanned; @@ -264,7 +269,7 @@ public function withCustomerBuilder(?CustomerReferenceBuilder $customer) * @deprecated use withAmountPlanned() instead * @return $this */ - public function withAmountPlannedBuilder(?TypedMoneyBuilder $amountPlanned) + public function withAmountPlannedBuilder(?CentPrecisionMoneyBuilder $amountPlanned) { $this->amountPlanned = $amountPlanned; @@ -300,7 +305,7 @@ public function build(): MyPayment $this->version, $this->customer instanceof CustomerReferenceBuilder ? $this->customer->build() : $this->customer, $this->anonymousId, - $this->amountPlanned instanceof TypedMoneyBuilder ? $this->amountPlanned->build() : $this->amountPlanned, + $this->amountPlanned instanceof CentPrecisionMoneyBuilder ? $this->amountPlanned->build() : $this->amountPlanned, $this->paymentMethodInfo instanceof PaymentMethodInfoBuilder ? $this->paymentMethodInfo->build() : $this->paymentMethodInfo, $this->transactions, $this->custom instanceof CustomFieldsBuilder ? $this->custom->build() : $this->custom diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentChangeAmountPlannedAction.php b/lib/commercetools-api/src/Models/Me/MyPaymentChangeAmountPlannedAction.php index 447e35502d2..ae673b12e54 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentChangeAmountPlannedAction.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentChangeAmountPlannedAction.php @@ -17,8 +17,7 @@ interface MyPaymentChangeAmountPlannedAction extends MyPaymentUpdateAction public const FIELD_AMOUNT = 'amount'; /** - *

Draft type that stores amounts in cent precision for the specified currency.

- *

For storing money values in fractions of the minor unit in a currency, use HighPrecisionMoneyDraft instead.

+ *

New value to set.

* * @return null|Money diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentChangeAmountPlannedActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyPaymentChangeAmountPlannedActionBuilder.php index 61aedbe41ef..e946295ed58 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentChangeAmountPlannedActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentChangeAmountPlannedActionBuilder.php @@ -29,8 +29,7 @@ final class MyPaymentChangeAmountPlannedActionBuilder implements Builder private $amount; /** - *

Draft type that stores amounts in cent precision for the specified currency.

- *

For storing money values in fractions of the minor unit in a currency, use HighPrecisionMoneyDraft instead.

+ *

New value to set.

* * @return null|Money diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentChangeAmountPlannedActionModel.php b/lib/commercetools-api/src/Models/Me/MyPaymentChangeAmountPlannedActionModel.php index 02640174a82..9d2047b87eb 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentChangeAmountPlannedActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentChangeAmountPlannedActionModel.php @@ -65,8 +65,7 @@ public function getAction() } /** - *

Draft type that stores amounts in cent precision for the specified currency.

- *

For storing money values in fractions of the minor unit in a currency, use HighPrecisionMoneyDraft instead.

+ *

New value to set.

* * * @return null|Money diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentDraft.php b/lib/commercetools-api/src/Models/Me/MyPaymentDraft.php index 8e581734a35..c96d58f1c16 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentDraft.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentDraft.php @@ -22,8 +22,8 @@ interface MyPaymentDraft extends JsonObject public const FIELD_TRANSACTION = 'transaction'; /** - *

How much money this payment intends to receive from the customer. - * The value usually matches the cart or order gross total.

+ *

Money value the Payment intends to receive from the customer. + * The value usually matches the Cart or Order gross total.

* * @return null|Money @@ -31,20 +31,23 @@ interface MyPaymentDraft extends JsonObject public function getAmountPlanned(); /** + *

Information regarding the payment interface (for example, a PSP), and the specific payment method used.

+ * * @return null|PaymentMethodInfo */ public function getPaymentMethodInfo(); /** + *

Custom Fields for the Payment.

+ * * @return null|CustomFieldsDraft */ public function getCustom(); /** - *

A list of financial transactions of the Authorization or Charge - * TransactionTypes.

+ *

Financial transactions of the TransactionTypes Authorization or Charge.

* * @return null|MyTransactionDraft diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentDraftBuilder.php b/lib/commercetools-api/src/Models/Me/MyPaymentDraftBuilder.php index cbfedbf4486..b2ea3c01363 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentDraftBuilder.php @@ -51,8 +51,8 @@ final class MyPaymentDraftBuilder implements Builder private $transaction; /** - *

How much money this payment intends to receive from the customer. - * The value usually matches the cart or order gross total.

+ *

Money value the Payment intends to receive from the customer. + * The value usually matches the Cart or Order gross total.

* * @return null|Money @@ -63,6 +63,8 @@ public function getAmountPlanned() } /** + *

Information regarding the payment interface (for example, a PSP), and the specific payment method used.

+ * * @return null|PaymentMethodInfo */ @@ -72,6 +74,8 @@ public function getPaymentMethodInfo() } /** + *

Custom Fields for the Payment.

+ * * @return null|CustomFieldsDraft */ @@ -81,8 +85,7 @@ public function getCustom() } /** - *

A list of financial transactions of the Authorization or Charge - * TransactionTypes.

+ *

Financial transactions of the TransactionTypes Authorization or Charge.

* * @return null|MyTransactionDraft diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentDraftModel.php b/lib/commercetools-api/src/Models/Me/MyPaymentDraftModel.php index 817dcc6dbd1..58ecfb39225 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentDraftModel.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentDraftModel.php @@ -66,8 +66,8 @@ public function __construct( } /** - *

How much money this payment intends to receive from the customer. - * The value usually matches the cart or order gross total.

+ *

Money value the Payment intends to receive from the customer. + * The value usually matches the Cart or Order gross total.

* * * @return null|Money @@ -88,6 +88,8 @@ public function getAmountPlanned() } /** + *

Information regarding the payment interface (for example, a PSP), and the specific payment method used.

+ * * * @return null|PaymentMethodInfo */ @@ -107,6 +109,8 @@ public function getPaymentMethodInfo() } /** + *

Custom Fields for the Payment.

+ * * * @return null|CustomFieldsDraft */ @@ -126,8 +130,7 @@ public function getCustom() } /** - *

A list of financial transactions of the Authorization or Charge - * TransactionTypes.

+ *

Financial transactions of the TransactionTypes Authorization or Charge.

* * * @return null|MyTransactionDraft diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentModel.php b/lib/commercetools-api/src/Models/Me/MyPaymentModel.php index c8d4870796c..ae017e7a7dc 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentModel.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentModel.php @@ -8,8 +8,8 @@ namespace Commercetools\Api\Models\Me; -use Commercetools\Api\Models\Common\TypedMoney; -use Commercetools\Api\Models\Common\TypedMoneyModel; +use Commercetools\Api\Models\Common\CentPrecisionMoney; +use Commercetools\Api\Models\Common\CentPrecisionMoneyModel; use Commercetools\Api\Models\Customer\CustomerReference; use Commercetools\Api\Models\Customer\CustomerReferenceModel; use Commercetools\Api\Models\Payment\PaymentMethodInfo; @@ -54,7 +54,7 @@ final class MyPaymentModel extends JsonObjectModel implements MyPayment /** * - * @var ?TypedMoney + * @var ?CentPrecisionMoney */ protected $amountPlanned; @@ -85,7 +85,7 @@ public function __construct( ?int $version = null, ?CustomerReference $customer = null, ?string $anonymousId = null, - ?TypedMoney $amountPlanned = null, + ?CentPrecisionMoney $amountPlanned = null, ?PaymentMethodInfo $paymentMethodInfo = null, ?TransactionCollection $transactions = null, ?CustomFields $custom = null @@ -101,7 +101,7 @@ public function __construct( } /** - *

Unique identifier of the MyPayment.

+ *

Unique identifier of the Payment.

* * * @return null|string @@ -121,6 +121,8 @@ public function getId() } /** + *

Current version of the Payment.

+ * * * @return null|int */ @@ -139,7 +141,7 @@ public function getVersion() } /** - *

A reference to the customer this payment belongs to.

+ *

Reference to a Customer associated with the Payment. Set automatically with a password flow token. Either customer or anonymousId is present.

* * * @return null|CustomerReference @@ -160,7 +162,7 @@ public function getCustomer() } /** - *

Identifies payments belonging to an anonymous session (the customer has not signed up/in yet).

+ *

Anonymous session associated with the Payment. Set automatically with a token for an anonymous session. Either customer or anonymousId is present.

* * * @return null|string @@ -180,11 +182,11 @@ public function getAnonymousId() } /** - *

How much money this payment intends to receive from the customer. - * The value usually matches the cart or order gross total.

+ *

Money value the Payment intends to receive from the customer. + * The value typically matches the Cart or Order gross total.

* * - * @return null|TypedMoney + * @return null|CentPrecisionMoney */ public function getAmountPlanned() { @@ -194,14 +196,16 @@ public function getAmountPlanned() if (is_null($data)) { return null; } - $className = TypedMoneyModel::resolveDiscriminatorClass($data); - $this->amountPlanned = $className::of($data); + + $this->amountPlanned = CentPrecisionMoneyModel::of($data); } return $this->amountPlanned; } /** + *

Information regarding the payment interface (for example, a PSP), and the specific payment method used.

+ * * * @return null|PaymentMethodInfo */ @@ -221,8 +225,7 @@ public function getPaymentMethodInfo() } /** - *

A list of financial transactions of different TransactionTypes - * with different TransactionStates.

+ *

Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.

* * * @return null|TransactionCollection @@ -242,6 +245,8 @@ public function getTransactions() } /** + *

Custom Fields defined for the Payment.

+ * * * @return null|CustomFields */ @@ -294,9 +299,9 @@ public function setAnonymousId(?string $anonymousId): void } /** - * @param ?TypedMoney $amountPlanned + * @param ?CentPrecisionMoney $amountPlanned */ - public function setAmountPlanned(?TypedMoney $amountPlanned): void + public function setAmountPlanned(?CentPrecisionMoney $amountPlanned): void { $this->amountPlanned = $amountPlanned; } diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentPagedQueryResponse.php b/lib/commercetools-api/src/Models/Me/MyPaymentPagedQueryResponse.php index edc273ed927..660390ad52c 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentPagedQueryResponse.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentPagedQueryResponse.php @@ -28,12 +28,20 @@ interface MyPaymentPagedQueryResponse extends JsonObject public function getLimit(); /** + *

Actual number of results returned.

+ * * @return null|int */ public function getCount(); /** + *

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.

+ * * @return null|int */ @@ -48,6 +56,8 @@ public function getTotal(); public function getOffset(); /** + *

MyPayments matching the query.

+ * * @return null|MyPaymentCollection */ diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentPagedQueryResponseBuilder.php b/lib/commercetools-api/src/Models/Me/MyPaymentPagedQueryResponseBuilder.php index fc44e783e26..eabc16f4cc2 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentPagedQueryResponseBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentPagedQueryResponseBuilder.php @@ -62,6 +62,8 @@ public function getLimit() } /** + *

Actual number of results returned.

+ * * @return null|int */ @@ -71,6 +73,12 @@ public function getCount() } /** + *

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.

+ * * @return null|int */ @@ -91,6 +99,8 @@ public function getOffset() } /** + *

MyPayments matching the query.

+ * * @return null|MyPaymentCollection */ diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentPagedQueryResponseModel.php b/lib/commercetools-api/src/Models/Me/MyPaymentPagedQueryResponseModel.php index ae7a86343c4..1428f8cca80 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentPagedQueryResponseModel.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentPagedQueryResponseModel.php @@ -88,6 +88,8 @@ public function getLimit() } /** + *

Actual number of results returned.

+ * * * @return null|int */ @@ -106,6 +108,12 @@ public function getCount() } /** + *

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.

+ * * * @return null|int */ @@ -144,6 +152,8 @@ public function getOffset() } /** + *

MyPayments matching the query.

+ * * * @return null|MyPaymentCollection */ diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoInterfaceAction.php b/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoInterfaceAction.php index 18484df1178..e6e7c37aa66 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoInterfaceAction.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoInterfaceAction.php @@ -16,6 +16,9 @@ interface MyPaymentSetMethodInfoInterfaceAction extends MyPaymentUpdateAction public const FIELD_INTERFACE = 'interface'; /** + *

Value to set. + * Once set, the paymentInterface of the paymentMethodInfo cannot be changed.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoInterfaceActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoInterfaceActionBuilder.php index 59d04db3ee8..9658c0b27ab 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoInterfaceActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoInterfaceActionBuilder.php @@ -27,6 +27,9 @@ final class MyPaymentSetMethodInfoInterfaceActionBuilder implements Builder private $interface; /** + *

Value to set. + * Once set, the paymentInterface of the paymentMethodInfo cannot be changed.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoInterfaceActionModel.php b/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoInterfaceActionModel.php index 3165a550e7e..298334c1f09 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoInterfaceActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoInterfaceActionModel.php @@ -63,6 +63,9 @@ public function getAction() } /** + *

Value to set. + * Once set, the paymentInterface of the paymentMethodInfo cannot be changed.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoMethodAction.php b/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoMethodAction.php index e837fa31c32..80535b594d9 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoMethodAction.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoMethodAction.php @@ -16,6 +16,9 @@ interface MyPaymentSetMethodInfoMethodAction extends MyPaymentUpdateAction public const FIELD_METHOD = 'method'; /** + *

Value to set. + * If empty, any existing value will be removed.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoMethodActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoMethodActionBuilder.php index 7c9fc24cb76..95f77dd86ed 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoMethodActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoMethodActionBuilder.php @@ -27,6 +27,9 @@ final class MyPaymentSetMethodInfoMethodActionBuilder implements Builder private $method; /** + *

Value to set. + * If empty, any existing value will be removed.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoMethodActionModel.php b/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoMethodActionModel.php index 9682040d7f1..57e5629a884 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoMethodActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoMethodActionModel.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/Me/MyPaymentSetMethodInfoNameAction.php b/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoNameAction.php index e99f2923859..57a9472574c 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoNameAction.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoNameAction.php @@ -17,7 +17,8 @@ interface MyPaymentSetMethodInfoNameAction extends MyPaymentUpdateAction public const FIELD_NAME = 'name'; /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Value to set. + * If empty, any existing value will be removed.

* * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoNameActionBuilder.php b/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoNameActionBuilder.php index 3cff75d5ed8..614b55db245 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoNameActionBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoNameActionBuilder.php @@ -29,7 +29,8 @@ final class MyPaymentSetMethodInfoNameActionBuilder implements Builder private $name; /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Value to set. + * If empty, any existing value will be removed.

* * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoNameActionModel.php b/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoNameActionModel.php index 8cc1f478d0b..8acfcd93097 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoNameActionModel.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentSetMethodInfoNameActionModel.php @@ -65,7 +65,8 @@ public function getAction() } /** - *

JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

+ *

Value to set. + * If empty, any existing value will be removed.

* * * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentUpdate.php b/lib/commercetools-api/src/Models/Me/MyPaymentUpdate.php index 47f5619f1f9..9b41893f48b 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentUpdate.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentUpdate.php @@ -17,12 +17,16 @@ interface MyPaymentUpdate extends JsonObject public const FIELD_ACTIONS = 'actions'; /** + *

Expected version of the Payment 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 Payment.

+ * * @return null|MyPaymentUpdateActionCollection */ diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentUpdateBuilder.php b/lib/commercetools-api/src/Models/Me/MyPaymentUpdateBuilder.php index cdbcd981f18..93af9e94486 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentUpdateBuilder.php @@ -33,6 +33,8 @@ final class MyPaymentUpdateBuilder implements Builder private $actions; /** + *

Expected version of the Payment 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 */ @@ -42,6 +44,8 @@ public function getVersion() } /** + *

Update actions to be performed on the Payment.

+ * * @return null|MyPaymentUpdateActionCollection */ diff --git a/lib/commercetools-api/src/Models/Me/MyPaymentUpdateModel.php b/lib/commercetools-api/src/Models/Me/MyPaymentUpdateModel.php index 9f7e4611d88..9e4a88bf82c 100644 --- a/lib/commercetools-api/src/Models/Me/MyPaymentUpdateModel.php +++ b/lib/commercetools-api/src/Models/Me/MyPaymentUpdateModel.php @@ -44,6 +44,8 @@ public function __construct( } /** + *

Expected version of the Payment 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 */ @@ -62,6 +64,8 @@ public function getVersion() } /** + *

Update actions to be performed on the Payment.

+ * * * @return null|MyPaymentUpdateActionCollection */ diff --git a/lib/commercetools-api/src/Models/Me/MyTransactionDraft.php b/lib/commercetools-api/src/Models/Me/MyTransactionDraft.php index 6534c4dd2ca..875e18a902c 100644 --- a/lib/commercetools-api/src/Models/Me/MyTransactionDraft.php +++ b/lib/commercetools-api/src/Models/Me/MyTransactionDraft.php @@ -23,7 +23,7 @@ interface MyTransactionDraft extends JsonObject public const FIELD_CUSTOM = 'custom'; /** - *

The time at which the transaction took place.

+ *

Date and time (UTC) the Transaction took place.

* * @return null|DateTimeImmutable @@ -31,9 +31,8 @@ interface MyTransactionDraft extends JsonObject public function getTimestamp(); /** - *

The type of this transaction. - * Only the Authorization or Charge - * TransactionTypes are allowed here.

+ *

Type of the Transaction. + * Only Authorization or Charge is allowed.

* * @return null|string @@ -41,16 +40,16 @@ public function getTimestamp(); public function getType(); /** + *

Money value for the Transaction.

+ * * @return null|Money */ public function getAmount(); /** - *

The identifier that is used by the interface that managed the transaction (usually the PSP). - * If a matching interaction was logged in the interfaceInteractions array, - * the corresponding interaction should be findable with this ID. - * The state is set to the Initial TransactionState.

+ *

Identifier used by the payment service that manages the Transaction. + * Can be used to correlate the Transaction to an interface interaction.

* * @return null|string @@ -58,7 +57,7 @@ public function getAmount(); public function getInteractionId(); /** - *

Custom Fields for the Transaction.

+ *

Custom Fields of the Transaction.

* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Me/MyTransactionDraftBuilder.php b/lib/commercetools-api/src/Models/Me/MyTransactionDraftBuilder.php index 9f99f3834a7..00ce40751b5 100644 --- a/lib/commercetools-api/src/Models/Me/MyTransactionDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Me/MyTransactionDraftBuilder.php @@ -56,7 +56,7 @@ final class MyTransactionDraftBuilder implements Builder private $custom; /** - *

The time at which the transaction took place.

+ *

Date and time (UTC) the Transaction took place.

* * @return null|DateTimeImmutable @@ -67,9 +67,8 @@ public function getTimestamp() } /** - *

The type of this transaction. - * Only the Authorization or Charge - * TransactionTypes are allowed here.

+ *

Type of the Transaction. + * Only Authorization or Charge is allowed.

* * @return null|string @@ -80,6 +79,8 @@ public function getType() } /** + *

Money value for the Transaction.

+ * * @return null|Money */ @@ -89,10 +90,8 @@ public function getAmount() } /** - *

The identifier that is used by the interface that managed the transaction (usually the PSP). - * If a matching interaction was logged in the interfaceInteractions array, - * the corresponding interaction should be findable with this ID. - * The state is set to the Initial TransactionState.

+ *

Identifier used by the payment service that manages the Transaction. + * Can be used to correlate the Transaction to an interface interaction.

* * @return null|string @@ -103,7 +102,7 @@ public function getInteractionId() } /** - *

Custom Fields for the Transaction.

+ *

Custom Fields of the Transaction.

* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Me/MyTransactionDraftModel.php b/lib/commercetools-api/src/Models/Me/MyTransactionDraftModel.php index a18d5e05b32..ef59c749a52 100644 --- a/lib/commercetools-api/src/Models/Me/MyTransactionDraftModel.php +++ b/lib/commercetools-api/src/Models/Me/MyTransactionDraftModel.php @@ -73,7 +73,7 @@ public function __construct( } /** - *

The time at which the transaction took place.

+ *

Date and time (UTC) the Transaction took place.

* * * @return null|DateTimeImmutable @@ -97,9 +97,8 @@ public function getTimestamp() } /** - *

The type of this transaction. - * Only the Authorization or Charge - * TransactionTypes are allowed here.

+ *

Type of the Transaction. + * Only Authorization or Charge is allowed.

* * * @return null|string @@ -119,6 +118,8 @@ public function getType() } /** + *

Money value for the Transaction.

+ * * * @return null|Money */ @@ -138,10 +139,8 @@ public function getAmount() } /** - *

The identifier that is used by the interface that managed the transaction (usually the PSP). - * If a matching interaction was logged in the interfaceInteractions array, - * the corresponding interaction should be findable with this ID. - * The state is set to the Initial TransactionState.

+ *

Identifier used by the payment service that manages the Transaction. + * Can be used to correlate the Transaction to an interface interaction.

* * * @return null|string @@ -161,7 +160,7 @@ public function getInteractionId() } /** - *

Custom Fields for the Transaction.

+ *

Custom Fields of the Transaction.

* * * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessage.php b/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessage.php index aa7608d33d1..b25010112f5 100644 --- a/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessage.php +++ b/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessage.php @@ -19,7 +19,7 @@ interface PaymentStatusInterfaceCodeSetMessage extends Message /** *

Unique identifier for the Payment for which the Set StatusInterfaceCode update action was applied.

* - * @deprecated + * @return null|string */ public function getPaymentId(); diff --git a/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessageBuilder.php b/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessageBuilder.php index 529edb1db4c..642b27c3644 100644 --- a/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessageBuilder.php +++ b/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessageBuilder.php @@ -88,7 +88,7 @@ final class PaymentStatusInterfaceCodeSetMessageBuilder implements Builder private $resourceUserProvidedIdentifiers; /** - * @deprecated + * @var ?string */ private $paymentId; @@ -213,7 +213,7 @@ public function getResourceUserProvidedIdentifiers() /** *

Unique identifier for the Payment for which the Set StatusInterfaceCode update action was applied.

* - * @deprecated + * @return null|string */ public function getPaymentId() diff --git a/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessageModel.php b/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessageModel.php index cbc4bc2ac33..3492fec45f2 100644 --- a/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessageModel.php +++ b/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessageModel.php @@ -94,7 +94,7 @@ final class PaymentStatusInterfaceCodeSetMessageModel extends JsonObjectModel im protected $resourceUserProvidedIdentifiers; /** - * @deprecated + * * @var ?string */ protected $paymentId; @@ -375,7 +375,7 @@ public function getResourceUserProvidedIdentifiers() /** *

Unique identifier for the Payment for which the Set StatusInterfaceCode update action was applied.

* - * @deprecated + * * @return null|string */ public function getPaymentId() diff --git a/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessagePayload.php b/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessagePayload.php index c0368f0999c..c7017858d25 100644 --- a/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessagePayload.php +++ b/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessagePayload.php @@ -19,7 +19,7 @@ interface PaymentStatusInterfaceCodeSetMessagePayload extends MessagePayload /** *

Unique identifier for the Payment for which the Set StatusInterfaceCode update action was applied.

* - * @deprecated + * @return null|string */ public function getPaymentId(); diff --git a/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessagePayloadBuilder.php b/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessagePayloadBuilder.php index 251deb54c0b..0a860251af2 100644 --- a/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessagePayloadBuilder.php +++ b/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessagePayloadBuilder.php @@ -21,7 +21,7 @@ final class PaymentStatusInterfaceCodeSetMessagePayloadBuilder implements Builder { /** - * @deprecated + * @var ?string */ private $paymentId; @@ -35,7 +35,7 @@ final class PaymentStatusInterfaceCodeSetMessagePayloadBuilder implements Builde /** *

Unique identifier for the Payment for which the Set StatusInterfaceCode update action was applied.

* - * @deprecated + * @return null|string */ public function getPaymentId() diff --git a/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessagePayloadModel.php b/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessagePayloadModel.php index 982a135f3f2..1b796bf76e1 100644 --- a/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessagePayloadModel.php +++ b/lib/commercetools-api/src/Models/Message/PaymentStatusInterfaceCodeSetMessagePayloadModel.php @@ -27,7 +27,7 @@ final class PaymentStatusInterfaceCodeSetMessagePayloadModel extends JsonObjectM protected $type; /** - * @deprecated + * * @var ?string */ protected $paymentId; @@ -73,7 +73,7 @@ public function getType() /** *

Unique identifier for the Payment for which the Set StatusInterfaceCode update action was applied.

* - * @deprecated + * * @return null|string */ public function getPaymentId() diff --git a/lib/commercetools-api/src/Models/Order/OrderAddPaymentAction.php b/lib/commercetools-api/src/Models/Order/OrderAddPaymentAction.php index a28f8daaeaa..d56d582e8b5 100644 --- a/lib/commercetools-api/src/Models/Order/OrderAddPaymentAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderAddPaymentAction.php @@ -17,7 +17,7 @@ interface OrderAddPaymentAction extends OrderUpdateAction public const FIELD_PAYMENT = 'payment'; /** - *

ResourceIdentifier to a Payment.

+ *

ResourceIdentifier of a Payment.

* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Order/OrderAddPaymentActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderAddPaymentActionBuilder.php index ee6e23c182a..f5d3e04593b 100644 --- a/lib/commercetools-api/src/Models/Order/OrderAddPaymentActionBuilder.php +++ b/lib/commercetools-api/src/Models/Order/OrderAddPaymentActionBuilder.php @@ -29,7 +29,7 @@ final class OrderAddPaymentActionBuilder implements Builder private $payment; /** - *

ResourceIdentifier to a Payment.

+ *

ResourceIdentifier of a Payment.

* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Order/OrderAddPaymentActionModel.php b/lib/commercetools-api/src/Models/Order/OrderAddPaymentActionModel.php index 6a85cf7f797..40576869b06 100644 --- a/lib/commercetools-api/src/Models/Order/OrderAddPaymentActionModel.php +++ b/lib/commercetools-api/src/Models/Order/OrderAddPaymentActionModel.php @@ -65,7 +65,7 @@ public function getAction() } /** - *

ResourceIdentifier to a Payment.

+ *

ResourceIdentifier of a Payment.

* * * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Order/OrderRemovePaymentAction.php b/lib/commercetools-api/src/Models/Order/OrderRemovePaymentAction.php index d360fe8b9ca..91eea287725 100644 --- a/lib/commercetools-api/src/Models/Order/OrderRemovePaymentAction.php +++ b/lib/commercetools-api/src/Models/Order/OrderRemovePaymentAction.php @@ -17,7 +17,7 @@ interface OrderRemovePaymentAction extends OrderUpdateAction public const FIELD_PAYMENT = 'payment'; /** - *

ResourceIdentifier to a Payment.

+ *

ResourceIdentifier of a Payment.

* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Order/OrderRemovePaymentActionBuilder.php b/lib/commercetools-api/src/Models/Order/OrderRemovePaymentActionBuilder.php index 28be0d4283e..7c7bc5b3472 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 to a Payment.

+ *

ResourceIdentifier of a Payment.

* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Order/OrderRemovePaymentActionModel.php b/lib/commercetools-api/src/Models/Order/OrderRemovePaymentActionModel.php index 385d2b120a2..6235283fe8f 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 to a Payment.

+ *

ResourceIdentifier of a Payment.

* * * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentAction.php index 59477e6b13d..abc2144c6c4 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentAction.php @@ -18,7 +18,7 @@ interface StagedOrderAddPaymentAction extends StagedOrderUpdateAction public const FIELD_PAYMENT = 'payment'; /** - *

ResourceIdentifier to a Payment.

+ *

ResourceIdentifier of a Payment.

* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentActionBuilder.php index 5ad060449a1..af4bd528cfe 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentActionBuilder.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentActionBuilder.php @@ -31,7 +31,7 @@ final class StagedOrderAddPaymentActionBuilder implements Builder private $payment; /** - *

ResourceIdentifier to a Payment.

+ *

ResourceIdentifier of a Payment.

* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentActionModel.php index a650be72989..c4de39c3f15 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentActionModel.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderAddPaymentActionModel.php @@ -67,7 +67,7 @@ public function getAction() } /** - *

ResourceIdentifier to a Payment.

+ *

ResourceIdentifier of a Payment.

* * * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemovePaymentAction.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemovePaymentAction.php index 4c601e6bc27..560e2d22c3c 100644 --- a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemovePaymentAction.php +++ b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemovePaymentAction.php @@ -18,7 +18,7 @@ interface StagedOrderRemovePaymentAction extends StagedOrderUpdateAction public const FIELD_PAYMENT = 'payment'; /** - *

ResourceIdentifier to a Payment.

+ *

ResourceIdentifier of a Payment.

* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemovePaymentActionBuilder.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemovePaymentActionBuilder.php index 02174814402..c1040f75c88 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 to a Payment.

+ *

ResourceIdentifier of a Payment.

* * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemovePaymentActionModel.php b/lib/commercetools-api/src/Models/OrderEdit/StagedOrderRemovePaymentActionModel.php index 3622926ef43..e02c26292c5 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 to a Payment.

+ *

ResourceIdentifier of a Payment.

* * * @return null|PaymentResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Payment/Payment.php b/lib/commercetools-api/src/Models/Payment/Payment.php index 74256e609a1..102ffc9d83f 100644 --- a/lib/commercetools-api/src/Models/Payment/Payment.php +++ b/lib/commercetools-api/src/Models/Payment/Payment.php @@ -9,6 +9,7 @@ namespace Commercetools\Api\Models\Payment; use Commercetools\Api\Models\Common\BaseResource; +use Commercetools\Api\Models\Common\CentPrecisionMoney; use Commercetools\Api\Models\Common\CreatedBy; use Commercetools\Api\Models\Common\LastModifiedBy; use Commercetools\Api\Models\Common\TypedMoney; @@ -25,8 +26,13 @@ interface Payment extends BaseResource public const FIELD_CREATED_BY = 'createdBy'; 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'; @@ -43,25 +49,31 @@ interface Payment extends BaseResource public function getId(); /** + *

Current version of the Payment.

+ * * @return null|int */ public function getVersion(); /** + *

Date and time (UTC) the Payment was initially created.

+ * * @return null|DateTimeImmutable */ public function getCreatedAt(); /** + *

Date and time (UTC) the Payment was last updated.

+ * * @return null|DateTimeImmutable */ public function getLastModifiedAt(); /** - *

Present on resources created after 1 February 2019 except for events not tracked.

+ *

Present on resources created after 1 February 2019 except for events not tracked.

* * @return null|LastModifiedBy @@ -69,7 +81,7 @@ public function getLastModifiedAt(); public function getLastModifiedBy(); /** - *

Present on resources created after 1 February 2019 except for events not tracked.

+ *

Present on resources created after 1 February 2019 except for events not tracked.

* * @return null|CreatedBy @@ -77,7 +89,7 @@ public function getLastModifiedBy(); public function getCreatedBy(); /** - *

A reference to the customer this payment belongs to.

+ *

Reference to a Customer associated with the Payment.

* * @return null|CustomerReference @@ -85,7 +97,7 @@ public function getCreatedBy(); public function getCustomer(); /** - *

Identifies payments belonging to an anonymous session (the customer has not signed up/in yet).

+ *

Anonymous session associated with the Payment.

* * @return null|string @@ -93,9 +105,16 @@ public function getCustomer(); public function getAnonymousId(); /** - *

The identifier that is used by the interface that manages the payment (usually the PSP). - * Cannot be changed once it has been set. - * The combination of this ID and the PaymentMethodInfo paymentInterface must be unique.

+ *

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.

* * @return null|string @@ -103,28 +122,64 @@ public function getAnonymousId(); public function getInterfaceId(); /** - *

How much money this payment intends to receive from the customer. - * The value usually matches the cart or order gross total.

+ *

Money value the Payment intends to receive from the customer. + * The value typically matches the Cart or Order gross total.

* - * @return null|TypedMoney + * @return null|CentPrecisionMoney */ public function getAmountPlanned(); /** + *

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.

+ * * @return null|PaymentMethodInfo */ public function getPaymentMethodInfo(); /** + *

Current status of the Payment.

+ * * @return null|PaymentStatus */ public function getPaymentStatus(); /** - *

A list of financial transactions of different TransactionTypes with different TransactionStates.

+ *

Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.

* * @return null|TransactionCollection @@ -132,10 +187,7 @@ public function getPaymentStatus(); public function getTransactions(); /** - *

Interface interactions can be requests sent to the PSP, responses received from the PSP or notifications received from the PSP. - * Some interactions may result in a transaction. - * If so, the interactionId in the Transaction should be set to match the ID of the PSP for the interaction. - * Interactions are managed by the PSP integration and are usually neither written nor read by the user facing frontends or other services.

+ *

Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.

* * @return null|CustomFieldsCollection @@ -143,6 +195,8 @@ public function getTransactions(); public function getInterfaceInteractions(); /** + *

Custom Fields for the Payment.

+ * * @return null|CustomFields */ @@ -196,15 +250,40 @@ public function setCustomer(?CustomerReference $customer): void; */ public function setAnonymousId(?string $anonymousId): void; + /** + * @param ?string $externalId + */ + public function setExternalId(?string $externalId): void; + /** * @param ?string $interfaceId */ public function setInterfaceId(?string $interfaceId): void; /** - * @param ?TypedMoney $amountPlanned + * @param ?CentPrecisionMoney $amountPlanned + */ + 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 setAmountPlanned(?TypedMoney $amountPlanned): void; + public function setAmountRefunded(?TypedMoney $amountRefunded): void; /** * @param ?PaymentMethodInfo $paymentMethodInfo diff --git a/lib/commercetools-api/src/Models/Payment/PaymentAddInterfaceInteractionAction.php b/lib/commercetools-api/src/Models/Payment/PaymentAddInterfaceInteractionAction.php index b56292527ed..1c0587bad3e 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentAddInterfaceInteractionAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentAddInterfaceInteractionAction.php @@ -19,12 +19,16 @@ interface PaymentAddInterfaceInteractionAction extends PaymentUpdateAction public const FIELD_FIELDS = 'fields'; /** + *

ResourceIdentifier of a Type.

+ * * @return null|TypeResourceIdentifier */ public function getType(); /** + *

Custom Fields as per FieldDefinitions of the Type.

+ * * @return null|FieldContainer */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentAddInterfaceInteractionActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentAddInterfaceInteractionActionBuilder.php index 795d18504db..c46ce275b7f 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentAddInterfaceInteractionActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentAddInterfaceInteractionActionBuilder.php @@ -37,6 +37,8 @@ final class PaymentAddInterfaceInteractionActionBuilder implements Builder private $fields; /** + *

ResourceIdentifier of a Type.

+ * * @return null|TypeResourceIdentifier */ @@ -46,6 +48,8 @@ public function getType() } /** + *

Custom Fields as per FieldDefinitions of the Type.

+ * * @return null|FieldContainer */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentAddInterfaceInteractionActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentAddInterfaceInteractionActionModel.php index f1ccc1fada8..e6f6065250e 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentAddInterfaceInteractionActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentAddInterfaceInteractionActionModel.php @@ -75,6 +75,8 @@ public function getAction() } /** + *

ResourceIdentifier of a Type.

+ * * * @return null|TypeResourceIdentifier */ @@ -94,6 +96,8 @@ public function getType() } /** + *

Custom Fields as per FieldDefinitions of the Type.

+ * * * @return null|FieldContainer */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentAddTransactionAction.php b/lib/commercetools-api/src/Models/Payment/PaymentAddTransactionAction.php index 8a944469cf9..d052ba3796f 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentAddTransactionAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentAddTransactionAction.php @@ -16,6 +16,8 @@ interface PaymentAddTransactionAction extends PaymentUpdateAction public const FIELD_TRANSACTION = 'transaction'; /** + *

Value to append to the transactions array.

+ * * @return null|TransactionDraft */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentAddTransactionActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentAddTransactionActionBuilder.php index c4a7c00bcb7..29ae27c764e 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentAddTransactionActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentAddTransactionActionBuilder.php @@ -27,6 +27,8 @@ final class PaymentAddTransactionActionBuilder implements Builder private $transaction; /** + *

Value to append to the transactions array.

+ * * @return null|TransactionDraft */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentAddTransactionActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentAddTransactionActionModel.php index 51962e9578b..1726e616fe2 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentAddTransactionActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentAddTransactionActionModel.php @@ -63,6 +63,8 @@ public function getAction() } /** + *

Value to append to the transactions array.

+ * * * @return null|TransactionDraft */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentBuilder.php index c0294fdc005..e0be7ee5e73 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentBuilder.php @@ -10,6 +10,8 @@ use Commercetools\Api\Models\Common\BaseResource; use Commercetools\Api\Models\Common\BaseResourceBuilder; +use Commercetools\Api\Models\Common\CentPrecisionMoney; +use Commercetools\Api\Models\Common\CentPrecisionMoneyBuilder; use Commercetools\Api\Models\Common\CreatedBy; use Commercetools\Api\Models\Common\CreatedByBuilder; use Commercetools\Api\Models\Common\LastModifiedBy; @@ -82,6 +84,12 @@ final class PaymentBuilder implements Builder */ private $anonymousId; + /** + + * @var ?string + */ + private $externalId; + /** * @var ?string @@ -90,10 +98,34 @@ final class PaymentBuilder implements Builder /** - * @var null|TypedMoney|TypedMoneyBuilder + * @var null|CentPrecisionMoney|CentPrecisionMoneyBuilder */ 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 @@ -142,6 +174,8 @@ public function getId() } /** + *

Current version of the Payment.

+ * * @return null|int */ @@ -151,6 +185,8 @@ public function getVersion() } /** + *

Date and time (UTC) the Payment was initially created.

+ * * @return null|DateTimeImmutable */ @@ -160,6 +196,8 @@ public function getCreatedAt() } /** + *

Date and time (UTC) the Payment was last updated.

+ * * @return null|DateTimeImmutable */ @@ -169,7 +207,7 @@ public function getLastModifiedAt() } /** - *

Present on resources created after 1 February 2019 except for events not tracked.

+ *

Present on resources created after 1 February 2019 except for events not tracked.

* * @return null|LastModifiedBy @@ -180,7 +218,7 @@ public function getLastModifiedBy() } /** - *

Present on resources created after 1 February 2019 except for events not tracked.

+ *

Present on resources created after 1 February 2019 except for events not tracked.

* * @return null|CreatedBy @@ -191,7 +229,7 @@ public function getCreatedBy() } /** - *

A reference to the customer this payment belongs to.

+ *

Reference to a Customer associated with the Payment.

* * @return null|CustomerReference @@ -202,7 +240,7 @@ public function getCustomer() } /** - *

Identifies payments belonging to an anonymous session (the customer has not signed up/in yet).

+ *

Anonymous session associated with the Payment.

* * @return null|string @@ -213,9 +251,19 @@ public function getAnonymousId() } /** - *

The identifier that is used by the interface that manages the payment (usually the PSP). - * Cannot be changed once it has been set. - * The combination of this ID and the PaymentMethodInfo paymentInterface must be unique.

+ *

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.

* * @return null|string @@ -226,18 +274,64 @@ public function getInterfaceId() } /** - *

How much money this payment intends to receive from the customer. - * The value usually matches the cart or order gross total.

+ *

Money value the Payment intends to receive from the customer. + * The value typically matches the Cart or Order gross total.

* - * @return null|TypedMoney + * @return null|CentPrecisionMoney */ public function getAmountPlanned() { - return $this->amountPlanned instanceof TypedMoneyBuilder ? $this->amountPlanned->build() : $this->amountPlanned; + return $this->amountPlanned instanceof CentPrecisionMoneyBuilder ? $this->amountPlanned->build() : $this->amountPlanned; + } + + /** + *

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.

+ * * @return null|PaymentMethodInfo */ @@ -247,6 +341,8 @@ public function getPaymentMethodInfo() } /** + *

Current status of the Payment.

+ * * @return null|PaymentStatus */ @@ -256,7 +352,7 @@ public function getPaymentStatus() } /** - *

A list of financial transactions of different TransactionTypes with different TransactionStates.

+ *

Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.

* * @return null|TransactionCollection @@ -267,10 +363,7 @@ public function getTransactions() } /** - *

Interface interactions can be requests sent to the PSP, responses received from the PSP or notifications received from the PSP. - * Some interactions may result in a transaction. - * If so, the interactionId in the Transaction should be set to match the ID of the PSP for the interaction. - * Interactions are managed by the PSP integration and are usually neither written nor read by the user facing frontends or other services.

+ *

Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.

* * @return null|CustomFieldsCollection @@ -281,6 +374,8 @@ public function getInterfaceInteractions() } /** + *

Custom Fields for the Payment.

+ * * @return null|CustomFields */ @@ -388,6 +483,17 @@ 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 @@ -400,16 +506,60 @@ public function withInterfaceId(?string $interfaceId) } /** - * @param ?TypedMoney $amountPlanned + * @param ?CentPrecisionMoney $amountPlanned * @return $this */ - public function withAmountPlanned(?TypedMoney $amountPlanned) + public function withAmountPlanned(?CentPrecisionMoney $amountPlanned) { $this->amountPlanned = $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 @@ -513,13 +663,46 @@ public function withCustomerBuilder(?CustomerReferenceBuilder $customer) * @deprecated use withAmountPlanned() instead * @return $this */ - public function withAmountPlannedBuilder(?TypedMoneyBuilder $amountPlanned) + public function withAmountPlannedBuilder(?CentPrecisionMoneyBuilder $amountPlanned) { $this->amountPlanned = $amountPlanned; 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 @@ -564,8 +747,13 @@ 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 TypedMoneyBuilder ? $this->amountPlanned->build() : $this->amountPlanned, + $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/PaymentChangeAmountPlannedAction.php b/lib/commercetools-api/src/Models/Payment/PaymentChangeAmountPlannedAction.php index 410aa3d197d..fe6fc58a6a0 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentChangeAmountPlannedAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentChangeAmountPlannedAction.php @@ -17,6 +17,8 @@ interface PaymentChangeAmountPlannedAction extends PaymentUpdateAction public const FIELD_AMOUNT = 'amount'; /** + *

New value to set.

+ * * @return null|Money */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentChangeAmountPlannedActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentChangeAmountPlannedActionBuilder.php index 5e39e28b51a..827733a5907 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentChangeAmountPlannedActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentChangeAmountPlannedActionBuilder.php @@ -29,6 +29,8 @@ final class PaymentChangeAmountPlannedActionBuilder implements Builder private $amount; /** + *

New value to set.

+ * * @return null|Money */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentChangeAmountPlannedActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentChangeAmountPlannedActionModel.php index 03a7c6dcffc..21fd11e61eb 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentChangeAmountPlannedActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentChangeAmountPlannedActionModel.php @@ -65,6 +65,8 @@ public function getAction() } /** + *

New value to set.

+ * * * @return null|Money */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionInteractionIdAction.php b/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionInteractionIdAction.php index 8736a90bf62..d038026b410 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionInteractionIdAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionInteractionIdAction.php @@ -17,12 +17,16 @@ interface PaymentChangeTransactionInteractionIdAction extends PaymentUpdateActio public const FIELD_INTERACTION_ID = 'interactionId'; /** + *

Unique identifier of the Transaction.

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

New value to set.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionInteractionIdActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionInteractionIdActionBuilder.php index e7ceabfff2a..01ff7d91389 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionInteractionIdActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionInteractionIdActionBuilder.php @@ -33,6 +33,8 @@ final class PaymentChangeTransactionInteractionIdActionBuilder implements Builde private $interactionId; /** + *

Unique identifier of the Transaction.

+ * * @return null|string */ @@ -42,6 +44,8 @@ public function getTransactionId() } /** + *

New value to set.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionInteractionIdActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionInteractionIdActionModel.php index c202057b4f7..a9f890a56df 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionInteractionIdActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionInteractionIdActionModel.php @@ -71,6 +71,8 @@ public function getAction() } /** + *

Unique identifier of the Transaction.

+ * * * @return null|string */ @@ -89,6 +91,8 @@ public function getTransactionId() } /** + *

New value to set.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionStateAction.php b/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionStateAction.php index e6effbccba4..a27b949ce10 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionStateAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionStateAction.php @@ -17,12 +17,16 @@ interface PaymentChangeTransactionStateAction extends PaymentUpdateAction public const FIELD_STATE = 'state'; /** + *

Unique identifier of the Transaction.

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

New TransactionState.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionStateActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionStateActionBuilder.php index 1fc1080c9b3..de520f9e547 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionStateActionBuilder.php @@ -33,6 +33,8 @@ final class PaymentChangeTransactionStateActionBuilder implements Builder private $state; /** + *

Unique identifier of the Transaction.

+ * * @return null|string */ @@ -42,6 +44,8 @@ public function getTransactionId() } /** + *

New TransactionState.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionStateActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionStateActionModel.php index 5d5ed0d880f..85ce03ea901 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionStateActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionStateActionModel.php @@ -71,6 +71,8 @@ public function getAction() } /** + *

Unique identifier of the Transaction.

+ * * * @return null|string */ @@ -89,6 +91,8 @@ public function getTransactionId() } /** + *

New TransactionState.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionTimestampAction.php b/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionTimestampAction.php index 9e8d3a970d9..8c0fe36c056 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionTimestampAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionTimestampAction.php @@ -18,12 +18,16 @@ interface PaymentChangeTransactionTimestampAction extends PaymentUpdateAction public const FIELD_TIMESTAMP = 'timestamp'; /** + *

Unique identifier of the Transaction.

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

Timestamp of the Transaction as reported by the payment service.

+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionTimestampActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionTimestampActionBuilder.php index 23c7a87b375..34c164aa6f0 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionTimestampActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionTimestampActionBuilder.php @@ -34,6 +34,8 @@ final class PaymentChangeTransactionTimestampActionBuilder implements Builder private $timestamp; /** + *

Unique identifier of the Transaction.

+ * * @return null|string */ @@ -43,6 +45,8 @@ public function getTransactionId() } /** + *

Timestamp of the Transaction as reported by the payment service.

+ * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionTimestampActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionTimestampActionModel.php index f798314c200..78d4272a68f 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionTimestampActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentChangeTransactionTimestampActionModel.php @@ -72,6 +72,8 @@ public function getAction() } /** + *

Unique identifier of the Transaction.

+ * * * @return null|string */ @@ -90,6 +92,8 @@ public function getTransactionId() } /** + *

Timestamp of the Transaction as reported by the payment service.

+ * * * @return null|DateTimeImmutable */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentDraft.php b/lib/commercetools-api/src/Models/Payment/PaymentDraft.php index 183f51a8c9f..9b36f376eee 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentDraft.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentDraft.php @@ -34,7 +34,7 @@ interface PaymentDraft extends JsonObject public const FIELD_KEY = 'key'; /** - *

A reference to the customer this payment belongs to.

+ *

Reference to a Customer associated with the Payment.

* * @return null|CustomerResourceIdentifier @@ -42,7 +42,7 @@ interface PaymentDraft extends JsonObject public function getCustomer(); /** - *

Identifies payments belonging to an anonymous session (the customer has not signed up/in yet).

+ *

Anonymous session associated with the Payment.

* * @return null|string @@ -50,15 +50,17 @@ public function getCustomer(); public function getAnonymousId(); /** - * @deprecated + *

Additional identifier for external systems like Customer Relationship Management (CRM) or Enterprise Resource Planning (ERP).

+ * + * @return null|string */ public function getExternalId(); /** - *

The identifier that is used by the interface that manages the payment (usually the PSP). - * Cannot be changed once it has been set. - * The combination of this ID and the PaymentMethodInfo paymentInterface must be unique.

+ *

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. + * Once set, it cannot be changed.

* * @return null|string @@ -66,8 +68,8 @@ public function getExternalId(); public function getInterfaceId(); /** - *

How much money this payment intends to receive from the customer. - * The value usually matches the cart or order gross total.

+ *

Money value the Payment intends to receive from the customer. + * The value typically matches the Cart or Order gross total.

* * @return null|Money @@ -75,8 +77,7 @@ public function getInterfaceId(); public function getAmountPlanned(); /** - *

Draft type that stores amounts in cent precision for the specified currency.

- *

For storing money values in fractions of the minor unit in a currency, use HighPrecisionMoneyDraft instead.

+ *

Deprecated because the value can be calculated from the total amounts saved in the Transactions.

* * @return null|Money @@ -84,14 +85,15 @@ public function getAmountPlanned(); 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(); /** - *

Draft type that stores amounts in cent precision for the specified currency.

- *

For storing money values in fractions of the minor unit in a currency, use HighPrecisionMoneyDraft instead.

+ *

Deprecated because the value can be calculated from the total amounts saved in the Transactions.

* * @return null|Money @@ -99,8 +101,7 @@ public function getAuthorizedUntil(); public function getAmountPaid(); /** - *

Draft type that stores amounts in cent precision for the specified currency.

- *

For storing money values in fractions of the minor unit in a currency, use HighPrecisionMoneyDraft instead.

+ *

Deprecated because the value can be calculated from the total amounts saved in the Transactions.

* * @return null|Money @@ -108,19 +109,23 @@ public function getAmountPaid(); public function getAmountRefunded(); /** + *

Information regarding the payment interface (for example, a PSP), and the specific payment method used.

+ * * @return null|PaymentMethodInfo */ public function getPaymentMethodInfo(); /** + *

Current status of the Payment.

+ * * @return null|PaymentStatusDraft */ public function getPaymentStatus(); /** - *

A list of financial transactions of different TransactionTypes with different TransactionStates.

+ *

Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.

* * @return null|TransactionDraftCollection @@ -128,10 +133,7 @@ public function getPaymentStatus(); public function getTransactions(); /** - *

Interface interactions can be requests send to the PSP, responses received from the PSP or notifications received from the PSP. - * Some interactions may result in a transaction. - * If so, the interactionId in the Transaction should be set to match the ID of the PSP for the interaction. - * Interactions are managed by the PSP integration and are usually neither written nor read by the user facing frontends or other services.

+ *

Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.

* * @return null|CustomFieldsDraftCollection @@ -139,6 +141,8 @@ public function getTransactions(); public function getInterfaceInteractions(); /** + *

Custom Fields for the Payment.

+ * * @return null|CustomFieldsDraft */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentDraftBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentDraftBuilder.php index 2df541eea07..ab4fbf654cf 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentDraftBuilder.php @@ -40,7 +40,7 @@ final class PaymentDraftBuilder implements Builder private $anonymousId; /** - * @deprecated + * @var ?string */ private $externalId; @@ -118,7 +118,7 @@ final class PaymentDraftBuilder implements Builder private $key; /** - *

A reference to the customer this payment belongs to.

+ *

Reference to a Customer associated with the Payment.

* * @return null|CustomerResourceIdentifier @@ -129,7 +129,7 @@ public function getCustomer() } /** - *

Identifies payments belonging to an anonymous session (the customer has not signed up/in yet).

+ *

Anonymous session associated with the Payment.

* * @return null|string @@ -140,7 +140,9 @@ public function getAnonymousId() } /** - * @deprecated + *

Additional identifier for external systems like Customer Relationship Management (CRM) or Enterprise Resource Planning (ERP).

+ * + * @return null|string */ public function getExternalId() @@ -149,9 +151,9 @@ public function getExternalId() } /** - *

The identifier that is used by the interface that manages the payment (usually the PSP). - * Cannot be changed once it has been set. - * The combination of this ID and the PaymentMethodInfo paymentInterface must be unique.

+ *

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. + * Once set, it cannot be changed.

* * @return null|string @@ -162,8 +164,8 @@ public function getInterfaceId() } /** - *

How much money this payment intends to receive from the customer. - * The value usually matches the cart or order gross total.

+ *

Money value the Payment intends to receive from the customer. + * The value typically matches the Cart or Order gross total.

* * @return null|Money @@ -174,8 +176,7 @@ public function getAmountPlanned() } /** - *

Draft type that stores amounts in cent precision for the specified currency.

- *

For storing money values in fractions of the minor unit in a currency, use HighPrecisionMoneyDraft instead.

+ *

Deprecated because the value can be calculated from the total amounts saved in the Transactions.

* * @return null|Money @@ -186,6 +187,8 @@ 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 */ @@ -195,8 +198,7 @@ public function getAuthorizedUntil() } /** - *

Draft type that stores amounts in cent precision for the specified currency.

- *

For storing money values in fractions of the minor unit in a currency, use HighPrecisionMoneyDraft instead.

+ *

Deprecated because the value can be calculated from the total amounts saved in the Transactions.

* * @return null|Money @@ -207,8 +209,7 @@ public function getAmountPaid() } /** - *

Draft type that stores amounts in cent precision for the specified currency.

- *

For storing money values in fractions of the minor unit in a currency, use HighPrecisionMoneyDraft instead.

+ *

Deprecated because the value can be calculated from the total amounts saved in the Transactions.

* * @return null|Money @@ -219,6 +220,8 @@ public function getAmountRefunded() } /** + *

Information regarding the payment interface (for example, a PSP), and the specific payment method used.

+ * * @return null|PaymentMethodInfo */ @@ -228,6 +231,8 @@ public function getPaymentMethodInfo() } /** + *

Current status of the Payment.

+ * * @return null|PaymentStatusDraft */ @@ -237,7 +242,7 @@ public function getPaymentStatus() } /** - *

A list of financial transactions of different TransactionTypes with different TransactionStates.

+ *

Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.

* * @return null|TransactionDraftCollection @@ -248,10 +253,7 @@ public function getTransactions() } /** - *

Interface interactions can be requests send to the PSP, responses received from the PSP or notifications received from the PSP. - * Some interactions may result in a transaction. - * If so, the interactionId in the Transaction should be set to match the ID of the PSP for the interaction. - * Interactions are managed by the PSP integration and are usually neither written nor read by the user facing frontends or other services.

+ *

Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.

* * @return null|CustomFieldsDraftCollection @@ -262,6 +264,8 @@ public function getInterfaceInteractions() } /** + *

Custom Fields for the Payment.

+ * * @return null|CustomFieldsDraft */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentDraftModel.php b/lib/commercetools-api/src/Models/Payment/PaymentDraftModel.php index 81fc0768d1e..3f2bb0d10f8 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentDraftModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentDraftModel.php @@ -39,7 +39,7 @@ final class PaymentDraftModel extends JsonObjectModel implements PaymentDraft protected $anonymousId; /** - * @deprecated + * * @var ?string */ protected $externalId; @@ -155,7 +155,7 @@ public function __construct( } /** - *

A reference to the customer this payment belongs to.

+ *

Reference to a Customer associated with the Payment.

* * * @return null|CustomerResourceIdentifier @@ -176,7 +176,7 @@ public function getCustomer() } /** - *

Identifies payments belonging to an anonymous session (the customer has not signed up/in yet).

+ *

Anonymous session associated with the Payment.

* * * @return null|string @@ -196,7 +196,9 @@ public function getAnonymousId() } /** - * @deprecated + *

Additional identifier for external systems like Customer Relationship Management (CRM) or Enterprise Resource Planning (ERP).

+ * + * * @return null|string */ public function getExternalId() @@ -214,9 +216,9 @@ public function getExternalId() } /** - *

The identifier that is used by the interface that manages the payment (usually the PSP). - * Cannot be changed once it has been set. - * The combination of this ID and the PaymentMethodInfo paymentInterface must be unique.

+ *

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. + * Once set, it cannot be changed.

* * * @return null|string @@ -236,8 +238,8 @@ public function getInterfaceId() } /** - *

How much money this payment intends to receive from the customer. - * The value usually matches the cart or order gross total.

+ *

Money value the Payment intends to receive from the customer. + * The value typically matches the Cart or Order gross total.

* * * @return null|Money @@ -258,8 +260,7 @@ public function getAmountPlanned() } /** - *

Draft type that stores amounts in cent precision for the specified currency.

- *

For storing money values in fractions of the minor unit in a currency, use HighPrecisionMoneyDraft instead.

+ *

Deprecated because the value can be calculated from the total amounts saved in the Transactions.

* * * @return null|Money @@ -280,6 +281,8 @@ 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 */ @@ -298,8 +301,7 @@ public function getAuthorizedUntil() } /** - *

Draft type that stores amounts in cent precision for the specified currency.

- *

For storing money values in fractions of the minor unit in a currency, use HighPrecisionMoneyDraft instead.

+ *

Deprecated because the value can be calculated from the total amounts saved in the Transactions.

* * * @return null|Money @@ -320,8 +322,7 @@ public function getAmountPaid() } /** - *

Draft type that stores amounts in cent precision for the specified currency.

- *

For storing money values in fractions of the minor unit in a currency, use HighPrecisionMoneyDraft instead.

+ *

Deprecated because the value can be calculated from the total amounts saved in the Transactions.

* * * @return null|Money @@ -342,6 +343,8 @@ public function getAmountRefunded() } /** + *

Information regarding the payment interface (for example, a PSP), and the specific payment method used.

+ * * * @return null|PaymentMethodInfo */ @@ -361,6 +364,8 @@ public function getPaymentMethodInfo() } /** + *

Current status of the Payment.

+ * * * @return null|PaymentStatusDraft */ @@ -380,7 +385,7 @@ public function getPaymentStatus() } /** - *

A list of financial transactions of different TransactionTypes with different TransactionStates.

+ *

Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.

* * * @return null|TransactionDraftCollection @@ -400,10 +405,7 @@ public function getTransactions() } /** - *

Interface interactions can be requests send to the PSP, responses received from the PSP or notifications received from the PSP. - * Some interactions may result in a transaction. - * If so, the interactionId in the Transaction should be set to match the ID of the PSP for the interaction. - * Interactions are managed by the PSP integration and are usually neither written nor read by the user facing frontends or other services.

+ *

Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.

* * * @return null|CustomFieldsDraftCollection @@ -423,6 +425,8 @@ public function getInterfaceInteractions() } /** + *

Custom Fields for the Payment.

+ * * * @return null|CustomFieldsDraft */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentMethodInfo.php b/lib/commercetools-api/src/Models/Payment/PaymentMethodInfo.php index 88a26928e5a..23258ebc480 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentMethodInfo.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentMethodInfo.php @@ -19,9 +19,9 @@ interface PaymentMethodInfo extends JsonObject public const FIELD_NAME = 'name'; /** - *

The interface that handles the payment (usually a PSP). - * Cannot be changed once it has been set. - * The combination of PaymentinterfaceId and this field must be unique.

+ *

Payment service that processes the Payment (for example, a PSP). + * Once set, it cannot be changed. + * The combination of paymentInterface and the interfaceId of a Payment must be unique.

* * @return null|string @@ -29,9 +29,7 @@ interface PaymentMethodInfo extends JsonObject public function getPaymentInterface(); /** - *

The payment method that is used, e.g. - * e.g. - * a conventional string representing Credit Card, Cash Advance etc.

+ *

Payment method used, for example, credit card, or cash advance.

* * @return null|string @@ -39,8 +37,7 @@ public function getPaymentInterface(); public function getMethod(); /** - *

A human-readable, localized name for the payment method, e.g. - * 'Credit Card'.

+ *

Localizable name of the payment method.

* * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Payment/PaymentMethodInfoBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentMethodInfoBuilder.php index 3237c713d03..04a23fc7c02 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentMethodInfoBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentMethodInfoBuilder.php @@ -41,9 +41,9 @@ final class PaymentMethodInfoBuilder implements Builder private $name; /** - *

The interface that handles the payment (usually a PSP). - * Cannot be changed once it has been set. - * The combination of PaymentinterfaceId and this field must be unique.

+ *

Payment service that processes the Payment (for example, a PSP). + * Once set, it cannot be changed. + * The combination of paymentInterface and the interfaceId of a Payment must be unique.

* * @return null|string @@ -54,9 +54,7 @@ public function getPaymentInterface() } /** - *

The payment method that is used, e.g. - * e.g. - * a conventional string representing Credit Card, Cash Advance etc.

+ *

Payment method used, for example, credit card, or cash advance.

* * @return null|string @@ -67,8 +65,7 @@ public function getMethod() } /** - *

A human-readable, localized name for the payment method, e.g. - * 'Credit Card'.

+ *

Localizable name of the payment method.

* * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Payment/PaymentMethodInfoModel.php b/lib/commercetools-api/src/Models/Payment/PaymentMethodInfoModel.php index 91a7c909e88..6698bb2e2c7 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentMethodInfoModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentMethodInfoModel.php @@ -54,9 +54,9 @@ public function __construct( } /** - *

The interface that handles the payment (usually a PSP). - * Cannot be changed once it has been set. - * The combination of PaymentinterfaceId and this field must be unique.

+ *

Payment service that processes the Payment (for example, a PSP). + * Once set, it cannot be changed. + * The combination of paymentInterface and the interfaceId of a Payment must be unique.

* * * @return null|string @@ -76,9 +76,7 @@ public function getPaymentInterface() } /** - *

The payment method that is used, e.g. - * e.g. - * a conventional string representing Credit Card, Cash Advance etc.

+ *

Payment method used, for example, credit card, or cash advance.

* * * @return null|string @@ -98,8 +96,7 @@ public function getMethod() } /** - *

A human-readable, localized name for the payment method, e.g. - * 'Credit Card'.

+ *

Localizable name of the payment method.

* * * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Payment/PaymentModel.php b/lib/commercetools-api/src/Models/Payment/PaymentModel.php index 65f5ff54b17..81ccd84fe02 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentModel.php @@ -10,6 +10,8 @@ use Commercetools\Api\Models\Common\BaseResource; use Commercetools\Api\Models\Common\BaseResourceModel; +use Commercetools\Api\Models\Common\CentPrecisionMoney; +use Commercetools\Api\Models\Common\CentPrecisionMoneyModel; use Commercetools\Api\Models\Common\CreatedBy; use Commercetools\Api\Models\Common\CreatedByModel; use Commercetools\Api\Models\Common\LastModifiedBy; @@ -95,7 +97,7 @@ final class PaymentModel extends JsonObjectModel implements Payment /** * - * @var ?TypedMoney + * @var ?CentPrecisionMoney */ protected $amountPlanned; @@ -172,8 +174,13 @@ public function __construct( ?CreatedBy $createdBy = null, ?CustomerReference $customer = null, ?string $anonymousId = null, + ?string $externalId = null, ?string $interfaceId = null, - ?TypedMoney $amountPlanned = 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, @@ -189,8 +196,13 @@ 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; @@ -220,6 +232,8 @@ public function getId() } /** + *

Current version of the Payment.

+ * * * @return null|int */ @@ -238,6 +252,8 @@ public function getVersion() } /** + *

Date and time (UTC) the Payment was initially created.

+ * * * @return null|DateTimeImmutable */ @@ -260,6 +276,8 @@ public function getCreatedAt() } /** + *

Date and time (UTC) the Payment was last updated.

+ * * * @return null|DateTimeImmutable */ @@ -282,7 +300,7 @@ public function getLastModifiedAt() } /** - *

Present on resources created after 1 February 2019 except for events not tracked.

+ *

Present on resources created after 1 February 2019 except for events not tracked.

* * * @return null|LastModifiedBy @@ -303,7 +321,7 @@ public function getLastModifiedBy() } /** - *

Present on resources created after 1 February 2019 except for events not tracked.

+ *

Present on resources created after 1 February 2019 except for events not tracked.

* * * @return null|CreatedBy @@ -324,7 +342,7 @@ public function getCreatedBy() } /** - *

A reference to the customer this payment belongs to.

+ *

Reference to a Customer associated with the Payment.

* * * @return null|CustomerReference @@ -345,7 +363,7 @@ public function getCustomer() } /** - *

Identifies payments belonging to an anonymous session (the customer has not signed up/in yet).

+ *

Anonymous session associated with the Payment.

* * * @return null|string @@ -365,9 +383,28 @@ public function getAnonymousId() } /** - *

The identifier that is used by the interface that manages the payment (usually the PSP). - * Cannot be changed once it has been set. - * The combination of this ID and the PaymentMethodInfo paymentInterface must be unique.

+ *

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.

* * * @return null|string @@ -387,11 +424,11 @@ public function getInterfaceId() } /** - *

How much money this payment intends to receive from the customer. - * The value usually matches the cart or order gross total.

+ *

Money value the Payment intends to receive from the customer. + * The value typically matches the Cart or Order gross total.

* * - * @return null|TypedMoney + * @return null|CentPrecisionMoney */ public function getAmountPlanned() { @@ -401,14 +438,99 @@ public function getAmountPlanned() if (is_null($data)) { return null; } - $className = TypedMoneyModel::resolveDiscriminatorClass($data); - $this->amountPlanned = $className::of($data); + + $this->amountPlanned = CentPrecisionMoneyModel::of($data); } return $this->amountPlanned; } /** + *

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|array|null $data */ + $data = $this->raw(self::FIELD_AMOUNT_AUTHORIZED); + if (is_null($data)) { + return null; + } + $className = TypedMoneyModel::resolveDiscriminatorClass($data); + $this->amountAuthorized = $className::of($data); + } + + return $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() + { + 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|array|null $data */ + $data = $this->raw(self::FIELD_AMOUNT_PAID); + if (is_null($data)) { + return null; + } + $className = TypedMoneyModel::resolveDiscriminatorClass($data); + $this->amountPaid = $className::of($data); + } + + return $this->amountPaid; + } + + /** + *

Deprecated 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|array|null $data */ + $data = $this->raw(self::FIELD_AMOUNT_REFUNDED); + if (is_null($data)) { + return null; + } + $className = TypedMoneyModel::resolveDiscriminatorClass($data); + $this->amountRefunded = $className::of($data); + } + + return $this->amountRefunded; + } + + /** + *

Information regarding the payment interface (for example, a PSP), and the specific payment method used.

+ * * * @return null|PaymentMethodInfo */ @@ -428,6 +550,8 @@ public function getPaymentMethodInfo() } /** + *

Current status of the Payment.

+ * * * @return null|PaymentStatus */ @@ -447,7 +571,7 @@ public function getPaymentStatus() } /** - *

A list of financial transactions of different TransactionTypes with different TransactionStates.

+ *

Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.

* * * @return null|TransactionCollection @@ -467,10 +591,7 @@ public function getTransactions() } /** - *

Interface interactions can be requests sent to the PSP, responses received from the PSP or notifications received from the PSP. - * Some interactions may result in a transaction. - * If so, the interactionId in the Transaction should be set to match the ID of the PSP for the interaction. - * Interactions are managed by the PSP integration and are usually neither written nor read by the user facing frontends or other services.

+ *

Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.

* * * @return null|CustomFieldsCollection @@ -490,6 +611,8 @@ public function getInterfaceInteractions() } /** + *

Custom Fields for the Payment.

+ * * * @return null|CustomFields */ @@ -593,6 +716,14 @@ public function setAnonymousId(?string $anonymousId): void $this->anonymousId = $anonymousId; } + /** + * @param ?string $externalId + */ + public function setExternalId(?string $externalId): void + { + $this->externalId = $externalId; + } + /** * @param ?string $interfaceId */ @@ -602,13 +733,45 @@ public function setInterfaceId(?string $interfaceId): void } /** - * @param ?TypedMoney $amountPlanned + * @param ?CentPrecisionMoney $amountPlanned */ - public function setAmountPlanned(?TypedMoney $amountPlanned): void + 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/Payment/PaymentPagedQueryResponse.php b/lib/commercetools-api/src/Models/Payment/PaymentPagedQueryResponse.php index 200fe497143..ccee88d553e 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentPagedQueryResponse.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentPagedQueryResponse.php @@ -28,12 +28,20 @@ interface PaymentPagedQueryResponse extends JsonObject public function getLimit(); /** + *

Actual number of results returned.

+ * * @return null|int */ public function getCount(); /** + *

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.

+ * * @return null|int */ @@ -48,6 +56,8 @@ public function getTotal(); public function getOffset(); /** + *

Payments matching the query.

+ * * @return null|PaymentCollection */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentPagedQueryResponseBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentPagedQueryResponseBuilder.php index 74c0897dc6f..c66fb1eba50 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentPagedQueryResponseBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentPagedQueryResponseBuilder.php @@ -62,6 +62,8 @@ public function getLimit() } /** + *

Actual number of results returned.

+ * * @return null|int */ @@ -71,6 +73,12 @@ public function getCount() } /** + *

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.

+ * * @return null|int */ @@ -91,6 +99,8 @@ public function getOffset() } /** + *

Payments matching the query.

+ * * @return null|PaymentCollection */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentPagedQueryResponseModel.php b/lib/commercetools-api/src/Models/Payment/PaymentPagedQueryResponseModel.php index e9868abf517..f628eb63b3d 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentPagedQueryResponseModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentPagedQueryResponseModel.php @@ -88,6 +88,8 @@ public function getLimit() } /** + *

Actual number of results returned.

+ * * * @return null|int */ @@ -106,6 +108,12 @@ public function getCount() } /** + *

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.

+ * * * @return null|int */ @@ -144,6 +152,8 @@ public function getOffset() } /** + *

Payments matching the query.

+ * * * @return null|PaymentCollection */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetAnonymousIdAction.php b/lib/commercetools-api/src/Models/Payment/PaymentSetAnonymousIdAction.php index dec4cc24ba9..91c1729a72d 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetAnonymousIdAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetAnonymousIdAction.php @@ -16,8 +16,8 @@ interface PaymentSetAnonymousIdAction extends PaymentUpdateAction public const FIELD_ANONYMOUS_ID = 'anonymousId'; /** - *

Anonymous ID of the anonymous customer that this payment belongs to. - * If this field is not set any existing anonymousId is removed.

+ *

Value to set. + * If empty, any existing value will be removed.

* * @return null|string diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetAnonymousIdActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentSetAnonymousIdActionBuilder.php index 7b3e0459fe2..34bfbfc201d 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetAnonymousIdActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetAnonymousIdActionBuilder.php @@ -27,8 +27,8 @@ final class PaymentSetAnonymousIdActionBuilder implements Builder private $anonymousId; /** - *

Anonymous ID of the anonymous customer that this payment belongs to. - * If this field is not set any existing anonymousId is removed.

+ *

Value to set. + * If empty, any existing value will be removed.

* * @return null|string diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetAnonymousIdActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentSetAnonymousIdActionModel.php index 23883f7e0d1..c8d7c46450d 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetAnonymousIdActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetAnonymousIdActionModel.php @@ -63,8 +63,8 @@ public function getAction() } /** - *

Anonymous ID of the anonymous customer that this payment belongs to. - * If this field is not set any existing anonymousId is removed.

+ *

Value to set. + * If empty, any existing value will be removed.

* * * @return null|string diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetCustomerAction.php b/lib/commercetools-api/src/Models/Payment/PaymentSetCustomerAction.php index 2675a02ad61..997df237a1f 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetCustomerAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetCustomerAction.php @@ -17,7 +17,8 @@ interface PaymentSetCustomerAction extends PaymentUpdateAction public const FIELD_CUSTOMER = 'customer'; /** - *

A reference to the customer this payment belongs to.

+ *

Value to set. + * If empty, any existing reference is removed.

* * @return null|CustomerResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetCustomerActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentSetCustomerActionBuilder.php index 9208dc208c4..82a38f6015a 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetCustomerActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetCustomerActionBuilder.php @@ -29,7 +29,8 @@ final class PaymentSetCustomerActionBuilder implements Builder private $customer; /** - *

A reference to the customer this payment belongs to.

+ *

Value to set. + * If empty, any existing reference is removed.

* * @return null|CustomerResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetCustomerActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentSetCustomerActionModel.php index 583b498ce72..9c567a57414 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetCustomerActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetCustomerActionModel.php @@ -65,7 +65,8 @@ public function getAction() } /** - *

A reference to the customer this payment belongs to.

+ *

Value to set. + * If empty, any existing reference is removed.

* * * @return null|CustomerResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetInterfaceIdAction.php b/lib/commercetools-api/src/Models/Payment/PaymentSetInterfaceIdAction.php index 1492ec02b8c..8562220dc4f 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetInterfaceIdAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetInterfaceIdAction.php @@ -16,6 +16,9 @@ interface PaymentSetInterfaceIdAction extends PaymentUpdateAction public const FIELD_INTERFACE_ID = 'interfaceId'; /** + *

Value to set. + * Once set, the interfaceId cannot be changed.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetInterfaceIdActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentSetInterfaceIdActionBuilder.php index 7e13da22600..fe174cdb072 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetInterfaceIdActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetInterfaceIdActionBuilder.php @@ -27,6 +27,9 @@ final class PaymentSetInterfaceIdActionBuilder implements Builder private $interfaceId; /** + *

Value to set. + * Once set, the interfaceId cannot be changed.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetInterfaceIdActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentSetInterfaceIdActionModel.php index 017c49b98e4..657f8515008 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetInterfaceIdActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetInterfaceIdActionModel.php @@ -63,6 +63,9 @@ public function getAction() } /** + *

Value to set. + * Once set, the interfaceId cannot be changed.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetKeyAction.php b/lib/commercetools-api/src/Models/Payment/PaymentSetKeyAction.php index fc53f6ab8ee..d02a729bdeb 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetKeyAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetKeyAction.php @@ -16,9 +16,8 @@ interface PaymentSetKeyAction extends PaymentUpdateAction public const FIELD_KEY = 'key'; /** - *

User-specific unique identifier for the payment (max. - * 256 characters). - * If not provided an existing key will be removed.

+ *

Value to set. + * If key is absent or null, the existing key, if any, will be removed.

* * @return null|string diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetKeyActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentSetKeyActionBuilder.php index a749983d90d..7bdf6058e9e 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetKeyActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetKeyActionBuilder.php @@ -27,9 +27,8 @@ final class PaymentSetKeyActionBuilder implements Builder private $key; /** - *

User-specific unique identifier for the payment (max. - * 256 characters). - * If not provided an existing key will be removed.

+ *

Value to set. + * If key is absent or null, the existing key, if any, will be removed.

* * @return null|string diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetKeyActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentSetKeyActionModel.php index 32245065194..0d720b8e859 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetKeyActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetKeyActionModel.php @@ -63,9 +63,8 @@ public function getAction() } /** - *

User-specific unique identifier for the payment (max. - * 256 characters). - * If not provided an existing key will be removed.

+ *

Value to set. + * If key is absent or null, the existing key, if any, will be removed.

* * * @return null|string diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoInterfaceAction.php b/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoInterfaceAction.php index 0614063d4fd..e8bed37d193 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoInterfaceAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoInterfaceAction.php @@ -16,6 +16,9 @@ interface PaymentSetMethodInfoInterfaceAction extends PaymentUpdateAction public const FIELD_INTERFACE = 'interface'; /** + *

Value to set. + * Once set, the paymentInterface of the paymentMethodInfo cannot be changed.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoInterfaceActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoInterfaceActionBuilder.php index af7d7f4136f..1d9bb96e38e 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoInterfaceActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoInterfaceActionBuilder.php @@ -27,6 +27,9 @@ final class PaymentSetMethodInfoInterfaceActionBuilder implements Builder private $interface; /** + *

Value to set. + * Once set, the paymentInterface of the paymentMethodInfo cannot be changed.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoInterfaceActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoInterfaceActionModel.php index f09429c95d8..a0ca6ff9a9d 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoInterfaceActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoInterfaceActionModel.php @@ -63,6 +63,9 @@ public function getAction() } /** + *

Value to set. + * Once set, the paymentInterface of the paymentMethodInfo cannot be changed.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoMethodAction.php b/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoMethodAction.php index 34b360c1e28..076583dbb32 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoMethodAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoMethodAction.php @@ -16,7 +16,8 @@ interface PaymentSetMethodInfoMethodAction extends PaymentUpdateAction public const FIELD_METHOD = 'method'; /** - *

If not provided, the method is unset.

+ *

Value to set. + * If empty, any existing value will be removed.

* * @return null|string diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoMethodActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoMethodActionBuilder.php index 5116f1d4087..c6db2a08632 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoMethodActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoMethodActionBuilder.php @@ -27,7 +27,8 @@ final class PaymentSetMethodInfoMethodActionBuilder implements Builder private $method; /** - *

If not provided, the method is unset.

+ *

Value to set. + * If empty, any existing value will be removed.

* * @return null|string diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoMethodActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoMethodActionModel.php index fa0021db519..dbe34bc4eb4 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoMethodActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoMethodActionModel.php @@ -63,7 +63,8 @@ public function getAction() } /** - *

If not provided, the method is unset.

+ *

Value to set. + * If empty, any existing value will be removed.

* * * @return null|string diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoNameAction.php b/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoNameAction.php index ee69dd94895..7986d824cc0 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoNameAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoNameAction.php @@ -17,7 +17,8 @@ interface PaymentSetMethodInfoNameAction extends PaymentUpdateAction public const FIELD_NAME = 'name'; /** - *

If not provided, the name is unset.

+ *

Value to set. + * If empty, any existing value will be removed.

* * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoNameActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoNameActionBuilder.php index 1b7acaa15a1..4cf2ea0e3ea 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoNameActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoNameActionBuilder.php @@ -29,7 +29,8 @@ final class PaymentSetMethodInfoNameActionBuilder implements Builder private $name; /** - *

If not provided, the name is unset.

+ *

Value to set. + * If empty, any existing value will be removed.

* * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoNameActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoNameActionModel.php index 370fc4576cc..dd03270a16d 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoNameActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetMethodInfoNameActionModel.php @@ -65,7 +65,8 @@ public function getAction() } /** - *

If not provided, the name is unset.

+ *

Value to set. + * If empty, any existing value will be removed.

* * * @return null|LocalizedString diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceCodeAction.php b/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceCodeAction.php index d775a055f35..3094191b38a 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceCodeAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceCodeAction.php @@ -16,6 +16,8 @@ interface PaymentSetStatusInterfaceCodeAction extends PaymentUpdateAction public const FIELD_INTERFACE_CODE = 'interfaceCode'; /** + *

Value to set. If empty, any existing value will be removed.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceCodeActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceCodeActionBuilder.php index 7a79391bf2c..1afa12fa511 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceCodeActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceCodeActionBuilder.php @@ -27,6 +27,8 @@ final class PaymentSetStatusInterfaceCodeActionBuilder implements Builder private $interfaceCode; /** + *

Value to set. If empty, any existing value will be removed.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceCodeActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceCodeActionModel.php index 31cf61c8406..eeb98efd718 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceCodeActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceCodeActionModel.php @@ -63,6 +63,8 @@ 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/Payment/PaymentSetStatusInterfaceTextAction.php b/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceTextAction.php index 3b7f3e25880..6d3c7bc0553 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceTextAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceTextAction.php @@ -16,6 +16,8 @@ interface PaymentSetStatusInterfaceTextAction extends PaymentUpdateAction public const FIELD_INTERFACE_TEXT = 'interfaceText'; /** + *

Value to set. If empty, any existing value will be removed.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceTextActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceTextActionBuilder.php index 364d2ba1c15..85234fd4f1e 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceTextActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceTextActionBuilder.php @@ -27,6 +27,8 @@ final class PaymentSetStatusInterfaceTextActionBuilder implements Builder private $interfaceText; /** + *

Value to set. If empty, any existing value will be removed.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceTextActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceTextActionModel.php index 39e01aeef65..ebf9294d5a8 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceTextActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetStatusInterfaceTextActionModel.php @@ -63,6 +63,8 @@ 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/Payment/PaymentSetTransactionCustomFieldAction.php b/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldAction.php index 5147eed2d3f..4282b0fa7f2 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldAction.php @@ -18,14 +18,15 @@ interface PaymentSetTransactionCustomFieldAction extends PaymentUpdateAction public const FIELD_VALUE = 'value'; /** + *

Unique identifier of the Transaction.

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

description: | - * Name of the Custom Field.

+ *

Name of the Custom Field.

* * @return null|string diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldActionBuilder.php index 80302a91ff7..b2d14f89c9d 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldActionBuilder.php @@ -39,6 +39,8 @@ final class PaymentSetTransactionCustomFieldActionBuilder implements Builder private $value; /** + *

Unique identifier of the Transaction.

+ * * @return null|string */ @@ -48,8 +50,7 @@ public function getTransactionId() } /** - *

description: | - * Name of the Custom Field.

+ *

Name of the Custom Field.

* * @return null|string diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldActionModel.php index dd43a25f241..69d0873f84d 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomFieldActionModel.php @@ -79,6 +79,8 @@ public function getAction() } /** + *

Unique identifier of the Transaction.

+ * * * @return null|string */ @@ -97,8 +99,7 @@ public function getTransactionId() } /** - *

description: | - * Name of the Custom Field.

+ *

Name of the Custom Field.

* * * @return null|string diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomTypeAction.php b/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomTypeAction.php index a112ae927fc..1a4ed8c98f5 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomTypeAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomTypeAction.php @@ -20,6 +20,8 @@ interface PaymentSetTransactionCustomTypeAction extends PaymentUpdateAction public const FIELD_FIELDS = 'fields'; /** + *

Unique identifier of the Transaction. If the specified transactionId does not exist, the request will fail with an InvalidOperation error.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomTypeActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomTypeActionBuilder.php index b0975c19186..16a75371f2b 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomTypeActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomTypeActionBuilder.php @@ -43,6 +43,8 @@ final class PaymentSetTransactionCustomTypeActionBuilder implements Builder private $fields; /** + *

Unique identifier of the Transaction. If the specified transactionId does not exist, the request will fail with an InvalidOperation error.

+ * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomTypeActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomTypeActionModel.php index 2dd946ccf70..d20de80cbfb 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomTypeActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentSetTransactionCustomTypeActionModel.php @@ -83,6 +83,8 @@ public function getAction() } /** + *

Unique identifier of the Transaction. If the specified transactionId does not exist, the request will fail with an InvalidOperation error.

+ * * * @return null|string */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentStatus.php b/lib/commercetools-api/src/Models/Payment/PaymentStatus.php index 2f90363cb80..7ee8bd8d336 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentStatus.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentStatus.php @@ -19,7 +19,7 @@ interface PaymentStatus extends JsonObject public const FIELD_STATE = 'state'; /** - *

A code describing the current status returned by the interface that processes the payment.

+ *

External reference that identifies the current status of the Payment.

* * @return null|string @@ -27,7 +27,7 @@ interface PaymentStatus extends JsonObject public function getInterfaceCode(); /** - *

A text describing the current status returned by the interface that processes the payment.

+ *

Text describing the current status of the Payment.

* * @return null|string @@ -35,6 +35,8 @@ public function getInterfaceCode(); public function getInterfaceText(); /** + *

Reference to a State.

+ * * @return null|StateReference */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentStatusBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentStatusBuilder.php index ba22613daab..d7ccc5c3261 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentStatusBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentStatusBuilder.php @@ -41,7 +41,7 @@ final class PaymentStatusBuilder implements Builder private $state; /** - *

A code describing the current status returned by the interface that processes the payment.

+ *

External reference that identifies the current status of the Payment.

* * @return null|string @@ -52,7 +52,7 @@ public function getInterfaceCode() } /** - *

A text describing the current status returned by the interface that processes the payment.

+ *

Text describing the current status of the Payment.

* * @return null|string @@ -63,6 +63,8 @@ public function getInterfaceText() } /** + *

Reference to a State.

+ * * @return null|StateReference */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentStatusDraft.php b/lib/commercetools-api/src/Models/Payment/PaymentStatusDraft.php index 4ecca4fd01c..b6f00d25352 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentStatusDraft.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentStatusDraft.php @@ -19,19 +19,23 @@ interface PaymentStatusDraft extends JsonObject public const FIELD_STATE = 'state'; /** + *

External reference that identifies the current status of the Payment.

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

Text describing the current status of the Payment.

+ * * @return null|string */ public function getInterfaceText(); /** - *

ResourceIdentifier to a State.

+ *

Reference to a State.

* * @return null|StateResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Payment/PaymentStatusDraftBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentStatusDraftBuilder.php index b34758d4123..3a26e1dfc79 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentStatusDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentStatusDraftBuilder.php @@ -41,6 +41,8 @@ final class PaymentStatusDraftBuilder implements Builder private $state; /** + *

External reference that identifies the current status of the Payment.

+ * * @return null|string */ @@ -50,6 +52,8 @@ public function getInterfaceCode() } /** + *

Text describing the current status of the Payment.

+ * * @return null|string */ @@ -59,7 +63,7 @@ public function getInterfaceText() } /** - *

ResourceIdentifier to a State.

+ *

Reference to a State.

* * @return null|StateResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Payment/PaymentStatusDraftModel.php b/lib/commercetools-api/src/Models/Payment/PaymentStatusDraftModel.php index 5239cd2fecf..c69f77a0837 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentStatusDraftModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentStatusDraftModel.php @@ -54,6 +54,8 @@ public function __construct( } /** + *

External reference that identifies the current status of the Payment.

+ * * * @return null|string */ @@ -72,6 +74,8 @@ public function getInterfaceCode() } /** + *

Text describing the current status of the Payment.

+ * * * @return null|string */ @@ -90,7 +94,7 @@ public function getInterfaceText() } /** - *

ResourceIdentifier to a State.

+ *

Reference to a State.

* * * @return null|StateResourceIdentifier diff --git a/lib/commercetools-api/src/Models/Payment/PaymentStatusModel.php b/lib/commercetools-api/src/Models/Payment/PaymentStatusModel.php index 6f1cc082a19..2af719bf3bd 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentStatusModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentStatusModel.php @@ -54,7 +54,7 @@ public function __construct( } /** - *

A code describing the current status returned by the interface that processes the payment.

+ *

External reference that identifies the current status of the Payment.

* * * @return null|string @@ -74,7 +74,7 @@ public function getInterfaceCode() } /** - *

A text describing the current status returned by the interface that processes the payment.

+ *

Text describing the current status of the Payment.

* * * @return null|string @@ -94,6 +94,8 @@ public function getInterfaceText() } /** + *

Reference to a State.

+ * * * @return null|StateReference */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentTransitionStateAction.php b/lib/commercetools-api/src/Models/Payment/PaymentTransitionStateAction.php index fe5d56efcb1..cd14b3dff5f 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentTransitionStateAction.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentTransitionStateAction.php @@ -18,12 +18,16 @@ interface PaymentTransitionStateAction extends PaymentUpdateAction public const FIELD_FORCE = 'force'; /** + *

Reference to a State.

+ * * @return null|StateResourceIdentifier */ public function getState(); /** + *

Set to true to skip validations when transitioning to the new State.

+ * * @return null|bool */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentTransitionStateActionBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentTransitionStateActionBuilder.php index a76d3fe0092..53627de9a59 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentTransitionStateActionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentTransitionStateActionBuilder.php @@ -35,6 +35,8 @@ final class PaymentTransitionStateActionBuilder implements Builder private $force; /** + *

Reference to a State.

+ * * @return null|StateResourceIdentifier */ @@ -44,6 +46,8 @@ public function getState() } /** + *

Set to true to skip validations when transitioning to the new State.

+ * * @return null|bool */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentTransitionStateActionModel.php b/lib/commercetools-api/src/Models/Payment/PaymentTransitionStateActionModel.php index 09d24158807..0254f60e10f 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentTransitionStateActionModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentTransitionStateActionModel.php @@ -73,6 +73,8 @@ public function getAction() } /** + *

Reference to a State.

+ * * * @return null|StateResourceIdentifier */ @@ -92,6 +94,8 @@ public function getState() } /** + *

Set to true to skip validations when transitioning to the new State.

+ * * * @return null|bool */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentUpdate.php b/lib/commercetools-api/src/Models/Payment/PaymentUpdate.php index 74ff52d5bcd..bb74e77ec20 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentUpdate.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentUpdate.php @@ -17,12 +17,16 @@ interface PaymentUpdate extends JsonObject public const FIELD_ACTIONS = 'actions'; /** + *

Expected version of the Payment on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict error will be returned.

+ * * @return null|int */ public function getVersion(); /** + *

Update actions to be performed on the Payment.

+ * * @return null|PaymentUpdateActionCollection */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentUpdateBuilder.php b/lib/commercetools-api/src/Models/Payment/PaymentUpdateBuilder.php index fb5da77a37d..969b61903dd 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentUpdateBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentUpdateBuilder.php @@ -33,6 +33,8 @@ final class PaymentUpdateBuilder implements Builder private $actions; /** + *

Expected version of the Payment on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict error will be returned.

+ * * @return null|int */ @@ -42,6 +44,8 @@ public function getVersion() } /** + *

Update actions to be performed on the Payment.

+ * * @return null|PaymentUpdateActionCollection */ diff --git a/lib/commercetools-api/src/Models/Payment/PaymentUpdateModel.php b/lib/commercetools-api/src/Models/Payment/PaymentUpdateModel.php index ba1ec835fe0..7b8133db0e4 100644 --- a/lib/commercetools-api/src/Models/Payment/PaymentUpdateModel.php +++ b/lib/commercetools-api/src/Models/Payment/PaymentUpdateModel.php @@ -44,6 +44,8 @@ public function __construct( } /** + *

Expected version of the Payment on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict error will be returned.

+ * * * @return null|int */ @@ -62,6 +64,8 @@ public function getVersion() } /** + *

Update actions to be performed on the Payment.

+ * * * @return null|PaymentUpdateActionCollection */ diff --git a/lib/commercetools-api/src/Models/Payment/Transaction.php b/lib/commercetools-api/src/Models/Payment/Transaction.php index 580d3e7c871..2b43b737ebd 100644 --- a/lib/commercetools-api/src/Models/Payment/Transaction.php +++ b/lib/commercetools-api/src/Models/Payment/Transaction.php @@ -33,7 +33,7 @@ interface Transaction extends JsonObject public function getId(); /** - *

The time at which the transaction took place.

+ *

Date and time (UTC) the Transaction took place.

* * @return null|DateTimeImmutable @@ -41,7 +41,7 @@ public function getId(); public function getTimestamp(); /** - *

The type of this transaction.

+ *

Type of the Transaction. For example, Authorization.

* * @return null|string @@ -49,14 +49,16 @@ public function getTimestamp(); public function getType(); /** + *

Money value of the Transaction.

+ * * @return null|TypedMoney */ public function getAmount(); /** - *

The identifier that is used by the interface that managed the transaction (usually the PSP). - * If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction should be findable with this ID.

+ *

Identifier used by the interface that manages the Transaction (usually the PSP). + * If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction can be found with this ID.

* * @return null|string @@ -64,7 +66,7 @@ public function getAmount(); public function getInteractionId(); /** - *

The state of this transaction.

+ *

State of the Transaction.

* * @return null|string @@ -72,7 +74,7 @@ public function getInteractionId(); public function getState(); /** - *

Custom Fields for the Transaction.

+ *

Custom Fields defined for the Transaction.

* * @return null|CustomFields diff --git a/lib/commercetools-api/src/Models/Payment/TransactionBuilder.php b/lib/commercetools-api/src/Models/Payment/TransactionBuilder.php index 9eeb0347611..d3492b5899e 100644 --- a/lib/commercetools-api/src/Models/Payment/TransactionBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/TransactionBuilder.php @@ -79,7 +79,7 @@ public function getId() } /** - *

The time at which the transaction took place.

+ *

Date and time (UTC) the Transaction took place.

* * @return null|DateTimeImmutable @@ -90,7 +90,7 @@ public function getTimestamp() } /** - *

The type of this transaction.

+ *

Type of the Transaction. For example, Authorization.

* * @return null|string @@ -101,6 +101,8 @@ public function getType() } /** + *

Money value of the Transaction.

+ * * @return null|TypedMoney */ @@ -110,8 +112,8 @@ public function getAmount() } /** - *

The identifier that is used by the interface that managed the transaction (usually the PSP). - * If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction should be findable with this ID.

+ *

Identifier used by the interface that manages the Transaction (usually the PSP). + * If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction can be found with this ID.

* * @return null|string @@ -122,7 +124,7 @@ public function getInteractionId() } /** - *

The state of this transaction.

+ *

State of the Transaction.

* * @return null|string @@ -133,7 +135,7 @@ public function getState() } /** - *

Custom Fields for the Transaction.

+ *

Custom Fields defined for the Transaction.

* * @return null|CustomFields diff --git a/lib/commercetools-api/src/Models/Payment/TransactionDraft.php b/lib/commercetools-api/src/Models/Payment/TransactionDraft.php index 7fa79d95e94..ed5b99ccf37 100644 --- a/lib/commercetools-api/src/Models/Payment/TransactionDraft.php +++ b/lib/commercetools-api/src/Models/Payment/TransactionDraft.php @@ -24,7 +24,7 @@ interface TransactionDraft extends JsonObject public const FIELD_CUSTOM = 'custom'; /** - *

The time at which the transaction took place.

+ *

Date and time (UTC) the Transaction took place.

* * @return null|DateTimeImmutable @@ -32,7 +32,7 @@ interface TransactionDraft extends JsonObject public function getTimestamp(); /** - *

The type of this transaction.

+ *

Type of the Transaction.

* * @return null|string @@ -40,14 +40,16 @@ public function getTimestamp(); public function getType(); /** + *

Money value for the Transaction.

+ * * @return null|Money */ public function getAmount(); /** - *

The identifier that is used by the interface that managed the transaction (usually the PSP). - * If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction should be findable with this ID.

+ *

Identifier used by the payment service that manages the Transaction. + * Can be used to correlate the Transaction to an interface interaction.

* * @return null|string @@ -55,8 +57,7 @@ public function getAmount(); public function getInteractionId(); /** - *

The state of this transaction. - * If not set, defaults to Initial.

+ *

State of the Transaction.

* * @return null|string @@ -64,7 +65,7 @@ public function getInteractionId(); public function getState(); /** - *

Custom Fields for the Transaction.

+ *

Custom Fields of the Transaction.

* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Payment/TransactionDraftBuilder.php b/lib/commercetools-api/src/Models/Payment/TransactionDraftBuilder.php index abb764a3d33..455323b411a 100644 --- a/lib/commercetools-api/src/Models/Payment/TransactionDraftBuilder.php +++ b/lib/commercetools-api/src/Models/Payment/TransactionDraftBuilder.php @@ -62,7 +62,7 @@ final class TransactionDraftBuilder implements Builder private $custom; /** - *

The time at which the transaction took place.

+ *

Date and time (UTC) the Transaction took place.

* * @return null|DateTimeImmutable @@ -73,7 +73,7 @@ public function getTimestamp() } /** - *

The type of this transaction.

+ *

Type of the Transaction.

* * @return null|string @@ -84,6 +84,8 @@ public function getType() } /** + *

Money value for the Transaction.

+ * * @return null|Money */ @@ -93,8 +95,8 @@ public function getAmount() } /** - *

The identifier that is used by the interface that managed the transaction (usually the PSP). - * If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction should be findable with this ID.

+ *

Identifier used by the payment service that manages the Transaction. + * Can be used to correlate the Transaction to an interface interaction.

* * @return null|string @@ -105,8 +107,7 @@ public function getInteractionId() } /** - *

The state of this transaction. - * If not set, defaults to Initial.

+ *

State of the Transaction.

* * @return null|string @@ -117,7 +118,7 @@ public function getState() } /** - *

Custom Fields for the Transaction.

+ *

Custom Fields of the Transaction.

* * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Payment/TransactionDraftModel.php b/lib/commercetools-api/src/Models/Payment/TransactionDraftModel.php index 9ecc553ecc4..010e9678605 100644 --- a/lib/commercetools-api/src/Models/Payment/TransactionDraftModel.php +++ b/lib/commercetools-api/src/Models/Payment/TransactionDraftModel.php @@ -81,7 +81,7 @@ public function __construct( } /** - *

The time at which the transaction took place.

+ *

Date and time (UTC) the Transaction took place.

* * * @return null|DateTimeImmutable @@ -105,7 +105,7 @@ public function getTimestamp() } /** - *

The type of this transaction.

+ *

Type of the Transaction.

* * * @return null|string @@ -125,6 +125,8 @@ public function getType() } /** + *

Money value for the Transaction.

+ * * * @return null|Money */ @@ -144,8 +146,8 @@ public function getAmount() } /** - *

The identifier that is used by the interface that managed the transaction (usually the PSP). - * If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction should be findable with this ID.

+ *

Identifier used by the payment service that manages the Transaction. + * Can be used to correlate the Transaction to an interface interaction.

* * * @return null|string @@ -165,8 +167,7 @@ public function getInteractionId() } /** - *

The state of this transaction. - * If not set, defaults to Initial.

+ *

State of the Transaction.

* * * @return null|string @@ -186,7 +187,7 @@ public function getState() } /** - *

Custom Fields for the Transaction.

+ *

Custom Fields of the Transaction.

* * * @return null|CustomFieldsDraft diff --git a/lib/commercetools-api/src/Models/Payment/TransactionModel.php b/lib/commercetools-api/src/Models/Payment/TransactionModel.php index 50cfbdbcd84..9a4cb512a00 100644 --- a/lib/commercetools-api/src/Models/Payment/TransactionModel.php +++ b/lib/commercetools-api/src/Models/Payment/TransactionModel.php @@ -109,7 +109,7 @@ public function getId() } /** - *

The time at which the transaction took place.

+ *

Date and time (UTC) the Transaction took place.

* * * @return null|DateTimeImmutable @@ -133,7 +133,7 @@ public function getTimestamp() } /** - *

The type of this transaction.

+ *

Type of the Transaction. For example, Authorization.

* * * @return null|string @@ -153,6 +153,8 @@ public function getType() } /** + *

Money value of the Transaction.

+ * * * @return null|TypedMoney */ @@ -172,8 +174,8 @@ public function getAmount() } /** - *

The identifier that is used by the interface that managed the transaction (usually the PSP). - * If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction should be findable with this ID.

+ *

Identifier used by the interface that manages the Transaction (usually the PSP). + * If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction can be found with this ID.

* * * @return null|string @@ -193,7 +195,7 @@ public function getInteractionId() } /** - *

The state of this transaction.

+ *

State of the Transaction.

* * * @return null|string @@ -213,7 +215,7 @@ public function getState() } /** - *

Custom Fields for the Transaction.

+ *

Custom Fields defined for the Transaction.

* * * @return null|CustomFields diff --git a/lib/commercetools-history/src/Models/Common/Transaction.php b/lib/commercetools-history/src/Models/Common/Transaction.php index 3c543871b14..28bde7ef0be 100644 --- a/lib/commercetools-history/src/Models/Common/Transaction.php +++ b/lib/commercetools-history/src/Models/Common/Transaction.php @@ -22,7 +22,7 @@ interface Transaction extends JsonObject public const FIELD_STATE = 'state'; /** - *

The unique ID of this object.

+ *

Unique identifier of the Transaction.

* * @return null|string @@ -30,7 +30,7 @@ interface Transaction extends JsonObject public function getId(); /** - *

The time at which the transaction took place.

+ *

Time at which the transaction took place.

* * @return null|string @@ -50,7 +50,7 @@ public function getType(); public function getAmount(); /** - *

The identifier that is used by the interface that managed the transaction (usually the PSP). If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction should be findable with this ID.

+ *

Identifier used by the interface that manages the transaction (usually the PSP). If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction should be findable with this ID.

* * @return null|string diff --git a/lib/commercetools-history/src/Models/Common/TransactionBuilder.php b/lib/commercetools-history/src/Models/Common/TransactionBuilder.php index d8220e76028..56c085ed2dc 100644 --- a/lib/commercetools-history/src/Models/Common/TransactionBuilder.php +++ b/lib/commercetools-history/src/Models/Common/TransactionBuilder.php @@ -57,7 +57,7 @@ final class TransactionBuilder implements Builder private $state; /** - *

The unique ID of this object.

+ *

Unique identifier of the Transaction.

* * @return null|string @@ -68,7 +68,7 @@ public function getId() } /** - *

The time at which the transaction took place.

+ *

Time at which the transaction took place.

* * @return null|string @@ -97,7 +97,7 @@ public function getAmount() } /** - *

The identifier that is used by the interface that managed the transaction (usually the PSP). If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction should be findable with this ID.

+ *

Identifier used by the interface that manages the transaction (usually the PSP). If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction should be findable with this ID.

* * @return null|string diff --git a/lib/commercetools-history/src/Models/Common/TransactionModel.php b/lib/commercetools-history/src/Models/Common/TransactionModel.php index 3a37eb57e4b..6adafd4999e 100644 --- a/lib/commercetools-history/src/Models/Common/TransactionModel.php +++ b/lib/commercetools-history/src/Models/Common/TransactionModel.php @@ -79,7 +79,7 @@ public function __construct( } /** - *

The unique ID of this object.

+ *

Unique identifier of the Transaction.

* * * @return null|string @@ -99,7 +99,7 @@ public function getId() } /** - *

The time at which the transaction took place.

+ *

Time at which the transaction took place.

* * * @return null|string @@ -156,7 +156,7 @@ public function getAmount() } /** - *

The identifier that is used by the interface that managed the transaction (usually the PSP). If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction should be findable with this ID.

+ *

Identifier used by the interface that manages the transaction (usually the PSP). If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction should be findable with this ID.

* * * @return null|string