ruby-jet 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bcea8da204c0c801c80d511a1dba6e3b7d31ca38
4
- data.tar.gz: 7dd0408a4025d0d2188e81fa599a0b1560be83fd
3
+ metadata.gz: 1895197a3daf65b5af2c50a20d4abd6acfbad4b5
4
+ data.tar.gz: 4b0a66192fa030ff36ca58248caca355c2180216
5
5
  SHA512:
6
- metadata.gz: aee182d1b76da22241ea7e75398183449afcde5e3d32127a21ccba84818264637c94497a173a76bdfe0e5eb6d74eaa5b7d76cb30940ea4d8135543735041c213
7
- data.tar.gz: 0f3e1681225d6ff463458efb8c0f57ae3dae7740be24b1e2bfa1825992796bd93a6e9fe6a93012e9d519c4b2df5fb6f2c61037f33325818072f30a2fe25b0148
6
+ metadata.gz: fbf02f6893b56c858a62ae5cd4b14e47f511718865689aa966f6efc400e75eccfaba9423ac4a3cbf2a94cdcd58b5e54d29b56327c12486db1d6c33ab43dd165f
7
+ data.tar.gz: 848a0174db383e795328ec2255e9858097c513ebe124a33cf392b069314e9c620f3e2811271c21df6b99bf16a409457a45f639e1dc9dbce69b3157e56b524aa4
@@ -75,6 +75,12 @@ module Jet
75
75
  decode_json(response.body) if response.code == 201
76
76
  end
77
77
 
78
+ def rest_patch_with_token(path, body = {})
79
+ headers = token
80
+ response = RestClient.patch("#{API_URL}#{path}", encode_json(body), headers)
81
+ decode_json(response.body) if response.code == 200
82
+ end
83
+
78
84
  def orders
79
85
  Orders.new(self)
80
86
  end
@@ -7,7 +7,7 @@ module Jet
7
7
  end
8
8
 
9
9
  def update_inventory(merchant_sku, body = {})
10
- @client.rest_put_with_token("/merchant-skus/#{merchant_sku}/inventory", body)
10
+ @client.rest_patch_with_token("/merchant-skus/#{merchant_sku}/inventory", body)
11
11
  end
12
12
 
13
13
  def get_inventory(merchant_sku)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-jet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Wells