- From: Manu Sporny <msporny@digitalbazaar.com>
- Date: Sat, 03 May 2014 20:21:50 -0400
- To: public-webpayments@w3.org
On 04/30/2014 07:45 AM, Melvin Carvalho wrote:
> Seems to be quite a common use case.
>
> I'd like to say "Alice has a balance of 20 Euros"
>
> I cant seem to find anything in the vocab to do this ... do we need
> to make a new class?
We talked about this over IRC, but just closing the loop via the mailing
list. We've been using "amount" to represent balances in accounts:
https://web-payments.org/specs/source/vocabs/commerce.html#amount
You'd markup the financial account like so:
{
"@context": "https://w3id.org/payswarm/v1",
"id": "http://payswarm.example.com/people/alice/accounts/3"
"type": "Account",
"label": "Alice's Financial Account",
"amount": "20.00",
"currency": "EUR"
}
The complete example would be this:
{
"@context": "https://w3id.org/payswarm/v1",
"id": "http://payswarm.example.com/people/alice"
"name": "Alice",
"account": {
"id": "http://payswarm.example.com/people/alice/accounts/3"
"type": "Account",
"label": "Alice's Financial Account",
"amount": "20.00",
"currency": "EUR"
}
}
-- manu
--
Manu Sporny (skype: msporny, twitter: manusporny, G+: +Manu Sporny)
Founder/CEO - Digital Bazaar, Inc.
blog: The Marathonic Dawn of Web Payments
http://manu.sporny.org/2014/dawn-of-web-payments/
Received on Sunday, 4 May 2014 00:22:19 UTC