Skip to content

Commit

Permalink
Regenerated types.
Browse files Browse the repository at this point in the history
  • Loading branch information
KSGRelewise committed Aug 12, 2024
1 parent 7d967e5 commit 192fb42
Show file tree
Hide file tree
Showing 19 changed files with 108 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
11 changes: 11 additions & 0 deletions src/src/main/java/com/relewise/client/model/CategoryNameAndId.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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;
Expand Down
9 changes: 9 additions & 0 deletions src/src/main/java/com/relewise/client/model/CategoryPath.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<CategoryNameAndId> 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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/src/main/java/com/relewise/client/model/Order.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -92,6 +93,7 @@ public String getCartName()
{
return this.subChannel;
}
/** @deprecated Use OrderNumber instead. */
public @Nullable String getTrackingNumber()
{
return this.trackingNumber;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ValueCondition> conditions;
Expand Down Expand Up @@ -71,6 +72,7 @@ public Boolean getConsiderAsMatchIfKeyIsNotFound()
{
return this.considerAsMatchIfKeyIsNotFound;
}
/** @deprecated Use MultiplierSelector instead */
public Double getMultiplyWeightBy()
{
return this.multiplyWeightBy;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -53,6 +54,7 @@ public ProductSearchSettings()
{
return this.explodedVariants;
}
/** @deprecated Not currently in use */
public RecommendationSettings getRecommendations()
{
return this.recommendations;
Expand Down Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 192fb42

Please sign in to comment.