lightspeed_restaurant 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a4c9f58fe22f8a8a77cb2be5d2032996e453f08
4
- data.tar.gz: 6ffb93f47a7ebfbc09856d9ba84c5d61ab3e87af
3
+ metadata.gz: aa8b609368b750f359883afec36d740604a012fa
4
+ data.tar.gz: eb514c7033c4e7770f2ce1f62be7dc645cf296c6
5
5
  SHA512:
6
- metadata.gz: 758a789a28515b0e3aaf4c496e7395bab6b48ae1847ba0a0198d8470e3ce4270ad8ac896393755409ae39b628da2d99cabdb783e84985738ed6882806e6eaf46
7
- data.tar.gz: b5d95d5e6e7e3300e97274c9e08fdba70d3033b4d39ce9db9751c35f0273223ca19122dac0315517db7596ee7e954bb4c9796aeff136615abc8f94209222f0af
6
+ metadata.gz: ee0076a606539411582588121df6ef017d863eccecc5336428448e485dace47700ca08005d7850a90975cfed2de1405fc75b2b8d984f0a78d3dc225dd2dd8d94
7
+ data.tar.gz: 68355cf483fc08fe3648cf473fbb56b9c152533b7d90116ff71e073237526e32314c2366d1ee3d1cdee1704f80b852a00f5c5c4dc51467c590c182529b9d4e0a
@@ -3,19 +3,8 @@ module LightspeedRestaurantClient
3
3
  module Update
4
4
  def update(id, attributes)
5
5
  updated_object = new(attributes)
6
- response = LightspeedRestaurantClient.put(resource_path + "/#{id}", updated_object)
7
- new(build_payload(attributes, response))
8
- end
9
-
10
- private
11
-
12
- def build_payload(attributes, response)
13
- begin
14
- return JSON.parse(response)
15
- rescue JSON::ParserError => error
16
- raise error if response.to_i.zero?
17
- end
18
- attributes.merge!(id: response.to_i)
6
+ LightspeedRestaurantClient.put(resource_path + "/#{id}", updated_object)
7
+ updated_object
19
8
  end
20
9
  end
21
10
  end
@@ -1,3 +1,3 @@
1
1
  module LightspeedRestaurantClient
2
- VERSION = '1.1.1'.freeze
2
+ VERSION = '1.1.2'.freeze
3
3
  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.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Buffon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-23 00:00:00.000000000 Z
11
+ date: 2018-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon