W3C home > Mailing lists > Public > public-webpayments@w3.org > May 2013

Re: semantically modelling a balance

From: Melvin Carvalho <melvincarvalho@gmail.com>
Date: Wed, 8 May 2013 10:40:05 +0200
Message-ID: <CAKaEYhJzvHe_WOBxLLZ2gZrbQz0e7KOSDYsXA6DPD9vJXYFpJg@mail.gmail.com>
To: Manu Sporny <msporny@digitalbazaar.com>
Cc: Web Payments <public-webpayments@w3.org>
On 8 May 2013 04:13, Manu Sporny <msporny@digitalbazaar.com> wrote:

> On 05/07/2013 05:23 PM, Melvin Carvalho wrote:
> > is there a way to model a balance using commerce vocabs?
>
> Yes.
>
> > for example: alice has 10 euros
>
> I wouldn't model Alice as having 10 Euros... Alice has an account that
> contains 10 Euros.
>
> {
>   "@context": "https://w3id.org/payswarm/v1",
>   "id": "http://example.com/alice",
>   "name": "Alice",
>   "account":
>   {
>     "id": "http://example.com/alice/accounts/savings",
>     "type": "Account",
>     "label": "Savings Account",
>     "amount": "7563.00",
>     "currency": "EUR"
>   }
> }
>
> > or account XYZ has 10 bitcoins
>
> {
>   "@context": "https://w3id.org/payswarm/v1",
>   "id": "http://example.com/bob/accounts/retirement",
>   "type": "Account",
>   "label": "Retirement Account",
>   "amount": "2.12498",
>   "currency": "BTC"
> }
>

Great, I'll use this!

One point is that balances change over time.  Is there a possibility to add
a context in terms of a time or ledger entry?


>
> Note that in the above two examples, EUR and BTC will resolve to a
> relative URL when they really should resolve to a currency URL like:
>
> https://w3id.org/currencies/EUR
>
> or
>
> https://w3id.org/currencies/BTC
>
> Currently, we have only created the USD currency. If you'd like, we can
> add EUR and BTC as well. Or, you can submit a pull request for the
> PaySwarm context here:
>
>
> https://github.com/web-payments/payswarm.com/blob/master/contexts/payswarm-v1.jsonld#L103
>
> And then some re-direction entries here:
>
> https://github.com/perma-id/w3id.org
>

I can do that, thanks!


>
> Let me know how you'd like to proceed.
>
> -- manu
>
> --
> Manu Sporny (skype: msporny, twitter: manusporny, G+: +Manu Sporny)
> Founder/CEO - Digital Bazaar, Inc.
> blog: Meritora - Web payments commercial launch
> http://blog.meritora.com/launch/
>
Received on Wednesday, 8 May 2013 08:40:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:07:23 UTC