projects/core/src/model/cart.model.ts
Properties |
|
appliedOrderPromotions |
appliedOrderPromotions:
|
Type : PromotionResult[]
|
Optional |
appliedProductPromotions |
appliedProductPromotions:
|
Type : PromotionResult[]
|
Optional |
appliedVouchers |
appliedVouchers:
|
Type : Voucher[]
|
Optional |
calculated |
calculated:
|
Type : boolean
|
Optional |
code |
code:
|
Type : string
|
Optional |
costCenter |
costCenter:
|
Type : CostCenter
|
Optional |
deliveryAddress |
deliveryAddress:
|
Type : Address
|
Optional |
deliveryCost |
deliveryCost:
|
Type : Price
|
Optional |
deliveryItemsQuantity |
deliveryItemsQuantity:
|
Type : number
|
Optional |
deliveryMode |
deliveryMode:
|
Type : DeliveryMode
|
Optional |
deliveryOrderGroups |
deliveryOrderGroups:
|
Type : DeliveryOrderEntryGroup[]
|
Optional |
description |
description:
|
Type : string
|
Optional |
entries |
entries:
|
Type : OrderEntry[]
|
Optional |
expirationTime |
expirationTime:
|
Type : Date
|
Optional |
guid |
guid:
|
Type : string
|
Optional |
name |
name:
|
Type : string
|
Optional |
net |
net:
|
Type : boolean
|
Optional |
orderDiscounts |
orderDiscounts:
|
Type : Price
|
Optional |
paymentInfo |
paymentInfo:
|
Type : PaymentDetails
|
Optional |
paymentType |
paymentType:
|
Type : PaymentType
|
Optional |
pickupItemsQuantity |
pickupItemsQuantity:
|
Type : number
|
Optional |
pickupOrderGroups |
pickupOrderGroups:
|
Type : PickupOrderEntryGroup[]
|
Optional |
potentialOrderPromotions |
potentialOrderPromotions:
|
Type : PromotionResult[]
|
Optional |
potentialProductPromotions |
potentialProductPromotions:
|
Type : PromotionResult[]
|
Optional |
productDiscounts |
productDiscounts:
|
Type : Price
|
Optional |
purchaseOrderNumber |
purchaseOrderNumber:
|
Type : string
|
Optional |
savedBy |
savedBy:
|
Type : Principal
|
Optional |
saveTime |
saveTime:
|
Type : Date
|
Optional |
site |
site:
|
Type : string
|
Optional |
store |
store:
|
Type : string
|
Optional |
subTotal |
subTotal:
|
Type : Price
|
Optional |
totalDiscounts |
totalDiscounts:
|
Type : Price
|
Optional |
totalItems |
totalItems:
|
Type : number
|
Optional |
totalPrice |
totalPrice:
|
Type : Price
|
Optional |
totalPriceWithTax |
totalPriceWithTax:
|
Type : Price
|
Optional |
totalTax |
totalTax:
|
Type : Price
|
Optional |
totalUnitCount |
totalUnitCount:
|
Type : number
|
Optional |
user |
user:
|
Type : Principal
|
Optional |
import { Address } from './address.model';
import { Currency } from './misc.model';
import {
DeliveryMode,
OrderEntry,
PickupOrderEntryGroup,
PromotionOrderEntryConsumed,
} from './order.model';
import { CostCenter } from './org-unit.model';
import { Price, Promotion } from './product.model';
export interface PromotionResult {
consumedEntries?: PromotionOrderEntryConsumed[];
description?: string;
promotion?: Promotion;
}
export enum PromotionLocation {
ActiveCart = 'CART',
Checkout = 'CHECKOUT',
Order = 'ORDER',
SaveForLater = 'SAVE_FOR_LATER',
SavedCart = 'SAVED_CART',
}
export enum B2BPaymentTypeEnum {
ACCOUNT_PAYMENT = 'ACCOUNT',
CARD_PAYMENT = 'CARD',
}
export interface Voucher {
appliedValue?: Price;
code?: string;
currency?: Currency;
description?: string;
freeShipping?: boolean;
name?: string;
value?: number;
valueFormatted?: string;
valueString?: string;
voucherCode?: string;
}
export interface DeliveryOrderEntryGroup {
deliveryAddress?: Address;
entries?: OrderEntry[];
quantity?: number;
totalPriceWithTax?: Price;
}
export interface Principal {
name?: string;
uid?: string;
}
export interface CardType {
code?: string;
name?: string;
}
export interface PaymentType {
code?: string;
displayName?: string;
}
export interface PaymentDetails {
accountHolderName?: string;
billingAddress?: Address;
cardNumber?: string;
cardType?: CardType;
cvn?: string;
defaultPayment?: boolean;
expiryMonth?: string;
expiryYear?: string;
id?: string;
issueNumber?: string;
saved?: boolean;
startMonth?: string;
startYear?: string;
subscriptionId?: string;
}
export interface SaveCartResult {
savedCartData?: Cart;
}
export interface Cart {
appliedOrderPromotions?: PromotionResult[];
appliedProductPromotions?: PromotionResult[];
appliedVouchers?: Voucher[];
calculated?: boolean;
code?: string;
costCenter?: CostCenter;
deliveryAddress?: Address;
deliveryCost?: Price;
deliveryItemsQuantity?: number;
deliveryMode?: DeliveryMode;
deliveryOrderGroups?: DeliveryOrderEntryGroup[];
description?: string;
entries?: OrderEntry[];
expirationTime?: Date;
guid?: string;
name?: string;
net?: boolean;
orderDiscounts?: Price;
paymentInfo?: PaymentDetails;
paymentType?: PaymentType;
pickupItemsQuantity?: number;
pickupOrderGroups?: PickupOrderEntryGroup[];
potentialOrderPromotions?: PromotionResult[];
potentialProductPromotions?: PromotionResult[];
productDiscounts?: Price;
purchaseOrderNumber?: string;
saveTime?: Date;
savedBy?: Principal;
site?: string;
store?: string;
subTotal?: Price;
totalDiscounts?: Price;
totalItems?: number;
totalPrice?: Price;
totalPriceWithTax?: Price;
totalTax?: Price;
totalUnitCount?: number;
user?: Principal;
}
export interface CartModification {
deliveryModeChanged?: boolean;
entry?: OrderEntry;
quantity?: number;
quantityAdded?: number;
statusCode?: string;
statusMessage?: string;
}
export interface CartModificationList {
cartModifications?: CartModification[];
}
export enum CartValidationStatusCode {
NO_STOCK = 'noStock',
LOW_STOCK = 'lowStock',
REVIEW_CONFIGURATION = 'reviewConfiguration',
PRICING_ERROR = 'pricingError',
UNRESOLVABLE_ISSUES = 'unresolvableIssues',
}