Represents a collection of methods to manage customers.

interface Customers {
    Budgets: Budgets;
    Create: ((customer: Customer) => Result);
    FindByEmail: ((email: string) => Customer);
    FindByExternalId: ((externalId: string) => Customer[]);
    FindByGuid: ((guid: string) => Customer);
    FindById: ((id: number) => Customer);
    FindByUsername: ((username: string) => Customer);
    GetDepartment: ((customerId: number) => Department);
    StartSearch: (() => CustomerSearch);
    Update: ((customer: Customer) => Result);
    UpdateExternalId: ((customerId: number, externalId: string, pluginSystemName: string) => Result);
}

Properties

Budgets: Budgets

Provides access to budget-related operations for customers.

Create: ((customer: Customer) => Result)

Creates a new customer.

Type declaration

    • (customer): Result
    • Parameters

      • customer: Customer

        The customer object to create.

      Returns Result

      A result object indicating the outcome of the operation.

FindByEmail: ((email: string) => Customer)

Finds a customer by their email address.

Type declaration

    • (email): Customer
    • Parameters

      • email: string

        The email address of the customer.

      Returns Customer

      An object representing the customer.

FindByExternalId: ((externalId: string) => Customer[])

Finds customers by their external identifier.

Type declaration

    • (externalId): Customer[]
    • Parameters

      • externalId: string

        The external identifier of the customers.

      Returns Customer[]

      An array of objects representing the customers.

FindByGuid: ((guid: string) => Customer)

Finds a customer by their GUID.

Type declaration

    • (guid): Customer
    • Parameters

      • guid: string

        The GUID of the customer.

      Returns Customer

      An object representing the customer.

FindById: ((id: number) => Customer)

Finds a customer by their identifier.

Type declaration

    • (id): Customer
    • Parameters

      • id: number

        The identifier of the customer.

      Returns Customer

      An object representing the customer.

FindByUsername: ((username: string) => Customer)

Finds a customer by their username.

Type declaration

    • (username): Customer
    • Parameters

      • username: string

        The username of the customer.

      Returns Customer

      An object representing the customer.

GetDepartment: ((customerId: number) => Department)

Retrieves the department associated with a customer.

Type declaration

    • (customerId): Department
    • Parameters

      • customerId: number

        The identifier of the customer.

      Returns Department

      An object representing the department associated with the customer.

StartSearch: (() => CustomerSearch)

Starts a search operation for customers.

Type declaration

Update: ((customer: Customer) => Result)

Updates an existing customer.

Type declaration

    • (customer): Result
    • Parameters

      • customer: Customer

        The customer object to update.

      Returns Result

      A result object indicating the outcome of the operation.

UpdateExternalId: ((customerId: number, externalId: string, pluginSystemName: string) => Result)

Updates the external identifier of a customer.

Type declaration

    • (customerId, externalId, pluginSystemName): Result
    • Parameters

      • customerId: number

        The identifier of the customer.

      • externalId: string

        The new external identifier to set.

      • pluginSystemName: string

        The name of the plugin system.

      Returns Result

      A result object indicating the outcome of the operation.