hubrise_client 2.0.13 → 2.0.14
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 +183 -159
- data/lib/hubrise_client/v1.rb +19 -1
- data/lib/hubrise_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89e7c3b037501ae07c44e6cfef51a9e39d5d0aa06c229493716957835146c64e
|
4
|
+
data.tar.gz: 34643d28e45cad280f62bc8e826cfaf0d7bbd19cedcd003faeeda087d3d5e428
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78e35af2ae3b43e4a3e73339abd261cbe515cddac733dbd930831f6fea512ec686683b4e681875d429d9d07edbe4d396ba44858d95a134ef6e4cab0c922a3852
|
7
|
+
data.tar.gz: 15ad66f6d58e868117ead6678921b0f70b9954525b60e28930c0af6e599daca371f1faf6105399f904980d5dcb73bfc9ae2dfdf0f15bbadef88a2a972afd3bde
|
data/README.md
CHANGED
data/V1_ENDPOINTS.md
CHANGED
@@ -6,122 +6,146 @@ client = HubriseClient::V1.new(CLIENT_ID, CLIENT_SECRET, client_attrs)
|
|
6
6
|
|
7
7
|
### GET_ACCOUNT
|
8
8
|
|
9
|
-
- Initialized with `client_attrs = { access_token: "
|
9
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
10
10
|
```ruby
|
11
|
-
client.get_account("
|
12
|
-
# [GET] /accounts/
|
11
|
+
client.get_account("accountIdX")
|
12
|
+
# [GET] /accounts/accountIdX with { headers: { "X-Access-Token": "accessTokenX" }}
|
13
13
|
```
|
14
|
-
- Initialized with `client_attrs = { access_token: "
|
14
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
15
15
|
```ruby
|
16
16
|
client.get_account
|
17
|
-
# [GET] /account with { headers: { "X-Access-Token": "
|
17
|
+
# [GET] /account with { headers: { "X-Access-Token": "accessTokenX" }}
|
18
18
|
```
|
19
19
|
|
20
20
|
### GET_ACCOUNTS
|
21
21
|
|
22
|
-
- Initialized with `client_attrs = { access_token: "
|
22
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
23
23
|
```ruby
|
24
24
|
client.get_accounts
|
25
|
-
# [GET] /accounts with { headers: { "X-Access-Token": "
|
25
|
+
# [GET] /accounts with { headers: { "X-Access-Token": "accessTokenX" }}
|
26
26
|
```
|
27
27
|
|
28
28
|
### GET_USER
|
29
29
|
|
30
|
-
- Initialized with `client_attrs = { access_token: "
|
30
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
31
31
|
```ruby
|
32
32
|
client.get_user
|
33
|
-
# [GET] /user with { headers: { "X-Access-Token": "
|
33
|
+
# [GET] /user with { headers: { "X-Access-Token": "accessTokenX" }}
|
34
34
|
```
|
35
35
|
|
36
36
|
### GET_LOCATIONS
|
37
37
|
|
38
|
-
- Initialized with `client_attrs = { access_token: "
|
38
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
39
39
|
```ruby
|
40
40
|
client.get_locations
|
41
|
-
# [GET] /locations with { headers: { "X-Access-Token": "
|
41
|
+
# [GET] /locations with { headers: { "X-Access-Token": "accessTokenX" }}
|
42
42
|
```
|
43
43
|
|
44
44
|
### GET_LOCATION
|
45
45
|
|
46
|
-
- Initialized with `client_attrs = { access_token: "
|
46
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
47
47
|
```ruby
|
48
|
-
client.get_location("
|
49
|
-
# [GET] /locations/
|
48
|
+
client.get_location("locationIdX")
|
49
|
+
# [GET] /locations/locationIdX with { headers: { "X-Access-Token": "accessTokenX" }}
|
50
50
|
```
|
51
|
-
- Initialized with `client_attrs = { access_token: "
|
51
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
52
52
|
```ruby
|
53
53
|
client.get_location
|
54
|
-
# [GET] /location with { headers: { "X-Access-Token": "
|
54
|
+
# [GET] /location with { headers: { "X-Access-Token": "accessTokenX" }}
|
55
55
|
```
|
56
56
|
|
57
57
|
### GET_ORDERS
|
58
58
|
|
59
|
-
- Initialized with `client_attrs = { access_token: "
|
59
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
60
60
|
```ruby
|
61
|
-
client.get_orders("
|
62
|
-
# [GET] /locations/
|
61
|
+
client.get_orders("locationIdX", { status: "new" })
|
62
|
+
# [GET] /locations/locationIdX/orders?status=new with { headers: { "X-Access-Token": "accessTokenX" }}
|
63
63
|
```
|
64
64
|
|
65
65
|
### GET_ORDER
|
66
66
|
|
67
|
-
- Initialized with `client_attrs = { access_token: "
|
67
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
68
68
|
```ruby
|
69
|
-
client.get_order("
|
70
|
-
# [GET] /locations/
|
69
|
+
client.get_order("locationIdX", "orderIdX")
|
70
|
+
# [GET] /locations/locationIdX/orders/orderIdX with { headers: { "X-Access-Token": "accessTokenX" }}
|
71
71
|
```
|
72
72
|
|
73
73
|
### CREATE_ORDER
|
74
74
|
|
75
|
-
- Initialized with `client_attrs = { access_token: "
|
75
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
76
76
|
```ruby
|
77
|
-
client.create_order("
|
78
|
-
# [POST] /locations/
|
77
|
+
client.create_order("locationIdX", { status: "new" })
|
78
|
+
# [POST] /locations/locationIdX/orders with { headers: { "Content-Type": "application/json" }, body: "{\"status\":\"new\" }" }
|
79
79
|
```
|
80
80
|
|
81
81
|
### UPDATE_ORDER
|
82
82
|
|
83
83
|
- This method is deprecated. Use `PATCH_ORDER` instead.
|
84
|
-
- Initialized with `client_attrs = { access_token: "
|
84
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
85
85
|
```ruby
|
86
|
-
client.update_order("
|
87
|
-
# [PUT] /locations/
|
86
|
+
client.update_order("locationIdX", "orderIdX", { status: "delivered" })
|
87
|
+
# [PUT] /locations/locationIdX/orders/orderIdX with { headers: { "Content-Type": "application/json" }, body: "{\"status\":\"delivered\" }" }
|
88
88
|
```
|
89
89
|
|
90
90
|
### PATCH_ORDER
|
91
91
|
|
92
|
-
- Initialized with `client_attrs = { access_token: "
|
92
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
93
93
|
```ruby
|
94
|
-
client.patch_order("
|
95
|
-
# [PATCH] /locations/
|
94
|
+
client.patch_order("locationIdX", "orderIdX", { status: "delivered" })
|
95
|
+
# [PATCH] /locations/locationIdX/orders/orderIdX with { headers: { "Content-Type": "application/json" }, body: "{\"status\":\"delivered\" }" }
|
96
|
+
```
|
97
|
+
|
98
|
+
### GET_DELIVERY
|
99
|
+
|
100
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
101
|
+
```ruby
|
102
|
+
client.get_delivery("locationIdX", "orderIdX")
|
103
|
+
# [GET] /locations/locationIdX/orders/orderIdX/delivery with { headers: { "X-Access-Token": "accessTokenX" }}
|
104
|
+
```
|
105
|
+
|
106
|
+
### CREATE_DELIVERY
|
107
|
+
|
108
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
109
|
+
```ruby
|
110
|
+
client.create_delivery("locationIdX", "orderIdX", { carrier: "UPS" })
|
111
|
+
# [POST] /locations/locationIdX/orders/orderIdX/delivery with { headers: { "Content-Type": "application/json" }, body: "{\"carrier\":\"UPS\" }" }
|
112
|
+
```
|
113
|
+
|
114
|
+
### PATCH_DELIVERY
|
115
|
+
|
116
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
117
|
+
```ruby
|
118
|
+
client.patch_delivery("locationIdX", "orderIdX", { status: "delivered" })
|
119
|
+
# [PATCH] /locations/locationIdX/orders/orderIdX/delivery with { headers: { "Content-Type": "application/json" }, body: "{\"status\":\"delivered\" }" }
|
96
120
|
```
|
97
121
|
|
98
122
|
### GET_CALLBACK
|
99
123
|
|
100
|
-
- Initialized with `client_attrs = { access_token: "
|
124
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
101
125
|
```ruby
|
102
126
|
client.get_callback
|
103
|
-
# [GET] /callback with { headers: { "X-Access-Token": "
|
127
|
+
# [GET] /callback with { headers: { "X-Access-Token": "accessTokenX" }}
|
104
128
|
```
|
105
129
|
|
106
130
|
### GET_CALLBACK_EVENTS
|
107
131
|
|
108
|
-
- Initialized with `client_attrs = { access_token: "
|
132
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
109
133
|
```ruby
|
110
134
|
client.get_callback_events
|
111
|
-
# [GET] /callback/events with { headers: { "X-Access-Token": "
|
135
|
+
# [GET] /callback/events with { headers: { "X-Access-Token": "accessTokenX" }}
|
112
136
|
```
|
113
137
|
|
114
138
|
### DELETE_EVENT
|
115
139
|
|
116
|
-
- Initialized with `client_attrs = { access_token: "
|
140
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
117
141
|
```ruby
|
118
|
-
client.delete_event("
|
119
|
-
# [DELETE] /callback/events/
|
142
|
+
client.delete_event("eventIdX")
|
143
|
+
# [DELETE] /callback/events/eventIdX with { headers: { "X-Access-Token": "accessTokenX" }}
|
120
144
|
```
|
121
145
|
|
122
146
|
### UPDATE_CALLBACK
|
123
147
|
|
124
|
-
- Initialized with `client_attrs = { access_token: "
|
148
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
125
149
|
```ruby
|
126
150
|
client.update_callback({ "order": ["create"]})
|
127
151
|
# [POST] /callback with { headers: { "Content-Type": "application/json" }, body: "{\"order\":[\"create\"]}" }
|
@@ -129,138 +153,138 @@ client = HubriseClient::V1.new(CLIENT_ID, CLIENT_SECRET, client_attrs)
|
|
129
153
|
|
130
154
|
### DELETE_CALLBACK
|
131
155
|
|
132
|
-
- Initialized with `client_attrs = { access_token: "
|
156
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
133
157
|
```ruby
|
134
158
|
client.delete_callback
|
135
|
-
# [DELETE] /callback with { headers: { "X-Access-Token": "
|
159
|
+
# [DELETE] /callback with { headers: { "X-Access-Token": "accessTokenX" }}
|
136
160
|
```
|
137
161
|
|
138
162
|
### GET_LOCATION_CUSTOMER_LISTS
|
139
163
|
|
140
|
-
- Initialized with `client_attrs = { access_token: "
|
164
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
141
165
|
```ruby
|
142
|
-
client.get_location_customer_lists("
|
143
|
-
# [GET] /locations/
|
166
|
+
client.get_location_customer_lists("locationIdX")
|
167
|
+
# [GET] /locations/locationIdX/customer_lists with { headers: { "X-Access-Token": "accessTokenX" }}
|
144
168
|
```
|
145
169
|
|
146
170
|
### GET_ACCOUNT_CUSTOMER_LISTS
|
147
171
|
|
148
|
-
- Initialized with `client_attrs = { access_token: "
|
172
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
149
173
|
```ruby
|
150
|
-
client.get_account_customer_lists("
|
151
|
-
# [GET] /accounts/
|
174
|
+
client.get_account_customer_lists("accountIdX")
|
175
|
+
# [GET] /accounts/accountIdX/customer_lists with { headers: { "X-Access-Token": "accessTokenX" }}
|
152
176
|
```
|
153
177
|
|
154
178
|
### GET_CUSTOMER_LIST
|
155
179
|
|
156
|
-
- Initialized with `client_attrs = { access_token: "
|
180
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
157
181
|
```ruby
|
158
|
-
client.get_customer_list("
|
159
|
-
# [GET] /customer_lists/
|
182
|
+
client.get_customer_list("customerListIdX")
|
183
|
+
# [GET] /customer_lists/customerListIdX with { headers: { "X-Access-Token": "accessTokenX" }}
|
160
184
|
```
|
161
|
-
- Initialized with `client_attrs = { access_token: "
|
185
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX", customer_list_id: "customerListIdX" }`
|
162
186
|
```ruby
|
163
187
|
client.get_customer_list
|
164
|
-
# [GET] /customer_lists/
|
188
|
+
# [GET] /customer_lists/customerListIdX with { headers: { "X-Access-Token": "accessTokenX" }}
|
165
189
|
```
|
166
190
|
|
167
191
|
### GET_ALL_CUSTOMERS
|
168
192
|
|
169
|
-
- Initialized with `client_attrs = { access_token: "
|
193
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
170
194
|
```ruby
|
171
|
-
client.get_all_customers("
|
172
|
-
# [GET] /customer_lists/
|
195
|
+
client.get_all_customers("customerListIdX")
|
196
|
+
# [GET] /customer_lists/customerListIdX/customers with { headers: { "X-Access-Token": "accessTokenX" }}
|
173
197
|
```
|
174
|
-
- Initialized with `client_attrs = { access_token: "
|
198
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX", customer_list_id: "customerListIdX" }`
|
175
199
|
```ruby
|
176
200
|
client.get_all_customers
|
177
|
-
# [GET] /customer_lists/
|
201
|
+
# [GET] /customer_lists/customerListIdX/customers with { headers: { "X-Access-Token": "accessTokenX" }}
|
178
202
|
```
|
179
203
|
|
180
204
|
### SEARCH_CUSTOMERS
|
181
205
|
|
182
|
-
- Initialized with `client_attrs = { access_token: "
|
206
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX", customer_list_id: "customerListIdX" }`
|
183
207
|
```ruby
|
184
|
-
client.search_customers({ email: "
|
185
|
-
# [GET] /customer_lists/
|
208
|
+
client.search_customers({ email: "john@*" })
|
209
|
+
# [GET] /customer_lists/customerListIdX/customers?email=john@* with { headers: { "X-Access-Token": "accessTokenX" }}
|
186
210
|
```
|
187
|
-
- Initialized with `client_attrs = { access_token: "
|
211
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
188
212
|
```ruby
|
189
|
-
client.search_customers({ email: "
|
190
|
-
# [GET] /customer_lists/
|
213
|
+
client.search_customers({ email: "john@*" }, "customerListIdX")
|
214
|
+
# [GET] /customer_lists/customerListIdX/customers?email=john@* with { headers: { "X-Access-Token": "accessTokenX" }}
|
191
215
|
```
|
192
216
|
|
193
217
|
### GET_CUSTOMER
|
194
218
|
|
195
|
-
- Initialized with `client_attrs = { access_token: "
|
219
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX", customer_list_id: "customerListIdX" }`
|
196
220
|
```ruby
|
197
|
-
client.get_customer("
|
198
|
-
# [GET] /customer_lists/
|
221
|
+
client.get_customer("customerIdX")
|
222
|
+
# [GET] /customer_lists/customerListIdX/customers/customerIdX with { headers: { "X-Access-Token": "accessTokenX" }}
|
199
223
|
```
|
200
|
-
- Initialized with `client_attrs = { access_token: "
|
224
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
201
225
|
```ruby
|
202
|
-
client.get_customer("
|
203
|
-
# [GET] /customer_lists/
|
226
|
+
client.get_customer("customerIdX", "customerListIdX")
|
227
|
+
# [GET] /customer_lists/customerListIdX/customers/customerIdX with { headers: { "X-Access-Token": "accessTokenX" }}
|
204
228
|
```
|
205
229
|
|
206
230
|
### CREATE_CUSTOMER
|
207
231
|
|
208
|
-
- Initialized with `client_attrs = { access_token: "
|
232
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX", customer_list_id: "customerListIdX" }`
|
209
233
|
```ruby
|
210
|
-
client.create_customer({ first_name: "
|
211
|
-
# [POST] /customer_lists/
|
234
|
+
client.create_customer({ first_name: "John" })
|
235
|
+
# [POST] /customer_lists/customerListIdX/customers with { headers: { "Content-Type": "application/json" }, body: "{\"first_name\":\"John\" }" }
|
212
236
|
```
|
213
|
-
- Initialized with `client_attrs = { access_token: "
|
237
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
214
238
|
```ruby
|
215
|
-
client.create_customer({ first_name: "
|
216
|
-
# [POST] /customer_lists/
|
239
|
+
client.create_customer({ first_name: "John" }, "customerListIdX")
|
240
|
+
# [POST] /customer_lists/customerListIdX/customers with { headers: { "Content-Type": "application/json" }, body: "{\"first_name\":\"John\" }" }
|
217
241
|
```
|
218
242
|
|
219
243
|
### UPDATE_CUSTOMER
|
220
244
|
|
221
|
-
- Initialized with `client_attrs = { access_token: "
|
245
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX", customer_list_id: "customerListIdX" }`
|
222
246
|
```ruby
|
223
|
-
client.update_customer("
|
224
|
-
# [PUT] /customer_lists/
|
247
|
+
client.update_customer("customerIdX", { first_name: "John" })
|
248
|
+
# [PUT] /customer_lists/customerListIdX/customers/customerIdX with { headers: { "Content-Type": "application/json" }, body: "{\"first_name\":\"John\" }" }
|
225
249
|
```
|
226
|
-
- Initialized with `client_attrs = { access_token: "
|
250
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
227
251
|
```ruby
|
228
|
-
client.update_customer("
|
229
|
-
# [PUT] /customer_lists/
|
252
|
+
client.update_customer("customerIdX", { first_name: "John" }, "customerListIdX")
|
253
|
+
# [PUT] /customer_lists/customerListIdX/customers/customerIdX with { headers: { "Content-Type": "application/json" }, body: "{\"first_name\":\"John\" }" }
|
230
254
|
```
|
231
255
|
|
232
256
|
### GET_LOCATION_CATALOGS
|
233
257
|
|
234
|
-
- Initialized with `client_attrs = { access_token: "
|
258
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
235
259
|
```ruby
|
236
|
-
client.get_location_catalogs("
|
237
|
-
# [GET] /locations/
|
260
|
+
client.get_location_catalogs("locationIdX")
|
261
|
+
# [GET] /locations/locationIdX/catalogs with { headers: { "X-Access-Token": "accessTokenX" }}
|
238
262
|
```
|
239
263
|
|
240
264
|
### GET_ACCOUNT_CATALOGS
|
241
265
|
|
242
|
-
- Initialized with `client_attrs = { access_token: "
|
266
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
243
267
|
```ruby
|
244
|
-
client.get_account_catalogs("
|
245
|
-
# [GET] /accounts/
|
268
|
+
client.get_account_catalogs("accountIdX")
|
269
|
+
# [GET] /accounts/accountIdX/catalogs with { headers: { "X-Access-Token": "accessTokenX" }}
|
246
270
|
```
|
247
271
|
|
248
272
|
### GET_CATALOG
|
249
273
|
|
250
|
-
- Initialized with `client_attrs = { access_token: "
|
274
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
251
275
|
```ruby
|
252
|
-
client.get_catalog("
|
253
|
-
# [GET] /catalogs/
|
276
|
+
client.get_catalog("catalogIdX")
|
277
|
+
# [GET] /catalogs/catalogIdX with { headers: { "X-Access-Token": "accessTokenX" }}
|
254
278
|
```
|
255
|
-
- Initialized with `client_attrs = { access_token: "
|
279
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX", catalog_id: "catalogIdX" }`
|
256
280
|
```ruby
|
257
281
|
client.get_catalog
|
258
|
-
# [GET] /catalogs/
|
282
|
+
# [GET] /catalogs/catalogIdX with { headers: { "X-Access-Token": "accessTokenX" }}
|
259
283
|
```
|
260
284
|
|
261
285
|
### CREATE_ACCOUNT_CATALOG
|
262
286
|
|
263
|
-
- Initialized with `client_attrs = { access_token: "
|
287
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
264
288
|
```ruby
|
265
289
|
client.create_account_catalog({ name: "Catalog1" })
|
266
290
|
# [POST] /account/catalogs with { headers: { "Content-Type": "application/json" }, body: "{\"name\":\"Catalog1\" }" }
|
@@ -268,12 +292,12 @@ client = HubriseClient::V1.new(CLIENT_ID, CLIENT_SECRET, client_attrs)
|
|
268
292
|
|
269
293
|
### CREATE_LOCATION_CATALOG
|
270
294
|
|
271
|
-
- Initialized with `client_attrs = { access_token: "
|
295
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
272
296
|
```ruby
|
273
|
-
client.create_location_catalog({ name: "Catalog1" }, "
|
274
|
-
# [POST] /locations/
|
297
|
+
client.create_location_catalog({ name: "Catalog1" }, "locationIdX")
|
298
|
+
# [POST] /locations/locationIdX/catalogs with { headers: { "Content-Type": "application/json" }, body: "{\"name\":\"Catalog1\" }" }
|
275
299
|
```
|
276
|
-
- Initialized with `client_attrs = { access_token: "
|
300
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
277
301
|
```ruby
|
278
302
|
client.create_location_catalog({ name: "Catalog1" })
|
279
303
|
# [POST] /location/catalogs with { headers: { "Content-Type": "application/json" }, body: "{\"name\":\"Catalog1\" }" }
|
@@ -281,145 +305,145 @@ client = HubriseClient::V1.new(CLIENT_ID, CLIENT_SECRET, client_attrs)
|
|
281
305
|
|
282
306
|
### UPDATE_CATALOG
|
283
307
|
|
284
|
-
- Initialized with `client_attrs = { access_token: "
|
308
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
285
309
|
```ruby
|
286
|
-
client.update_catalog({ name: "Catalog1" }, "
|
287
|
-
# [PUT] /catalogs/
|
310
|
+
client.update_catalog({ name: "Catalog1" }, "catalogIdX")
|
311
|
+
# [PUT] /catalogs/catalogIdX with { headers: { "Content-Type": "application/json" }, body: "{\"name\":\"Catalog1\" }" }
|
288
312
|
```
|
289
|
-
- Initialized with `client_attrs = { access_token: "
|
313
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX", catalog_id: "catalogIdX" }`
|
290
314
|
```ruby
|
291
315
|
client.update_catalog({ name: "Catalog1" })
|
292
|
-
# [PUT] /catalogs/
|
316
|
+
# [PUT] /catalogs/catalogIdX with { headers: { "Content-Type": "application/json" }, body: "{\"name\":\"Catalog1\" }" }
|
293
317
|
```
|
294
318
|
|
295
319
|
### CREATE_IMAGE
|
296
320
|
|
297
|
-
- Initialized with `client_attrs = { access_token: "
|
321
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
298
322
|
```ruby
|
299
|
-
client.create_image("bin1", "image/png", "
|
300
|
-
# [POST] /catalogs/
|
323
|
+
client.create_image("bin1", "image/png", "catalogIdX")
|
324
|
+
# [POST] /catalogs/catalogIdX/images with { headers: { "Content-Type": "image/png" }, body: "bin1" }
|
301
325
|
```
|
302
|
-
- Initialized with `client_attrs = { access_token: "
|
326
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX", catalog_id: "catalogIdX" }`
|
303
327
|
```ruby
|
304
328
|
client.create_image("bin1", "image/png")
|
305
|
-
# [POST] /catalogs/
|
329
|
+
# [POST] /catalogs/catalogIdX/images with { headers: { "Content-Type": "image/png" }, body: "bin1" }
|
306
330
|
```
|
307
331
|
|
308
332
|
### GET_IMAGES
|
309
333
|
|
310
|
-
- Initialized with `client_attrs = { access_token: "
|
334
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
311
335
|
```ruby
|
312
|
-
client.get_images("
|
313
|
-
# [GET] /catalogs/
|
336
|
+
client.get_images("orderIdX")
|
337
|
+
# [GET] /catalogs/orderIdX/images with { headers: { "X-Access-Token": "accessTokenX" }}
|
314
338
|
```
|
315
|
-
- Initialized with `client_attrs = { access_token: "
|
339
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX", catalog_id: "catalogIdX" }`
|
316
340
|
```ruby
|
317
341
|
client.get_images
|
318
|
-
# [GET] /catalogs/
|
342
|
+
# [GET] /catalogs/catalogIdX/images with { headers: { "X-Access-Token": "accessTokenX" }}
|
319
343
|
```
|
320
344
|
|
321
345
|
### GET_IMAGE
|
322
346
|
|
323
|
-
- Initialized with `client_attrs = { access_token: "
|
347
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
324
348
|
```ruby
|
325
|
-
client.get_image("
|
326
|
-
# [GET] /catalogs/
|
349
|
+
client.get_image("imageIdX", "catalogIdX")
|
350
|
+
# [GET] /catalogs/catalogIdX/images/imageIdX with { headers: { "X-Access-Token": "accessTokenX" }}
|
327
351
|
```
|
328
|
-
- Initialized with `client_attrs = { access_token: "
|
352
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX", catalog_id: "catalogIdX" }`
|
329
353
|
```ruby
|
330
|
-
client.get_image("
|
331
|
-
# [GET] /catalogs/
|
354
|
+
client.get_image("imageIdX")
|
355
|
+
# [GET] /catalogs/catalogIdX/images/imageIdX with { headers: { "X-Access-Token": "accessTokenX" }}
|
332
356
|
```
|
333
357
|
|
334
358
|
### GET_IMAGE_DATA
|
335
359
|
|
336
|
-
- Initialized with `client_attrs = { access_token: "
|
360
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
337
361
|
```ruby
|
338
|
-
client.get_image_data("
|
339
|
-
# [GET] /catalogs/
|
362
|
+
client.get_image_data("imageIdX", "catalogIdX")
|
363
|
+
# [GET] /catalogs/catalogIdX/images/imageIdX/data with { headers: { "X-Access-Token": "accessTokenX" }}
|
340
364
|
```
|
341
|
-
- Initialized with `client_attrs = { access_token: "
|
365
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX", catalog_id: "catalogIdX" }`
|
342
366
|
```ruby
|
343
|
-
client.get_image_data("
|
344
|
-
# [GET] /catalogs/
|
367
|
+
client.get_image_data("imageIdX")
|
368
|
+
# [GET] /catalogs/catalogIdX/images/imageIdX/data with { headers: { "X-Access-Token": "accessTokenX" }}
|
345
369
|
```
|
346
370
|
|
347
371
|
### GET_INVENTORY
|
348
372
|
|
349
|
-
- Initialized with `client_attrs = { access_token: "
|
373
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
350
374
|
```ruby
|
351
|
-
client.get_inventory("
|
352
|
-
# [GET] /catalogs/
|
375
|
+
client.get_inventory("catalogIdX", "locationIdX")
|
376
|
+
# [GET] /catalogs/catalogIdX/locations/locationIdX/inventory with { headers: { "X-Access-Token": "accessTokenX" }}
|
353
377
|
```
|
354
|
-
- Initialized with `client_attrs = { access_token: "
|
378
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
355
379
|
```ruby
|
356
|
-
client.get_inventory("
|
357
|
-
# [GET] /catalogs/
|
380
|
+
client.get_inventory("catalogIdX")
|
381
|
+
# [GET] /catalogs/catalogIdX/location/inventory with { headers: { "X-Access-Token": "accessTokenX" }}
|
358
382
|
```
|
359
|
-
- Initialized with `client_attrs = { access_token: "
|
383
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX", catalog_id: "catalogIdX" }`
|
360
384
|
```ruby
|
361
385
|
client.get_inventory
|
362
|
-
# [GET] /catalogs/
|
386
|
+
# [GET] /catalogs/catalogIdX/location/inventory with { headers: { "X-Access-Token": "accessTokenX" }}
|
363
387
|
```
|
364
388
|
|
365
389
|
### UPDATE_INVENTORY
|
366
390
|
|
367
|
-
- Initialized with `client_attrs = { access_token: "
|
391
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
368
392
|
```ruby
|
369
|
-
client.update_inventory([{sku_ref: "m9qqs"}], "
|
370
|
-
# [PUT] /catalogs/
|
393
|
+
client.update_inventory([{sku_ref: "m9qqs"}], "catalogIdX", "locationIdX")
|
394
|
+
# [PUT] /catalogs/catalogIdX/locations/locationIdX/inventory with { headers: { "X-Access-Token": "accessTokenX" }, body: "[{\"sku_ref\":\"m9qqs\"}]"}
|
371
395
|
```
|
372
|
-
- Initialized with `client_attrs = { access_token: "
|
396
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
373
397
|
```ruby
|
374
|
-
client.update_inventory([{sku_ref: "m9qqs"}], "
|
375
|
-
# [PUT] /catalogs/
|
398
|
+
client.update_inventory([{sku_ref: "m9qqs"}], "catalogIdX")
|
399
|
+
# [PUT] /catalogs/catalogIdX/location/inventory with { headers: { "X-Access-Token": "accessTokenX" }, body: "[{\"sku_ref\":\"m9qqs\"}]"}
|
376
400
|
```
|
377
|
-
- Initialized with `client_attrs = { access_token: "
|
401
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX", catalog_id: "catalogIdX" }`
|
378
402
|
```ruby
|
379
403
|
client.update_inventory([{sku_ref: "m9qqs"}])
|
380
|
-
# [PUT] /catalogs/
|
404
|
+
# [PUT] /catalogs/catalogIdX/location/inventory with { headers: { "X-Access-Token": "accessTokenX" }, body: "[{\"sku_ref\":\"m9qqs\"}]"}
|
381
405
|
```
|
382
406
|
|
383
407
|
### PATCH_INVENTORY
|
384
408
|
|
385
|
-
- Initialized with `client_attrs = { access_token: "
|
409
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
386
410
|
```ruby
|
387
|
-
client.patch_inventory([{sku_ref: "m9qqs"}], "
|
388
|
-
# [PATCH] /catalogs/
|
411
|
+
client.patch_inventory([{sku_ref: "m9qqs"}], "catalogIdX", "locationIdX")
|
412
|
+
# [PATCH] /catalogs/catalogIdX/locations/locationIdX/inventory with { headers: { "X-Access-Token": "accessTokenX" }, body: "[{\"sku_ref\":\"m9qqs\"}]"}
|
389
413
|
```
|
390
|
-
- Initialized with `client_attrs = { access_token: "
|
414
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
391
415
|
```ruby
|
392
|
-
client.patch_inventory([{sku_ref: "m9qqs"}], "
|
393
|
-
# [PATCH] /catalogs/
|
416
|
+
client.patch_inventory([{sku_ref: "m9qqs"}], "locationIdX")
|
417
|
+
# [PATCH] /catalogs/catalogIdX/location/inventory with { headers: { "X-Access-Token": "accessTokenX" }, body: "[{\"sku_ref\":\"m9qqs\"}]"}
|
394
418
|
```
|
395
|
-
- Initialized with `client_attrs = { access_token: "
|
419
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX", catalog_id: "catalogIdX" }`
|
396
420
|
```ruby
|
397
421
|
client.patch_inventory([{sku_ref: "m9qqs"}])
|
398
|
-
# [PATCH] /catalogs/
|
422
|
+
# [PATCH] /catalogs/catalogIdX/location/inventory with { headers: { "X-Access-Token": "accessTokenX" }, body: "[{\"sku_ref\":\"m9qqs\"}]"}
|
399
423
|
```
|
400
424
|
|
401
425
|
### CREATE_LOYALTY_CARD
|
402
426
|
|
403
|
-
- Initialized with `client_attrs = { access_token: "
|
427
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
404
428
|
```ruby
|
405
|
-
client.create_loyalty_card({ name: "bonus" }, "
|
406
|
-
# [POST] /customer_lists/
|
429
|
+
client.create_loyalty_card({ name: "bonus" }, "customerListIdX")
|
430
|
+
# [POST] /customer_lists/customerListIdX/loyalty_cards with { headers: { "X-Access-Token": "accessTokenX" }, body: { name: "bonus" } }
|
407
431
|
```
|
408
|
-
- Initialized with `client_attrs = { access_token: "
|
432
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX", customer_list_id: "customerListIdX" }`
|
409
433
|
```ruby
|
410
434
|
client.create_loyalty_card({ name: "bonus" })
|
411
|
-
# [POST] /customer_lists/
|
435
|
+
# [POST] /customer_lists/customerListIdX/loyalty_cards with { headers: { "X-Access-Token": "accessTokenX" }, body: { name: "bonus" } }
|
412
436
|
```
|
413
437
|
|
414
438
|
### CREATE_LOYALTY_OPERATION
|
415
439
|
|
416
|
-
- Initialized with `client_attrs = { access_token: "
|
440
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX" }`
|
417
441
|
```ruby
|
418
|
-
client.create_loyalty_operation("
|
419
|
-
# [POST] /customer_lists/
|
442
|
+
client.create_loyalty_operation("loyaltyCardIdX", { delta: "4.2" }, "customerListIdX")
|
443
|
+
# [POST] /customer_lists/customerListIdX/loyalty_cards/loyaltyCardIdX/operations with { headers: { "X-Access-Token": "accessTokenX" }, body: { delta: "4.2" } }
|
420
444
|
```
|
421
|
-
- Initialized with `client_attrs = { access_token: "
|
445
|
+
- Initialized with `client_attrs = { access_token: "accessTokenX", customer_list_id: "q2brk" }`
|
422
446
|
```ruby
|
423
|
-
client.create_loyalty_operation("
|
424
|
-
# [POST] /customer_lists/q2brk/loyalty_cards/
|
447
|
+
client.create_loyalty_operation("loyaltyCardIdX", { delta: "4.2" })
|
448
|
+
# [POST] /customer_lists/q2brk/loyalty_cards/loyaltyCardIdX/operations with { headers: { "X-Access-Token": "accessTokenX" }, body: { delta: "4.2" } }
|
425
449
|
```
|
data/lib/hubrise_client/v1.rb
CHANGED
@@ -37,10 +37,13 @@ module HubriseClient
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
def
|
40
|
+
def patch_location(location_id, params)
|
41
41
|
call_api("/locations/#{location_id}", :patch, data: params)
|
42
42
|
end
|
43
43
|
|
44
|
+
# @deprecated Use patch_location instead
|
45
|
+
alias_method :update_location, :patch_location
|
46
|
+
|
44
47
|
# --------------------
|
45
48
|
# Orders
|
46
49
|
# --------------------
|
@@ -65,6 +68,21 @@ module HubriseClient
|
|
65
68
|
call_api("/locations/#{location_id}/orders/#{order_id}", :patch, data: params)
|
66
69
|
end
|
67
70
|
|
71
|
+
# --------------------
|
72
|
+
# Deliveries
|
73
|
+
# --------------------
|
74
|
+
def get_delivery(location_id, order_id)
|
75
|
+
call_api("/locations/#{location_id}/orders/#{order_id}/delivery")
|
76
|
+
end
|
77
|
+
|
78
|
+
def create_delivery(location_id, order_id, params)
|
79
|
+
call_api("/locations/#{location_id}/orders/#{order_id}/delivery", :post, data: params)
|
80
|
+
end
|
81
|
+
|
82
|
+
def patch_delivery(location_id, order_id, params)
|
83
|
+
call_api("/locations/#{location_id}/orders/#{order_id}/delivery", :patch, data: params)
|
84
|
+
end
|
85
|
+
|
68
86
|
# --------------------
|
69
87
|
# Callback, events
|
70
88
|
# --------------------
|
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.
|
4
|
+
version: 2.0.14
|
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: 2025-
|
12
|
+
date: 2025-04-11 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email:
|