export declare enum OrderStatus { PAID = "paid", UNPAID = "unpaid", WIRE = "wire", FAIL = "fail", CLOSED = "closed" } export declare enum OrderPromotionType { ByCount = "byCount", ByAmount = "byAmount" } export interface OrderProduct { code: number; name: string; priceName: string; priceValue: number; discountRate: number; discountDeadline?: string; /** * @since 1.1.2 */ quantity?: number; cover?: string; [name: string]: any; } export interface OrderCustomer { name: string; email: string; phoneNumber: string; companyName: string; address: string; } export interface Order { code: string; creationDate: string; total: number; status: OrderStatus; products: OrderProduct[]; customer?: OrderCustomer; promotions?: OrderPromotion[]; /** * @since 1.1.2 */ props?: { [name: string]: string; }; [name: string]: any; } export interface NewOrderRequest { products: { code: number; priceID: number; }[]; } export interface NewPaymentResponse { orderCode: string; paymentMethod: string; payload: string; total: number; } export interface ProcessPayPalResponse { orderCode: string; paymentID: string; state: string; failureReason: string; } export interface CartPrice { total: number; promotions: OrderPromotion[]; } export interface OrderPromotion { manufacturerName: string; type: OrderPromotionType; startDate?: string; endDate?: string; description?: string; /** * @since 1.1.2 */ arguments?: { [name: string]: any; }; } export interface OrderPromotionByCount extends OrderPromotion { count: number; discountRate: number; } export interface OrderPromotionByAmount extends OrderPromotion { amount: number; discountAmount: number; }