import { Image, Meta_Data } from './base'; import { Billing } from './billing'; import { Coupon_Lines } from './coupon'; import { Fee_Lines } from './fee'; import { Order_Refund_Line_Item, Refund } from './refund'; import { Shipping, Shipping_Line } from './shipping'; import { Tax_Line } from './taxes'; export interface Order { id: number; parent_id: number; number: string; order_key: string; created_via: string; version: string; status: string; currency: string; date_created: Date; date_created_gmt: Date; date_modified: Date; date_modified_gmt: Date; discount_total: string; discount_tax: string; shipping_total: string; shipping_tax: string; cart_tax: string; total: string; total_tax: string; prices_include_tax: boolean; customer_id: number; customer_ip_address: string; customer_user_agent: string; customer_note: string; billing: Partial; shipping: Shipping; payment_method: string; payment_method_title: string; transaction_id: string; date_paid: string; date_paid_gmt: string; date_completed: string; date_completed_gmt: string; cart_hash: string; meta_data: Partial[]; line_items: Partial[]; tax_lines: Partial[]; shipping_lines: Partial[]; fee_lines: Partial[]; coupon_lines: Partial[]; refunds: Partial[]; set_paid: boolean; } export type OrderItem = { id: number; name: string; product_id: number; variation_id: number; quantity: number; tax_class: string; subtotal: string; subtotal_tax: string; total: string; total_tax: string; taxes: any[]; meta_data: Meta_Data[]; sku: string; price: number; image: Image; }; export interface OrderNotes { id: number; author: string; date_created: Date; date_created_gmt: Date; note: string; customer_note: boolean; added_by_user: boolean; } export interface OrderRefunds { id: number; date_created: Date; date_created_gmt: Date; amount: string; reason: string; refunded_by: number; refunded_payment: boolean; meta_data: Partial[]; line_items: Partial[]; api_refund: boolean; } export type OrderParams = Partial; export type OrderNotesParams = Partial; export type OrderRefundsParams = Partial; /** * Union type for all possible params for Orders */ export type OrdersMainParams = OrderParams & OrderNotesParams & OrderRefundsParams;