Skip to content

@nht-pandats/sdk / @nht-pandats/sdk/clients / @nht-pandats/sdk/clients/affiliateApi / AffiliateApiCustomersModule

Class: AffiliateApiCustomersModule ​

@nht-pandats/sdk/clients.@nht-pandats/sdk/clients/affiliateApi.AffiliateApiCustomersModule

A module for interacting with the customers endpoint of the Affiliate API.

Since

v1.20240429.0

Accessors ​

comments ​

• get comments(): AffiliateApiCommentsModule

A module for interacting with the comments endpoints of the Affiliate API.

Returns ​

AffiliateApiCommentsModule

Usage

You can access the methods of the AffiliateApiCommentsModule by calling the comments property of the AffiliateApiCustomersModule instance.

typescript
import { AffiliateApiClient } from '@nht-pandats/sdk/clients/affiliateApi'
const client = new AffiliateApiClient('...', '...', '...')
const comments = await client.customers.comments.list({ ... })

See

AffiliateApiCommentsModule for more information on usage.

Defined in ​

src/clients/affiliateApi/customers.ts:672


deposits ​

• get deposits(): AffiliateApiDepositsModule

A module for interacting with the deposits endpoints of the Affiliate API.

Returns ​

AffiliateApiDepositsModule

Usage

You can access the methods of the AffiliateApiDepositsModule by calling the deposits property of the AffiliateApiCustomersModule instance.

typescript
import { AffiliateApiClient } from '@nht-pandats/sdk/clients/affiliateApi'
const client = new AffiliateApiClient('...', '...', '...')
const deposits = await client.customers.deposits.list({ ... })

See

AffiliateApiDepositsModule for more information on usage.

Defined in ​

src/clients/affiliateApi/customers.ts:653


marketing ​

• get marketing(): AffiliateApiMarketingModule

A module for interacting with the marketing endpoints of the Affiliate API.

Returns ​

AffiliateApiMarketingModule

Usage

You can access the methods of the AffiliateApiMarketingModule by calling the marketing property of the AffiliateApiCustomersModule instance.

typescript
import { AffiliateApiClient } from '@nht-pandats/sdk/clients/affiliateApi'
const client = new AffiliateApiClient('...', '...', '...')
const marketing = await client.customers.marketing.update({ ... })

See

AffiliateApiMarketingModule for more information on usage.

Defined in ​

src/clients/affiliateApi/customers.ts:691


tradingAccounts ​

• get tradingAccounts(): AffiliateApiTradingAccountsModule

A module for interacting with the trading accounts endpoints of the Affiliate API.

Returns ​

AffiliateApiTradingAccountsModule

Usage

You can access the methods of the AffiliateApiTradingAccountsModule by calling the tradingAccounts property of the AffiliateApiCustomersModule instance.

typescript
import { AffiliateApiClient } from '@nht-pandats/sdk/clients/affiliateApi'
const client = new AffiliateApiClient('...', '...', '...')
const tradingAccounts = await client.customers.tradingAccounts.list({ ... })

See

AffiliateApiTradingAccountsModule for more information on usage.

Defined in ​

src/clients/affiliateApi/customers.ts:634

Methods ​

all ​

▸ all(options?): Promise<ResponseFields<AffiliateApiCustomerModelDefinition>[]>

List all customers matching the specified options via the Affiliate API.

Parameters ​

NameTypeDescription
optionsOmit<ListMethodOptions<AffiliateApiCustomerModelDefinition>, "limit" | "page">The options to use when listing all matching customers.

Returns ​

Promise<ResponseFields<AffiliateApiCustomerModelDefinition>[]>

A list of all matching customers.

Throws

AffiliateApiOperationError If the operation was not successful.

Reference

PandaTS API Documentation

Defined in ​

src/clients/affiliateApi/customers.ts:536


create ​

▸ create(payload): Promise<AffiliateApiOperationResponse<AffiliateApiCustomerSaveSuccessfulResponse, AffiliateApiCustomerSaveSuccessfulResponse>>

Create a new customer via the Affiliate API.

Parameters ​

NameTypeDescription
payloadCreatePayload<AffiliateApiCustomerModelDefinition>The payload for creating a new customer via the Affiliate API.

Returns ​

Promise<AffiliateApiOperationResponse<AffiliateApiCustomerSaveSuccessfulResponse, AffiliateApiCustomerSaveSuccessfulResponse>>

Creation Status and Resource Information on the created client

Throws

AffiliateApiOperationError If the operation was not successful.

Reference

PandaTS API Documentation

Defined in ​

src/clients/affiliateApi/customers.ts:562


list ​

▸ list(options?): Promise<AffiliateApiOperationResponse<ResponseFields<AffiliateApiCustomerModelDefinition>[], ResponseFields<AffiliateApiCustomerModelDefinition>[]>>

List customers via the Affiliate API.

Parameters ​

NameTypeDescription
optionsListMethodOptions<AffiliateApiCustomerModelDefinition>The options to use when listing customers.

Returns ​

Promise<AffiliateApiOperationResponse<ResponseFields<AffiliateApiCustomerModelDefinition>[], ResponseFields<AffiliateApiCustomerModelDefinition>[]>>

List of customers

Throws

AffiliateApiOperationError If the operation was not successful.

Reference

PandaTS API Documentation

Defined in ​

src/clients/affiliateApi/customers.ts:514


read ​

▸ read(email): Promise<AffiliateApiOperationResponse<ResponseFields<AffiliateApiCustomerModelDefinition>, ResponseFields<AffiliateApiCustomerModelDefinition>>>

Read a customer via the Affiliate API.

Parameters ​

NameTypeDescription
emailstringThe email of the customer to read.

Returns ​

Promise<AffiliateApiOperationResponse<ResponseFields<AffiliateApiCustomerModelDefinition>, ResponseFields<AffiliateApiCustomerModelDefinition>>>

Customer Information

Throws

AffiliateApiOperationError If the operation was not successful.

Reference

PandaTS API Documentation

Defined in ​

src/clients/affiliateApi/customers.ts:583


update ​

▸ update(email, payload): Promise<AffiliateApiOperationResponse<AffiliateApiCustomerSaveSuccessfulResponse, AffiliateApiCustomerSaveSuccessfulResponse>>

Update a customer via the Affiliate API.

Parameters ​

NameTypeDescription
emailstringThe email of the customer to update.
payloadUpdatePayload<AffiliateApiCustomerModelDefinition>The payload to update on the customer.

Returns ​

Promise<AffiliateApiOperationResponse<AffiliateApiCustomerSaveSuccessfulResponse, AffiliateApiCustomerSaveSuccessfulResponse>>

Update Status and Resource Information on the updated client

Throws

AffiliateApiOperationError If the operation was not successful.

Reference

PandaTS API Documentation

Defined in ​

src/clients/affiliateApi/customers.ts:605