ordercloud-javascript-sdk
    Preparing search index...

    Class Bundles

    Index
    • Returns this

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

      Bundles.As().List() // lists Bundles using the impersonated users' token
      
    • Delete a bundle Check out the docs for more info

      Parameters

      • bundleID: string

        ID of the bundle.

      • 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 bundle assignment Check out the docs for more info

      Parameters

      • bundleID: string

        ID of the bundle.

      • buyerID: string

        ID of the buyer.

      • listOptions: { sellerID?: string; userGroupID?: string; userID?: string } = {}
        • OptionalsellerID?: string

          ID of the seller.

        • OptionaluserGroupID?: string

          ID of the user group.

        • OptionaluserID?: string

          ID of the 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<void>

    • Delete a bundle product assignment Check out the docs for more info

      Parameters

      • bundleID: string

        ID of the bundle.

      • productID: string

        ID of the product.

      • 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>

    • Retrieve a bundle Check out the docs for more info

      Type Parameters

      Parameters

      • bundleID: string

        ID of the bundle.

      • 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<TBundle>>

    • List bundles Check out the docs for more info

      Type Parameters

      Parameters

      • listOptions: {
            catalogID?: string;
            categoryID?: string;
            filters?: Filters;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: string[];
            searchType?: SearchType;
            sortBy?: string[];
            supplierID?: string;
        } = {}
        • OptionalcatalogID?: string

          ID of the catalog.

        • OptionalcategoryID?: string

          ID of the category.

        • 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?: string[]

          Comma-delimited list of fields to search on.

        • OptionalsearchType?: SearchType

          Type of search to perform.

        • OptionalsortBy?: string[]

          Comma-delimited list of fields to sort by.

        • OptionalsupplierID?: string

          ID of the supplier.

      • 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<ListPageWithFacets<TBundle, any>>>

    • List bundle assignments Check out the docs for more info

      Type Parameters

      Parameters

      • listOptions: {
            bundleID?: string;
            buyerID?: string;
            level?: "Group" | "Company";
            page?: number;
            pageSize?: number;
            userGroupID?: string;
        } = {}
        • OptionalbundleID?: string

          ID of the bundle.

        • OptionalbuyerID?: string

          ID of the buyer.

        • Optionallevel?: "Group" | "Company"

          Level of the bundle assignment. Possible values: Group, Company, BuyerGroup.

        • 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.

        • OptionaluserGroupID?: string

          ID of the user group.

      • 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<TBundleAssignment>>>

    • List bundle product assignments Check out the docs for more info

      Type Parameters

      Parameters

      • listOptions: { bundleID?: string; page?: number; pageSize?: number; productID?: string } = {}
        • OptionalbundleID?: string

          ID of the bundle.

        • 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.

        • OptionalproductID?: string

          ID of the product.

      • 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<TBundleProductAssignment>>>

    • Create or update a bundle If an object with the same ID already exists, it will be overwritten. Check out the docs for more info

      Type Parameters

      Parameters

      • bundleID: string

        ID of the bundle.

      • bundle: Bundle

        Required fields: Name

      • 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<TBundle>>

    • Create or update a bundle assignment Check out the docs for more info

      Parameters

      • bundleAssignment: BundleAssignment

        Required fields: BundleID, BuyerID

      • 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>

    • Create or update a bundle product assignment Check out the docs for more info

      Parameters

      • bundleProductAssignment: BundleProductAssignment

        Required fields: ProductID, BundleID, Required

      • 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>