import { Method } from 'axios'; import { Executable } from './executable'; /** * The order line object */ export interface OrderLine { /** * quantity of the order line */ quantity: number; /** * bambu meta product identifier. */ productId: number; /** * price used just for information */ price: number; /** * any additional metadata attributes required by the order. */ metadata?: { /** * IPFS hash key of image */ image?: string; /** * And additional attributes, passthrough. */ [key: string]: any; }; } export interface PersonIdentifier { firstName?: string; lastName?: string; email?: string; phone?: string; accountId?: string; } /** * The CreateOrderInput used by the constructor of CreateOrder */ export interface CreateOrderInput { /** * external identifier, not use for anything internally */ externalId?: string; /** * currency the order was placed in. */ currency: string; /** * order lines to be fulfilled */ orderLines: OrderLine[]; /** * first name on the order. */ person: PersonIdentifier; } /** * The CreateOrder response expected from the execution of the object within BambuClient execute. */ export interface CreateOrderResponse { /** * the message response from the request */ message: string; /** * any error messages that were returned by the request. */ error?: any; } /** * The create order api is an asyncronous request to BambuMeta to issue the provided user an order. This request * will not guarentee an order is created. */ export declare class CreateOrder extends Executable { externalId?: string; currency: string; orderLines?: OrderLine[]; person?: PersonIdentifier; /** * getMethod is used by the BambuClient to properly construct the request call. * @returns request method */ getMethod(): Method; /** * getResponse is used by the BambuClient to propery return the response object type. * @param apiResponse the api response object returned by the BambuMeta client before being converted to the CreateOrderResponse * @returns CreateOrderResponse */ getResponse(apiResponse: any): CreateOrderResponse; /** * getURLPath is used by the BambuClient to properly construct the request call. * @param tenantId the tenant id defined in the BambuClient * @returns request url */ getURLPath(tenantId?: string): string; constructor(input?: CreateOrderInput); /** * getBody is used by the BambuClient to properly construct the request object body. * @returns Returns the expected body of the request utilizing the defined request attributes. */ getBody(): any; /** * getRootPath is used by the BambuClient to properly construct the request call. * @returns The root path of the request */ getRootPath(): string | undefined; }