2using System.Collections.Generic;
3using System.Threading.Tasks;
29 : base(
"Wallet/ProcessEDalerUri",
30 new KeyValuePair<Type,
Expression>(typeof(Dictionary<string, object>), new
Expression(jsonPattern)),
49 string Uri = (string)Parameters[
"PUri"].AssociatedObjectValue;
57 if (!(Parsed is
null))
69 if (
string.IsNullOrEmpty(Msg))
70 Msg =
"Unable to process URI.";
106 string Currency =
string.Empty;
116 BalanceTimestamp = DateTime.UtcNow,
117 Created = DateTime.UtcNow,
119 Domain = Gateway.Domain
123 XmlDocument TransactionResult;
125 if (
string.IsNullOrEmpty(State.
ResultXml))
126 TransactionResult =
null;
129 TransactionResult =
new XmlDocument()
131 PreserveWhitespace =
true
133 TransactionResult.LoadXml(State.
ResultXml);
138 {
"Balance",
new Dictionary<string, object>()
140 {
"amount", Wallet.Balance },
141 {
"reserved", Wallet.Reserved },
142 {
"currency", Wallet.Currency.Value },
143 {
"timestamp", Wallet.BalanceTimestamp }
146 {
"Result", TransactionResult }
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.
The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repe...
The request could not be completed due to a conflict with the current state of the resource....
The server understood the request, but is refusing to fulfill it. Authorization will not help and the...
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,...
The server is currently unable to handle the request due to a temporary overloading or maintenance of...
The user has sent too many requests in a given amount of time. Intended for use with rate limiting sc...
Contains information about one XMPP address.
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.
Module making sure no unfinished transactions are left when system ends.
static bool Running
If the transaction module is running.
Class managing a script expression.
Contains information about a broker account.
string UserName
User Name.
Abstract base class for eDaler URIs
static async Task< EDalerUri > Parse(string Uri, EDalerUriState State, EDalerComponent EDaler)
Parses an eDaler URI
EDalerUriErrorType? ErrorType
Type of error, if any.
string ErrorMessage
Error message, or null if no error.
string ResultXml
Result XML
Current state of URI from internal source
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
override async Task POST(HttpRequest Request, HttpResponse Response, Dictionary< string, IElement > Parameters)
Executes the POST method on the resource.
ProcessEDalerUri()
Processes an eDaler URI.
Service Module hosting the XMPP broker and its components.
EDalerUriErrorType
Type of URI Error