2using System.Collections.Generic;
3using System.Threading.Tasks;
25 : base(
"Wallet/GetBalance",
26 new KeyValuePair<Type,
Expression>(typeof(Dictionary<string, object>), new
Expression(jsonPattern)),
58 string Currency =
string.Empty;
63 Wallet =
new EDaler.Wallet()
68 BalanceTimestamp = DateTime.UtcNow,
69 Created = DateTime.UtcNow,
71 Domain = Gateway.Domain
77 {
"amount", Wallet.Balance },
78 {
"reserved", Wallet.Reserved },
79 {
"currency", Wallet.Currency.Value },
80 {
"timestamp", Wallet.BalanceTimestamp }
A Named dictionary is a dictionary, with a local name and a namespace. Use it to return content that ...
Static class managing loading of resources stored as embedded resources or in content files.
static string LoadResourceAsText(string ResourceName)
Loads a text resource from an embedded resource.
Static class managing the runtime environment of the IoT Gateway.
static CaseInsensitiveString Domain
Domain name.
Represents an HTTP request.
Represets a response of an HTTP client request.
async Task Return(object Object)
Returns an object to the client. This method can only be called once per response,...
Static interface for database persistence. In order to work, a database provider has to be assigned t...
This filter selects objects that have a named field equal to a given value.
Class managing a script expression.
Contains information about a broker account.
string UserName
User Name.
Retains the current balance of an account.
Abstract base class for agent resources supporting the POST method.
static AccountUser AssertUserAuthenticated(HttpRequest Request)
Makes sure the request is made by an authenticated API user.
const string AgentNamespace
https://waher.se/Schema/BrokerAgent.xsd
Gets the balance of the wallet associated with the account of the caller.
override async Task POST(HttpRequest Request, HttpResponse Response, Dictionary< string, IElement > Parameters)
Executes the POST method on the resource.
GetBalance()
Gets the balance of the wallet associated with the account of the caller.
Service Module hosting the XMPP broker and its components.