Financial Primitive - Store
This primitive is to contain and assign ownership for the value that is transacted in a financial usecase. There are two entities - Store and Owner.
- Store - Holds the value that is managed in the usecase.
- Owner - This entity can be used to maintain the owner details.
Add this line to your application's Gemfile:
gem 'hws-stores'
And then execute:
$ bundle
Or install it yourself as:
$ gem install hws-stores
Hws::Stores.create_store(name: 'test1', schema: {"type"=> "object", "require"=>["a"], "properties"=> {"a"=>{"type"=>"number"}}})
=> "619f5ce9-075b-0778-7969-7413c37452e9" # returns id of the created store
Hws::Stores.update_store("619f5ce9-075b-0778-7969-7413c37452e9", {"a": 54})
=> true # Update successful
Hws::Stores.create_store(name: 'test1', schema: {"type"=> "object", "require"=>["a"], "properties"=> {"a"=>{"type"=>"number"}}}, data: {"a": 6})
=> "619f5ce9-075b-0778-7969-7413c37452e9" # returns id of the created store
Hws::Stores.delete_store("619f5ce9-075b-0778-7969-7413c37452e9")
=> true # Delete successful
Bug reports and pull requests are welcome on GitHub at https://github.com/hwslabs/hws-stores. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Hws::Stores project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.