hubrise_client 2.0.9 → 2.0.12

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
  SHA256:
3
- metadata.gz: 7a0da97b141e59b8eae05bf3640cea1d5a80e9966aeaccbc70583970971d41d7
4
- data.tar.gz: 80efd8375446ec71cfa1e970adec22615c4591487f73d6aeddc7c9cb8ee5bc00
3
+ metadata.gz: a49437a57be7d5e200116c79f69c64ce6d5e5517702911698b2a2b1794b2748b
4
+ data.tar.gz: 4731c2856b2a7b5420848b30835a522a8f2720da1bf44c5c94c219abc654980c
5
5
  SHA512:
6
- metadata.gz: 045ba72c148dcec59354e36c6c1576ad640b5f1a0a97f0e5aa5c60a526a7cdfc427ba5227426ef5780b4937d3dae180614f2b25d6a1b7e1993b1e970f616504f
7
- data.tar.gz: 456ce565b0e30f1ab6e8c2fc57eef3b37c8de74e41c7df0797b9c221da0505f9276267be586e5f7bed15cf250b58d08600690853da5ca4a441e6bff8ca5e011f
6
+ metadata.gz: 3c0266e7166192756389bbaacb87ab1b56c6843db2742bcf0ad7627165953d853eea48ab0476f805652ae1338c20b2e19b6ee8b3e006b10cfee43622792f7345
7
+ data.tar.gz: f31a3da704293aa9df30dcacffc778e8da48a3adb742a70ce558939f4dc74d7b55e55e7b2550174d007c3fd01343f420b7e49f9f513afb725857f23e940f3e52
data/README.md CHANGED
@@ -107,7 +107,7 @@ end
107
107
  3. Tag the repository:
108
108
 
109
109
  ```bash
110
- VERSION=2.0.9
110
+ VERSION=2.0.12
111
111
  git add lib/hubrise_client/version.rb
112
112
  git commit -m "Version $VERSION"
113
113
  git tag v$VERSION
data/V1_ENDPOINTS.md CHANGED
@@ -80,12 +80,21 @@ client = HubriseClient::V1.new(CLIENT_ID, CLIENT_SECRET, client_attrs)
80
80
 
81
81
  ### UPDATE_ORDER
82
82
 
83
+ - This method is deprecated. Use `PATCH_ORDER` instead.
83
84
  - Initialized with `client_attrs = { access_token: "access_token1" }`
84
85
  ```ruby
85
86
  client.update_order("zrn61", "wy3xz", { status: "delivered" })
86
87
  # [PUT] /locations/zrn61/orders/wy3xz with { headers: { "Content-Type": "application/json" }, body: "{\"status\":\"delivered\" }" }
87
88
  ```
88
89
 
90
+ ### PATCH_ORDER
91
+
92
+ - Initialized with `client_attrs = { access_token: "access_token1" }`
93
+ ```ruby
94
+ client.patch_order("zrn61", "wy3xz", { status: "delivered" })
95
+ # [PATCH] /locations/zrn61/orders/wy3xz with { headers: { "Content-Type": "application/json" }, body: "{\"status\":\"delivered\" }" }
96
+ ```
97
+
89
98
  ### GET_CALLBACK
90
99
 
91
100
  - Initialized with `client_attrs = { access_token: "access_token1" }`
@@ -43,7 +43,7 @@ module HubriseClient
43
43
  client_id: @app_id
44
44
  )
45
45
 
46
- (@use_https ? "https" : "http") + "://" + oauth2_hubrise_hostname_with_version + "/authorize?" + URI.encode_www_form(params) # rubocop:disable Metrics/LineLength
46
+ (@use_https ? "https" : "http") + "://" + oauth2_hubrise_hostname_with_version + "/authorize?" + URI.encode_www_form(params) # rubocop:disable Layout/LineLength
47
47
  end
48
48
 
49
49
  def authorize!(authorization_code)
@@ -56,10 +56,15 @@ module HubriseClient
56
56
  call_api("/locations/#{location_id}/orders", :post, data: params)
57
57
  end
58
58
 
59
+ # @deprecated Use patch_order instead
59
60
  def update_order(location_id, order_id, params)
60
61
  call_api("/locations/#{location_id}/orders/#{order_id}", :put, data: params)
61
62
  end
62
63
 
64
+ def patch_order(location_id, order_id, params)
65
+ call_api("/locations/#{location_id}/orders/#{order_id}", :patch, data: params)
66
+ end
67
+
63
68
  # --------------------
64
69
  # Callback, events
65
70
  # --------------------
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module HubriseClient
3
- VERSION = "2.0.9"
3
+ VERSION = "2.0.12"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubrise_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.9
4
+ version: 2.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antoine Monnier
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-04-04 00:00:00.000000000 Z
12
+ date: 2024-06-10 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email:
@@ -37,7 +37,7 @@ require_paths:
37
37
  - lib
38
38
  required_ruby_version: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - "~>"
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: 2.7.7
43
43
  required_rubygems_version: !ruby/object:Gem::Requirement