コード例 #1
0
        public static Invoice Create(
            UserModel user, int entityId, EntityType entityType, decimal amount, CurrencyType currencyType,
            InvoiceStatus status, CurrencyWallet wallet
            )
        {
            switch (entityType)
            {
            case EntityType.UserBalance:
                UserBalanceRepository.FindOrCreate(user, currencyType);
                break;
            }
            var invoice = Find(Invoice.Create(user, entityId, entityType, amount, currencyType, status, wallet));

            DiscordWebhooks.SendEvent("system-events", $"New invoice #{invoice.id} was created for user: {invoice.user_id}");
            return(invoice);
        }
コード例 #2
0
 public static CurrencyWallet Find(int id)
 {
     return(CurrencyWallet.Find(id));
 }
コード例 #3
0
 public static CurrencyWallet Create(string address, CurrencyType currencyType)
 {
     return(Find(CurrencyWallet.Create(address, currencyType)));
 }
コード例 #4
0
 public static CurrencyWallet FindRandom(CurrencyType type)
 {
     return(CurrencyWallet.FindRandomByEnum("currency_type", type.ToString()));
 }
コード例 #5
0
 public static CurrencyWallet FindByGuid(string guid)
 {
     return(CurrencyWallet.FindBy("guid", guid));
 }
コード例 #6
0
 public BTCMarketsSyntheticCurrencyWalletPair(CurrencyWallet _sourceWallet, CurrencyWallet _destinationWallet, IDataStore _dataStore, string _url, string _url2)
     : base(_sourceWallet, _destinationWallet, _dataStore, _url)
 {
     url  = _url;
     url2 = _url2;
 }
コード例 #7
0
 public BTCMarketsCurrencyWalletPair(CurrencyWallet _sourceWallet, CurrencyWallet _destinationWallet, IDataStore _dataStore, string _url)
     : base(_sourceWallet, _destinationWallet, _dataStore)
 {
     url = _url;
 }
コード例 #8
0
 public BTCeInverseQuoteCurrencyWalletPair(CurrencyWallet _sourceWallet, CurrencyWallet _destinationWallet, IDataStore _dataStore, string _url)
     : base(_sourceWallet, _destinationWallet, _dataStore, _url)
 {
 }