Lago Ruby Client
This is a ruby wrapper for Lago API
Current Releases
Project | Release Badge |
---|---|
Lago | |
Lago Ruby Client |
Installation
Install the gem and add to the application's Gemfile by executing:
$ bundle add lago-ruby-client
If bundler is not being used to manage dependencies, install the gem by executing:
$ gem install lago-ruby-client
Usage
Once the gem is installed, you can use it in your Ruby application as follows:
require 'lago-ruby-client'
client = Lago::Api::Client.new(api_key: "xyz")
applied_coupons = client.applied_coupons.get_all(
page: 1,
per_page: 10,
"coupon_code[]": ["BLACK_FRIDAY", "CHRISTMAS"],
)
puts "Listing all applied coupons:"
puts applied_coupons
For detailed usage, refer to the lago API reference.
Development
Install the dependencies
bundle install
Run tests
bundle exec rspec
Run the linter
bundle exec rubocop
To format the code, run:
bundle exec rubocop -a # or -A
Documentation
The Lago documentation is available at doc.getlago.com.
Contributing
The contribution documentation is available here
License
Lago Ruby client is distributed under MIT license.