IClientService

StockSharp.Web.Api.Interfaces

Implements: IBaseEntityService<Client>, ISmsService

Methods

ChangePasswordAsync
public Task ChangePasswordAsync(string oldPassword, string newPassword, long? clientId, CancellationToken cancellationToken)
result = iClientService.ChangePasswordAsync(oldPassword, newPassword, clientId, cancellationToken)

Change a password. For a self-service change ( is null) the current password must be provided and is verified; when an api-admin/editor resets another client's password ( set, e.g. the forgot-password flow) the current password is not required.

CorrectBalanceAsync
public Task<decimal> CorrectBalanceAsync(long clientId, CurrencyTypes currency, decimal diff, CancellationToken cancellationToken)
result = iClientService.CorrectBalanceAsync(clientId, currency, diff, cancellationToken)

Move a client's balance by hand, in either direction -- a correction an operator makes when money arrived outside the gateways, or was charged for something that did not happen.

clientId
Whose balance moves.
currency
Which balance: a client holds one per currency.
diff
How much it moves by, negative to take away. A balance never goes below zero.
cancellationToken
Cancellation token.

Returns: What the balance stands at afterwards.

UpdateDomainAsync
public Task UpdateDomainAsync(long domainId, CancellationToken cancellationToken)
result = iClientService.UpdateDomainAsync(domainId, cancellationToken)

Persist the current client's language by repointing them to the site domain with that language (each domain carries one culture). Emails and the Telegram bot read the client's domain culture, so this makes the chosen language durable across sessions and channels.

UpdateEmailPreferencesByTokenAsync
public Task UpdateEmailPreferencesByTokenAsync(string emailToken, EmailPreferences preferences, CancellationToken cancellationToken)
result = iClientService.UpdateEmailPreferencesByTokenAsync(emailToken, preferences, cancellationToken)

Update the email preferences of the client identified by an encrypted email token (the subscribe/ unsubscribe link), without touching any other field. Api-admin only; the token itself authorizes the change, so an anonymous visitor from an email link can manage exactly that client's notifications.