Загрузка приложения

ICartPromoNotice

Физическое объявление TypeScript из стартового проекта Nuxt со связанными типами и комментариями к полям.

ICartPromoNotice

Промокод без скидки, удалённый или отклонённый код.

app/interfaces/orionplace/cart/ICartData.ts
TypeScript
export interface ICartPromoNotice {
  // Код причины. При `is_removed: false`: `no_lines`, `not_matched`,
  // `product_discounted`, `below_minimum`, `subscriptions_only`, `too_small`
  // или `nothing_to_ship` (код бесплатной доставки, когда все отправления с
  // подходящими товарами и так доставляются бесплатно). При `is_removed: true`:
  // `expired`, `not_active`, `not_started`, `usage_limit`, `promotion_limit`,
  // `not_yours`, `personal_limit`, `first_order_only` или `wrong_domain`, либо
  // причина из первой группы, если `marketing_promo_promo_apply` отклонил код
  // для этих товаров.
  reason: ECartPromoNoticeReason | string;
  /** The reason in the request language. */
  message: string;
  // Код, к которому относится сообщение.
  promocode: string | null;
  // `false` — код остаётся в `cart.promocode`, но с текущими товарами скидки не
  // даёт. `true` — кода в корзине больше нет: он удалён или отклонён.
  is_removed: boolean;
  /**
   * Minimum order amount per currency; set only for `below_minimum`. The
   * dollar amount decides (catalog dollar prices); the other currencies
   * are its conversion.
   */
  minimum_order_amount: ICurrencyAmounts | null;
  /**
   * The currency ids the notice is about; `null` means every currency.
   * Show the notice only when the selected currency id is in the list, for
   * example a fixed code that takes $10 off in dollars and 0 ₽ in rubles
   * (`too_small`). Absent on older backends.
   */
  currency_ids?: Array<number | string> | null;
  /**
   * For `below_minimum`: how much more the products the code covers must
   * cost, per currency (dollars decide). `null` otherwise; absent on older
   * backends.
   */
  missing_amount?: ICurrencyAmounts | null;
}