ordercloud-javascript-sdk
    Preparing search index...

    Class Cart

    Index
    • Auto-apply promotions to the cart Apply up to 100 eligible promotions where AutoApply=true. Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TOrder>>

    • Returns this

      enables impersonation by calling the subsequent method with the stored impersonation token

      Cart.As().List() // lists Cart using the impersonated users' token
      
    • Calculate the cart Check out the docs for more info

      Type Parameters

      • TOrderWorksheet extends OrderWorksheet<
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
        >

      Parameters

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TOrderWorksheet>>

    • Create a cart bundle item Adds bundle line items to the cart Check out the docs for more info

      Type Parameters

      • TLineItem extends LineItem<any, any, any, any, any>

      Parameters

      • bundleID: string

        ID of the bundle.

      • bundleItems: BundleItems
      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TLineItem>>

    • Create a cart line item Adds a line item to the cart Check out the docs for more info

      Type Parameters

      • TLineItem extends LineItem<any, any, any, any, any>

      Parameters

      • lineItem: LineItem

        Required fields: ProductID

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TLineItem>>

    • Create a cart payment transaction Check out the docs for more info

      Type Parameters

      • TPayment extends Payment<any, any>

      Parameters

      • paymentID: string

        ID of the payment.

      • paymentTransaction: PaymentTransaction

        Required fields: Type, DateExecuted

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TPayment>>

    • Delete a cart Empties the cart. Any promotions, payments or other items associated with the cart will also be removed. Check out the docs for more info

      Parameters

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>

    • Delete a cart bundle item Check out the docs for more info

      Parameters

      • bundleID: string

        ID of the bundle.

      • bundleItemID: string

        ID of the bundle item.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>

    • Delete a cart line item Check out the docs for more info

      Parameters

      • lineItemID: string

        ID of the line item.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>

    • Delete a cart payment Check out the docs for more info

      Parameters

      • paymentID: string

        ID of the payment.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>

    • Delete a cart payment transaction Check out the docs for more info

      Parameters

      • paymentID: string

        ID of the payment.

      • transactionID: string

        ID of the transaction.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>

    • Delete a cart promotion Check out the docs for more info

      Parameters

      • promoCode: string

        Promo code of the cart.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>

    • Estimate shipping cost Check out the docs for more info

      Type Parameters

      • TOrderWorksheet extends OrderWorksheet<
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
        >

      Parameters

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TOrderWorksheet>>

    • Retrieve a cart If the ID of the Order returned is null, the cart has not yet been interacted with. Once an item is added, the Order.ID will be populated. Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TOrder>>

    • Retrieve a cart line item Check out the docs for more info

      Type Parameters

      • TLineItem extends LineItem<any, any, any, any, any>

      Parameters

      • lineItemID: string

        ID of the line item.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TLineItem>>

    • Retrieve a cart order worksheet Check out the docs for more info

      Type Parameters

      • TOrderWorksheet extends OrderWorksheet<
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
        >

      Parameters

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TOrderWorksheet>>

    • Retrieve a cart payment Check out the docs for more info

      Type Parameters

      • TPayment extends Payment<any, any>

      Parameters

      • paymentID: string

        ID of the payment.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TPayment>>

    • List eligible promotions for the cart Check out the docs for more info

      Type Parameters

      Parameters

      • listOptions: {
            filters?: Filters;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: (
                | "ID"
                | "Name"
                | "Description"
                | "Code"
                | "FinePrint"
                | "EligibleExpression"
                | "ValueExpression"
            )[];
            sortBy?: (
                | "ID"
                | "Name"
                | "ExpirationDate"
                | "Code"
                | "EligibleExpression"
                | "ValueExpression"
                | "!ID"
                | "!Name"
                | "!ExpirationDate"
                | "StartDate"
                | "CanCombine"
                | "AutoApply"
                | "Active"
                | "Priority"
                | "!Code"
                | "!StartDate"
                | "!EligibleExpression"
                | "!ValueExpression"
                | "!CanCombine"
                | "!AutoApply"
                | "!Active"
                | "!Priority"
            )[];
        } = {}
        • Optionalfilters?: Filters

          An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

        • Optionalpage?: number

          Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

        • OptionalpageSize?: number

          Number of results to return per page.

        • Optionalsearch?: string

          Word or phrase to search for.

        • OptionalsearchOn?: (
              | "ID"
              | "Name"
              | "Description"
              | "Code"
              | "FinePrint"
              | "EligibleExpression"
              | "ValueExpression"
          )[]

          Comma-delimited list of fields to search on.

        • OptionalsortBy?: (
              | "ID"
              | "Name"
              | "ExpirationDate"
              | "Code"
              | "EligibleExpression"
              | "ValueExpression"
              | "!ID"
              | "!Name"
              | "!ExpirationDate"
              | "StartDate"
              | "CanCombine"
              | "AutoApply"
              | "Active"
              | "Priority"
              | "!Code"
              | "!StartDate"
              | "!EligibleExpression"
              | "!ValueExpression"
              | "!CanCombine"
              | "!AutoApply"
              | "!Active"
              | "!Priority"
          )[]

          Comma-delimited list of fields to sort by.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredObjectDeep<ListPage<TEligiblePromotion>>>

    • List cart line items Check out the docs for more info

      Type Parameters

      • TLineItem extends LineItem<any, any, any, any, any>

      Parameters

      • listOptions: {
            filters?: Filters;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: ("ID" | "ProductID")[];
            sortBy?: (
                "ID"
                | "ProductID"
                | "!ID"
                | "DateAdded"
                | "!DateAdded"
                | "!ProductID"
            )[];
        } = {}
        • Optionalfilters?: Filters

          An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

        • Optionalpage?: number

          Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

        • OptionalpageSize?: number

          Number of results to return per page.

        • Optionalsearch?: string

          Word or phrase to search for.

        • OptionalsearchOn?: ("ID" | "ProductID")[]

          Comma-delimited list of fields to search on.

        • OptionalsortBy?: ("ID" | "ProductID" | "!ID" | "DateAdded" | "!DateAdded" | "!ProductID")[]

          Comma-delimited list of fields to sort by.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredObjectDeep<ListPage<TLineItem>>>

    • List cart payments Check out the docs for more info

      Type Parameters

      • TPayment extends Payment<any, any>

      Parameters

      • listOptions: {
            filters?: Filters;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: ("ID" | "Description")[];
            sortBy?: (
                | "ID"
                | "DateCreated"
                | "!ID"
                | "!DateCreated"
                | "Type"
                | "CreditCardID"
                | "SpendingAccountID"
                | "!Type"
                | "!CreditCardID"
                | "!SpendingAccountID"
            )[];
        } = {}
        • Optionalfilters?: Filters

          An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

        • Optionalpage?: number

          Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

        • OptionalpageSize?: number

          Number of results to return per page.

        • Optionalsearch?: string

          Word or phrase to search for.

        • OptionalsearchOn?: ("ID" | "Description")[]

          Comma-delimited list of fields to search on.

        • OptionalsortBy?: (
              | "ID"
              | "DateCreated"
              | "!ID"
              | "!DateCreated"
              | "Type"
              | "CreditCardID"
              | "SpendingAccountID"
              | "!Type"
              | "!CreditCardID"
              | "!SpendingAccountID"
          )[]

          Comma-delimited list of fields to sort by.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredObjectDeep<ListPage<TPayment>>>

    • List cart promotions Check out the docs for more info

      Type Parameters

      Parameters

      • listOptions: {
            filters?: Filters;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: (
                | "ID"
                | "Name"
                | "Description"
                | "Code"
                | "FinePrint"
                | "EligibleExpression"
                | "ValueExpression"
            )[];
            sortBy?: (
                | "ID"
                | "Name"
                | "ExpirationDate"
                | "Code"
                | "EligibleExpression"
                | "ValueExpression"
                | "!ID"
                | "!Name"
                | "!ExpirationDate"
                | "StartDate"
                | "CanCombine"
                | "AutoApply"
                | "Active"
                | "Priority"
                | "!Code"
                | "!StartDate"
                | "!EligibleExpression"
                | "!ValueExpression"
                | "!CanCombine"
                | "!AutoApply"
                | "!Active"
                | "!Priority"
                | "DateApplied"
                | "!DateApplied"
            )[];
        } = {}
        • Optionalfilters?: Filters

          An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

        • Optionalpage?: number

          Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

        • OptionalpageSize?: number

          Number of results to return per page.

        • Optionalsearch?: string

          Word or phrase to search for.

        • OptionalsearchOn?: (
              | "ID"
              | "Name"
              | "Description"
              | "Code"
              | "FinePrint"
              | "EligibleExpression"
              | "ValueExpression"
          )[]

          Comma-delimited list of fields to search on.

        • OptionalsortBy?: (
              | "ID"
              | "Name"
              | "ExpirationDate"
              | "Code"
              | "EligibleExpression"
              | "ValueExpression"
              | "!ID"
              | "!Name"
              | "!ExpirationDate"
              | "StartDate"
              | "CanCombine"
              | "AutoApply"
              | "Active"
              | "Priority"
              | "!Code"
              | "!StartDate"
              | "!EligibleExpression"
              | "!ValueExpression"
              | "!CanCombine"
              | "!AutoApply"
              | "!Active"
              | "!Priority"
              | "DateApplied"
              | "!DateApplied"
          )[]

          Comma-delimited list of fields to sort by.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredObjectDeep<ListPage<TOrderPromotion>>>

    • Partially update a cart billing address Not allowed on carts where BillingAddressID has been set. In that case, use the Addresses resource to update the saved address. Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • address: PartialDeep<Address>
      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TOrder>>

    • Partially update a cart from user Only FirstName, LastName, and Email can be updated.

      Primarily used to facilitate guest checkout scenarios. Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • user: PartialDeep<User>
      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TOrder>>

    • Partially update a cart shipping address Not allowed on carts where ShippingAddressID has been set. In that case, use the Addresses resource to update the saved address. Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • address: PartialDeep<Address>
      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TOrder>>

    • Create or update a cart If an object with the same ID already exists, it will be overwritten.

      The recommended way to initiate a new cart is to add a line item. If there is a specific reason an order needs to exist prior to adding a line item, this method can be used to initiate a new cart. Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • order: Order
      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TOrder>>

    • Create or update a cart line item Check out the docs for more info

      Type Parameters

      • TLineItem extends LineItem<any, any, any, any, any>

      Parameters

      • lineItemID: string

        ID of the line item.

      • lineItem: LineItem

        Required fields: ProductID

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TLineItem>>

    • Select a ship method Check out the docs for more info

      Type Parameters

      • TOrderWorksheet extends OrderWorksheet<
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
            any,
        >

      Parameters

      • orderShipMethodSelection: OrderShipMethodSelection
      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TOrderWorksheet>>

    • Set an active cart Check out the docs for more info

      Parameters

      • orderID: string

        ID of the order.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>

    • Set a billing address Use only when the address is not to be saved/reused.

      To use a saved address (i.e. from the Addresses resource), PATCH the order's BillingAddressID property instead. Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • address: Address

        Required fields: Street1, City, Country

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TOrder>>

    • Set a shipping address Use only when the address is not to be saved/reused. To use a saved address (i.e. from the Addresses resource), PATCH the order's ShippingAddressID property instead. The address used will be populated on the ShippingAddress property of each LineItem. Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • address: Address

        Required fields: Street1, City, Country

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TOrder>>

    • Submit the cart Check out the docs for more info

      Type Parameters

      • TOrder extends Order<any, any, any>

      Parameters

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TOrder>>

    • Validate the cart in it's current state Check out the docs for more info

      Parameters

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>