beyond_api 0.19.0.pre → 0.20.0.pre
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/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/lib/beyond_api/resources/products/searches.rb +61 -0
- data/lib/beyond_api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '084d3533192827ae43bcbbdcef706d5e6a3fd9ab7c518492c87dcf57e2ff8233'
|
4
|
+
data.tar.gz: e28b3a3526b2a97eb511137acf723345512dadcaa9fd7532990245ef0846d572
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25f33bb7cefa616071fb0b29bbf1c9a104eeb963407e58049a61ee80d9fa93e920859350129c6c398160e357b2de0fb3c9bbf2da4aac63c61cfeccf5f2154e5c
|
7
|
+
data.tar.gz: ca5922134ab627f9fa3482e4a4b367bd0b1252df4a15f6536045b5390518876c597dbedeca3738c51c16402d7dafdf67bc314c3e995398d421d1d7dca0bde74d
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -4,6 +4,67 @@ require "beyond_api/utils"
|
|
4
4
|
|
5
5
|
module BeyondApi
|
6
6
|
module ProductSearches
|
7
|
+
#
|
8
|
+
# A +POST+ request is used to search for products by a search term. Optionally, you can also filter the search results.
|
9
|
+
#
|
10
|
+
# $ curl 'https://api-shop.beyondshop.cloud/api/products/search' -i -X POST \
|
11
|
+
# -H 'Content-Type: application/hal+json;charset=UTF-8' \
|
12
|
+
# -H 'Accept: application/hal+json' \
|
13
|
+
# -H 'Authorization: Bearer <Access token>'
|
14
|
+
# -d '{
|
15
|
+
# "search" : {
|
16
|
+
# "term" : "Tony Highfinger, Poloshirt, Men",
|
17
|
+
# "category" : "NAME"
|
18
|
+
# },
|
19
|
+
# "filters" : [ {
|
20
|
+
# "key" : "status",
|
21
|
+
# "values" : [ "PUBLISHED" ]
|
22
|
+
# } ],
|
23
|
+
# "paging" : {
|
24
|
+
# "page" : 0,
|
25
|
+
# "pageSize" : 20,
|
26
|
+
# "sort" : {
|
27
|
+
# "property" : "name",
|
28
|
+
# "direction" : "ASC"
|
29
|
+
# }
|
30
|
+
# }
|
31
|
+
# }'
|
32
|
+
#
|
33
|
+
# @beyond_api.scopes +prod:r+
|
34
|
+
#
|
35
|
+
# @param body [String] the request body
|
36
|
+
#
|
37
|
+
# @return [OpenStruct]
|
38
|
+
#
|
39
|
+
# @example
|
40
|
+
# body = {
|
41
|
+
# search: {
|
42
|
+
# term: "Tony Highfinger, Poloshirt, Men",
|
43
|
+
# category: "NAME"
|
44
|
+
# },
|
45
|
+
# filters: [ {
|
46
|
+
# key: "status",
|
47
|
+
# values: [ "PUBLISHED" ]
|
48
|
+
# } ],
|
49
|
+
# paging: {
|
50
|
+
# page: 0,
|
51
|
+
# page_size: 20,
|
52
|
+
# sort: {
|
53
|
+
# property: "name",
|
54
|
+
# direction: "ASC"
|
55
|
+
# }
|
56
|
+
# }
|
57
|
+
# }
|
58
|
+
# @products = session.product.search(body)
|
59
|
+
#
|
60
|
+
def search(body)
|
61
|
+
response, status = BeyondApi::Request.post(@session,
|
62
|
+
"/products/search",
|
63
|
+
body)
|
64
|
+
|
65
|
+
handle_response(response, status)
|
66
|
+
end
|
67
|
+
|
7
68
|
#
|
8
69
|
# A +GET+ request is used to search for a product by SKU.
|
9
70
|
#
|
data/lib/beyond_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beyond_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.20.0.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Unai Abrisketa
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2021-12-
|
14
|
+
date: 2021-12-03 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -243,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
243
243
|
- !ruby/object:Gem::Version
|
244
244
|
version: 1.3.1
|
245
245
|
requirements: []
|
246
|
-
rubygems_version: 3.
|
246
|
+
rubygems_version: 3.0.3
|
247
247
|
signing_key:
|
248
248
|
specification_version: 4
|
249
249
|
summary: Ruby client to access the Beyond API
|