- From: Melvin Carvalho <melvincarvalho@gmail.com>
- Date: Sun, 4 May 2014 02:47:54 +0200
- To: Manu Sporny <msporny@digitalbazaar.com>
- Cc: Web Payments <public-webpayments@w3.org>
- Message-ID: <CAKaEYhL2f_Y_o2mDSGDywGx9h5WpeQ+0Yr4tPP_Y=zJ=rV-aeA@mail.gmail.com>
On 4 May 2014 02:21, Manu Sporny <msporny@digitalbazaar.com> wrote: > 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" > } > } > Yes that's exactly what I'm doing. Tomorrow I'll do the signing. There was a slight edge case that I was considering. And that is for an account to hold more than one currency. I guess that's going to be kind of impossible in this case, unless we make something like <> comm:amount "20.00"^^<currency> Seems pretty difficult tho ... > > -- 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:48:22 UTC