import { Event, EventType } from "../../../event/core/event"; /** * Product in a order event. * * @export * @interface OrderProduct */ export interface OrderProduct { product: string; price: number; quantity: number; } /** * Page Confirmation Event. * * Should be used whenever the user completes an order. * Order ID is mandatory. * * @export * @class PageConfirmationEvent * @extends {Event} */ export declare class PageConfirmationEvent extends Event { order: string; locale?: string; channel?: string; products: OrderProduct[]; type: EventType; /** * Creates an instance of PageConfirmationEvent. * * @param {string} order * @param {string} locale * @param {string} channel * @param {string} session * @param {string} anonymous * @memberof PageConfirmationEvent */ constructor(order: string, locale?: string, channel?: string, session?: string, anonymous?: string); /** * Add a product to this order event. * * @param {string} product Product's ID. * @param {number} price Product's current price. * @param {number} [quantity=1] Quantity bought. * @return {PageConfirmationEvent} * @memberof PageConfirmationEvent */ withProduct(product: string, price: number, quantity?: number): PageConfirmationEvent; /** * Add a series of products to this order event. * * @param {OrderProduct[]} products All the products to be added. * @return {PageConfirmationEvent} * @memberof PageConfirmationEvent */ withProducts(products: OrderProduct[]): PageConfirmationEvent; }