Brink Loyalty is a Ruby gem designed to facilitate integration with the Brink Generic Loyalty API. It provides a simple SDK for interacting with various endpoints related to loyalty programs.
Add this line to your application's Gemfile:
gem 'brink_loyalty'
Then run bundle install
.
Before using the gem, you need to configure it with your API credentials:
BrinkLoyalty.configure do |config|
config.api_key = 'your_api_key'
config.base_url = 'base_url'
end
Create a client instance to interact with the API:
client = BrinkLoyalty.client
The gem provides methods to interact with various endpoints:
-
Lookup Order:
client.lookup(store_id: '123', order_id: '456', body: { ... })
-
Finalize Order:
client.finalize(store_id: '123', order_id: '456', body: { ... })
-
POS Configurations:
client.pos_configurations(store_id: '123')
-
Receipt:
client.receipt(store_id: '123', order_id: '456', body: { ... })
-
Redeem Rewards:
client.redeem(store_id: '123', order_id: '456', body: { ... })
-
Remove Rewards:
client.remove_rewards(store_id: '123', order_id: '456', body: { ... })
-
Validate Order:
client.validate_order(store_id: '123', order_id: '456', body: { ... })
Bug reports and pull requests are welcome on GitHub at https://github.com/lunchboxinc/brink_loyalty. 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.