lightspeed_restaurant 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/lib/lightspeed_restaurant.rb +2 -1
- data/lib/lightspeed_restaurant/customer_loyalty_card.rb +22 -0
- data/lib/lightspeed_restaurant/request.rb +1 -1
- data/lib/lightspeed_restaurant/version.rb +1 -1
- data/lightspeed_restaurant.gemspec +4 -5
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '03778001aab334ef23c2f7fbb1d399f2ffdd7038'
|
4
|
+
data.tar.gz: 288c132884c84ba602e8e7f2f5e9c1e368acce28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08c2ec16b63142cddaa01ab51c68139179690b7eb030105fb00ae2bcb9f188fcc67ad4e8c256aa7d2b884d30dbef9d8a03aa4bb4f350ad47c6ad1ed649d17a9a'
|
7
|
+
data.tar.gz: 3ad0e2e5b7153854be241addde5987bed5b2d3061e2d049ea96ea9c5540e7aeab656e5e3be539d2247ddb28b4c18fa9309c8e8ddc02caf3edfd623ceb7f8c119
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
2.2.8
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Lightspeed Restaurant Ruby Bindings
|
2
|
-
# API spec at http://
|
2
|
+
# API spec at http://stating-integration.posios.com/PosServer/swagger-ui.html
|
3
3
|
|
4
4
|
require 'excon'
|
5
5
|
require 'json'
|
@@ -9,6 +9,7 @@ require 'lightspeed_restaurant/request'
|
|
9
9
|
|
10
10
|
require 'lightspeed_restaurant/customer'
|
11
11
|
require 'lightspeed_restaurant/customer_credit_change'
|
12
|
+
require 'lightspeed_restaurant/customer_loyalty_card'
|
12
13
|
require 'lightspeed_restaurant/receipt'
|
13
14
|
require 'lightspeed_restaurant/company'
|
14
15
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'lightspeed_restaurant/base'
|
2
|
+
require 'lightspeed_restaurant/operations/create'
|
3
|
+
require 'lightspeed_restaurant/operations/list'
|
4
|
+
|
5
|
+
module LightspeedRestaurantClient
|
6
|
+
class CustomerLoyaltyCard < LightspeedRestaurantClient::Base
|
7
|
+
include Operations::List
|
8
|
+
include Operations::Create
|
9
|
+
|
10
|
+
def initialize(customer_id)
|
11
|
+
super
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.resource_name
|
15
|
+
'LoyaltyCard'
|
16
|
+
end
|
17
|
+
|
18
|
+
def resource_path
|
19
|
+
"#{Customer.resource_path}/#{customer_id}/#{self.class.resource_name.downcase}"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -8,7 +8,7 @@ require 'uri'
|
|
8
8
|
module LightspeedRestaurantClient
|
9
9
|
class Request
|
10
10
|
def initialize(base_uri, path, token, body = {}, query = {})
|
11
|
-
@base_uri = base_uri || 'http://
|
11
|
+
@base_uri = base_uri || 'http://stating-integration.posios.com'
|
12
12
|
@headers = { 'Content-Type' => 'application/json', 'X-Auth-Token' => token }
|
13
13
|
@body = body.to_json
|
14
14
|
@query = query
|
@@ -1,4 +1,3 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
lib = File.expand_path('../lib', __FILE__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'lightspeed_restaurant/version'
|
@@ -24,12 +23,12 @@ Gem::Specification.new do |spec|
|
|
24
23
|
spec.add_dependency('excon', '~> 0.45.4')
|
25
24
|
spec.add_dependency('json', '~> 1.8.3')
|
26
25
|
|
26
|
+
spec.add_development_dependency('bundler-audit')
|
27
|
+
spec.add_development_dependency('pry')
|
27
28
|
spec.add_development_dependency('rake')
|
28
29
|
spec.add_development_dependency('rspec')
|
29
|
-
spec.add_development_dependency('pry')
|
30
|
-
spec.add_development_dependency('rubocop')
|
31
|
-
spec.add_development_dependency('bundler-audit')
|
32
30
|
spec.add_development_dependency('rspec_junit_formatter')
|
33
|
-
spec.add_development_dependency('
|
31
|
+
spec.add_development_dependency('rubocop')
|
34
32
|
spec.add_development_dependency('vcr')
|
33
|
+
spec.add_development_dependency('webmock')
|
35
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lightspeed_restaurant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Olivier Buffon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.8.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: bundler-audit
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: pry
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: rspec_junit_formatter
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: rubocop
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - ">="
|
@@ -123,7 +123,7 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: vcr
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - ">="
|
@@ -137,7 +137,7 @@ dependencies:
|
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: webmock
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - ">="
|
@@ -177,6 +177,7 @@ files:
|
|
177
177
|
- lib/lightspeed_restaurant/company.rb
|
178
178
|
- lib/lightspeed_restaurant/customer.rb
|
179
179
|
- lib/lightspeed_restaurant/customer_credit_change.rb
|
180
|
+
- lib/lightspeed_restaurant/customer_loyalty_card.rb
|
180
181
|
- lib/lightspeed_restaurant/errors/api_error.rb
|
181
182
|
- lib/lightspeed_restaurant/errors/authentication_error.rb
|
182
183
|
- lib/lightspeed_restaurant/errors/invalid_request_error.rb
|
@@ -213,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
214
|
version: '0'
|
214
215
|
requirements: []
|
215
216
|
rubyforge_project:
|
216
|
-
rubygems_version: 2.5.
|
217
|
+
rubygems_version: 2.4.5.3
|
217
218
|
signing_key:
|
218
219
|
specification_version: 4
|
219
220
|
summary: Ruby bindings for the Lightspeed Restaurant API
|