TransactionService Class
Assembly: PTS.Modules.Transactions.dll
Syntax
public class TransactionService : UnitOfWorkService, IServiceProviderAccessor, ITransactionService, ISeedWork<ITransactionService>, ISeedWork
Inheritance
System.Object
TransactionService
Constructors
TransactionService(IUnitOfWork)
Declaration
public TransactionService(IUnitOfWork unitOfWork)
Parameters
Properties
Accounts
Declaration
protected IRepository<Account> Accounts { get; }
Property Value
Activities
Declaration
protected IRepository<MoneyAccountActivity> Activities { get; }
Property Value
MoneyAccounts
Declaration
protected IRepository<MoneyAccount> MoneyAccounts { get; }
Property Value
Transactions
Declaration
protected IRepository<Transaction> Transactions { get; }
Property Value
Methods
GenerateAccountActivityAsync(Transaction)
Declaration
public Task GenerateAccountActivityAsync(Transaction transaction)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
GenerateGiftCards(Decimal, Int32, Nullable<DateTime>, Nullable<DateTime>, String, String)
Declaration
public List<MoneyAccount> GenerateGiftCards(decimal initialAmount, int count = 1, DateTime? expireOn = default(DateTime? ), DateTime? validFrom = default(DateTime? ), string name = null, string note = null)
Parameters
Type |
Name |
Description |
System.Decimal |
initialAmount |
|
System.Int32 |
count |
|
System.Nullable<System.DateTime> |
expireOn |
|
System.Nullable<System.DateTime> |
validFrom |
|
System.String |
name |
|
System.String |
note |
|
Returns
Type |
Description |
System.Collections.Generic.List<MoneyAccount> |
|
GenerateGiftCardsAsync(Decimal, Int32, Nullable<DateTime>, Nullable<DateTime>, String, String)
Declaration
public Task<List<MoneyAccount>> GenerateGiftCardsAsync(decimal initialAmount, int count = 1, DateTime? expireOn = default(DateTime? ), DateTime? validFrom = default(DateTime? ), string name = null, string note = null)
Parameters
Type |
Name |
Description |
System.Decimal |
initialAmount |
|
System.Int32 |
count |
|
System.Nullable<System.DateTime> |
expireOn |
|
System.Nullable<System.DateTime> |
validFrom |
|
System.String |
name |
|
System.String |
note |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.List<MoneyAccount>> |
|
GetAccountBalance(Account, BalanceType, MoneyAccountType, Nullable<DateTime>, CurrencyCode)
Declaration
public decimal GetAccountBalance(Account profile, BalanceType type, MoneyAccountType accountType = MoneyAccountType.Primary, DateTime? asOf = default(DateTime? ), CurrencyCode currency = CurrencyCode.NotSet)
Parameters
Returns
Type |
Description |
System.Decimal |
|
GetAccountBalanceAsync(Account, BalanceType, MoneyAccountType, Nullable<DateTime>, CurrencyCode)
Declaration
public Task<decimal> GetAccountBalanceAsync(Account profile, BalanceType type, MoneyAccountType accountType = MoneyAccountType.Primary, DateTime? asOf = default(DateTime? ), CurrencyCode currency = CurrencyCode.NotSet)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Decimal> |
|
GetAccountTotalCredit(Account, BalanceType, Nullable<DateTime>, Nullable<DateTime>, MoneyAccountType, CurrencyCode)
Declaration
public decimal GetAccountTotalCredit(Account profile, BalanceType type, DateTime? asOf = default(DateTime? ), DateTime? from = default(DateTime? ), MoneyAccountType accountType = MoneyAccountType.Primary, CurrencyCode currency = CurrencyCode.NotSet)
Parameters
Returns
Type |
Description |
System.Decimal |
|
GetAccountTotalCreditAsync(Account, BalanceType, Nullable<DateTime>, Nullable<DateTime>, MoneyAccountType, CurrencyCode)
Declaration
public Task<decimal> GetAccountTotalCreditAsync(Account profile, BalanceType type, DateTime? asOf = default(DateTime? ), DateTime? from = default(DateTime? ), MoneyAccountType accountType = MoneyAccountType.Primary, CurrencyCode currency = CurrencyCode.NotSet)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Decimal> |
|
GetAccountTotalDebit(Account, BalanceType, Nullable<DateTime>, Nullable<DateTime>, MoneyAccountType, CurrencyCode)
Declaration
public decimal GetAccountTotalDebit(Account profile, BalanceType type, DateTime? asOf = default(DateTime? ), DateTime? from = default(DateTime? ), MoneyAccountType accountType = MoneyAccountType.Primary, CurrencyCode currency = CurrencyCode.NotSet)
Parameters
Returns
Type |
Description |
System.Decimal |
|
GetAccountTotalDebitAsync(Account, BalanceType, Nullable<DateTime>, Nullable<DateTime>, MoneyAccountType, CurrencyCode)
Declaration
public Task<decimal> GetAccountTotalDebitAsync(Account profile, BalanceType type, DateTime? asOf = default(DateTime? ), DateTime? from = default(DateTime? ), MoneyAccountType accountType = MoneyAccountType.Primary, CurrencyCode currency = CurrencyCode.NotSet)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Decimal> |
|
GetActivity(MoneyAccount)
Declaration
public List<MoneyAccountActivity> GetActivity(MoneyAccount account)
Parameters
Returns
GetActivityAsync(MoneyAccount)
Declaration
public Task<List<MoneyAccountActivity>> GetActivityAsync(MoneyAccount account)
Parameters
Returns
GetBalance(MoneyAccount, BalanceType, Nullable<DateTime>)
Declaration
public decimal GetBalance(MoneyAccount account, BalanceType type, DateTime? asOf = default(DateTime? ))
Parameters
Returns
Type |
Description |
System.Decimal |
|
GetBalanceAsync(MoneyAccount, BalanceType, Nullable<DateTime>)
Declaration
public Task<decimal> GetBalanceAsync(MoneyAccount account, BalanceType type, DateTime? asOf = default(DateTime? ))
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Decimal> |
|
GetHolder(MoneyAccount)
Declaration
public Account GetHolder(MoneyAccount account)
Parameters
Returns
GetHolderAsync(MoneyAccount)
Declaration
public ValueTask<Account> GetHolderAsync(MoneyAccount account)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.ValueTask<Account> |
|
GetMoneyAccount(Account, MoneyAccountType, Boolean, CurrencyCode, CountryCode)
Declaration
public MoneyAccount GetMoneyAccount(Account profile, MoneyAccountType accountType = MoneyAccountType.Primary, bool allocate = false, CurrencyCode currency = CurrencyCode.NotSet, CountryCode country = CountryCode.NotSet)
Parameters
Returns
GetMoneyAccountAsync(Account, MoneyAccountType, Boolean, CurrencyCode, CountryCode)
Declaration
public Task<MoneyAccount> GetMoneyAccountAsync(Account profile, MoneyAccountType accountType = MoneyAccountType.Primary, bool allocate = false, CurrencyCode currency = CurrencyCode.NotSet, CountryCode country = CountryCode.NotSet)
Parameters
Returns
GetSourceMoneyAccountAsync(Transaction)
Declaration
public ValueTask<MoneyAccount> GetSourceMoneyAccountAsync(Transaction transaction)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.ValueTask<MoneyAccount> |
|
GetTargetMoneyAccountAsync(Transaction)
Declaration
public ValueTask<MoneyAccount> GetTargetMoneyAccountAsync(Transaction transaction)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.ValueTask<MoneyAccount> |
|
GetTransaction(MoneyAccountActivity)
Declaration
public Transaction GetTransaction(MoneyAccountActivity activity)
Parameters
Returns
GetTransactionAsync(MoneyAccountActivity)
Declaration
public ValueTask<Transaction> GetTransactionAsync(MoneyAccountActivity activity)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.ValueTask<Transaction> |
|
RequestPayout(Account, Decimal, MoneyAccountType)
Declaration
public Transaction RequestPayout(Account profile, decimal amount, MoneyAccountType accountType = MoneyAccountType.Primary)
Parameters
Returns
RequestPayoutAsync(Account, Decimal, MoneyAccountType)
Declaration
public Task<Transaction> RequestPayoutAsync(Account profile, decimal amount, MoneyAccountType accountType = MoneyAccountType.Primary)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<Transaction> |
|
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Extension Methods