package billingserver.billingserverapi;

import billingserver.commons.AccountStatus;
import billingserver.commons.CurrencyValue;
import org.jetbrains.annotations.NotNull;
import replicationAnnotations.OuterWorldAPI;

/**
 * API для внешнего взаимодействия с billing-сервером.
 *
 * @author sergey.kolosov
 */
@OuterWorldAPI
public interface BillingServerAPI {
  @NotNull
  AccountInfoResult getAccount(@NotNull String accountName);

  /**
   * Method deprecated. Use addMoneyWithTranType from 2nd version of api.
   * @see BillingServerAPI2
   */
  @Deprecated
  @NotNull
  AddMoneyResult addMoney(@NotNull String accountName, int money, long transactionId);

  @NotNull
  SubMoneyResult subMoney(@NotNull String accountName, int money);

  @NotNull
  SubMoneyResult subMoneyWithCurrency(@NotNull String accountName, @NotNull CurrencyValue money);

  @NotNull
  ChangeAccountResult setStatus(@NotNull String accountName, @NotNull AccountStatus status);
}