diff --git a/changes.md b/changes.md index 586ab9d535e..ea1a95536ea 100644 --- a/changes.md +++ b/changes.md @@ -1,323 +1,5 @@ **Api changes** -
-Added Resource(s) - -- added resource `/{projectKey}/discount-groups` -- added resource `/{projectKey}/payment-methods` -- added resource `/{projectKey}/recurring-orders` -- added resource `/{projectKey}/recurrence-policies` -- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists` -- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/key={key}` -- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/{ID}` -- added resource `/{projectKey}/business-units/key={key}/associates/{associateId}` -- added resource `/{projectKey}/business-units/{businessUnitId}/associates/{associateId}` -- added resource `/{projectKey}/discount-groups/key={key}` -- added resource `/{projectKey}/discount-groups/{ID}` -- added resource `/{projectKey}/payment-methods/key={key}` -- added resource `/{projectKey}/payment-methods/{ID}` -- added resource `/{projectKey}/recurring-orders/{ID}` -- added resource `/{projectKey}/recurring-orders/key={key}` -- added resource `/{projectKey}/recurrence-policies/key={key}` -- added resource `/{projectKey}/recurrence-policies/{ID}` -- added resource `/{projectKey}/in-store/key={storeKey}/business-units` -- added resource `/{projectKey}/in-store/key={storeKey}/business-units/key={key}` -- added resource `/{projectKey}/in-store/key={storeKey}/business-units/{ID}` -- added resource `/{projectKey}/in-store/key={storeKey}/business-units/key={key}/associates/{associateId}` -- added resource `/{projectKey}/in-store/key={storeKey}/business-units/{businessUnitId}/associates/{associateId}` -
- - -
-Required Property(s) - -- changed property `sortOrder` of type `CartDiscountDraft` to be optional -- changed property `variantSelection` of type `ProductSelectionProductAddedMessage` to be optional -- changed property `variantExclusion` of type `ProductSelectionProductExcludedMessage` to be optional -- changed property `oldVariantExclusion` of type `ProductSelectionVariantExclusionChangedMessage` to be optional -- changed property `newVariantExclusion` of type `ProductSelectionVariantExclusionChangedMessage` to be optional -- changed property `oldVariantSelection` of type `ProductSelectionVariantSelectionChangedMessage` to be optional -- changed property `newVariantSelection` of type `ProductSelectionVariantSelectionChangedMessage` to be optional -- changed property `variantSelection` of type `ProductSelectionProductAddedMessagePayload` to be optional -- changed property `variantExclusion` of type `ProductSelectionProductExcludedMessagePayload` to be optional -- changed property `oldVariantExclusion` of type `ProductSelectionVariantExclusionChangedMessagePayload` to be optional -- changed property `newVariantExclusion` of type `ProductSelectionVariantExclusionChangedMessagePayload` to be optional -- changed property `oldVariantSelection` of type `ProductSelectionVariantSelectionChangedMessagePayload` to be optional -- changed property `newVariantSelection` of type `ProductSelectionVariantSelectionChangedMessagePayload` to be optional -- changed property `images` of type `ProductTailoringSetExternalImagesAction` to be optional -- changed property `facets` of type `ProductProjectionPagedSearchResponse` to be optional -- :warning: changed property `triggerPattern` of type `CartDiscountPatternTarget` to be required -
- - -
-MarkDeprecated Property(s) - -- marked property `CountOnCustomLineItemUnits::excludeCount` as deprecated -- marked property `CountOnLineItemUnits::excludeCount` as deprecated -
- - -
-Changed Property(s) - -- :warning: changed property `discount` of type `DiscountedTotalPricePortion` from type `CartDiscountReference` to `Reference` -- :warning: changed property `actions` of type `MyBusinessUnitUpdate` from type `BusinessUnitUpdateAction[]` to `MyBusinessUnitUpdateAction[]` -- :warning: changed property `paymentMethodInfo` of type `MyPaymentDraft` from type `PaymentMethodInfo` to `PaymentMethodInfoDraft` -- :warning: changed property `paymentMethodInfo` of type `PaymentDraft` from type `PaymentMethodInfo` to `PaymentMethodInfoDraft` -- :warning: changed property `filter` of type `SearchSorting` from type `SearchQueryExpression` to `SearchQuery` -
- - -
-Added Property(s) - -- added property `inheritedStores` to type `BusinessUnit` -- added property `inheritedStores` to type `Company` -- added property `inheritedStores` to type `Division` -- added property `makeInheritedAssociatesExplicit` to type `BusinessUnitChangeAssociateModeAction` -- added property `discountGroup` to type `CartDiscount` -- added property `discountGroup` to type `CartDiscountDraft` -- added property `priceRoundingMode` to type `Cart` -- added property `discountTypeCombination` to type `Cart` -- added property `priceRoundingMode` to type `CartDraft` -- added property `recurrenceInfo` to type `CustomLineItem` -- added property `recurrenceInfo` to type `CustomLineItemDraft` -- added property `recurrenceInfo` to type `LineItem` -- added property `recurrenceInfo` to type `LineItemDraft` -- added property `recurrenceInfo` to type `CartAddCustomLineItemAction` -- added property `recurrenceInfo` to type `CartAddLineItemAction` -- added property `recurrencePolicy` to type `Price` -- added property `recurrencePolicy` to type `PriceDraft` -- added property `customerGroupAssignments` to type `Customer` -- added property `invalidateOlderTokens` to type `CustomerCreateEmailToken` -- added property `invalidateOlderTokens` to type `CustomerCreatePasswordResetToken` -- added property `customerGroupAssignments` to type `CustomerDraft` -- added property `invalidateOlderTokens` to type `CustomerToken` -- added property `minCartQuantity` to type `InventoryEntry` -- added property `maxCartQuantity` to type `InventoryEntry` -- added property `minCartQuantity` to type `InventoryEntryDraft` -- added property `maxCartQuantity` to type `InventoryEntryDraft` -- added property `recurrenceInfo` to type `MyLineItemDraft` -- added property `interfaceId` to type `MyTransactionDraft` -- added property `recurrenceInfo` to type `MyCartAddLineItemAction` -- added property `value` to type `CustomerEmailTokenCreatedMessage` -- added property `invalidateOlderTokens` to type `CustomerEmailTokenCreatedMessage` -- added property `value` to type `CustomerPasswordTokenCreatedMessage` -- added property `invalidateOlderTokens` to type `CustomerPasswordTokenCreatedMessage` -- added property `attributes` to type `ProductTailoringCreatedMessage` -- added property `value` to type `CustomerEmailTokenCreatedMessagePayload` -- added property `invalidateOlderTokens` to type `CustomerEmailTokenCreatedMessagePayload` -- added property `value` to type `CustomerPasswordTokenCreatedMessagePayload` -- added property `invalidateOlderTokens` to type `CustomerPasswordTokenCreatedMessagePayload` -- added property `attributes` to type `ProductTailoringCreatedMessagePayload` -- added property `priceRoundingMode` to type `StagedOrder` -- added property `recurringOrder` to type `StagedOrder` -- added property `discountTypeCombination` to type `StagedOrder` -- added property `recurrenceInfo` to type `StagedOrderAddCustomLineItemAction` -- added property `recurrenceInfo` to type `StagedOrderAddLineItemAction` -- added property `priceRoundingMode` to type `Order` -- added property `recurringOrder` to type `Order` -- added property `discountTypeCombination` to type `Order` -- added property `priceRoundingMode` to type `OrderImportDraft` -- added property `token` to type `PaymentMethodInfo` -- added property `interfaceAccount` to type `PaymentMethodInfo` -- added property `custom` to type `PaymentMethodInfo` -- added property `interfaceId` to type `Transaction` -- added property `interfaceId` to type `TransactionDraft` -- added property `priceCustomerGroupAssignments` to type `ProductSearchProjectionParams` -- added property `attributes` to type `ProductTailoringData` -- added property `attributes` to type `ProductTailoringDraft` -- added property `attributes` to type `ProductTailoringInStoreDraft` -- added property `level` to type `AttributeDefinition` -- added property `level` to type `AttributeDefinitionDraft` -- added property `/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/` to type `CategoryOrderHints` -- added property `attributes` to type `ProductData` -- added property `attributes` to type `ProductDraft` -- added property `attributes` to type `ProductProjection` -- added property `recurrencePrices` to type `ProductVariant` -- added property `/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/` to type `ProductVariantChannelAvailabilityMap` -- added property `priceRoundingMode` to type `CartsConfiguration` -- added property `taxRoundingMode` to type `CartsConfiguration` -- added property `priceRoundingMode` to type `QuoteRequest` -- added property `priceRoundingMode` to type `Quote` -- added property `businessUnit` to type `ShoppingList` -- added property `businessUnit` to type `ShoppingListDraft` -- added property `published` to type `ShoppingListLineItem` -- added property `recurrencePolicy` to type `StandalonePrice` -- added property `recurrencePolicy` to type `StandalonePriceDraft` -- added property `events` to type `Subscription` -- added property `events` to type `SubscriptionDraft` -
- - -
-Removed Property(s) - -- :warning: removed property `/[0-9].[0-9]*[1-9]/` from type `CategoryOrderHints` -- :warning: removed property `//` from type `ProductVariantChannelAvailabilityMap` -
- - -
-Removed QueryParameter(s) - -- :warning: removed query parameter `withTotal` from method `get /{projectKey}/product-projections/search` -
- - -
-Added QueryParameter(s) - -- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/products` -- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/products` -- added query parameter `priceCustomerGroupAssignments` to method `post /{projectKey}/products` -- added query parameter `priceRecurrencePolicy` to method `post /{projectKey}/products` -- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/product-projections` -- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/product-projections` -- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/products/key={key}` -- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/products/key={key}` -- added query parameter `priceCustomerGroupAssignments` to method `post /{projectKey}/products/key={key}` -- added query parameter `priceRecurrencePolicy` to method `post /{projectKey}/products/key={key}` -- added query parameter `priceCustomerGroupAssignments` to method `delete /{projectKey}/products/key={key}` -- added query parameter `priceRecurrencePolicy` to method `delete /{projectKey}/products/key={key}` -- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/products/{ID}` -- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/products/{ID}` -- added query parameter `priceCustomerGroupAssignments` to method `post /{projectKey}/products/{ID}` -- added query parameter `priceRecurrencePolicy` to method `post /{projectKey}/products/{ID}` -- added query parameter `priceCustomerGroupAssignments` to method `delete /{projectKey}/products/{ID}` -- added query parameter `priceRecurrencePolicy` to method `delete /{projectKey}/products/{ID}` -- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/product-projections/search` -- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/product-projections/search` -- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/product-projections/key={key}` -- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/product-projections/key={key}` -- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/product-projections/{ID}` -- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/product-projections/{ID}` -- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/in-store/key={storeKey}/product-projections/key={key}` -- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/in-store/key={storeKey}/product-projections/key={key}` -- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/in-store/key={storeKey}/product-projections/{ID}` -- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/in-store/key={storeKey}/product-projections/{ID}` -
- - -
-Added Method(s) - -- added method `$apiRoot->withProjectKey()->discountGroups()->get()` -- added method `$apiRoot->withProjectKey()->discountGroups()->head()` -- added method `$apiRoot->withProjectKey()->discountGroups()->post()` -- added method `$apiRoot->withProjectKey()->paymentMethods()->get()` -- added method `$apiRoot->withProjectKey()->paymentMethods()->head()` -- added method `$apiRoot->withProjectKey()->paymentMethods()->post()` -- added method `$apiRoot->withProjectKey()->recurringOrders()->get()` -- added method `$apiRoot->withProjectKey()->recurringOrders()->head()` -- added method `$apiRoot->withProjectKey()->recurringOrders()->post()` -- added method `$apiRoot->withProjectKey()->recurrencePolicies()->get()` -- added method `$apiRoot->withProjectKey()->recurrencePolicies()->head()` -- added method `$apiRoot->withProjectKey()->recurrencePolicies()->post()` -- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->get()` -- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->head()` -- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->post()` -- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withKey()->get()` -- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withKey()->head()` -- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withKey()->post()` -- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withKey()->delete()` -- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withId()->get()` -- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withId()->head()` -- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withId()->post()` -- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withId()->delete()` -- added method `$apiRoot->withProjectKey()->businessUnits()->keyWithKeyValueAssociatesWithAssociateIdValue()->get()` -- added method `$apiRoot->withProjectKey()->businessUnits()->withBusinessUnitIdValueAssociatesWithAssociateIdValue()->get()` -- added method `$apiRoot->withProjectKey()->discountGroups()->withKey()->get()` -- added method `$apiRoot->withProjectKey()->discountGroups()->withKey()->head()` -- added method `$apiRoot->withProjectKey()->discountGroups()->withKey()->post()` -- added method `$apiRoot->withProjectKey()->discountGroups()->withKey()->delete()` -- added method `$apiRoot->withProjectKey()->discountGroups()->withId()->get()` -- added method `$apiRoot->withProjectKey()->discountGroups()->withId()->head()` -- added method `$apiRoot->withProjectKey()->discountGroups()->withId()->post()` -- added method `$apiRoot->withProjectKey()->discountGroups()->withId()->delete()` -- added method `$apiRoot->withProjectKey()->paymentMethods()->withKey()->get()` -- added method `$apiRoot->withProjectKey()->paymentMethods()->withKey()->head()` -- added method `$apiRoot->withProjectKey()->paymentMethods()->withKey()->post()` -- added method `$apiRoot->withProjectKey()->paymentMethods()->withKey()->delete()` -- added method `$apiRoot->withProjectKey()->paymentMethods()->withId()->get()` -- added method `$apiRoot->withProjectKey()->paymentMethods()->withId()->head()` -- added method `$apiRoot->withProjectKey()->paymentMethods()->withId()->post()` -- added method `$apiRoot->withProjectKey()->paymentMethods()->withId()->delete()` -- added method `$apiRoot->withProjectKey()->recurringOrders()->withId()->get()` -- added method `$apiRoot->withProjectKey()->recurringOrders()->withId()->head()` -- added method `$apiRoot->withProjectKey()->recurringOrders()->withId()->post()` -- added method `$apiRoot->withProjectKey()->recurringOrders()->withId()->delete()` -- added method `$apiRoot->withProjectKey()->recurringOrders()->withKey()->get()` -- added method `$apiRoot->withProjectKey()->recurringOrders()->withKey()->head()` -- added method `$apiRoot->withProjectKey()->recurringOrders()->withKey()->post()` -- added method `$apiRoot->withProjectKey()->recurringOrders()->withKey()->delete()` -- added method `$apiRoot->withProjectKey()->recurrencePolicies()->withKey()->get()` -- added method `$apiRoot->withProjectKey()->recurrencePolicies()->withKey()->head()` -- added method `$apiRoot->withProjectKey()->recurrencePolicies()->withKey()->post()` -- added method `$apiRoot->withProjectKey()->recurrencePolicies()->withKey()->delete()` -- added method `$apiRoot->withProjectKey()->recurrencePolicies()->withId()->get()` -- added method `$apiRoot->withProjectKey()->recurrencePolicies()->withId()->head()` -- added method `$apiRoot->withProjectKey()->recurrencePolicies()->withId()->post()` -- added method `$apiRoot->withProjectKey()->recurrencePolicies()->withId()->delete()` -- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->get()` -- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->head()` -- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->post()` -- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->withKey()->get()` -- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->withKey()->head()` -- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->withKey()->post()` -- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->withKey()->delete()` -- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->withId()->get()` -- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->withId()->head()` -- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->withId()->post()` -- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->withId()->delete()` -- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->keyWithKeyValueAssociatesWithAssociateIdValue()->get()` -- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->withBusinessUnitIdValueAssociatesWithAssociateIdValue()->get()` -
- - -
-Added Enum(s) - -- added enum `ViewMyShoppingLists` to type `Permission` -- added enum `ViewOthersShoppingLists` to type `Permission` -- added enum `UpdateMyShoppingLists` to type `Permission` -- added enum `UpdateOthersShoppingLists` to type `Permission` -- added enum `CreateMyShoppingLists` to type `Permission` -- added enum `CreateOthersShoppingLists` to type `Permission` -- added enum `DeleteMyShoppingLists` to type `Permission` -- added enum `DeleteOthersShoppingLists` to type `Permission` -- added enum `RecurringOrder` to type `CartOrigin` -- added enum `ApplicationStoppedByGroupBestDeal` to type `DiscountCodeState` -- added enum `discount-group` to type `ReferenceTypeId` -- added enum `payment-method` to type `ReferenceTypeId` -- added enum `recurrence-policy` to type `ReferenceTypeId` -- added enum `recurring-order` to type `ReferenceTypeId` -- added enum `payment-method` to type `ExtensionResourceTypeId` -- added enum `RecurringOrderState` to type `StateTypeEnum` -- added enum `discount-group` to type `ChangeSubscriptionResourceTypeId` -- added enum `recurrence-policy` to type `ChangeSubscriptionResourceTypeId` -- added enum `recurring-order` to type `ChangeSubscriptionResourceTypeId` -- added enum `recurring-order` to type `ResourceTypeId` -
- - -
-Removed Type(s) - -- :warning: removed type `AssociateRoleNameChangedMessage` -- :warning: removed type `AssociateRoleNameChangedMessagePayload` -- :warning: removed type `ProductSearchFacetScope` -
- - -
-Changed Type(s) - -- :warning: changed type `DeliveryPayload` from type `object` to `SubscriptionNotification` -
- -
Added Type(s) @@ -578,6 +260,8 @@ - added type `RecurringOrderSetStartsAtAction` - added type `RecurringOrderSetStateAction` - added type `RecurringOrderTransitionStateAction` +- added type `SearchFuzzyExpression` +- added type `SearchFuzzyValue` - added type `ShoppingListSetBusinessUnitAction` - added type `EventDeliveryPayload` - added type `EventSubscription` @@ -587,67 +271,332 @@ - added type `SubscriptionSetEventsAction`
-**Import changes**
-Added Resource(s) +Changed Type(s) -- added resource `/{projectKey}/product-selections` -- added resource `/{projectKey}/business-units` -- added resource `/{projectKey}/product-selections/import-containers` -- added resource `/{projectKey}/product-selections/import-containers/{importContainerKey}` -- added resource `/{projectKey}/business-units/import-containers` -- added resource `/{projectKey}/business-units/import-containers/{importContainerKey}` +- :warning: changed type `DeliveryPayload` from type `object` to `SubscriptionNotification`
-Added Method(s) +Removed Type(s) -- added method `$apiRoot->withProjectKeyValue()->productSelections()->importContainers()->withImportContainerKeyValue()->post()` -- added method `$apiRoot->withProjectKeyValue()->businessUnits()->importContainers()->withImportContainerKeyValue()->post()` +- :warning: removed type `AssociateRoleNameChangedMessage` +- :warning: removed type `AssociateRoleNameChangedMessagePayload` +- :warning: removed type `ProductSearchFacetScope` +
+ + +
+Added QueryParameter(s) + +- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/products` +- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/products` +- added query parameter `priceCustomerGroupAssignments` to method `post /{projectKey}/products` +- added query parameter `priceRecurrencePolicy` to method `post /{projectKey}/products` +- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/product-projections` +- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/product-projections` +- added query parameter `filter[attributes]` to method `get /{projectKey}/product-projections` +- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/products/key={key}` +- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/products/key={key}` +- added query parameter `priceCustomerGroupAssignments` to method `post /{projectKey}/products/key={key}` +- added query parameter `priceRecurrencePolicy` to method `post /{projectKey}/products/key={key}` +- added query parameter `priceCustomerGroupAssignments` to method `delete /{projectKey}/products/key={key}` +- added query parameter `priceRecurrencePolicy` to method `delete /{projectKey}/products/key={key}` +- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/products/{ID}` +- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/products/{ID}` +- added query parameter `priceCustomerGroupAssignments` to method `post /{projectKey}/products/{ID}` +- added query parameter `priceRecurrencePolicy` to method `post /{projectKey}/products/{ID}` +- added query parameter `priceCustomerGroupAssignments` to method `delete /{projectKey}/products/{ID}` +- added query parameter `priceRecurrencePolicy` to method `delete /{projectKey}/products/{ID}` +- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/product-projections/search` +- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/product-projections/search` +- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/product-projections/key={key}` +- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/product-projections/key={key}` +- added query parameter `filter[attributes]` to method `get /{projectKey}/product-projections/key={key}` +- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/product-projections/{ID}` +- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/product-projections/{ID}` +- added query parameter `filter[attributes]` to method `get /{projectKey}/product-projections/{ID}` +- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/in-store/key={storeKey}/product-projections/key={key}` +- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/in-store/key={storeKey}/product-projections/key={key}` +- added query parameter `filter[attributes]` to method `get /{projectKey}/in-store/key={storeKey}/product-projections/key={key}` +- added query parameter `priceCustomerGroupAssignments` to method `get /{projectKey}/in-store/key={storeKey}/product-projections/{ID}` +- added query parameter `priceRecurrencePolicy` to method `get /{projectKey}/in-store/key={storeKey}/product-projections/{ID}` +- added query parameter `filter[attributes]` to method `get /{projectKey}/in-store/key={storeKey}/product-projections/{ID}` +
+ + +
+Removed QueryParameter(s) + +- :warning: removed query parameter `withTotal` from method `get /{projectKey}/product-projections/search` +
+ + +
+Added Enum(s) + +- added enum `ViewMyShoppingLists` to type `Permission` +- added enum `ViewOthersShoppingLists` to type `Permission` +- added enum `UpdateMyShoppingLists` to type `Permission` +- added enum `UpdateOthersShoppingLists` to type `Permission` +- added enum `CreateMyShoppingLists` to type `Permission` +- added enum `CreateOthersShoppingLists` to type `Permission` +- added enum `DeleteMyShoppingLists` to type `Permission` +- added enum `DeleteOthersShoppingLists` to type `Permission` +- added enum `RecurringOrder` to type `CartOrigin` +- added enum `ApplicationStoppedByGroupBestDeal` to type `DiscountCodeState` +- added enum `discount-group` to type `ReferenceTypeId` +- added enum `payment-method` to type `ReferenceTypeId` +- added enum `recurrence-policy` to type `ReferenceTypeId` +- added enum `recurring-order` to type `ReferenceTypeId` +- added enum `payment-method` to type `ExtensionResourceTypeId` +- added enum `RecurringOrderState` to type `StateTypeEnum` +- added enum `discount-group` to type `ChangeSubscriptionResourceTypeId` +- added enum `recurrence-policy` to type `ChangeSubscriptionResourceTypeId` +- added enum `recurring-order` to type `ChangeSubscriptionResourceTypeId` +- added enum `recurring-order` to type `ResourceTypeId` +
+ + +
+Required Property(s) + +- changed property `sortOrder` of type `CartDiscountDraft` to be optional +- changed property `variantSelection` of type `ProductSelectionProductAddedMessage` to be optional +- changed property `variantExclusion` of type `ProductSelectionProductExcludedMessage` to be optional +- changed property `oldVariantExclusion` of type `ProductSelectionVariantExclusionChangedMessage` to be optional +- changed property `newVariantExclusion` of type `ProductSelectionVariantExclusionChangedMessage` to be optional +- changed property `oldVariantSelection` of type `ProductSelectionVariantSelectionChangedMessage` to be optional +- changed property `newVariantSelection` of type `ProductSelectionVariantSelectionChangedMessage` to be optional +- changed property `variantSelection` of type `ProductSelectionProductAddedMessagePayload` to be optional +- changed property `variantExclusion` of type `ProductSelectionProductExcludedMessagePayload` to be optional +- changed property `oldVariantExclusion` of type `ProductSelectionVariantExclusionChangedMessagePayload` to be optional +- changed property `newVariantExclusion` of type `ProductSelectionVariantExclusionChangedMessagePayload` to be optional +- changed property `oldVariantSelection` of type `ProductSelectionVariantSelectionChangedMessagePayload` to be optional +- changed property `newVariantSelection` of type `ProductSelectionVariantSelectionChangedMessagePayload` to be optional +- changed property `images` of type `ProductTailoringSetExternalImagesAction` to be optional +- changed property `facets` of type `ProductProjectionPagedSearchResponse` to be optional +- :warning: changed property `triggerPattern` of type `CartDiscountPatternTarget` to be required
Changed Property(s) -- :warning: changed property `value` of type `MoneySetField` from type `Money[]` to `TypedMoney[]` -- :warning: changed property `country` of type `ExternalTaxRateDraft` from type `string` to `CountryCode` +- :warning: changed property `discount` of type `DiscountedTotalPricePortion` from type `CartDiscountReference` to `Reference` +- :warning: changed property `actions` of type `MyBusinessUnitUpdate` from type `BusinessUnitUpdateAction[]` to `MyBusinessUnitUpdateAction[]` +- :warning: changed property `paymentMethodInfo` of type `MyPaymentDraft` from type `PaymentMethodInfo` to `PaymentMethodInfoDraft` +- :warning: changed property `paymentMethodInfo` of type `PaymentDraft` from type `PaymentMethodInfo` to `PaymentMethodInfoDraft` +- :warning: changed property `filter` of type `SearchSorting` from type `SearchQueryExpression` to `SearchQuery` +
+ + +
+MarkDeprecated Property(s) + +- marked property `CountOnCustomLineItemUnits::excludeCount` as deprecated +- marked property `CountOnLineItemUnits::excludeCount` as deprecated +
+ + +
+Removed Property(s) + +- :warning: removed property `/[0-9].[0-9]*[1-9]/` from type `CategoryOrderHints` +- :warning: removed property `//` from type `ProductVariantChannelAvailabilityMap`
Added Property(s) -- added property `/^[a-zA-Z]{2,3}(?:-[a-zA-Z]{4})?(?:-(?:[a-zA-Z]{2}|\d{3}))?$/` to type `LocalizedString` -- added property `retentionPolicy` to type `ImportContainer` -- added property `expiresAt` to type `ImportContainer` -- added property `retentionPolicy` to type `ImportContainerDraft` -- added property `attributes` to type `ProductDraftImport` -- added property `/^[a-zA-Z]{2,3}(?:-[a-zA-Z]{4})?(?:-(?:[a-zA-Z]{2}|\d{3}))?$/` to type `SearchKeywords` -- added property `attributes` to type `ProductImport` +- added property `inheritedStores` to type `BusinessUnit` +- added property `inheritedStores` to type `Company` +- added property `inheritedStores` to type `Division` +- added property `makeInheritedAssociatesExplicit` to type `BusinessUnitChangeAssociateModeAction` +- added property `discountGroup` to type `CartDiscount` +- added property `discountGroup` to type `CartDiscountDraft` +- added property `applicationMode` to type `CartDiscountValueRelative` +- added property `applicationMode` to type `CartDiscountValueRelativeDraft` +- added property `priceRoundingMode` to type `Cart` +- added property `discountTypeCombination` to type `Cart` +- added property `priceRoundingMode` to type `CartDraft` +- added property `recurrenceInfo` to type `CustomLineItem` +- added property `recurrenceInfo` to type `CustomLineItemDraft` +- added property `recurrenceInfo` to type `LineItem` +- added property `recurrenceInfo` to type `LineItemDraft` +- added property `recurrenceInfo` to type `CartAddCustomLineItemAction` +- added property `recurrenceInfo` to type `CartAddLineItemAction` +- added property `recurrencePolicy` to type `Price` +- added property `recurrencePolicy` to type `PriceDraft` +- added property `customerGroupAssignments` to type `Customer` +- added property `invalidateOlderTokens` to type `CustomerCreateEmailToken` +- added property `invalidateOlderTokens` to type `CustomerCreatePasswordResetToken` +- added property `customerGroupAssignments` to type `CustomerDraft` +- added property `invalidateOlderTokens` to type `CustomerToken` +- added property `minCartQuantity` to type `InventoryEntry` +- added property `maxCartQuantity` to type `InventoryEntry` +- added property `minCartQuantity` to type `InventoryEntryDraft` +- added property `maxCartQuantity` to type `InventoryEntryDraft` +- added property `recurrenceInfo` to type `MyLineItemDraft` +- added property `interfaceId` to type `MyTransactionDraft` +- added property `recurrenceInfo` to type `MyCartAddLineItemAction` +- added property `value` to type `CustomerEmailTokenCreatedMessage` +- added property `invalidateOlderTokens` to type `CustomerEmailTokenCreatedMessage` +- added property `value` to type `CustomerPasswordTokenCreatedMessage` +- added property `invalidateOlderTokens` to type `CustomerPasswordTokenCreatedMessage` +- added property `attributes` to type `ProductTailoringCreatedMessage` +- added property `value` to type `CustomerEmailTokenCreatedMessagePayload` +- added property `invalidateOlderTokens` to type `CustomerEmailTokenCreatedMessagePayload` +- added property `value` to type `CustomerPasswordTokenCreatedMessagePayload` +- added property `invalidateOlderTokens` to type `CustomerPasswordTokenCreatedMessagePayload` +- added property `attributes` to type `ProductTailoringCreatedMessagePayload` +- added property `priceRoundingMode` to type `StagedOrder` +- added property `recurringOrder` to type `StagedOrder` +- added property `discountTypeCombination` to type `StagedOrder` +- added property `recurrenceInfo` to type `StagedOrderAddCustomLineItemAction` +- added property `recurrenceInfo` to type `StagedOrderAddLineItemAction` +- added property `priceRoundingMode` to type `Order` +- added property `recurringOrder` to type `Order` +- added property `discountTypeCombination` to type `Order` +- added property `priceRoundingMode` to type `OrderImportDraft` +- added property `token` to type `PaymentMethodInfo` +- added property `interfaceAccount` to type `PaymentMethodInfo` +- added property `custom` to type `PaymentMethodInfo` +- added property `interfaceId` to type `Transaction` +- added property `interfaceId` to type `TransactionDraft` +- added property `priceCustomerGroupAssignments` to type `ProductSearchProjectionParams` +- added property `attributes` to type `ProductTailoringData` +- added property `attributes` to type `ProductTailoringDraft` +- added property `attributes` to type `ProductTailoringInStoreDraft` - added property `level` to type `AttributeDefinition` +- added property `level` to type `AttributeDefinitionDraft` +- added property `/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/` to type `CategoryOrderHints` +- added property `attributes` to type `ProductData` +- added property `attributes` to type `ProductDraft` +- added property `attributes` to type `ProductProjection` +- added property `recurrencePrices` to type `ProductVariant` +- added property `/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/` to type `ProductVariantChannelAvailabilityMap` +- added property `priceRoundingMode` to type `CartsConfiguration` +- added property `taxRoundingMode` to type `CartsConfiguration` +- added property `priceRoundingMode` to type `QuoteRequest` +- added property `priceRoundingMode` to type `Quote` +- added property `businessUnit` to type `ShoppingList` +- added property `businessUnit` to type `ShoppingListDraft` +- added property `published` to type `ShoppingListLineItem` +- added property `recurrencePolicy` to type `StandalonePrice` +- added property `recurrencePolicy` to type `StandalonePriceDraft` +- added property `events` to type `Subscription` +- added property `events` to type `SubscriptionDraft`
-Removed Property(s) +Added Method(s) -- :warning: removed property `/^[a-z]{2}(-[A-Z]{2})?$/` from type `SearchKeywords` -- :warning: removed property `/^[a-z]{2}(-[A-Z]{2})?$/` from type `LocalizedString` +- added method `$apiRoot->withProjectKey()->discountGroups()->get()` +- added method `$apiRoot->withProjectKey()->discountGroups()->head()` +- added method `$apiRoot->withProjectKey()->discountGroups()->post()` +- added method `$apiRoot->withProjectKey()->paymentMethods()->get()` +- added method `$apiRoot->withProjectKey()->paymentMethods()->head()` +- added method `$apiRoot->withProjectKey()->paymentMethods()->post()` +- added method `$apiRoot->withProjectKey()->recurringOrders()->get()` +- added method `$apiRoot->withProjectKey()->recurringOrders()->head()` +- added method `$apiRoot->withProjectKey()->recurringOrders()->post()` +- added method `$apiRoot->withProjectKey()->recurrencePolicies()->get()` +- added method `$apiRoot->withProjectKey()->recurrencePolicies()->head()` +- added method `$apiRoot->withProjectKey()->recurrencePolicies()->post()` +- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->get()` +- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->head()` +- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->post()` +- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withKey()->get()` +- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withKey()->head()` +- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withKey()->post()` +- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withKey()->delete()` +- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withId()->get()` +- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withId()->head()` +- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withId()->post()` +- added method `$apiRoot->withProjectKey()->asAssociate()->withAssociateIdValue()->inBusinessUnitKeyWithBusinessUnitKeyValue()->shoppingLists()->withId()->delete()` +- added method `$apiRoot->withProjectKey()->businessUnits()->keyWithKeyValueAssociatesWithAssociateIdValue()->get()` +- added method `$apiRoot->withProjectKey()->businessUnits()->withBusinessUnitIdValueAssociatesWithAssociateIdValue()->get()` +- added method `$apiRoot->withProjectKey()->discountGroups()->withKey()->get()` +- added method `$apiRoot->withProjectKey()->discountGroups()->withKey()->head()` +- added method `$apiRoot->withProjectKey()->discountGroups()->withKey()->post()` +- added method `$apiRoot->withProjectKey()->discountGroups()->withKey()->delete()` +- added method `$apiRoot->withProjectKey()->discountGroups()->withId()->get()` +- added method `$apiRoot->withProjectKey()->discountGroups()->withId()->head()` +- added method `$apiRoot->withProjectKey()->discountGroups()->withId()->post()` +- added method `$apiRoot->withProjectKey()->discountGroups()->withId()->delete()` +- added method `$apiRoot->withProjectKey()->paymentMethods()->withKey()->get()` +- added method `$apiRoot->withProjectKey()->paymentMethods()->withKey()->head()` +- added method `$apiRoot->withProjectKey()->paymentMethods()->withKey()->post()` +- added method `$apiRoot->withProjectKey()->paymentMethods()->withKey()->delete()` +- added method `$apiRoot->withProjectKey()->paymentMethods()->withId()->get()` +- added method `$apiRoot->withProjectKey()->paymentMethods()->withId()->head()` +- added method `$apiRoot->withProjectKey()->paymentMethods()->withId()->post()` +- added method `$apiRoot->withProjectKey()->paymentMethods()->withId()->delete()` +- added method `$apiRoot->withProjectKey()->recurringOrders()->withId()->get()` +- added method `$apiRoot->withProjectKey()->recurringOrders()->withId()->head()` +- added method `$apiRoot->withProjectKey()->recurringOrders()->withId()->post()` +- added method `$apiRoot->withProjectKey()->recurringOrders()->withId()->delete()` +- added method `$apiRoot->withProjectKey()->recurringOrders()->withKey()->get()` +- added method `$apiRoot->withProjectKey()->recurringOrders()->withKey()->head()` +- added method `$apiRoot->withProjectKey()->recurringOrders()->withKey()->post()` +- added method `$apiRoot->withProjectKey()->recurringOrders()->withKey()->delete()` +- added method `$apiRoot->withProjectKey()->recurrencePolicies()->withKey()->get()` +- added method `$apiRoot->withProjectKey()->recurrencePolicies()->withKey()->head()` +- added method `$apiRoot->withProjectKey()->recurrencePolicies()->withKey()->post()` +- added method `$apiRoot->withProjectKey()->recurrencePolicies()->withKey()->delete()` +- added method `$apiRoot->withProjectKey()->recurrencePolicies()->withId()->get()` +- added method `$apiRoot->withProjectKey()->recurrencePolicies()->withId()->head()` +- added method `$apiRoot->withProjectKey()->recurrencePolicies()->withId()->post()` +- added method `$apiRoot->withProjectKey()->recurrencePolicies()->withId()->delete()` +- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->get()` +- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->head()` +- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->post()` +- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->withKey()->get()` +- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->withKey()->head()` +- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->withKey()->post()` +- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->withKey()->delete()` +- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->withId()->get()` +- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->withId()->head()` +- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->withId()->post()` +- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->withId()->delete()` +- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->keyWithKeyValueAssociatesWithAssociateIdValue()->get()` +- added method `$apiRoot->withProjectKey()->inStoreKeyWithStoreKeyValue()->businessUnits()->withBusinessUnitIdValueAssociatesWithAssociateIdValue()->get()`
-Added Enum(s) +Added Resource(s) -- added enum `business-unit` to type `ImportResourceType` -- added enum `product-selection` to type `ImportResourceType` -- added enum `associate-role` to type `ReferenceType` -- added enum `business-unit` to type `ReferenceType` +- added resource `/{projectKey}/discount-groups` +- added resource `/{projectKey}/payment-methods` +- added resource `/{projectKey}/recurring-orders` +- added resource `/{projectKey}/recurrence-policies` +- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists` +- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/key={key}` +- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/{ID}` +- added resource `/{projectKey}/business-units/key={key}/associates/{associateId}` +- added resource `/{projectKey}/business-units/{businessUnitId}/associates/{associateId}` +- added resource `/{projectKey}/discount-groups/key={key}` +- added resource `/{projectKey}/discount-groups/{ID}` +- added resource `/{projectKey}/payment-methods/key={key}` +- added resource `/{projectKey}/payment-methods/{ID}` +- added resource `/{projectKey}/recurring-orders/{ID}` +- added resource `/{projectKey}/recurring-orders/key={key}` +- added resource `/{projectKey}/recurrence-policies/key={key}` +- added resource `/{projectKey}/recurrence-policies/{ID}` +- added resource `/{projectKey}/in-store/key={storeKey}/business-units` +- added resource `/{projectKey}/in-store/key={storeKey}/business-units/key={key}` +- added resource `/{projectKey}/in-store/key={storeKey}/business-units/{ID}` +- added resource `/{projectKey}/in-store/key={storeKey}/business-units/key={key}/associates/{associateId}` +- added resource `/{projectKey}/in-store/key={storeKey}/business-units/{businessUnitId}/associates/{associateId}`
+**Import changes**
Added Type(s) @@ -680,12 +629,73 @@ - added type `AttributeLevel`
+ +
+Added Enum(s) + +- added enum `business-unit` to type `ImportResourceType` +- added enum `product-selection` to type `ImportResourceType` +- added enum `associate-role` to type `ReferenceType` +- added enum `business-unit` to type `ReferenceType` +
+ + +
+Changed Property(s) + +- :warning: changed property `value` of type `MoneySetField` from type `Money[]` to `TypedMoney[]` +- :warning: changed property `country` of type `ExternalTaxRateDraft` from type `string` to `CountryCode` +
+ + +
+Removed Property(s) + +- :warning: removed property `/^[a-z]{2}(-[A-Z]{2})?$/` from type `SearchKeywords` +- :warning: removed property `/^[a-z]{2}(-[A-Z]{2})?$/` from type `LocalizedString` +
+ + +
+Added Property(s) + +- added property `/^[a-zA-Z]{2,3}(?:-[a-zA-Z]{4})?(?:-(?:[a-zA-Z]{2}|\d{3}))?$/` to type `LocalizedString` +- added property `retentionPolicy` to type `ImportContainer` +- added property `expiresAt` to type `ImportContainer` +- added property `retentionPolicy` to type `ImportContainerDraft` +- added property `attributes` to type `ProductDraftImport` +- added property `/^[a-zA-Z]{2,3}(?:-[a-zA-Z]{4})?(?:-(?:[a-zA-Z]{2}|\d{3}))?$/` to type `SearchKeywords` +- added property `attributes` to type `ProductImport` +- added property `level` to type `AttributeDefinition` +
+ + +
+Added Method(s) + +- added method `$apiRoot->withProjectKeyValue()->productSelections()->importContainers()->withImportContainerKeyValue()->post()` +- added method `$apiRoot->withProjectKeyValue()->businessUnits()->importContainers()->withImportContainerKeyValue()->post()` +
+ + +
+Added Resource(s) + +- added resource `/{projectKey}/product-selections` +- added resource `/{projectKey}/business-units` +- added resource `/{projectKey}/product-selections/import-containers` +- added resource `/{projectKey}/product-selections/import-containers/{importContainerKey}` +- added resource `/{projectKey}/business-units/import-containers` +- added resource `/{projectKey}/business-units/import-containers/{importContainerKey}` +
+ **History changes**
-Required Property(s) +Added Type(s) -- :warning: changed property `triggerPattern` of type `ChangeTargetPatternChangeValue` to be required +- added type `TooManyRequestsError` +- added type `GraphQLTooManyRequestsError`
@@ -707,9 +717,8 @@
-Added Type(s) +Required Property(s) -- added type `TooManyRequestsError` -- added type `GraphQLTooManyRequestsError` +- :warning: changed property `triggerPattern` of type `ChangeTargetPatternChangeValue` to be required
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 e64ca249000..6ea1da5f687 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDTest.php @@ -195,6 +195,19 @@ function (ApiRequestBuilder $builder): RequestInterface { 'get', 'test_projectKey/in-store/key=test_storeKey/product-projections/test_ID?localeProjection=localeProjection', ], + 'ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet_withFilterAttributes' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->inStoreKeyWithStoreKeyValue('test_storeKey') + ->productProjections() + ->withId('test_ID') + ->get() + ->withFilterAttributes('filter[attributes]'); + }, + 'get', + 'test_projectKey/in-store/key=test_storeKey/product-projections/test_ID?filter%5Battributes%5D=filter%5Battributes%5D', + ], 'ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet_withExpand' => [ 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 c3857081472..34471f76b7f 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyTest.php @@ -195,6 +195,19 @@ function (ApiRequestBuilder $builder): RequestInterface { 'get', 'test_projectKey/in-store/key=test_storeKey/product-projections/key=test_key?localeProjection=localeProjection', ], + 'ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet_withFilterAttributes' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->inStoreKeyWithStoreKeyValue('test_storeKey') + ->productProjections() + ->withKey('test_key') + ->get() + ->withFilterAttributes('filter[attributes]'); + }, + 'get', + 'test_projectKey/in-store/key=test_storeKey/product-projections/key=test_key?filter%5Battributes%5D=filter%5Battributes%5D', + ], 'ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsByIDTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsByIDTest.php index 7aa7766e9c1..a86050b17c4 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsByIDTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsByIDTest.php @@ -199,6 +199,18 @@ function (ApiRequestBuilder $builder): RequestInterface { 'get', 'test_projectKey/product-projections/test_ID?storeProjection=storeProjection', ], + 'ByProjectKeyProductProjectionsByIDGet_withFilterAttributes' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->productProjections() + ->withId('test_ID') + ->get() + ->withFilterAttributes('filter[attributes]'); + }, + 'get', + 'test_projectKey/product-projections/test_ID?filter%5Battributes%5D=filter%5Battributes%5D', + ], 'ByProjectKeyProductProjectionsByIDGet_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsKeyByKeyTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsKeyByKeyTest.php index c5f167e7bfd..161b71d88e3 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsKeyByKeyTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsKeyByKeyTest.php @@ -199,6 +199,18 @@ function (ApiRequestBuilder $builder): RequestInterface { 'get', 'test_projectKey/product-projections/key=test_key?storeProjection=storeProjection', ], + 'ByProjectKeyProductProjectionsKeyByKeyGet_withFilterAttributes' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->productProjections() + ->withKey('test_key') + ->get() + ->withFilterAttributes('filter[attributes]'); + }, + 'get', + 'test_projectKey/product-projections/key=test_key?filter%5Battributes%5D=filter%5Battributes%5D', + ], 'ByProjectKeyProductProjectionsKeyByKeyGet_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder diff --git a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsTest.php b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsTest.php index ed8f269f47b..10fb226a290 100644 --- a/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsTest.php +++ b/lib/commercetools-api-tests/test/unit/Client/Resource/ResourceByProjectKeyProductProjectionsTest.php @@ -203,6 +203,17 @@ function (ApiRequestBuilder $builder): RequestInterface { 'get', 'test_projectKey/product-projections?storeProjection=storeProjection', ], + 'ByProjectKeyProductProjectionsGet_withFilterAttributes' => [ + function (ApiRequestBuilder $builder): RequestInterface { + return $builder + ->withProjectKey('test_projectKey') + ->productProjections() + ->get() + ->withFilterAttributes('filter[attributes]'); + }, + 'get', + 'test_projectKey/product-projections?filter%5Battributes%5D=filter%5Battributes%5D', + ], 'ByProjectKeyProductProjectionsGet_withExpand' => [ function (ApiRequestBuilder $builder): RequestInterface { return $builder diff --git a/lib/commercetools-api/docs/RequestBuilder.md b/lib/commercetools-api/docs/RequestBuilder.md index 169b32ffe28..50920f248bc 100644 --- a/lib/commercetools-api/docs/RequestBuilder.md +++ b/lib/commercetools-api/docs/RequestBuilder.md @@ -2014,6 +2014,7 @@ $request = $builder Creating a Cart Discount produces the [CartDiscountCreated](ctp:api:type:CartDiscountCreatedMessage) Message. + ### Example ```php use Commercetools\Api\Client\ApiRequestBuilder; diff --git a/lib/commercetools-api/src/Client/Resource/AttributeFiltering.php b/lib/commercetools-api/src/Client/Resource/AttributeFiltering.php new file mode 100644 index 00000000000..1671abd3d7c --- /dev/null +++ b/lib/commercetools-api/src/Client/Resource/AttributeFiltering.php @@ -0,0 +1,24 @@ + + */ +interface AttributeFiltering extends ApiRequestInterface +{ + /** + * @return ApiRequestInterface + * @psalm-return T + */ + public function withFilterAttributes(string $filterAttributes); +} diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet.php index 2d7e6a1bbdf..7aad46a487b 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet.php @@ -33,11 +33,12 @@ * @template-implements ProjectionSelectingTailoring * @template-implements PriceSelecting * @template-implements LocaleProjecting + * @template-implements AttributeFiltering * @template-implements Expandable * @template-implements Errorable * @template-implements Deprecatable200 */ -class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet extends ApiRequest implements ProjectionSelectingTailoring, PriceSelecting, LocaleProjecting, Expandable, Errorable, Deprecatable200 +class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet extends ApiRequest implements ProjectionSelectingTailoring, PriceSelecting, LocaleProjecting, AttributeFiltering, Expandable, Errorable, Deprecatable200 { /** * @param ?object|array|string $body @@ -219,6 +220,15 @@ public function withLocaleProjection($localeProjection): ByProjectKeyInStoreKeyB return $this->withQueryParam('localeProjection', $localeProjection); } + /** + * + * @psalm-param scalar|scalar[] $filterAttributes + */ + public function withFilterAttributes($filterAttributes): ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDGet + { + return $this->withQueryParam('filter[attributes]', $filterAttributes); + } + /** * * @psalm-param scalar|scalar[] $expand diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet.php index 4711a705565..0b1aa021d91 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet.php @@ -33,11 +33,12 @@ * @template-implements ProjectionSelectingTailoring * @template-implements PriceSelecting * @template-implements LocaleProjecting + * @template-implements AttributeFiltering * @template-implements Expandable * @template-implements Errorable * @template-implements Deprecatable200 */ -class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet extends ApiRequest implements ProjectionSelectingTailoring, PriceSelecting, LocaleProjecting, Expandable, Errorable, Deprecatable200 +class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet extends ApiRequest implements ProjectionSelectingTailoring, PriceSelecting, LocaleProjecting, AttributeFiltering, Expandable, Errorable, Deprecatable200 { /** * @param ?object|array|string $body @@ -219,6 +220,15 @@ public function withLocaleProjection($localeProjection): ByProjectKeyInStoreKeyB return $this->withQueryParam('localeProjection', $localeProjection); } + /** + * + * @psalm-param scalar|scalar[] $filterAttributes + */ + public function withFilterAttributes($filterAttributes): ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyGet + { + return $this->withQueryParam('filter[attributes]', $filterAttributes); + } + /** * * @psalm-param scalar|scalar[] $expand diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsByIDGet.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsByIDGet.php index 10fa2036498..3fb5e8c8a1f 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsByIDGet.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsByIDGet.php @@ -34,11 +34,12 @@ * @template-implements PriceSelecting * @template-implements LocaleProjecting * @template-implements StoreProjectingTailoring + * @template-implements AttributeFiltering * @template-implements Expandable * @template-implements Errorable * @template-implements Deprecatable200 */ -class ByProjectKeyProductProjectionsByIDGet extends ApiRequest implements ProjectionSelecting, PriceSelecting, LocaleProjecting, StoreProjectingTailoring, Expandable, Errorable, Deprecatable200 +class ByProjectKeyProductProjectionsByIDGet extends ApiRequest implements ProjectionSelecting, PriceSelecting, LocaleProjecting, StoreProjectingTailoring, AttributeFiltering, Expandable, Errorable, Deprecatable200 { /** * @param ?object|array|string $body @@ -229,6 +230,15 @@ public function withStoreProjection($storeProjection): ByProjectKeyProductProjec return $this->withQueryParam('storeProjection', $storeProjection); } + /** + * + * @psalm-param scalar|scalar[] $filterAttributes + */ + public function withFilterAttributes($filterAttributes): ByProjectKeyProductProjectionsByIDGet + { + return $this->withQueryParam('filter[attributes]', $filterAttributes); + } + /** * * @psalm-param scalar|scalar[] $expand diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsGet.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsGet.php index c7dab029cdf..272fb40661d 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsGet.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsGet.php @@ -34,6 +34,7 @@ * @template-implements PriceSelecting * @template-implements LocaleProjecting * @template-implements StoreProjectingTailoring + * @template-implements AttributeFiltering * @template-implements Expandable * @template-implements Sortable * @template-implements Paging @@ -41,7 +42,7 @@ * @template-implements Errorable * @template-implements Deprecatable200 */ -class ByProjectKeyProductProjectionsGet extends ApiRequest implements ProjectionSelecting, PriceSelecting, LocaleProjecting, StoreProjectingTailoring, Expandable, Sortable, Paging, Query, Errorable, Deprecatable200 +class ByProjectKeyProductProjectionsGet extends ApiRequest implements ProjectionSelecting, PriceSelecting, LocaleProjecting, StoreProjectingTailoring, AttributeFiltering, Expandable, Sortable, Paging, Query, Errorable, Deprecatable200 { /** * @param ?object|array|string $body @@ -232,6 +233,15 @@ public function withStoreProjection($storeProjection): ByProjectKeyProductProjec return $this->withQueryParam('storeProjection', $storeProjection); } + /** + * + * @psalm-param scalar|scalar[] $filterAttributes + */ + public function withFilterAttributes($filterAttributes): ByProjectKeyProductProjectionsGet + { + return $this->withQueryParam('filter[attributes]', $filterAttributes); + } + /** * * @psalm-param scalar|scalar[] $expand diff --git a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsKeyByKeyGet.php b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsKeyByKeyGet.php index 75800c4b6e8..b4a9760c21b 100644 --- a/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsKeyByKeyGet.php +++ b/lib/commercetools-api/src/Client/Resource/ByProjectKeyProductProjectionsKeyByKeyGet.php @@ -34,11 +34,12 @@ * @template-implements PriceSelecting * @template-implements LocaleProjecting * @template-implements StoreProjectingTailoring + * @template-implements AttributeFiltering * @template-implements Expandable * @template-implements Errorable * @template-implements Deprecatable200 */ -class ByProjectKeyProductProjectionsKeyByKeyGet extends ApiRequest implements ProjectionSelecting, PriceSelecting, LocaleProjecting, StoreProjectingTailoring, Expandable, Errorable, Deprecatable200 +class ByProjectKeyProductProjectionsKeyByKeyGet extends ApiRequest implements ProjectionSelecting, PriceSelecting, LocaleProjecting, StoreProjectingTailoring, AttributeFiltering, Expandable, Errorable, Deprecatable200 { /** * @param ?object|array|string $body @@ -229,6 +230,15 @@ public function withStoreProjection($storeProjection): ByProjectKeyProductProjec return $this->withQueryParam('storeProjection', $storeProjection); } + /** + * + * @psalm-param scalar|scalar[] $filterAttributes + */ + public function withFilterAttributes($filterAttributes): ByProjectKeyProductProjectionsKeyByKeyGet + { + return $this->withQueryParam('filter[attributes]', $filterAttributes); + } + /** * * @psalm-param scalar|scalar[] $expand diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeTargetAction.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeTargetAction.php index 21443469112..cc57a55b063 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeTargetAction.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeTargetAction.php @@ -17,6 +17,9 @@ interface CartDiscountChangeTargetAction extends CartDiscountUpdateAction /** *

New value to set.

+ *

For a CartDiscountValueRelative, if applicationMode is set, the target must be CartDiscountPatternTarget. + * If applicationMode is ProportionateDistribution or EvenDistribution, the CartDiscountPatternTarget triggerPattern must be non-empty. + * If either conditions are not met, an InvalidOperation error is returned.

* * @return null|CartDiscountTarget diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeTargetActionBuilder.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeTargetActionBuilder.php index 26726be0460..f6f1f835456 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeTargetActionBuilder.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeTargetActionBuilder.php @@ -28,6 +28,9 @@ final class CartDiscountChangeTargetActionBuilder implements Builder /** *

New value to set.

+ *

For a CartDiscountValueRelative, if applicationMode is set, the target must be CartDiscountPatternTarget. + * If applicationMode is ProportionateDistribution or EvenDistribution, the CartDiscountPatternTarget triggerPattern must be non-empty. + * If either conditions are not met, an InvalidOperation error is returned.

* * @return null|CartDiscountTarget diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeTargetActionModel.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeTargetActionModel.php index 07e01e83c35..66048f3cb46 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeTargetActionModel.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeTargetActionModel.php @@ -64,6 +64,9 @@ public function getAction() /** *

New value to set.

+ *

For a CartDiscountValueRelative, if applicationMode is set, the target must be CartDiscountPatternTarget. + * If applicationMode is ProportionateDistribution or EvenDistribution, the CartDiscountPatternTarget triggerPattern must be non-empty. + * If either conditions are not met, an InvalidOperation error is returned.

* * * @return null|CartDiscountTarget diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueAction.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueAction.php index bf8d1efed56..8d56ff1f6f1 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueAction.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueAction.php @@ -16,8 +16,8 @@ interface CartDiscountChangeValueAction extends CartDiscountUpdateAction public const FIELD_VALUE = 'value'; /** - *

New value to set. - * When trying to set a CartDiscountValueGiftLineItemDraft an InvalidInput error is returned.

+ *

New value to set.

+ *

When trying to set a CartDiscountValueGiftLineItemDraft an InvalidInput error is returned.

* * @return null|CartDiscountValueDraft diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueActionBuilder.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueActionBuilder.php index 15941610eac..b6707236368 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueActionBuilder.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueActionBuilder.php @@ -27,8 +27,8 @@ final class CartDiscountChangeValueActionBuilder implements Builder private $value; /** - *

New value to set. - * When trying to set a CartDiscountValueGiftLineItemDraft an InvalidInput error is returned.

+ *

New value to set.

+ *

When trying to set a CartDiscountValueGiftLineItemDraft an InvalidInput error is returned.

* * @return null|CartDiscountValueDraft diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueActionModel.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueActionModel.php index 112664e4802..6c12e7ecbbc 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueActionModel.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountChangeValueActionModel.php @@ -63,8 +63,8 @@ public function getAction() } /** - *

New value to set. - * When trying to set a CartDiscountValueGiftLineItemDraft an InvalidInput error is returned.

+ *

New value to set.

+ *

When trying to set a CartDiscountValueGiftLineItemDraft an InvalidInput error is returned.

* * * @return null|CartDiscountValueDraft diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelative.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelative.php index 8257fe7690f..413198ae7a0 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelative.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelative.php @@ -14,6 +14,7 @@ interface CartDiscountValueRelative extends CartDiscountValue { public const FIELD_PERMYRIAD = 'permyriad'; + public const FIELD_APPLICATION_MODE = 'applicationMode'; /** *

Fraction (per ten thousand) the price is reduced by. For example, 1000 will result in a 10% price reduction.

@@ -23,8 +24,25 @@ interface CartDiscountValueRelative extends CartDiscountValue */ public function getPermyriad(); + /** + *

Indicates how the discount applies when using CartDiscountPatternTarget.

+ *
    + *
  • If the mode is IndividualApplication, the discounted percentage is applied on each unit's price. The units matching the triggerPattern are not considered.
  • + *
  • If the mode is ProportionateDistribution and EvenDistribution the discounted value is calculated from the total value of the units matching the targetPattern and distributed among the units matching the targetPattern or triggerPattern. These modes are allowed only if CartDiscountPatternTarget triggerPattern is non-empty.
  • + *
+ * + + * @return null|string + */ + public function getApplicationMode(); + /** * @param ?int $permyriad */ public function setPermyriad(?int $permyriad): void; + + /** + * @param ?string $applicationMode + */ + public function setApplicationMode(?string $applicationMode): void; } diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeBuilder.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeBuilder.php index b152dbbef68..c1547a732d8 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeBuilder.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeBuilder.php @@ -26,6 +26,12 @@ final class CartDiscountValueRelativeBuilder implements Builder */ private $permyriad; + /** + + * @var ?string + */ + private $applicationMode; + /** *

Fraction (per ten thousand) the price is reduced by. For example, 1000 will result in a 10% price reduction.

* @@ -37,6 +43,21 @@ public function getPermyriad() return $this->permyriad; } + /** + *

Indicates how the discount applies when using CartDiscountPatternTarget.

+ *
    + *
  • If the mode is IndividualApplication, the discounted percentage is applied on each unit's price. The units matching the triggerPattern are not considered.
  • + *
  • If the mode is ProportionateDistribution and EvenDistribution the discounted value is calculated from the total value of the units matching the targetPattern and distributed among the units matching the targetPattern or triggerPattern. These modes are allowed only if CartDiscountPatternTarget triggerPattern is non-empty.
  • + *
+ * + + * @return null|string + */ + public function getApplicationMode() + { + return $this->applicationMode; + } + /** * @param ?int $permyriad * @return $this @@ -48,11 +69,23 @@ public function withPermyriad(?int $permyriad) return $this; } + /** + * @param ?string $applicationMode + * @return $this + */ + public function withApplicationMode(?string $applicationMode) + { + $this->applicationMode = $applicationMode; + + return $this; + } + public function build(): CartDiscountValueRelative { return new CartDiscountValueRelativeModel( - $this->permyriad + $this->permyriad, + $this->applicationMode ); } diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeDraft.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeDraft.php index 3eca8fed444..966d241a5ec 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeDraft.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeDraft.php @@ -14,6 +14,7 @@ interface CartDiscountValueRelativeDraft extends CartDiscountValueDraft { public const FIELD_PERMYRIAD = 'permyriad'; + public const FIELD_APPLICATION_MODE = 'applicationMode'; /** *

Fraction (per ten thousand) the price is reduced by. For example, 1000 will result in a 10% price reduction.

@@ -23,8 +24,25 @@ interface CartDiscountValueRelativeDraft extends CartDiscountValueDraft */ public function getPermyriad(); + /** + *

Determines how the discount applies when using CartDiscountPatternTarget.

+ *
    + *
  • If the mode is IndividualApplication, the discounted percentage is applied on each unit's price. The units matching the triggerPattern are not considered.
  • + *
  • If the mode is ProportionateDistribution and EvenDistribution the discounted value is calculated from the total value of the units matching the targetPattern and distributed among the units matching the targetPattern or triggerPattern. These modes are allowed only if CartDiscountPatternTarget triggerPattern is non-empty.
  • + *
+ * + + * @return null|string + */ + public function getApplicationMode(); + /** * @param ?int $permyriad */ public function setPermyriad(?int $permyriad): void; + + /** + * @param ?string $applicationMode + */ + public function setApplicationMode(?string $applicationMode): void; } diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeDraftBuilder.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeDraftBuilder.php index 3f85fff5e1f..bb55ca9d3d0 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeDraftBuilder.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeDraftBuilder.php @@ -26,6 +26,12 @@ final class CartDiscountValueRelativeDraftBuilder implements Builder */ private $permyriad; + /** + + * @var ?string + */ + private $applicationMode; + /** *

Fraction (per ten thousand) the price is reduced by. For example, 1000 will result in a 10% price reduction.

* @@ -37,6 +43,21 @@ public function getPermyriad() return $this->permyriad; } + /** + *

Determines how the discount applies when using CartDiscountPatternTarget.

+ *
    + *
  • If the mode is IndividualApplication, the discounted percentage is applied on each unit's price. The units matching the triggerPattern are not considered.
  • + *
  • If the mode is ProportionateDistribution and EvenDistribution the discounted value is calculated from the total value of the units matching the targetPattern and distributed among the units matching the targetPattern or triggerPattern. These modes are allowed only if CartDiscountPatternTarget triggerPattern is non-empty.
  • + *
+ * + + * @return null|string + */ + public function getApplicationMode() + { + return $this->applicationMode; + } + /** * @param ?int $permyriad * @return $this @@ -48,11 +69,23 @@ public function withPermyriad(?int $permyriad) return $this; } + /** + * @param ?string $applicationMode + * @return $this + */ + public function withApplicationMode(?string $applicationMode) + { + $this->applicationMode = $applicationMode; + + return $this; + } + public function build(): CartDiscountValueRelativeDraft { return new CartDiscountValueRelativeDraftModel( - $this->permyriad + $this->permyriad, + $this->applicationMode ); } diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeDraftModel.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeDraftModel.php index 691e96562f8..681d160bdf5 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeDraftModel.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeDraftModel.php @@ -32,15 +32,23 @@ final class CartDiscountValueRelativeDraftModel extends JsonObjectModel implemen */ protected $permyriad; + /** + * + * @var ?string + */ + protected $applicationMode; + /** * @psalm-suppress MissingParamType */ public function __construct( ?int $permyriad = null, + ?string $applicationMode = null, ?string $type = null ) { $this->permyriad = $permyriad; + $this->applicationMode = $applicationMode; $this->type = $type ?? self::DISCRIMINATOR_VALUE; } @@ -82,6 +90,30 @@ public function getPermyriad() return $this->permyriad; } + /** + *

Determines how the discount applies when using CartDiscountPatternTarget.

+ *
    + *
  • If the mode is IndividualApplication, the discounted percentage is applied on each unit's price. The units matching the triggerPattern are not considered.
  • + *
  • If the mode is ProportionateDistribution and EvenDistribution the discounted value is calculated from the total value of the units matching the targetPattern and distributed among the units matching the targetPattern or triggerPattern. These modes are allowed only if CartDiscountPatternTarget triggerPattern is non-empty.
  • + *
+ * + * + * @return null|string + */ + public function getApplicationMode() + { + if (is_null($this->applicationMode)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_APPLICATION_MODE); + if (is_null($data)) { + return null; + } + $this->applicationMode = (string) $data; + } + + return $this->applicationMode; + } + /** * @param ?int $permyriad @@ -90,4 +122,12 @@ public function setPermyriad(?int $permyriad): void { $this->permyriad = $permyriad; } + + /** + * @param ?string $applicationMode + */ + public function setApplicationMode(?string $applicationMode): void + { + $this->applicationMode = $applicationMode; + } } diff --git a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeModel.php b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeModel.php index be7be1dc00f..49a401ffd87 100644 --- a/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeModel.php +++ b/lib/commercetools-api/src/Models/CartDiscount/CartDiscountValueRelativeModel.php @@ -32,15 +32,23 @@ final class CartDiscountValueRelativeModel extends JsonObjectModel implements Ca */ protected $permyriad; + /** + * + * @var ?string + */ + protected $applicationMode; + /** * @psalm-suppress MissingParamType */ public function __construct( ?int $permyriad = null, + ?string $applicationMode = null, ?string $type = null ) { $this->permyriad = $permyriad; + $this->applicationMode = $applicationMode; $this->type = $type ?? self::DISCRIMINATOR_VALUE; } @@ -82,6 +90,30 @@ public function getPermyriad() return $this->permyriad; } + /** + *

Indicates how the discount applies when using CartDiscountPatternTarget.

+ *
    + *
  • If the mode is IndividualApplication, the discounted percentage is applied on each unit's price. The units matching the triggerPattern are not considered.
  • + *
  • If the mode is ProportionateDistribution and EvenDistribution the discounted value is calculated from the total value of the units matching the targetPattern and distributed among the units matching the targetPattern or triggerPattern. These modes are allowed only if CartDiscountPatternTarget triggerPattern is non-empty.
  • + *
+ * + * + * @return null|string + */ + public function getApplicationMode() + { + if (is_null($this->applicationMode)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_APPLICATION_MODE); + if (is_null($data)) { + return null; + } + $this->applicationMode = (string) $data; + } + + return $this->applicationMode; + } + /** * @param ?int $permyriad @@ -90,4 +122,12 @@ public function setPermyriad(?int $permyriad): void { $this->permyriad = $permyriad; } + + /** + * @param ?string $applicationMode + */ + public function setApplicationMode(?string $applicationMode): void + { + $this->applicationMode = $applicationMode; + } } diff --git a/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderDraft.php b/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderDraft.php index 7013e648332..daceacc8bd8 100644 --- a/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderDraft.php +++ b/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderDraft.php @@ -50,7 +50,7 @@ public function getCart(); public function getCartVersion(); /** - *

Date and time (UTC) when the RecurringOrder will start.

+ *

Date and time (UTC) when the RecurringOrder will start. When specified, the date and time must be in the future. If not specified, the recurring order will start immediately.

* * @return null|DateTimeImmutable diff --git a/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderDraftBuilder.php b/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderDraftBuilder.php index be5772528f7..4a90e744914 100644 --- a/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderDraftBuilder.php +++ b/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderDraftBuilder.php @@ -103,7 +103,7 @@ public function getCartVersion() } /** - *

Date and time (UTC) when the RecurringOrder will start.

+ *

Date and time (UTC) when the RecurringOrder will start. When specified, the date and time must be in the future. If not specified, the recurring order will start immediately.

* * @return null|DateTimeImmutable diff --git a/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderDraftModel.php b/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderDraftModel.php index 9d2548c5033..85d49d5a9e9 100644 --- a/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderDraftModel.php +++ b/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderDraftModel.php @@ -152,7 +152,7 @@ public function getCartVersion() } /** - *

Date and time (UTC) when the RecurringOrder will start.

+ *

Date and time (UTC) when the RecurringOrder will start. When specified, the date and time must be in the future. If not specified, the recurring order will start immediately.

* * * @return null|DateTimeImmutable diff --git a/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderSetOrderSkipConfigurationAction.php b/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderSetOrderSkipConfigurationAction.php index 21f40f1f107..a9b0dfcf31f 100644 --- a/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderSetOrderSkipConfigurationAction.php +++ b/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderSetOrderSkipConfigurationAction.php @@ -14,7 +14,7 @@ interface RecurringOrderSetOrderSkipConfigurationAction extends RecurringOrderUpdateAction { - public const FIELD_SKIP_CONFIGURATION = 'skipConfiguration'; + public const FIELD_SKIP_CONFIGURATION_INPUT_DRAFT = 'skipConfigurationInputDraft'; public const FIELD_UPDATED_EXPIRES_AT = 'updatedExpiresAt'; /** @@ -23,7 +23,7 @@ interface RecurringOrderSetOrderSkipConfigurationAction extends RecurringOrderUp * @return null|SkipConfigurationDraft */ - public function getSkipConfiguration(); + public function getSkipConfigurationInputDraft(); /** *

Date and time (UTC) the Recurring Order will expire and stop generating new orders.

@@ -34,9 +34,9 @@ public function getSkipConfiguration(); public function getUpdatedExpiresAt(); /** - * @param ?SkipConfigurationDraft $skipConfiguration + * @param ?SkipConfigurationDraft $skipConfigurationInputDraft */ - public function setSkipConfiguration(?SkipConfigurationDraft $skipConfiguration): void; + public function setSkipConfigurationInputDraft(?SkipConfigurationDraft $skipConfigurationInputDraft): void; /** * @param ?DateTimeImmutable $updatedExpiresAt diff --git a/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderSetOrderSkipConfigurationActionBuilder.php b/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderSetOrderSkipConfigurationActionBuilder.php index 456957ce975..9c60bf3e353 100644 --- a/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderSetOrderSkipConfigurationActionBuilder.php +++ b/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderSetOrderSkipConfigurationActionBuilder.php @@ -25,7 +25,7 @@ final class RecurringOrderSetOrderSkipConfigurationActionBuilder implements Buil * @var null|SkipConfigurationDraft|SkipConfigurationDraftBuilder */ - private $skipConfiguration; + private $skipConfigurationInputDraft; /** @@ -39,9 +39,9 @@ final class RecurringOrderSetOrderSkipConfigurationActionBuilder implements Buil * @return null|SkipConfigurationDraft */ - public function getSkipConfiguration() + public function getSkipConfigurationInputDraft() { - return $this->skipConfiguration instanceof SkipConfigurationDraftBuilder ? $this->skipConfiguration->build() : $this->skipConfiguration; + return $this->skipConfigurationInputDraft instanceof SkipConfigurationDraftBuilder ? $this->skipConfigurationInputDraft->build() : $this->skipConfigurationInputDraft; } /** @@ -56,12 +56,12 @@ public function getUpdatedExpiresAt() } /** - * @param ?SkipConfigurationDraft $skipConfiguration + * @param ?SkipConfigurationDraft $skipConfigurationInputDraft * @return $this */ - public function withSkipConfiguration(?SkipConfigurationDraft $skipConfiguration) + public function withSkipConfigurationInputDraft(?SkipConfigurationDraft $skipConfigurationInputDraft) { - $this->skipConfiguration = $skipConfiguration; + $this->skipConfigurationInputDraft = $skipConfigurationInputDraft; return $this; } @@ -78,12 +78,12 @@ public function withUpdatedExpiresAt(?DateTimeImmutable $updatedExpiresAt) } /** - * @deprecated use withSkipConfiguration() instead + * @deprecated use withSkipConfigurationInputDraft() instead * @return $this */ - public function withSkipConfigurationBuilder(?SkipConfigurationDraftBuilder $skipConfiguration) + public function withSkipConfigurationInputDraftBuilder(?SkipConfigurationDraftBuilder $skipConfigurationInputDraft) { - $this->skipConfiguration = $skipConfiguration; + $this->skipConfigurationInputDraft = $skipConfigurationInputDraft; return $this; } @@ -91,7 +91,7 @@ public function withSkipConfigurationBuilder(?SkipConfigurationDraftBuilder $ski public function build(): RecurringOrderSetOrderSkipConfigurationAction { return new RecurringOrderSetOrderSkipConfigurationActionModel( - $this->skipConfiguration instanceof SkipConfigurationDraftBuilder ? $this->skipConfiguration->build() : $this->skipConfiguration, + $this->skipConfigurationInputDraft instanceof SkipConfigurationDraftBuilder ? $this->skipConfigurationInputDraft->build() : $this->skipConfigurationInputDraft, $this->updatedExpiresAt ); } diff --git a/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderSetOrderSkipConfigurationActionModel.php b/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderSetOrderSkipConfigurationActionModel.php index e1845f9480a..50d595b18e7 100644 --- a/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderSetOrderSkipConfigurationActionModel.php +++ b/lib/commercetools-api/src/Models/RecurringOrder/RecurringOrderSetOrderSkipConfigurationActionModel.php @@ -31,7 +31,7 @@ final class RecurringOrderSetOrderSkipConfigurationActionModel extends JsonObjec * * @var ?SkipConfigurationDraft */ - protected $skipConfiguration; + protected $skipConfigurationInputDraft; /** * @@ -44,11 +44,11 @@ final class RecurringOrderSetOrderSkipConfigurationActionModel extends JsonObjec * @psalm-suppress MissingParamType */ public function __construct( - ?SkipConfigurationDraft $skipConfiguration = null, + ?SkipConfigurationDraft $skipConfigurationInputDraft = null, ?DateTimeImmutable $updatedExpiresAt = null, ?string $action = null ) { - $this->skipConfiguration = $skipConfiguration; + $this->skipConfigurationInputDraft = $skipConfigurationInputDraft; $this->updatedExpiresAt = $updatedExpiresAt; $this->action = $action ?? self::DISCRIMINATOR_VALUE; } @@ -77,19 +77,19 @@ public function getAction() * * @return null|SkipConfigurationDraft */ - public function getSkipConfiguration() + public function getSkipConfigurationInputDraft() { - if (is_null($this->skipConfiguration)) { + if (is_null($this->skipConfigurationInputDraft)) { /** @psalm-var stdClass|array|null $data */ - $data = $this->raw(self::FIELD_SKIP_CONFIGURATION); + $data = $this->raw(self::FIELD_SKIP_CONFIGURATION_INPUT_DRAFT); if (is_null($data)) { return null; } $className = SkipConfigurationDraftModel::resolveDiscriminatorClass($data); - $this->skipConfiguration = $className::of($data); + $this->skipConfigurationInputDraft = $className::of($data); } - return $this->skipConfiguration; + return $this->skipConfigurationInputDraft; } /** @@ -118,11 +118,11 @@ public function getUpdatedExpiresAt() /** - * @param ?SkipConfigurationDraft $skipConfiguration + * @param ?SkipConfigurationDraft $skipConfigurationInputDraft */ - public function setSkipConfiguration(?SkipConfigurationDraft $skipConfiguration): void + public function setSkipConfigurationInputDraft(?SkipConfigurationDraft $skipConfigurationInputDraft): void { - $this->skipConfiguration = $skipConfiguration; + $this->skipConfigurationInputDraft = $skipConfigurationInputDraft; } /** diff --git a/lib/commercetools-api/src/Models/Search/SearchFuzzyExpression.php b/lib/commercetools-api/src/Models/Search/SearchFuzzyExpression.php new file mode 100644 index 00000000000..be593f077c9 --- /dev/null +++ b/lib/commercetools-api/src/Models/Search/SearchFuzzyExpression.php @@ -0,0 +1,28 @@ + + */ +final class SearchFuzzyExpressionBuilder implements Builder +{ + /** + + * @var null|SearchFuzzyValue|SearchFuzzyValueBuilder + */ + private $fuzzy; + + /** + + * @return null|SearchFuzzyValue + */ + public function getFuzzy() + { + return $this->fuzzy instanceof SearchFuzzyValueBuilder ? $this->fuzzy->build() : $this->fuzzy; + } + + /** + * @param ?SearchFuzzyValue $fuzzy + * @return $this + */ + public function withFuzzy(?SearchFuzzyValue $fuzzy) + { + $this->fuzzy = $fuzzy; + + return $this; + } + + /** + * @deprecated use withFuzzy() instead + * @return $this + */ + public function withFuzzyBuilder(?SearchFuzzyValueBuilder $fuzzy) + { + $this->fuzzy = $fuzzy; + + return $this; + } + + public function build(): SearchFuzzyExpression + { + return new SearchFuzzyExpressionModel( + $this->fuzzy instanceof SearchFuzzyValueBuilder ? $this->fuzzy->build() : $this->fuzzy + ); + } + + public static function of(): SearchFuzzyExpressionBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Search/SearchFuzzyExpressionCollection.php b/lib/commercetools-api/src/Models/Search/SearchFuzzyExpressionCollection.php new file mode 100644 index 00000000000..42fbb92162e --- /dev/null +++ b/lib/commercetools-api/src/Models/Search/SearchFuzzyExpressionCollection.php @@ -0,0 +1,56 @@ + + * @method SearchFuzzyExpression current() + * @method SearchFuzzyExpression end() + * @method SearchFuzzyExpression at($offset) + */ +class SearchFuzzyExpressionCollection extends SearchQueryExpressionCollection +{ + /** + * @psalm-assert SearchFuzzyExpression $value + * @psalm-param SearchFuzzyExpression|stdClass $value + * @throws InvalidArgumentException + * + * @return SearchFuzzyExpressionCollection + */ + public function add($value) + { + if (!$value instanceof SearchFuzzyExpression) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?SearchFuzzyExpression + */ + protected function mapper() + { + return function (?int $index): ?SearchFuzzyExpression { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var SearchFuzzyExpression $data */ + $data = SearchFuzzyExpressionModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Search/SearchFuzzyExpressionModel.php b/lib/commercetools-api/src/Models/Search/SearchFuzzyExpressionModel.php new file mode 100644 index 00000000000..39b62690895 --- /dev/null +++ b/lib/commercetools-api/src/Models/Search/SearchFuzzyExpressionModel.php @@ -0,0 +1,65 @@ +fuzzy = $fuzzy; + } + + /** + * + * @return null|SearchFuzzyValue + */ + public function getFuzzy() + { + if (is_null($this->fuzzy)) { + /** @psalm-var stdClass|array|null $data */ + $data = $this->raw(self::FIELD_FUZZY); + if (is_null($data)) { + return null; + } + + $this->fuzzy = SearchFuzzyValueModel::of($data); + } + + return $this->fuzzy; + } + + + /** + * @param ?SearchFuzzyValue $fuzzy + */ + public function setFuzzy(?SearchFuzzyValue $fuzzy): void + { + $this->fuzzy = $fuzzy; + } +} diff --git a/lib/commercetools-api/src/Models/Search/SearchFuzzyValue.php b/lib/commercetools-api/src/Models/Search/SearchFuzzyValue.php new file mode 100644 index 00000000000..2b20be6dcc4 --- /dev/null +++ b/lib/commercetools-api/src/Models/Search/SearchFuzzyValue.php @@ -0,0 +1,77 @@ +The search term to find fuzzy matches for. If multiple terms are provided (separated by whitespace), the fuzziness level is applied to each term individually.

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

The maximum fuzziness level desired for the search term. Allowed values are 0, 1, and 2. The API automatically adjusts the effective fuzziness level based on the length of the search term if it exceeds the maximum allowed for the given string length according to the following rules:

+ *
    + *
  • Terms with 1-2 characters: 0 (exact match)
  • + *
  • Terms with 3-5 characters: 1 (up to one difference is allowed)
  • + *
  • Terms with more than 5 characters: 2 (up to two differences are allowed)
  • + *
+ * + + * @return null|int + */ + public function getLevel(); + + /** + *

Language of the localized value. Must be provided when the field is of type localizedTextField. The provided Locale must be one of the Project's languages.

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

Controls whether all of the provided terms must match (all, default) or any of those (any).

+ * + + * @return null|string + */ + public function getMustMatch(); + + /** + * @param mixed $value + */ + public function setValue($value): void; + + /** + * @param ?int $level + */ + public function setLevel(?int $level): void; + + /** + * @param ?string $language + */ + public function setLanguage(?string $language): void; + + /** + * @param ?string $mustMatch + */ + public function setMustMatch(?string $mustMatch): void; +} diff --git a/lib/commercetools-api/src/Models/Search/SearchFuzzyValueBuilder.php b/lib/commercetools-api/src/Models/Search/SearchFuzzyValueBuilder.php new file mode 100644 index 00000000000..b5add02abaa --- /dev/null +++ b/lib/commercetools-api/src/Models/Search/SearchFuzzyValueBuilder.php @@ -0,0 +1,238 @@ + + */ +final class SearchFuzzyValueBuilder implements Builder +{ + /** + + * @var ?string + */ + private $field; + + /** + + * @var ?float + */ + private $boost; + + /** + + * @var ?string + */ + private $fieldType; + + /** + + * @var null|mixed|mixed + */ + private $value; + + /** + + * @var ?int + */ + private $level; + + /** + + * @var ?string + */ + private $language; + + /** + + * @var ?string + */ + private $mustMatch; + + /** + + * @return null|string + */ + public function getField() + { + return $this->field; + } + + /** + + * @return null|float + */ + public function getBoost() + { + return $this->boost; + } + + /** + *

Possible values for the fieldType property on simple expressions indicating the data type of the field.

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

The search term to find fuzzy matches for. If multiple terms are provided (separated by whitespace), the fuzziness level is applied to each term individually.

+ * + + * @return null|mixed + */ + public function getValue() + { + return $this->value; + } + + /** + *

The maximum fuzziness level desired for the search term. Allowed values are 0, 1, and 2. The API automatically adjusts the effective fuzziness level based on the length of the search term if it exceeds the maximum allowed for the given string length according to the following rules:

+ *
    + *
  • Terms with 1-2 characters: 0 (exact match)
  • + *
  • Terms with 3-5 characters: 1 (up to one difference is allowed)
  • + *
  • Terms with more than 5 characters: 2 (up to two differences are allowed)
  • + *
+ * + + * @return null|int + */ + public function getLevel() + { + return $this->level; + } + + /** + *

Language of the localized value. Must be provided when the field is of type localizedTextField. The provided Locale must be one of the Project's languages.

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

Controls whether all of the provided terms must match (all, default) or any of those (any).

+ * + + * @return null|string + */ + public function getMustMatch() + { + return $this->mustMatch; + } + + /** + * @param ?string $field + * @return $this + */ + public function withField(?string $field) + { + $this->field = $field; + + return $this; + } + + /** + * @param ?float $boost + * @return $this + */ + public function withBoost(?float $boost) + { + $this->boost = $boost; + + return $this; + } + + /** + * @param ?string $fieldType + * @return $this + */ + public function withFieldType(?string $fieldType) + { + $this->fieldType = $fieldType; + + return $this; + } + + /** + * @param mixed $value + * @return $this + */ + public function withValue($value) + { + $this->value = $value; + + return $this; + } + + /** + * @param ?int $level + * @return $this + */ + public function withLevel(?int $level) + { + $this->level = $level; + + return $this; + } + + /** + * @param ?string $language + * @return $this + */ + public function withLanguage(?string $language) + { + $this->language = $language; + + return $this; + } + + /** + * @param ?string $mustMatch + * @return $this + */ + public function withMustMatch(?string $mustMatch) + { + $this->mustMatch = $mustMatch; + + return $this; + } + + + public function build(): SearchFuzzyValue + { + return new SearchFuzzyValueModel( + $this->field, + $this->boost, + $this->fieldType, + $this->value, + $this->level, + $this->language, + $this->mustMatch + ); + } + + public static function of(): SearchFuzzyValueBuilder + { + return new self(); + } +} diff --git a/lib/commercetools-api/src/Models/Search/SearchFuzzyValueCollection.php b/lib/commercetools-api/src/Models/Search/SearchFuzzyValueCollection.php new file mode 100644 index 00000000000..d95bab7ee85 --- /dev/null +++ b/lib/commercetools-api/src/Models/Search/SearchFuzzyValueCollection.php @@ -0,0 +1,56 @@ + + * @method SearchFuzzyValue current() + * @method SearchFuzzyValue end() + * @method SearchFuzzyValue at($offset) + */ +class SearchFuzzyValueCollection extends SearchQueryExpressionValueCollection +{ + /** + * @psalm-assert SearchFuzzyValue $value + * @psalm-param SearchFuzzyValue|stdClass $value + * @throws InvalidArgumentException + * + * @return SearchFuzzyValueCollection + */ + public function add($value) + { + if (!$value instanceof SearchFuzzyValue) { + throw new InvalidArgumentException(); + } + $this->store($value); + + return $this; + } + + /** + * @psalm-return callable(int):?SearchFuzzyValue + */ + protected function mapper() + { + return function (?int $index): ?SearchFuzzyValue { + $data = $this->get($index); + if ($data instanceof stdClass) { + /** @var SearchFuzzyValue $data */ + $data = SearchFuzzyValueModel::of($data); + $this->set($data, $index); + } + + return $data; + }; + } +} diff --git a/lib/commercetools-api/src/Models/Search/SearchFuzzyValueModel.php b/lib/commercetools-api/src/Models/Search/SearchFuzzyValueModel.php new file mode 100644 index 00000000000..c639fe434cc --- /dev/null +++ b/lib/commercetools-api/src/Models/Search/SearchFuzzyValueModel.php @@ -0,0 +1,283 @@ +field = $field; + $this->boost = $boost; + $this->fieldType = $fieldType; + $this->value = $value; + $this->level = $level; + $this->language = $language; + $this->mustMatch = $mustMatch; + } + + /** + * + * @return null|string + */ + public function getField() + { + if (is_null($this->field)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_FIELD); + if (is_null($data)) { + return null; + } + $this->field = (string) $data; + } + + return $this->field; + } + + /** + * + * @return null|float + */ + public function getBoost() + { + if (is_null($this->boost)) { + /** @psalm-var ?float $data */ + $data = $this->raw(self::FIELD_BOOST); + if (is_null($data)) { + return null; + } + $this->boost = (float) $data; + } + + return $this->boost; + } + + /** + *

Possible values for the fieldType property on simple expressions indicating the data type of the field.

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

The search term to find fuzzy matches for. If multiple terms are provided (separated by whitespace), the fuzziness level is applied to each term individually.

+ * + * + * @return null|mixed + */ + public function getValue() + { + if (is_null($this->value)) { + /** @psalm-var mixed $data */ + $data = $this->raw(self::FIELD_VALUE); + if (is_null($data)) { + return null; + } + $this->value = $data; + } + + return $this->value; + } + + /** + *

The maximum fuzziness level desired for the search term. Allowed values are 0, 1, and 2. The API automatically adjusts the effective fuzziness level based on the length of the search term if it exceeds the maximum allowed for the given string length according to the following rules:

+ *
    + *
  • Terms with 1-2 characters: 0 (exact match)
  • + *
  • Terms with 3-5 characters: 1 (up to one difference is allowed)
  • + *
  • Terms with more than 5 characters: 2 (up to two differences are allowed)
  • + *
+ * + * + * @return null|int + */ + public function getLevel() + { + if (is_null($this->level)) { + /** @psalm-var ?int $data */ + $data = $this->raw(self::FIELD_LEVEL); + if (is_null($data)) { + return null; + } + $this->level = (int) $data; + } + + return $this->level; + } + + /** + *

Language of the localized value. Must be provided when the field is of type localizedTextField. The provided Locale must be one of the Project's languages.

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

Controls whether all of the provided terms must match (all, default) or any of those (any).

+ * + * + * @return null|string + */ + public function getMustMatch() + { + if (is_null($this->mustMatch)) { + /** @psalm-var ?string $data */ + $data = $this->raw(self::FIELD_MUST_MATCH); + if (is_null($data)) { + return null; + } + $this->mustMatch = (string) $data; + } + + return $this->mustMatch; + } + + + /** + * @param ?string $field + */ + public function setField(?string $field): void + { + $this->field = $field; + } + + /** + * @param ?float $boost + */ + public function setBoost(?float $boost): void + { + $this->boost = $boost; + } + + /** + * @param ?string $fieldType + */ + public function setFieldType(?string $fieldType): void + { + $this->fieldType = $fieldType; + } + + /** + * @param mixed $value + */ + public function setValue($value): void + { + $this->value = $value; + } + + /** + * @param ?int $level + */ + public function setLevel(?int $level): void + { + $this->level = $level; + } + + /** + * @param ?string $language + */ + public function setLanguage(?string $language): void + { + $this->language = $language; + } + + /** + * @param ?string $mustMatch + */ + public function setMustMatch(?string $mustMatch): void + { + $this->mustMatch = $mustMatch; + } +} diff --git a/references.txt b/references.txt index 5d3c8e0b682..1840d02dcd9 100644 --- a/references.txt +++ b/references.txt @@ -512,3 +512,4 @@ df77c68a29c7df7e44d197903e5cfd3a2a53c878 bf9886771c750bd43c1fc124dd6689ef4e3b45c5 ea7ba668e4084d845f2f3871c239999f43613b28 7c8466665829aaf9142b056c57fe5b32c4072076 +263e58a9f68bacfe67cd292b203c956d5ae9f264