From 192fb428373121df758f3764a3a71cdc53ee869a Mon Sep 17 00:00:00 2001 From: KSGRelewise <119578211+KSGRelewise@users.noreply.github.com> Date: Mon, 12 Aug 2024 15:09:00 +0200 Subject: [PATCH] Regenerated types. --- .../model/BrandIdRelevanceModifier.java | 2 + .../client/model/CategoryNameAndId.java | 11 +++++ .../relewise/client/model/CategoryPath.java | 9 ++++ .../LanguageIndexConfigurationEntry.java | 3 ++ .../java/com/relewise/client/model/Order.java | 3 ++ .../ProductCategoryIdRelevanceModifier.java | 2 + .../model/ProductDataIntegerValueFacet.java | 1 + .../model/ProductDataRelevanceModifier.java | 3 ++ .../ProductListPriceRelevanceModifier.java | 2 + ...entlyPurchasedByUserRelevanceModifier.java | 2 + ...RecentlyViewedByUserRelevanceModifier.java | 2 + .../ProductSalesPriceRelevanceModifier.java | 2 + .../client/model/ProductSearchSettings.java | 3 ++ .../java/com/relewise/client/model/User.java | 44 +++++++++++++++++++ .../client/model/UserResultDetails.java | 4 ++ .../model/VariantDataRelevanceModifier.java | 3 ++ .../VariantListPriceRelevanceModifier.java | 2 + .../VariantSalesPriceRelevanceModifier.java | 2 + ...ecificationsInCommonRelevanceModifier.java | 8 ++++ 19 files changed, 108 insertions(+) diff --git a/src/src/main/java/com/relewise/client/model/BrandIdRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/BrandIdRelevanceModifier.java index 01ea9376..6a3fa9c4 100644 --- a/src/src/main/java/com/relewise/client/model/BrandIdRelevanceModifier.java +++ b/src/src/main/java/com/relewise/client/model/BrandIdRelevanceModifier.java @@ -41,10 +41,12 @@ public BrandIdRelevanceModifier(String brandId) this.ifProductIsBrandMultiplyWeightBy = 1d; this.ifProductIsNotBrandMultiplyWeightBy = 1d; } + /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */ public static BrandIdRelevanceModifier create(String brandId, Double ifProductIsBrandMultiplyWeightBy, Double ifProductIsNotBrandMultiplyWeightBy) { return new BrandIdRelevanceModifier(brandId, ifProductIsBrandMultiplyWeightBy, ifProductIsNotBrandMultiplyWeightBy); } + /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */ public BrandIdRelevanceModifier(String brandId, Double ifProductIsBrandMultiplyWeightBy, Double ifProductIsNotBrandMultiplyWeightBy) { this.brandId = brandId; diff --git a/src/src/main/java/com/relewise/client/model/CategoryNameAndId.java b/src/src/main/java/com/relewise/client/model/CategoryNameAndId.java index be7fcbdd..a63bb471 100644 --- a/src/src/main/java/com/relewise/client/model/CategoryNameAndId.java +++ b/src/src/main/java/com/relewise/client/model/CategoryNameAndId.java @@ -19,6 +19,7 @@ import java.util.Set; import java.util.HashSet; +/** A category segment, containing the id and display name(s) of an individual category */ @JsonIgnoreProperties(ignoreUnknown = true) public class CategoryNameAndId { @@ -33,10 +34,20 @@ public CategoryNameAndId(String id) this.id = id; this.displayName = null; } + /** + * The id and name of a category segment + * @param id The ID of the category (Which is generally very unlikely to change in the future) + * @param displayName The Display name of the category (More likely to change in the future) + */ public static CategoryNameAndId create(String id, Multilingual displayName) { return new CategoryNameAndId(id, displayName); } + /** + * The id and name of a category segment + * @param id The ID of the category (Which is generally very unlikely to change in the future) + * @param displayName The Display name of the category (More likely to change in the future) + */ public CategoryNameAndId(String id, Multilingual displayName) { this.id = id; diff --git a/src/src/main/java/com/relewise/client/model/CategoryPath.java b/src/src/main/java/com/relewise/client/model/CategoryPath.java index 7edab4fb..5286117a 100644 --- a/src/src/main/java/com/relewise/client/model/CategoryPath.java +++ b/src/src/main/java/com/relewise/client/model/CategoryPath.java @@ -19,14 +19,23 @@ import java.util.Set; import java.util.HashSet; +/** Used to specify the full path of a product/lineitem, starting at the root > subcategory > subcategory2 etc. */ @JsonIgnoreProperties(ignoreUnknown = true) public class CategoryPath { public ArrayList breadcrumbPathStartingFromRoot; + /** + * The full path of the products, starting at the root > subcategory > subcategory2 etc. If you dont have a category id available, provide the Category name for both ID and Name, and the same if you have an ID, but not a Name. Example: new CategoryPath(new CategoryNameAndId("515", "Soups"), new CategoryNameAndId("518", "Vegetable soups")) + * @param breadcrumbPathStartingFromRoot Example: new CategoryPath(new CategoryNameAndId("515", "Soups"), new CategoryNameAndId("518", "Vegetable soups")) + */ public static CategoryPath create(CategoryNameAndId... breadcrumbPathStartingFromRoot) { return new CategoryPath(breadcrumbPathStartingFromRoot); } + /** + * The full path of the products, starting at the root > subcategory > subcategory2 etc. If you dont have a category id available, provide the Category name for both ID and Name, and the same if you have an ID, but not a Name. Example: new CategoryPath(new CategoryNameAndId("515", "Soups"), new CategoryNameAndId("518", "Vegetable soups")) + * @param breadcrumbPathStartingFromRoot Example: new CategoryPath(new CategoryNameAndId("515", "Soups"), new CategoryNameAndId("518", "Vegetable soups")) + */ public CategoryPath(CategoryNameAndId... breadcrumbPathStartingFromRoot) { this.breadcrumbPathStartingFromRoot = new ArrayList<>(Arrays.asList(breadcrumbPathStartingFromRoot)); diff --git a/src/src/main/java/com/relewise/client/model/LanguageIndexConfigurationEntry.java b/src/src/main/java/com/relewise/client/model/LanguageIndexConfigurationEntry.java index 702c25c8..79721628 100644 --- a/src/src/main/java/com/relewise/client/model/LanguageIndexConfigurationEntry.java +++ b/src/src/main/java/com/relewise/client/model/LanguageIndexConfigurationEntry.java @@ -24,6 +24,7 @@ public class LanguageIndexConfigurationEntry { public Language language; public Boolean included; + /** The ISO639-1 code for the selected language, this is used for spelling correction, stemming, phonetic analysis etc. This is optional if the specified "Language" already follows the official codes, e.g. "en" for English, "da" for Danish etc (case-insensitive). https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes */ public @Nullable String iSO639_1; public static LanguageIndexConfigurationEntry create(Language language, Boolean included) { @@ -56,6 +57,7 @@ public Boolean getIncluded() { return this.included; } + /** The ISO639-1 code for the selected language, this is used for spelling correction, stemming, phonetic analysis etc. This is optional if the specified "Language" already follows the official codes, e.g. "en" for English, "da" for Danish etc (case-insensitive). https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes */ public @Nullable String getISO639_1() { return this.iSO639_1; @@ -70,6 +72,7 @@ public LanguageIndexConfigurationEntry setIncluded(Boolean included) this.included = included; return this; } + /** The ISO639-1 code for the selected language, this is used for spelling correction, stemming, phonetic analysis etc. This is optional if the specified "Language" already follows the official codes, e.g. "en" for English, "da" for Danish etc (case-insensitive). https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes */ public LanguageIndexConfigurationEntry setISO639_1(String iSO639_1) { this.iSO639_1 = iSO639_1; diff --git a/src/src/main/java/com/relewise/client/model/Order.java b/src/src/main/java/com/relewise/client/model/Order.java index 88d8e9bc..6ccfea91 100644 --- a/src/src/main/java/com/relewise/client/model/Order.java +++ b/src/src/main/java/com/relewise/client/model/Order.java @@ -35,6 +35,7 @@ public class Order extends Trackable implements IUserIdentifier public String cartName; public @Nullable String channel; public @Nullable String subChannel; + /** @deprecated Use OrderNumber instead. */ public @Nullable String trackingNumber; public static Order create(User user, Money subtotal, String orderNumber, LineItem... lineItems) { @@ -92,6 +93,7 @@ public String getCartName() { return this.subChannel; } + /** @deprecated Use OrderNumber instead. */ public @Nullable String getTrackingNumber() { return this.trackingNumber; @@ -140,6 +142,7 @@ public Order setSubChannel(String subChannel) this.subChannel = subChannel; return this; } + /** @deprecated Use OrderNumber instead. */ public Order setTrackingNumber(String trackingNumber) { this.trackingNumber = trackingNumber; diff --git a/src/src/main/java/com/relewise/client/model/ProductCategoryIdRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductCategoryIdRelevanceModifier.java index fec8e191..25787ac5 100644 --- a/src/src/main/java/com/relewise/client/model/ProductCategoryIdRelevanceModifier.java +++ b/src/src/main/java/com/relewise/client/model/ProductCategoryIdRelevanceModifier.java @@ -43,10 +43,12 @@ public ProductCategoryIdRelevanceModifier(String categoryId, CategoryScope evalu this.multiplyWeightBy = 1d; this.negated = false; } + /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */ public static ProductCategoryIdRelevanceModifier create(String categoryId, CategoryScope evaluationScope, Double multiplyWeightBy, Boolean negated) { return new ProductCategoryIdRelevanceModifier(categoryId, evaluationScope, multiplyWeightBy, negated); } + /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */ public ProductCategoryIdRelevanceModifier(String categoryId, CategoryScope evaluationScope, Double multiplyWeightBy, Boolean negated) { this.categoryId = categoryId; diff --git a/src/src/main/java/com/relewise/client/model/ProductDataIntegerValueFacet.java b/src/src/main/java/com/relewise/client/model/ProductDataIntegerValueFacet.java index 0b056dbc..edb7c900 100644 --- a/src/src/main/java/com/relewise/client/model/ProductDataIntegerValueFacet.java +++ b/src/src/main/java/com/relewise/client/model/ProductDataIntegerValueFacet.java @@ -19,6 +19,7 @@ import java.util.Set; import java.util.HashSet; +/** @deprecated Use ProductDataDoubleValueFacet instead */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, diff --git a/src/src/main/java/com/relewise/client/model/ProductDataRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductDataRelevanceModifier.java index c90c4fbf..03db747c 100644 --- a/src/src/main/java/com/relewise/client/model/ProductDataRelevanceModifier.java +++ b/src/src/main/java/com/relewise/client/model/ProductDataRelevanceModifier.java @@ -30,6 +30,7 @@ public class ProductDataRelevanceModifier extends RelevanceModifier implements I public String $type = "Relewise.Client.Requests.RelevanceModifiers.ProductDataRelevanceModifier, Relewise.Client"; public String key; public Boolean considerAsMatchIfKeyIsNotFound; + /** @deprecated Use MultiplierSelector instead */ public Double multiplyWeightBy; public Boolean mustMatchAllConditions; public ArrayList conditions; @@ -71,6 +72,7 @@ public Boolean getConsiderAsMatchIfKeyIsNotFound() { return this.considerAsMatchIfKeyIsNotFound; } + /** @deprecated Use MultiplierSelector instead */ public Double getMultiplyWeightBy() { return this.multiplyWeightBy; @@ -97,6 +99,7 @@ public ProductDataRelevanceModifier setConsiderAsMatchIfKeyIsNotFound(Boolean co this.considerAsMatchIfKeyIsNotFound = considerAsMatchIfKeyIsNotFound; return this; } + /** @deprecated Use MultiplierSelector instead */ public ProductDataRelevanceModifier setMultiplyWeightBy(Double multiplyWeightBy) { this.multiplyWeightBy = multiplyWeightBy; diff --git a/src/src/main/java/com/relewise/client/model/ProductListPriceRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductListPriceRelevanceModifier.java index a3309562..6768d601 100644 --- a/src/src/main/java/com/relewise/client/model/ProductListPriceRelevanceModifier.java +++ b/src/src/main/java/com/relewise/client/model/ProductListPriceRelevanceModifier.java @@ -43,10 +43,12 @@ public ProductListPriceRelevanceModifier(DoubleRange range) this.currency = null; this.negated = false; } + /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */ public static ProductListPriceRelevanceModifier create(DoubleRange range, Double multiplyWeightBy, @Nullable Currency currency, Boolean negated) { return new ProductListPriceRelevanceModifier(range, multiplyWeightBy, currency, negated); } + /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */ public ProductListPriceRelevanceModifier(DoubleRange range, Double multiplyWeightBy, @Nullable Currency currency, Boolean negated) { this.range = range; diff --git a/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserRelevanceModifier.java index b12b1091..7d9e3226 100644 --- a/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserRelevanceModifier.java +++ b/src/src/main/java/com/relewise/client/model/ProductRecentlyPurchasedByUserRelevanceModifier.java @@ -41,10 +41,12 @@ public ProductRecentlyPurchasedByUserRelevanceModifier(OffsetDateTime sinceUtc) this.ifPreviouslyPurchasedByUserMultiplyWeightBy = 1d; this.ifNotPreviouslyPurchasedByUserMultiplyWeightBy = 1d; } + /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */ public static ProductRecentlyPurchasedByUserRelevanceModifier create(OffsetDateTime sinceUtc, Double ifPreviouslyPurchasedByUserMultiplyWeightBy, Double ifNotPreviouslyPurchasedByUserMultiplyWeightBy) { return new ProductRecentlyPurchasedByUserRelevanceModifier(sinceUtc, ifPreviouslyPurchasedByUserMultiplyWeightBy, ifNotPreviouslyPurchasedByUserMultiplyWeightBy); } + /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */ public ProductRecentlyPurchasedByUserRelevanceModifier(OffsetDateTime sinceUtc, Double ifPreviouslyPurchasedByUserMultiplyWeightBy, Double ifNotPreviouslyPurchasedByUserMultiplyWeightBy) { this.sinceUtc = sinceUtc; diff --git a/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserRelevanceModifier.java index b3f1eb0d..54bb4aaa 100644 --- a/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserRelevanceModifier.java +++ b/src/src/main/java/com/relewise/client/model/ProductRecentlyViewedByUserRelevanceModifier.java @@ -41,10 +41,12 @@ public ProductRecentlyViewedByUserRelevanceModifier(OffsetDateTime sinceUtc) this.ifPreviouslyViewedByUserMultiplyWeightBy = 1d; this.ifNotPreviouslyViewedByUserMultiplyWeightBy = 1d; } + /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */ public static ProductRecentlyViewedByUserRelevanceModifier create(OffsetDateTime sinceUtc, Double ifPreviouslyViewedByUserMultiplyWeightBy, Double ifNotPreviouslyViewedByUserMultiplyWeightBy) { return new ProductRecentlyViewedByUserRelevanceModifier(sinceUtc, ifPreviouslyViewedByUserMultiplyWeightBy, ifNotPreviouslyViewedByUserMultiplyWeightBy); } + /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */ public ProductRecentlyViewedByUserRelevanceModifier(OffsetDateTime sinceUtc, Double ifPreviouslyViewedByUserMultiplyWeightBy, Double ifNotPreviouslyViewedByUserMultiplyWeightBy) { this.sinceUtc = sinceUtc; diff --git a/src/src/main/java/com/relewise/client/model/ProductSalesPriceRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/ProductSalesPriceRelevanceModifier.java index 54672ca5..951c871a 100644 --- a/src/src/main/java/com/relewise/client/model/ProductSalesPriceRelevanceModifier.java +++ b/src/src/main/java/com/relewise/client/model/ProductSalesPriceRelevanceModifier.java @@ -43,10 +43,12 @@ public ProductSalesPriceRelevanceModifier(DoubleRange range) this.currency = null; this.negated = false; } + /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */ public static ProductSalesPriceRelevanceModifier create(DoubleRange range, Double multiplyWeightBy, @Nullable Currency currency, Boolean negated) { return new ProductSalesPriceRelevanceModifier(range, multiplyWeightBy, currency, negated); } + /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a product must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a product only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */ public ProductSalesPriceRelevanceModifier(DoubleRange range, Double multiplyWeightBy, @Nullable Currency currency, Boolean negated) { this.range = range; diff --git a/src/src/main/java/com/relewise/client/model/ProductSearchSettings.java b/src/src/main/java/com/relewise/client/model/ProductSearchSettings.java index ff65491a..0285e0c6 100644 --- a/src/src/main/java/com/relewise/client/model/ProductSearchSettings.java +++ b/src/src/main/java/com/relewise/client/model/ProductSearchSettings.java @@ -31,6 +31,7 @@ public class ProductSearchSettings extends SearchSettings public @Nullable SelectedProductPropertiesSettings selectedProductProperties; public @Nullable SelectedVariantPropertiesSettings selectedVariantProperties; public @Nullable Integer explodedVariants; + /** @deprecated Not currently in use */ public RecommendationSettings recommendations; public @Nullable SelectedBrandPropertiesSettings selectedBrandProperties; public @Nullable VariantSearchSettings variantSettings; @@ -53,6 +54,7 @@ public ProductSearchSettings() { return this.explodedVariants; } + /** @deprecated Not currently in use */ public RecommendationSettings getRecommendations() { return this.recommendations; @@ -80,6 +82,7 @@ public ProductSearchSettings setExplodedVariants(@Nullable Integer explodedVaria this.explodedVariants = explodedVariants; return this; } + /** @deprecated Not currently in use */ public ProductSearchSettings setRecommendations(RecommendationSettings recommendations) { this.recommendations = recommendations; diff --git a/src/src/main/java/com/relewise/client/model/User.java b/src/src/main/java/com/relewise/client/model/User.java index 19b66e79..2f724940 100644 --- a/src/src/main/java/com/relewise/client/model/User.java +++ b/src/src/main/java/com/relewise/client/model/User.java @@ -22,17 +22,44 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class User { + /** A persistent Id for current user, e.g. a database-id This Id should never be expected to change in the future */ public @Nullable String authenticatedId; + /** A TemporaryId, likely to change in the future, e.g. a CookieId in a web context */ public @Nullable String temporaryId; + /** The email of the user */ public @Nullable String email; + /** Segmentation data about the user, e.g. Country or other segmentation, useful for passing known information about the user from a CRM, CDP and other sources */ public @Nullable HashMap classifications; + /** A set of additional ids associated with the user, e.g. ERP customer id, Marketing id, CDP id etc. */ public @Nullable HashMap identifiers; + /** Data stored on the user */ public @Nullable HashMap data; + /** A fingerprint, highly likely to change in the future, e.g. between a users sessions */ public @Nullable String fingerprint; + /** + * User DTO + * @param authenticatedId A persistent Id for current user, e.g. a database-id + * @param temporaryId A TemporaryId, likely to change in the future, e.g. a CookieId in a web context + * @param email The email of the user + * @param fingerprint A fingerprint, highly likely to change in the future, e.g. between a users sessions + * @param classifications Segmentation data about the user, e.g. Country or other segmentation, useful for passing known information about the user from a CRM, CDP and other sources + * @param identifiers A set of additional ids associated with the user, e.g. ERP customer id, Marketing id, CDP id etc. + * @param data Data stored on the user + */ public static User create(@Nullable String authenticatedId, @Nullable String temporaryId, @Nullable String email, @Nullable String fingerprint, @Nullable HashMap classifications, @Nullable HashMap identifiers, HashMap data) { return new User(authenticatedId, temporaryId, email, fingerprint, classifications, identifiers, data); } + /** + * User DTO + * @param authenticatedId A persistent Id for current user, e.g. a database-id + * @param temporaryId A TemporaryId, likely to change in the future, e.g. a CookieId in a web context + * @param email The email of the user + * @param fingerprint A fingerprint, highly likely to change in the future, e.g. between a users sessions + * @param classifications Segmentation data about the user, e.g. Country or other segmentation, useful for passing known information about the user from a CRM, CDP and other sources + * @param identifiers A set of additional ids associated with the user, e.g. ERP customer id, Marketing id, CDP id etc. + * @param data Data stored on the user + */ public User(@Nullable String authenticatedId, @Nullable String temporaryId, @Nullable String email, @Nullable String fingerprint, @Nullable HashMap classifications, @Nullable HashMap identifiers, HashMap data) { this.authenticatedId = authenticatedId; @@ -46,49 +73,60 @@ public User(@Nullable String authenticatedId, @Nullable String temporaryId, @Nul public User() { } + /** A persistent Id for current user, e.g. a database-id This Id should never be expected to change in the future */ public @Nullable String getAuthenticatedId() { return this.authenticatedId; } + /** A TemporaryId, likely to change in the future, e.g. a CookieId in a web context */ public @Nullable String getTemporaryId() { return this.temporaryId; } + /** The email of the user */ public @Nullable String getEmail() { return this.email; } + /** Segmentation data about the user, e.g. Country or other segmentation, useful for passing known information about the user from a CRM, CDP and other sources */ public @Nullable HashMap getClassifications() { return this.classifications; } + /** A set of additional ids associated with the user, e.g. ERP customer id, Marketing id, CDP id etc. */ public @Nullable HashMap getIdentifiers() { return this.identifiers; } + /** Data stored on the user */ public @Nullable HashMap getData() { return this.data; } + /** A fingerprint, highly likely to change in the future, e.g. between a users sessions */ public @Nullable String getFingerprint() { return this.fingerprint; } + /** A persistent Id for current user, e.g. a database-id This Id should never be expected to change in the future */ public User setAuthenticatedId(String authenticatedId) { this.authenticatedId = authenticatedId; return this; } + /** A TemporaryId, likely to change in the future, e.g. a CookieId in a web context */ public User setTemporaryId(String temporaryId) { this.temporaryId = temporaryId; return this; } + /** The email of the user */ public User setEmail(String email) { this.email = email; return this; } + /** Segmentation data about the user, e.g. Country or other segmentation, useful for passing known information about the user from a CRM, CDP and other sources */ public User addToClassifications(String key, String value) { if (this.classifications == null) @@ -98,11 +136,13 @@ public User addToClassifications(String key, String value) this.classifications.put(key, value); return this; } + /** Segmentation data about the user, e.g. Country or other segmentation, useful for passing known information about the user from a CRM, CDP and other sources */ public User setClassifications(HashMap classifications) { this.classifications = classifications; return this; } + /** A set of additional ids associated with the user, e.g. ERP customer id, Marketing id, CDP id etc. */ public User addToIdentifiers(String key, String value) { if (this.identifiers == null) @@ -112,11 +152,13 @@ public User addToIdentifiers(String key, String value) this.identifiers.put(key, value); return this; } + /** A set of additional ids associated with the user, e.g. ERP customer id, Marketing id, CDP id etc. */ public User setIdentifiers(HashMap identifiers) { this.identifiers = identifiers; return this; } + /** Data stored on the user */ public User addToData(String key, DataValue value) { if (this.data == null) @@ -126,11 +168,13 @@ public User addToData(String key, DataValue value) this.data.put(key, value); return this; } + /** Data stored on the user */ public User setData(HashMap data) { this.data = data; return this; } + /** A fingerprint, highly likely to change in the future, e.g. between a users sessions */ public User setFingerprint(String fingerprint) { this.fingerprint = fingerprint; diff --git a/src/src/main/java/com/relewise/client/model/UserResultDetails.java b/src/src/main/java/com/relewise/client/model/UserResultDetails.java index 7ba49581..68e1abfe 100644 --- a/src/src/main/java/com/relewise/client/model/UserResultDetails.java +++ b/src/src/main/java/com/relewise/client/model/UserResultDetails.java @@ -35,6 +35,7 @@ public class UserResultDetails public HashMap identifiers; public Integer key; public HashMap data; + /** All known temporary ids for the user */ public String[] temporaryIds; public static UserResultDetails create() { @@ -95,6 +96,7 @@ public HashMap getData() { return this.data; } + /** All known temporary ids for the user */ public String[] getTemporaryIds() { return this.temporaryIds; @@ -200,11 +202,13 @@ public UserResultDetails setData(HashMap data) this.data = data; return this; } + /** All known temporary ids for the user */ public UserResultDetails setTemporaryIds(String... temporaryIds) { this.temporaryIds = temporaryIds; return this; } + /** All known temporary ids for the user */ public UserResultDetails addToTemporaryIds(String temporaryId) { if (this.temporaryIds == null) diff --git a/src/src/main/java/com/relewise/client/model/VariantDataRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/VariantDataRelevanceModifier.java index 225f36a0..dc58638a 100644 --- a/src/src/main/java/com/relewise/client/model/VariantDataRelevanceModifier.java +++ b/src/src/main/java/com/relewise/client/model/VariantDataRelevanceModifier.java @@ -30,6 +30,7 @@ public class VariantDataRelevanceModifier extends RelevanceModifier implements I public String $type = "Relewise.Client.Requests.RelevanceModifiers.VariantDataRelevanceModifier, Relewise.Client"; public String key; public Boolean considerAsMatchIfKeyIsNotFound; + /** @deprecated Use MultiplierSelector instead */ public Double multiplyWeightBy; public Boolean mustMatchAllConditions; public ArrayList conditions; @@ -71,6 +72,7 @@ public Boolean getConsiderAsMatchIfKeyIsNotFound() { return this.considerAsMatchIfKeyIsNotFound; } + /** @deprecated Use MultiplierSelector instead */ public Double getMultiplyWeightBy() { return this.multiplyWeightBy; @@ -97,6 +99,7 @@ public VariantDataRelevanceModifier setConsiderAsMatchIfKeyIsNotFound(Boolean co this.considerAsMatchIfKeyIsNotFound = considerAsMatchIfKeyIsNotFound; return this; } + /** @deprecated Use MultiplierSelector instead */ public VariantDataRelevanceModifier setMultiplyWeightBy(Double multiplyWeightBy) { this.multiplyWeightBy = multiplyWeightBy; diff --git a/src/src/main/java/com/relewise/client/model/VariantListPriceRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/VariantListPriceRelevanceModifier.java index f4723238..0b9f6407 100644 --- a/src/src/main/java/com/relewise/client/model/VariantListPriceRelevanceModifier.java +++ b/src/src/main/java/com/relewise/client/model/VariantListPriceRelevanceModifier.java @@ -43,10 +43,12 @@ public VariantListPriceRelevanceModifier(DoubleRange range) this.currency = null; this.negated = false; } + /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a variant must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a variant only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */ public static VariantListPriceRelevanceModifier create(DoubleRange range, Double multiplyWeightBy, @Nullable Currency currency, Boolean negated) { return new VariantListPriceRelevanceModifier(range, multiplyWeightBy, currency, negated); } + /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a variant must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a variant only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */ public VariantListPriceRelevanceModifier(DoubleRange range, Double multiplyWeightBy, @Nullable Currency currency, Boolean negated) { this.range = range; diff --git a/src/src/main/java/com/relewise/client/model/VariantSalesPriceRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/VariantSalesPriceRelevanceModifier.java index e59a7d0b..56832119 100644 --- a/src/src/main/java/com/relewise/client/model/VariantSalesPriceRelevanceModifier.java +++ b/src/src/main/java/com/relewise/client/model/VariantSalesPriceRelevanceModifier.java @@ -43,10 +43,12 @@ public VariantSalesPriceRelevanceModifier(DoubleRange range) this.currency = null; this.negated = false; } + /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a variant must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a variant only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */ public static VariantSalesPriceRelevanceModifier create(DoubleRange range, Double multiplyWeightBy, @Nullable Currency currency, Boolean negated) { return new VariantSalesPriceRelevanceModifier(range, multiplyWeightBy, currency, negated); } + /** 0.0: Means it will be given zero percentage of its default weight during evaluation, but may still be used as "fill" to meet the "desiredNumberOfRecommendations" 0.5: Means a variant must be twice as good a match as one with a default weight of 1.0 in order to be considered equal in the recommendation results. 1.0: Default weight 2.0: Means a variant only have to be half as good a match, as one with a weight of 1.0 to still score equally high in the recommendation results */ public VariantSalesPriceRelevanceModifier(DoubleRange range, Double multiplyWeightBy, @Nullable Currency currency, Boolean negated) { this.range = range; diff --git a/src/src/main/java/com/relewise/client/model/VariantSpecificationsInCommonRelevanceModifier.java b/src/src/main/java/com/relewise/client/model/VariantSpecificationsInCommonRelevanceModifier.java index a5609eda..36411642 100644 --- a/src/src/main/java/com/relewise/client/model/VariantSpecificationsInCommonRelevanceModifier.java +++ b/src/src/main/java/com/relewise/client/model/VariantSpecificationsInCommonRelevanceModifier.java @@ -29,10 +29,18 @@ public class VariantSpecificationsInCommonRelevanceModifier extends RelevanceMod { public String $type = "Relewise.Client.Requests.RelevanceModifiers.VariantSpecificationsInCommonRelevanceModifier, Relewise.Client"; public KeyMultiplier[] specificationKeysAndMultipliers; + /** + * The default multiplier for keys not included, is 1.0 + * @param specificationKeysAndMultipliers + */ public static VariantSpecificationsInCommonRelevanceModifier create(KeyMultiplier... specificationKeysAndMultipliers) { return new VariantSpecificationsInCommonRelevanceModifier(specificationKeysAndMultipliers); } + /** + * The default multiplier for keys not included, is 1.0 + * @param specificationKeysAndMultipliers + */ public VariantSpecificationsInCommonRelevanceModifier(KeyMultiplier... specificationKeysAndMultipliers) { this.specificationKeysAndMultipliers = specificationKeysAndMultipliers;