import { AxiosResponse } from "axios"; import { ApiRequest } from "../client/ApiRequest"; import { IOptions, IRequestOptions, IStandardParameters, IStandardResponse } from "../types"; export interface ICart { /** * The numeric ID of the cart */ cart_id: number; /** * The shop name */ shop_name: string; /** * The message to the seller */ message_to_seller: string; /** * The numeric ID of the destination country */ destination_country_id: number; /** @deprecated * The alphanumeric coupon code applied to the cart Deprecated: The Etsy API no longer supports coupons. */ coupon_code: string; /** * The ISO (alphabetic) code for the currency */ currency_code: string; /** * The total price */ total: string; /** * The subtotal price */ subtotal: string; /** * The shipping cost */ shipping_cost: string; /** * The tax cost */ tax_cost: string; /** * The line-item discount amount (does not include tax or shipping) */ discount_amount: string; /** * The shipping discount amount */ shipping_discount_amount: string; /** * The tax discount amount */ tax_discount_amount: string; /** * The full URL to the cart page on Etsy */ url: string; /** * An array of purchase information for the listings */ listings: any[]; /** * The cart is download only */ is_download_only: boolean; /** * The cart has VAT tax */ has_vat: boolean; /** * The selected shipping option identifier for the cart */ shipping_option: any; } export interface IGetAllUserCartsParameters { user_id: string | number; limit?: number; offset?: number; page?: number; } export interface IAddToCartParameters { user_id: string | number; listing_id: number; quantity?: number; selected_variations?: [any, any]; personalization?: any; } export interface IUpdateCartListingQuantityParameters { user_id: string | number; listing_id: number; quantity: number; listing_customization_id?: number; } export interface IRemoveCartListingParameters { user_id: string | number; listing_id: number; listing_customization_id?: number; } export interface IGetUserCartParameters { user_id: string | number; cart_id: string | number; } export interface IUpdateCartParameters { user_id: string | number; cart_id: string | number; destination_country_id?: number; message_to_seller?: string; coupon_code?: string; shipping_option_id?: string; destination_zip?: string; } export interface IDeleteCartParameters { user_id: string | number; cart_id: string | number; } export interface IAddAndSelectShippingForApplePayParameters { user_id: string | number; cart_id: string | number; second_line?: string; city: string; state?: string; zip: string; country_id: number; } export interface ISaveListingForLaterParameters { user_id: string | number; cart_id: number; listing_id: number; listing_inventory_id?: number; listing_customization_id?: number; } export interface IGetUserCartForShopParameters { user_id: string | number; shop_id: string | number; } export interface ICreateSingleListingCartParameters { user_id: string | number; listing_id: number; quantity?: number; selected_variations?: [any, any]; personalization?: any; } export declare class Cart extends ApiRequest { constructor(options: IOptions); /** * Get a user's Carts */ getAllUserCarts(params: IGetAllUserCartsParameters & IStandardParameters, extra?: IRequestOptions): Promise>>; /** * Add a listing to a cart */ addToCart(params: IAddToCartParameters & IStandardParameters, extra?: IRequestOptions): Promise>>; /** * Update a cart listing purchase quantity */ updateCartListingQuantity(params: IUpdateCartListingQuantityParameters & IStandardParameters, extra?: IRequestOptions): Promise>>; /** * Remove a listing from a cart */ removeCartListing(params: IRemoveCartListingParameters & IStandardParameters, extra?: IRequestOptions): Promise>>; /** * Get a cart */ getUserCart(params: IGetUserCartParameters & IStandardParameters, extra?: IRequestOptions): Promise>>; /** * Update a cart */ updateCart(params: IUpdateCartParameters & IStandardParameters, extra?: IRequestOptions): Promise>>; /** * Delete a cart */ deleteCart(params: IDeleteCartParameters & IStandardParameters, extra?: IRequestOptions): Promise>>; /** * Saves and selects a shipping address for apple pay */ addAndSelectShippingForApplePay(params: IAddAndSelectShippingForApplePayParameters & IStandardParameters, extra?: IRequestOptions): Promise>>; /** * Move a listing to Saved for Later */ saveListingForLater(params: ISaveListingForLaterParameters & IStandardParameters, extra?: IRequestOptions): Promise>>; /** * Get a cart from a shop ID */ getUserCartForShop(params: IGetUserCartForShopParameters & IStandardParameters, extra?: IRequestOptions): Promise>>; /** * Create a single-listing cart from a listing */ createSingleListingCart(params: ICreateSingleListingCartParameters & IStandardParameters, extra?: IRequestOptions): Promise>>; }