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 +4 -4
- data/README.md +1 -1
- data/V1_ENDPOINTS.md +9 -0
- data/lib/hubrise_client/base.rb +1 -1
- data/lib/hubrise_client/request.rb +2 -2
- data/lib/hubrise_client/v1.rb +5 -0
- data/lib/hubrise_client/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0570b66732ff3c2ee070ccbf03fa249940fbd1c3035ff9ffafb2a39c2ed78bc
|
4
|
+
data.tar.gz: dad47449388c9ab7eb333352c0b782cb9373be1bbdd33914d2910bcd2ec1982b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 533ee284165ea75562beb61f8a567514c41d70f7065e76644124c7b5c67ddc6b7c8f7dbaf8ab4bf7312c15a235f9a7a67124c515187db3d95085738ae9c07abe
|
7
|
+
data.tar.gz: e62584523d362d94f858d1951b196ff70d240a9f6aecaf14d4db62d0bbd9fa9d04c1ea518d4bf9cbf51663808226ac1b6665a38cdb39c92672077f3a0ecdffa0
|
data/README.md
CHANGED
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" }`
|
data/lib/hubrise_client/base.rb
CHANGED
@@ -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
|
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
|
data/lib/hubrise_client/v1.rb
CHANGED
@@ -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
|
# --------------------
|
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.
|
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:
|
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.
|
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: []
|