Unleashed
Ruby gem for invoking Unleashedsoftware RESTful API https://apidocs.unleashedsoftware.com
1. Installation
Add this line to your application's Gemfile:
gem 'unleashed'
And then execute:
$ bundle
Or install it yourself as:
$ gem install unleashed
2. Configuration
Before interacting with Unleashed API you need to sign up an account.
See Unleashed API Documentation for more information.
Setup environment variables
The client can be configured through environment variables.
# In your environment file
# Default
UNLEASHED_API_DOMAIN = api.unleashedsoftware.com
UNLEASHED_CLIENT_TYPE_HEADER = API-Sandbox
UNLEASHED_API_ID = yourapiid
UNLEASHED_API_KEY = yourapikey
The following parameters are configurable through the client:
-
:api_domain
/ENV['UNLEASHED_API_DOMAIN']
: API domain name to use (default: 'api.unleashedsoftware.com') -
:api_id
/ENV['UNLEASHED_API_ID']
: API ID -
:api_key
/ENV['UNLEASHED_API_KEY']
: API KEY -
:client_type_header
/ENV['UNLEASHED_CLIENT_TYPE_HEADER']
: Client Type Header to use (default: 'API-Sandbox')
Setup default Unleashed client from environment variables
Add file unleashed.rb
to config/initializers
Unleashed.setup
3. Usage
Instantiate the Unleashed client manually
options = { api_id: ENV['UNLEASHED_API_ID'], api_key: ENV['UNLEASHED_API_KEY'] }
client = Unleashed::Client.new(options)
4. Documentation for Models
- Unleashed::Company
- Unleashed::Currency
- Unleashed::Customer
- Unleashed::Invoice
- Unleashed::PaymentTerm
5. Contributing
- Fork it https://github.com/nnhansg/unleashed-ruby
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
6. License
The gem is available as open source under the terms of the MIT License.
7. Code of Conduct
Everyone interacting in the Unleashed project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.