@wix/auto_sdk_ecom_checkout 1.0.190 → 1.0.191

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1918,6 +1918,17 @@ declare enum DiscountType {
1918
1918
  type DiscountTypeWithLiterals = DiscountType | 'GLOBAL' | 'SPECIFIC_ITEMS' | 'SHIPPING';
1919
1919
  /** Coupon */
1920
1920
  interface Coupon extends CouponDiscountValueOneOf {
1921
+ /**
1922
+ * Percentage the coupon took off the price it applied to. For example, `10.5` for 10.5%.
1923
+ *
1924
+ * The price it applied to depends on the applied discount's `discountType`. For `SPECIFIC_ITEMS`, it's the
1925
+ * line items' price after the discounts applied before this one. For `GLOBAL`, it's the subtotal after the
1926
+ * line item discounts. An order discount applied before the coupon, such as an automatic discount on the
1927
+ * whole order, isn't taken off first.
1928
+ * @format DECIMAL_VALUE
1929
+ * @decimalValue options { gt:0, lte:100, maxScale:2 }
1930
+ */
1931
+ percentage?: string;
1921
1932
  /** Coupon ID. */
1922
1933
  id?: string;
1923
1934
  /** Coupon code. */
@@ -1926,15 +1937,46 @@ interface Coupon extends CouponDiscountValueOneOf {
1926
1937
  amount?: MultiCurrencyPrice;
1927
1938
  /** Coupon name. */
1928
1939
  name?: string;
1940
+ /**
1941
+ * How the coupon's discount is expressed. `percentage` holds the rate of a percentage coupon, and `amount` holds
1942
+ * the total amount the coupon took off, whatever the type.
1943
+ *
1944
+ * Not returned for a free-shipping coupon.
1945
+ */
1946
+ discountValueType?: DiscountValueTypeWithLiterals;
1929
1947
  }
1930
1948
  /** @oneof */
1931
1949
  interface CouponDiscountValueOneOf {
1950
+ /**
1951
+ * Percentage the coupon took off the price it applied to. For example, `10.5` for 10.5%.
1952
+ *
1953
+ * The price it applied to depends on the applied discount's `discountType`. For `SPECIFIC_ITEMS`, it's the
1954
+ * line items' price after the discounts applied before this one. For `GLOBAL`, it's the subtotal after the
1955
+ * line item discounts. An order discount applied before the coupon, such as an automatic discount on the
1956
+ * whole order, isn't taken off first.
1957
+ * @format DECIMAL_VALUE
1958
+ * @decimalValue options { gt:0, lte:100, maxScale:2 }
1959
+ */
1960
+ percentage?: string;
1932
1961
  }
1933
1962
  /** How a coupon's or discount rule's discount value is expressed. */
1934
1963
  declare enum DiscountValueType {
1964
+ /**
1965
+ * The discount takes a percentage off the price it applies to.
1966
+ * @documentationMaturity preview
1967
+ */
1968
+ PERCENTAGE = "PERCENTAGE",
1969
+ /**
1970
+ * The discount takes a fixed amount off the price it applies to.
1971
+ *
1972
+ * Also returned for a discount that sets a fixed price, for a buy X for an amount discount, and for a buy X
1973
+ * get Y coupon. For each of these, the coupon's or discount rule's `amount` holds what the discount took off.
1974
+ * @documentationMaturity preview
1975
+ */
1976
+ FIXED_AMOUNT = "FIXED_AMOUNT"
1935
1977
  }
1936
1978
  /** @enumType */
1937
- type DiscountValueTypeWithLiterals = DiscountValueType;
1979
+ type DiscountValueTypeWithLiterals = DiscountValueType | 'PERCENTAGE' | 'FIXED_AMOUNT';
1938
1980
  interface MerchantDiscount {
1939
1981
  /** Discount value. */
1940
1982
  amount?: MultiCurrencyPrice;
@@ -1946,6 +1988,16 @@ interface MerchantDiscount {
1946
1988
  percentage?: number | null;
1947
1989
  }
1948
1990
  interface DiscountRule extends DiscountRuleDiscountValueOneOf {
1991
+ /**
1992
+ * Percentage the discount rule took off the price it applied to. For example, `10.5` for 10.5%.
1993
+ *
1994
+ * The price it applied to depends on the applied discount's `discountType`: the line items' price for
1995
+ * `SPECIFIC_ITEMS`, the subtotal for `GLOBAL`. In each case it's the price after the discounts applied
1996
+ * before this one.
1997
+ * @format DECIMAL_VALUE
1998
+ * @decimalValue options { gt:0, lte:100, maxScale:2 }
1999
+ */
2000
+ percentage?: string;
1949
2001
  /**
1950
2002
  * Discount rule ID
1951
2003
  * @format GUID
@@ -1955,9 +2007,26 @@ interface DiscountRule extends DiscountRuleDiscountValueOneOf {
1955
2007
  name?: DiscountRuleName;
1956
2008
  /** Total amount the discount rule took off. */
1957
2009
  amount?: MultiCurrencyPrice;
2010
+ /**
2011
+ * How the discount rule's discount is expressed. `percentage` holds the rate of a percentage discount rule, and
2012
+ * `amount` holds the total amount the discount rule took off, whatever the type.
2013
+ *
2014
+ * Not returned for a free-shipping discount rule.
2015
+ */
2016
+ discountValueType?: DiscountValueTypeWithLiterals;
1958
2017
  }
1959
2018
  /** @oneof */
1960
2019
  interface DiscountRuleDiscountValueOneOf {
2020
+ /**
2021
+ * Percentage the discount rule took off the price it applied to. For example, `10.5` for 10.5%.
2022
+ *
2023
+ * The price it applied to depends on the applied discount's `discountType`: the line items' price for
2024
+ * `SPECIFIC_ITEMS`, the subtotal for `GLOBAL`. In each case it's the price after the discounts applied
2025
+ * before this one.
2026
+ * @format DECIMAL_VALUE
2027
+ * @decimalValue options { gt:0, lte:100, maxScale:2 }
2028
+ */
2029
+ percentage?: string;
1961
2030
  }
1962
2031
  interface DiscountRuleName {
1963
2032
  /**
@@ -1981,6 +2050,14 @@ interface LineItemDiscount {
1981
2050
  id?: string;
1982
2051
  /** Discount value. */
1983
2052
  totalDiscountAmount?: MultiCurrencyPrice;
2053
+ /**
2054
+ * Number of the line item's units the discount was applied to.
2055
+ *
2056
+ * Returned only for a `SPECIFIC_ITEMS` discount.
2057
+ * @min 1
2058
+ * @max 100000
2059
+ */
2060
+ discountedQuantity?: number | null;
1984
2061
  }
1985
2062
  interface ItemCombination {
1986
2063
  /**