From 360d759f151b6a8a8867f5f28c6c3cc82aaacc42 Mon Sep 17 00:00:00 2001 From: sarawasim1 <111089200+sarawasim1@users.noreply.github.com> Date: Tue, 27 Sep 2022 11:51:56 -0700 Subject: [PATCH] feat(cart/order): added discount, without_discount & discounts fields to cart/order (#738) --- src/types/cart.d.ts | 9 +++++++++ src/types/order.d.ts | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/src/types/cart.d.ts b/src/types/cart.d.ts index 160fe3e4f..1946d0d19 100644 --- a/src/types/cart.d.ts +++ b/src/types/cart.d.ts @@ -102,6 +102,15 @@ export interface CartItem extends CartItemBase { unit: FormattedPrice value: FormattedPrice } + discount?: { + unit: FormattedPrice + value: FormattedPrice + } + without_discount?: { + unit: FormattedPrice + value: FormattedPrice + } + discounts?: FormattedPrice } timestamps: { created_at: string diff --git a/src/types/order.d.ts b/src/types/order.d.ts index 2c8f24a7f..956a67b60 100644 --- a/src/types/order.d.ts +++ b/src/types/order.d.ts @@ -68,6 +68,7 @@ export interface Order extends Identifiable, OrderBase { with_tax: FormattedPrice without_tax: FormattedPrice tax: FormattedPrice + discount: FormattedPrice } timestamps: { created_at: string @@ -168,6 +169,11 @@ export interface OrderItem extends Identifiable, OrderItemBase { unit: FormattedPrice value: FormattedPrice } + without_discount?: { + unit: FormattedPrice + value: FormattedPrice + } + discounts?: FormattedPrice } timestamps?: { created_at: string @@ -185,6 +191,7 @@ export interface OrderItem extends Identifiable, OrderItemBase { currency: string includes_tax: string } + id: string code: string } ]