No release in over 3 years
Low commit activity in last 3 years
Lightspeed Restaurant is a Point Of Sale that helps bars, restaurants, and cafés deliver a better customer experience and run a more profitable business. See https://www.lightspeedhq.com/products/restaurant/ for details
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
>= 0
>= 0

Runtime

~> 0.71.0
~> 2.3
 Project Readme

Lightspeed Restaurant API Client

Code Climate Gem Version

Lightspeed Restaurant API Client is a gem for interacting with Lightspeed Restaurant API. Lightspeed Restaurant is point of sale that helps bars, restaurants, and cafés deliver a better customer experience and run a more profitable business.

Installation

Add this line to your application's Gemfile:

gem 'lightspeed_restaurant'

And then execute:

$ bundle

Or install it yourself as:

$ gem install lightspeed_restaurant

Usage

Basic Usage

First, set your api token:

LightspeedRestaurantClient.api_token = "YOUR_API_TOKEN_HERE"

Next, make requests using the resource class you need:

customers = LightspeedRestaurantClient::Customer.all
customer  = customers.first
customer.firstName = 'Tom'
customer.save

That's it!

Using a custom API configuration per action

Each action support a configuration object as the last param, allows you to setup api_token, base_uri Sample usage:

LightspeedRestaurantClient::Customer.all(LightspeedRestaurantClient.default_configuration.with(api_token: 'MY_OTHER_TOKEN', base_uri: 'other_ls_resto_uri'))

Available operations

List

LightspeedRestaurantClient::Customer.all

Find

LightspeedRestaurantClient::Customer.find(123)

Create

LightspeedRestaurantClient::Customer.create(...firstName: 'Tom', email: 'tom@brady.com'...)

Update

LightspeedRestaurantClient::Customer.update(123, { email: 'tom@brady.com' })

Save

customer = LightspeedRestaurantClient::Customer.find(123)
customer.firstName = 'Micheal'
customer.save

Destroy

customer = LightspeedRestaurantClient::Customer.find(123)
customer.destroy

Logs

By default the logs are done on STDOUT. You can specify your own logger (it has to respond to info and error methods, like the Rails logger) :

LightspeedRestaurantClient.logger = "YOUR_LOGGER"

Contributing

Pull requests are welcome on GitHub at https://github.com/chronogolf/lightspeed_restaurant.

About Us

Chronogolf by Lightspeed

Chronogolf by Lightspeed's mission is to facilitate the interactions between golf managers and golf players. We are building software that allows golf directors to better manage their course, together with a marketplace to find & book games in real-time. We are constantly innovating and trying to challenge the status quo.

Learn more at https://www.lightspeedhq.com/golf/

Future Improvements

  • Improve destroy operation to handle destroy by passing an ID (or an array of IDs)
  • Add missing resources (Company, Reservation, Floor, Table...)
  • Improve test coverage

License

The gem is available as open source under the terms of the MIT License.