import { BaseClient, ClientConfig, Response } from "@commerce-apps/core";
import type { CommonParameters } from "@commerce-apps/core";
import type { OperationOptions } from "retry";
import type { RequestInit } from "node-fetch";
import type { CompositeParameters, CustomRequestBody, QueryParameters, RequireParametersUnlessAllAreOptional } from "../../types";
import type { Customer, CustomerAddress, CustomerAddressResult, CustomerGroupMemberResult, CustomerGroupResult, CustomerGroupSearchResult, CustomerSearchResult, SearchRequest } from '../models/index';
/**
* [Customers](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=customers:Summary)
* ==================================
*
* *[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/customers/customers-oas-v1-public.yaml)
# API Overview
Use the Customers API to search for and manage customer information within a customer list. It also enables you to search for customer groups.
Once you find information for a customer, you can also use the API to manage customer addresses.
The `customerNo` is created when you create a shopper record. You can create a shopper record using the Customers API or Business Manager. For details, see [registerCustomer](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=registerCustomer) and [Create and Manage Customer Records](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-customer-records.html?q=create%20customer).

## Authentication & Authorization
For resource access, you must use a client ID and client secret from Account Manager to request an access token. The access token is used as a bearer token and added to the Authorization header of your API request.
You must include the relevant scope(s) in the client ID used to generate the token. For a full list of permissions, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)
For detailed setup instructions, see the [Authorization for Admin APIs guide.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html)*
*
* For instructions on how to retrieve access token for admin APIs: https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html
* Example with admin auth
*
* ```typescript
* import { Customers, ClientConfig } from "commerce-sdk";
* // or
* const { Customers, ClientConfig } = require("commerce-sdk");
*
* const clientConfig: ClientConfig = {
* parameters: {
* clientId: "XXXXXX",
* organizationId: "XXXX",
* shortCode: "XXX",
* siteId: "XX"
* }
* };
*
* token = { access_token: 'INSERT_ACCESS_TOKEN_HERE' };
*
* clientConfig.headers['authorization'] = `Bearer ${token.access_token}`;
* const customersClient = new Customers(clientConfig);
* ```
*
*
* API Version: 1.4.4
* Last Updated:
*
*
*/
export declare class Customers extends BaseClient {
constructor(config: ClientConfig);
/**
* Add multiple customers to a (static) customer group.
This endpoint assigns the specified customers to the customer group identified by the given ID.
Only static customer groups support this operation.
*
* If you would like to get a raw Response object use the other assignCustomerGroupMembers function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.parameters.customerGroupId - Customer group ID
* @param options.parameters.customerNos - List of customer numbers to assign or unassign from the customer group.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
*
* @returns A promise of type CustomerGroupMemberResult.
*/
assignCustomerGroupMembers(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
siteId: string;
customerGroupId: string;
customerNos: Array;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>): Promise;
/**
* Add multiple customers to a (static) customer group.
This endpoint assigns the specified customers to the customer group identified by the given ID.
Only static customer groups support this operation.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.parameters.customerGroupId - Customer group ID
* @param options.parameters.customerNos - List of customer numbers to assign or unassign from the customer group.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type CustomerGroupMemberResult otherwise.
*/
assignCustomerGroupMembers(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
siteId: string;
customerGroupId: string;
customerNos: Array;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>, rawResponse?: T): Promise;
/**
* Creates a new customer address with the given address
information.
*
* If you would like to get a raw Response object use the other createAddressForCustomerInCustomerList function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.customerNo - The customer number.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type CustomerAddress.
*/
createAddressForCustomerInCustomerList(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
customerNo: string;
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: CustomerAddress & CustomRequestBody;
}>): Promise;
/**
* Creates a new customer address with the given address
information.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.customerNo - The customer number.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type CustomerAddress otherwise.
*/
createAddressForCustomerInCustomerList(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
customerNo: string;
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: CustomerAddress & CustomRequestBody;
}>, rawResponse?: T): Promise;
/**
* Create a new customer. The customer is created using the specified customer number, credentials, and
customer information. This action verifies:
- Login acceptance criteria and uniqueness.
- Mandatory customer properties.
If the action fails to create the customer, it returns a 400 fault with an appropriate message.
*
* If you would like to get a raw Response object use the other createCustomerInCustomerList function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.customerNo - The customer number.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type Customer.
*/
createCustomerInCustomerList(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
customerNo: string;
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: Customer & CustomRequestBody;
}>): Promise;
/**
* Create a new customer. The customer is created using the specified customer number, credentials, and
customer information. This action verifies:
- Login acceptance criteria and uniqueness.
- Mandatory customer properties.
If the action fails to create the customer, it returns a 400 fault with an appropriate message.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.customerNo - The customer number.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type Customer otherwise.
*/
createCustomerInCustomerList(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
customerNo: string;
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: Customer & CustomRequestBody;
}>, rawResponse?: T): Promise;
/**
* Create a new customer. The customer is created using the specified credentials and customer
information. This action verifies:
- Login acceptance criteria and uniqueness.
- Mandatory customer properties.
If the action fails to create the customer, it returns a 400 fault with an appropriate message.
*
* If you would like to get a raw Response object use the other createCustomerList function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type Customer.
*/
createCustomerList(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: Customer & CustomRequestBody;
}>): Promise;
/**
* Create a new customer. The customer is created using the specified credentials and customer
information. This action verifies:
- Login acceptance criteria and uniqueness.
- Mandatory customer properties.
If the action fails to create the customer, it returns a 400 fault with an appropriate message.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type Customer otherwise.
*/
createCustomerList(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: Customer & CustomRequestBody;
}>, rawResponse?: T): Promise;
/**
* Deletes the customer, including all related information like the customer addresses.
*
* If you would like to get a raw Response object use the other deleteCustomerFromCustomerList function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.customerNo - The customer number.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
*
* @returns A promise of type void.
*/
deleteCustomerFromCustomerList(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
customerNo: string;
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>): Promise;
/**
* Deletes the customer, including all related information like the customer addresses.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.customerNo - The customer number.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type void otherwise.
*/
deleteCustomerFromCustomerList(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
customerNo: string;
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>, rawResponse?: T): Promise;
/**
* Action that returns a single customer address from a customer list.
*
* If you would like to get a raw Response object use the other getAddressForCustomerFromCustomerList function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.addressId - The address ID.
* @param options.parameters.customerNo - The customer number.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
*
* @returns A promise of type CustomerAddress.
*/
getAddressForCustomerFromCustomerList(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
addressId: string;
customerNo: string;
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>): Promise;
/**
* Action that returns a single customer address from a customer list.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.addressId - The address ID.
* @param options.parameters.customerNo - The customer number.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type CustomerAddress otherwise.
*/
getAddressForCustomerFromCustomerList(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
addressId: string;
customerNo: string;
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>, rawResponse?: T): Promise;
/**
* Returns a list of all customer addresses in pages. The
default page size is 10 customer addresses.
*
* If you would like to get a raw Response object use the other getAddressesForCustomerFromCustomerList function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.customerNo - The customer number.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.parameters.limit - Maximum records to retrieve per request, not to exceed 50. Defaults to 25.
* @param options.parameters.offset - Used to retrieve the results based on a particular resource offset.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
*
* @returns A promise of type CustomerAddressResult.
*/
getAddressesForCustomerFromCustomerList(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
customerNo: string;
customerListId: string;
organizationId: string;
limit?: number;
offset?: number;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>): Promise;
/**
* Returns a list of all customer addresses in pages. The
default page size is 10 customer addresses.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.customerNo - The customer number.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.parameters.limit - Maximum records to retrieve per request, not to exceed 50. Defaults to 25.
* @param options.parameters.offset - Used to retrieve the results based on a particular resource offset.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type CustomerAddressResult otherwise.
*/
getAddressesForCustomerFromCustomerList(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
customerNo: string;
customerListId: string;
organizationId: string;
limit?: number;
offset?: number;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>, rawResponse?: T): Promise;
/**
* Action to get customer information.
*
* If you would like to get a raw Response object use the other getCustomerFromCustomerList function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.customerNo - The customer number.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
*
* @returns A promise of type Customer.
*/
getCustomerFromCustomerList(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
customerNo: string;
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>): Promise;
/**
* Action to get customer information.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.customerNo - The customer number.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type Customer otherwise.
*/
getCustomerFromCustomerList(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
customerNo: string;
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>, rawResponse?: T): Promise;
/**
* Returns a list of all customer groups for a given site in pages.
The default page size is 25 customer groups.
*
* If you would like to get a raw Response object use the other getCustomerGroups function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.parameters.select -
* @param options.parameters.limit - Maximum records to retrieve per request, not to exceed 50. Defaults to 25.
* @param options.parameters.offset - Used to retrieve the results based on a particular resource offset.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
*
* @returns A promise of type CustomerGroupResult.
*/
getCustomerGroups(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
siteId: string;
select?: string;
limit?: number;
offset?: number;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>): Promise;
/**
* Returns a list of all customer groups for a given site in pages.
The default page size is 25 customer groups.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.parameters.select -
* @param options.parameters.limit - Maximum records to retrieve per request, not to exceed 50. Defaults to 25.
* @param options.parameters.offset - Used to retrieve the results based on a particular resource offset.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type CustomerGroupResult otherwise.
*/
getCustomerGroups(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
siteId: string;
select?: string;
limit?: number;
offset?: number;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>, rawResponse?: T): Promise;
/**
* Deletes a customer address.
*
* If you would like to get a raw Response object use the other removeAddressForCustomerInCustomerList function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.addressId - The address ID.
* @param options.parameters.customerNo - The customer number.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
*
* @returns A promise of type void.
*/
removeAddressForCustomerInCustomerList(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
addressId: string;
customerNo: string;
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>): Promise;
/**
* Deletes a customer address.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.addressId - The address ID.
* @param options.parameters.customerNo - The customer number.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type void otherwise.
*/
removeAddressForCustomerInCustomerList(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
addressId: string;
customerNo: string;
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>, rawResponse?: T): Promise;
/**
* Search for customer groups in a given site ID.
The query attribute specifies a complex query that can be used to narrow down the search. The following list
provides searchable attributes:
| Attribute | Type |
|-----------|--------|
| id| String |
| description | String |
| type | String |
Note: This endpoint is available with B2C Commerce version 24.2.
*
* If you would like to get a raw Response object use the other searchCustomerGroup function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type CustomerGroupSearchResult.
*/
searchCustomerGroup(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: SearchRequest & CustomRequestBody;
}>): Promise;
/**
* Search for customer groups in a given site ID.
The query attribute specifies a complex query that can be used to narrow down the search. The following list
provides searchable attributes:
| Attribute | Type |
|-----------|--------|
| id| String |
| description | String |
| type | String |
Note: This endpoint is available with B2C Commerce version 24.2.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type CustomerGroupSearchResult otherwise.
*/
searchCustomerGroup(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
siteId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: SearchRequest & CustomRequestBody;
}>, rawResponse?: T): Promise;
/**
* Search for customers in a customer list.
The query attribute specifies a complex query that can be used to narrow down the search. The following list
provides searchable attributes:
| Attribute | Type |
|-----------|--------|
| customerNo| String |
| firstName | String |
| secondName | String |
| lastName | String |
| suffix | String |
| salutation | String |
| title | String |
| fax| String |
| phoneHome | String |
| phoneBusiness | String |
| phoneMobile | String |
| email | String |
| gender | Integer |
| companyName | String |
| credentials.login | String |
| credentials.enabled | Boolean |
*
* If you would like to get a raw Response object use the other searchCustomerInCustomerList function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type CustomerSearchResult.
*/
searchCustomerInCustomerList(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: SearchRequest & CustomRequestBody;
}>): Promise;
/**
* Search for customers in a customer list.
The query attribute specifies a complex query that can be used to narrow down the search. The following list
provides searchable attributes:
| Attribute | Type |
|-----------|--------|
| customerNo| String |
| firstName | String |
| secondName | String |
| lastName | String |
| suffix | String |
| salutation | String |
| title | String |
| fax| String |
| phoneHome | String |
| phoneBusiness | String |
| phoneMobile | String |
| email | String |
| gender | Integer |
| companyName | String |
| credentials.login | String |
| credentials.enabled | Boolean |
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type CustomerSearchResult otherwise.
*/
searchCustomerInCustomerList(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: SearchRequest & CustomRequestBody;
}>, rawResponse?: T): Promise;
/**
* Remove multiple customers from a (static) customer group.
This endpoint unassigns the specified customers from the customer group identified by the given ID.
Only static customer groups support this operation.
*
* If you would like to get a raw Response object use the other unassignCustomerGroupMembers function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.parameters.customerGroupId - Customer group ID
* @param options.parameters.customerNos - List of customer numbers to assign or unassign from the customer group.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
*
* @returns A promise of type void.
*/
unassignCustomerGroupMembers(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
siteId: string;
customerGroupId: string;
customerNos: Array;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>): Promise;
/**
* Remove multiple customers from a (static) customer group.
This endpoint unassigns the specified customers from the customer group identified by the given ID.
Only static customer groups support this operation.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.parameters.siteId - The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
* @param options.parameters.customerGroupId - Customer group ID
* @param options.parameters.customerNos - List of customer numbers to assign or unassign from the customer group.
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type void otherwise.
*/
unassignCustomerGroupMembers(options?: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
organizationId: string;
siteId: string;
customerGroupId: string;
customerNos: Array;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
}>, rawResponse?: T): Promise;
/**
* Updates an address of a customer with the given address information.
*
* If you would like to get a raw Response object use the other updateAddressForCustomerInCustomerList function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.addressId - The address ID.
* @param options.parameters.customerNo - The customer number.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type CustomerAddress.
*/
updateAddressForCustomerInCustomerList(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
addressId: string;
customerNo: string;
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: CustomerAddress & CustomRequestBody;
}>): Promise;
/**
* Updates an address of a customer with the given address information.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.addressId - The address ID.
* @param options.parameters.customerNo - The customer number.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type CustomerAddress otherwise.
*/
updateAddressForCustomerInCustomerList(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
addressId: string;
customerNo: string;
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: CustomerAddress & CustomRequestBody;
}>, rawResponse?: T): Promise;
/**
* Updates the customer with the specified information. The customer number can be updated, but results in a
CustomerNumberAlreadyInUseException if there is another customer with the same customer number.
*
* If you would like to get a raw Response object use the other updateCustomerInCustomerList function.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.customerNo - The customer number.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
*
* @returns A promise of type Customer.
*/
updateCustomerInCustomerList(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
customerNo: string;
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: Customer & CustomRequestBody;
}>): Promise;
/**
* Updates the customer with the specified information. The customer number can be updated, but results in a
CustomerNumberAlreadyInUseException if there is another customer with the same customer number.
*
* @param options - An object containing the options for this method.
* @param options.parameters - An object containing the parameters for this method.
* @param options.parameters.customerNo - The customer number.
* @param options.parameters.customerListId - The customer list ID.
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
* @param options.retrySettings - Retry options for the `node-retry` package
* @param options.fetchOptions - Fetch options for the `make-fetch-happen` package
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
* @param options.body - The data to send as the request body.
* @param rawResponse - Set to true to return entire Response object instead of DTO.
*
* @returns A promise of type Response if rawResponse is true, a promise of type Customer otherwise.
*/
updateCustomerInCustomerList(options: RequireParametersUnlessAllAreOptional<{
parameters?: CompositeParameters<{
customerNo: string;
customerListId: string;
organizationId: string;
} & QueryParameters, CommonParameters>;
retrySettings?: OperationOptions;
fetchOptions?: RequestInit;
headers?: {
[key: string]: string;
};
body: Customer & CustomRequestBody;
}>, rawResponse?: T): Promise;
}