@usethrottle/checkout-react
    Preparing search index...

    Interface UseCartSessionResult

    interface UseCartSessionResult {
        addItem: (input: AddLineItemInput) => Promise<void>;
        applyDiscount: (code: string) => Promise<void>;
        cart: any;
        cartSessionId: string | null;
        checkout: (input: CheckoutHandoffInput) => Promise<CheckoutHandoff>;
        clearShipping: () => Promise<void>;
        error: Error | null;
        loading: boolean;
        refresh: () => Promise<void>;
        removeDiscount: () => Promise<void>;
        removeItem: (itemId: string) => Promise<void>;
        reset: () => void;
        selectShipping: (input: SelectShippingInput) => Promise<void>;
        updateItem: (itemId: string, input: UpdateLineItemInput) => Promise<void>;
    }
    Index
    addItem: (input: AddLineItemInput) => Promise<void>
    applyDiscount: (code: string) => Promise<void>
    cart: any

    Current cart snapshot, or null before the first item / resume.

    cartSessionId: string | null

    Current opaque session id, or null before the first item.

    checkout: (input: CheckoutHandoffInput) => Promise<CheckoutHandoff>

    Hand off to checkout. Returns the hand-off (redirect the buyer to checkoutUrl).

    clearShipping: () => Promise<void>
    error: Error | null

    Last error, or null.

    loading: boolean

    True while a request is in flight.

    refresh: () => Promise<void>

    Re-fetch the current cart.

    removeDiscount: () => Promise<void>
    removeItem: (itemId: string) => Promise<void>
    reset: () => void

    Forget the current session (a new cart is created on the next item).

    selectShipping: (input: SelectShippingInput) => Promise<void>
    updateItem: (itemId: string, input: UpdateLineItemInput) => Promise<void>