Beispiel #1
0
 public static FundingBalance AddFunds(Model.User.User from, FundingBalance balance, decimal amount)
 {
     FundingTransactionRepository.Create(
         from, balance.entity_id, balance.entity_type, amount, balance.currency_type
         );
     return(balance.UpdateBalance(balance.balance + amount));
 }
Beispiel #2
0
 public static FundingBalance FindByGuid(string guid) => FundingBalance.FindByGuid(guid);
Beispiel #3
0
 public static FundingBalance Find(int id) => FundingBalance.Find(id);
Beispiel #4
0
 public static FundingBalance Create(int entityId, EntityType entityType, CurrencyType currencyType)
 {
     return(FundingBalance.Find(FundingBalance.Create(entityId, entityType, currencyType)));
 }
Beispiel #5
0
 public static FundingBalance AddFunds(FundingBalance balance, Invoice invoice)
 {
     FundingTransactionUtils.CreateTxFromInvoice(invoice);
     return(balance.UpdateBalance(invoice.amount));
 }
Beispiel #6
0
 public static FundingBalance[] Get(int entityId, EntityType type, int limit = 10)
 {
     return(FundingBalance.Get(entityId, type, limit));
 }
Beispiel #7
0
 public static FundingBalance Find(int entityId, EntityType entityType, CurrencyType currencyType)
 => FundingBalance.Find(entityId, entityType, currencyType);
Beispiel #8
0
 public static FundingBalance FindBy(string col, int val) => FundingBalance.FindBy(col, val);