hubrise_client 2.0.10 → 2.0.13

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
  SHA256:
3
- metadata.gz: 75c7eef5135365fb5c999c9b6493389f3eec087fd6ba13d020cf85d7a69de67c
4
- data.tar.gz: 1f47d38b2288f154e5223896769b17646b255dd6b751f0a8f81c8d3f682c888d
3
+ metadata.gz: f0570b66732ff3c2ee070ccbf03fa249940fbd1c3035ff9ffafb2a39c2ed78bc
4
+ data.tar.gz: dad47449388c9ab7eb333352c0b782cb9373be1bbdd33914d2910bcd2ec1982b
5
5
  SHA512:
6
- metadata.gz: 9adea9896ad7f3fdebbc44d4e553497e96dd7b1f3e85d555da52972ad00315c12974457556abf00f165a0fa294ea7ef9a6aa5254dd5baec34e7ae4a0ac600b29
7
- data.tar.gz: 0152ce9425e8ddbac3d86be654bdcd7e076912091a8d2336b2885175ee3b5272c6a0939d300b5b43f0f181d3d00ff20bcc5a3bd3e8e86d19d5bf51d49f1ae6e9
6
+ metadata.gz: 533ee284165ea75562beb61f8a567514c41d70f7065e76644124c7b5c67ddc6b7c8f7dbaf8ab4bf7312c15a235f9a7a67124c515187db3d95085738ae9c07abe
7
+ data.tar.gz: e62584523d362d94f858d1951b196ff70d240a9f6aecaf14d4db62d0bbd9fa9d04c1ea518d4bf9cbf51663808226ac1b6665a38cdb39c92672077f3a0ecdffa0
data/README.md CHANGED
@@ -107,7 +107,7 @@ end
107
107
  3. Tag the repository:
108
108
 
109
109
  ```bash
110
- VERSION=2.0.10
110
+ VERSION=2.0.9
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)
@@ -39,8 +39,8 @@ module HubriseClient
39
39
 
40
40
  @response
41
41
  end
42
- rescue Errno::ECONNREFUSED
43
- raise HubriseError, "API is not reachable"
42
+ rescue Errno::ECONNREFUSED => e
43
+ raise HubriseError, "API is not reachable: #{e}"
44
44
  ensure
45
45
  callback.call(self, @response) if @http_request && callback
46
46
  end
@@ -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.10"
3
+ VERSION = "2.0.13"
4
4
  end
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubrise_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.10
4
+ version: 2.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antoine Monnier
8
8
  - Nick Save
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-04-04 00:00:00.000000000 Z
12
+ date: 2025-02-17 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description:
15
- email:
14
+ description:
15
+ email:
16
16
  executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
@@ -31,7 +31,7 @@ homepage: https://github.com/HubRise/ruby-client
31
31
  licenses:
32
32
  - MIT
33
33
  metadata: {}
34
- post_install_message:
34
+ post_install_message:
35
35
  rdoc_options: []
36
36
  require_paths:
37
37
  - lib
@@ -46,8 +46,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  requirements: []
49
- rubygems_version: 3.1.6
50
- signing_key:
49
+ rubygems_version: 3.4.20
50
+ signing_key:
51
51
  specification_version: 4
52
52
  summary: HubRise Ruby client
53
53
  test_files: []