Skip to content

Commit

Permalink
Release 3.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
olimart committed Dec 10, 2024
1 parent 3c9b961 commit 0dd6e9f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# Changelog

## 3.5.0 / 2024-12-10

- Add `externalPaymentProvider` resource endpoints
- Add `webhook` resource endpoints
- Upgrade ruby version to 3.3.6

## 3.4.0 / 2021-04-08

- Add `find` endpoint for the InventoryProduct
- Add `find` endpoint for the InventoryProduct

## 3.3.3 / 2021-04-08

- Add `find` endpoint for the company
- Add `find` endpoint for the company

## 3.3.2 / 2020-03-20

Expand Down
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
[Lightspeed Restaurant API Client](https://github.com/chronogolf/lightspeed_restaurant) is a gem for interacting with [Lightspeed Restaurant](https://www.lightspeedhq.com/pos/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:

```ruby
gem 'lightspeed_restaurant'
gem "lightspeed_restaurant"
```

And then execute:
Expand All @@ -28,23 +26,29 @@ Or install it yourself as:
### Basic Usage

First, set your api token:

```ruby
LightspeedRestaurantClient.api_token = "YOUR_API_TOKEN_HERE"
```

Next, make requests using the resource class you need:

```ruby
customers = LightspeedRestaurantClient::Customer.all
customer = customers.first
customer.firstName = 'Tom'
customer.firstName = "Tom"
customer.save
```
That's it!

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:

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

### Available operations
Expand All @@ -56,28 +60,33 @@ LightspeedRestaurantClient::Customer.all
```

#### Find

```ruby
LightspeedRestaurantClient::Customer.find(123)
```

#### Create

```ruby
LightspeedRestaurantClient::Customer.create(...firstName: 'Tom', email: '[email protected]'...)
LightspeedRestaurantClient::Customer.create(...firstName: "Tom", email: "[email protected]"...)
```

#### Update

```ruby
LightspeedRestaurantClient::Customer.update(123, { email: '[email protected]' })
LightspeedRestaurantClient::Customer.update(123, { email: "[email protected]" })
```

#### Save

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

#### Destroy

```ruby
customer = LightspeedRestaurantClient::Customer.find(123)
customer.destroy
Expand All @@ -87,6 +96,7 @@ customer.destroy

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) :

```ruby
LightspeedRestaurantClient.logger = "YOUR_LOGGER"
```
Expand All @@ -96,13 +106,15 @@ LightspeedRestaurantClient.logger = "YOUR_LOGGER"
Pull requests are welcome on GitHub at https://github.com/chronogolf/lightspeed_restaurant.

## About Us

[![Chronogolf by Lightspeed][crest]](https://www.lightspeedhq.com)

[Chronogolf by Lightspeed](https://www.lightspeedhq.com/golf/)'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/](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
Expand Down
2 changes: 1 addition & 1 deletion lib/lightspeed_restaurant/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module LightspeedRestaurantClient
VERSION = '3.4.0'
VERSION = "3.5.0"
end

0 comments on commit 0dd6e9f

Please sign in to comment.