ordercloud-javascript-sdk
    Preparing search index...

    Class Locales

    Index
    • Returns this

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

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

      Parameters

      • localeID: string

        ID of the locale.

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

      Parameters

      • localeID: string

        ID of the locale.

      • listOptions: { buyerID?: string; userGroupID?: string; userID?: string } = {}
        • OptionalbuyerID?: string

          ID of the buyer.

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

    • Retrieve a locale Check out the docs for more info

      Type Parameters

      Parameters

      • localeID: string

        ID of the locale.

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

    • List locales Check out the docs for more info

      Type Parameters

      Parameters

      • listOptions: {
            filters?: Filters;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: ("ID" | "Currency")[];
            sortBy?: ("ID" | "!ID")[];
        } = {}
        • 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" | "Currency")[]

          Comma-delimited list of fields to search on.

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

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

    • List locale assignments Check out the docs for more info

      Type Parameters

      Parameters

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

          ID of the buyer.

        • Optionallevel?: "Group" | "Company"

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

        • OptionallocaleID?: string

          ID of the locale.

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

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

      Type Parameters

      Parameters

      • localeID: string

        ID of the locale.

      • locale: Locale

        Required fields: Currency

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

    • Create or update a locale assignment Do not assign a user multiple groups with different assigned locales. That is considered a misconfiguration, and will yield unexpected results. Check out the docs for more info

      Parameters

      • localeAssignment: LocaleAssignment

        Required fields: LocaleID, 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>