aboutyou-sdk 0.0.21 → 0.0.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjM4MjYzOTM3ZjcwNDVjN2QyYTUxZjIxNGY5MDUwZWY4NTNlYmIzNQ==
4
+ OWI0ZDkyZTNmMTZiMjg0NzQ4ZTA2ZDMzMDM2ZGFjMTVjMDE5ZjVkMA==
5
5
  data.tar.gz: !binary |-
6
- MjQ5MTk4ZGU2ZjVmYzYyZTMyNjE0ZmQwNTIxMjQ4ZjM5NzZhYTU1OQ==
6
+ MTRmMDE3YmUzMmY3ZDIyNDZlNzkwOWUzZWVkNDk4YmE5MDkyMjUxNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YzQ0NTllZTcwZTY4MzZlMGU4Nzk5NjU5OGU1NmE5NmY5NzM1MDc5YzcwMWE3
10
- ZjY3YWIzNjRmZTNkNzM5M2FkYmVjYTI0NTYyNzVmYTQyOWQyMTdhMWU2NTlm
11
- YzBlOTEzMGU0ZjUwN2UyZmI2ZDBlYzQ3OTY5ZDEyODRhYzI5MTU=
9
+ NDE1MzliMjk0OWRlMDllNmI1MzUxNTEyMjM3MjE0OTkyMjgzOTU3ZmI5ZjVk
10
+ ODllYzAyNjNkMGQ1YzFmZjI5NzE5MTAxZTExN2I1MDM2MDVkYWRmOGYwZTdj
11
+ OTEzOTBmODcwOTY5ZTA1NTE2N2QzNjE3ZGQxMjI3MjdkMDFiYmI=
12
12
  data.tar.gz: !binary |-
13
- NjgwOTI0MDQxMGY3MGUxOWJjYmY5NzNiNmQyNmJiMzU0MGRiZmVlMzYwNTll
14
- OWE1ZWMzNDMzZmMzYWVlMmEzNDEzMDY0MjVhZGIwY2Y5ZTAyYmJjZTQxNDg4
15
- ZGNiYWI3ODEyNGJiYjRkMWZmZDdiMjMyMWM4Yjk5YThhNjdkZmQ=
13
+ ZWI3ZDNlNGNiMTA5NjkwNTNhZjNkOGVjYjZhMTA0NWVlNzY3ZjlkYWM2MWMy
14
+ ZDI0N2FmNWZlZmEwZDA3ZmU2ZTYzOTYwNmI3MTRhY2Y2MTBhMGI4MjEwOWQ5
15
+ YzI4YTQ5NDk2MzNjODI3NTg4ZGUwNDcyN2Y4YmIyNTU2OGExMjY=
@@ -146,13 +146,14 @@ module AboutYou
146
146
  # sets a filter for filtering by category ids
147
147
  #
148
148
  # * *Args* :
149
- # - +attributes+ -> Array of Hashes containing the relation Group_Id => Facet_Id
149
+ # - +attributes+ -> Array of Hashes containing the relation Group_Id => Array of Facet_Ids
150
150
  # - +append+ -> determines whether to append the category ids to an already set value or not [optional]
151
151
  #
152
152
  # * *Returns* :
153
153
  # - an instance of AboutYou::SDK::Criteria::ProductSearchCriteria
154
154
  ###
155
155
  def filterByFacetIds(attributes, append = false)
156
+ merged = attributes[0]
156
157
  if append && self.filter[FILTER_ATTRIBUTES]
157
158
  merged = self.filter[FILTER_ATTRIBUTES]
158
159
  attributes.each do |groupId, facetIds|
@@ -164,7 +165,7 @@ module AboutYou
164
165
  end
165
166
  attributes = merged
166
167
  end
167
- self.filterBy(FILTER_ATTRIBUTES, attributes)
168
+ self.filterBy(FILTER_ATTRIBUTES, merged)
168
169
  end
169
170
 
170
171
 
@@ -247,7 +247,6 @@ module AboutYou
247
247
  # - an Array containing all of the models build with the data of the api
248
248
  ###
249
249
  def execute
250
-
251
250
  if self.query.empty? && self.ghostQuery.empty?
252
251
  return []
253
252
  end
@@ -41,4 +41,7 @@ get "/filterCatId" do
41
41
  end
42
42
  get "/testDocExample" do
43
43
  erb :testDocExample
44
+ end
45
+ get "/filterByFacet" do
46
+ erb :filterByFacet
44
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aboutyou-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
4
+ version: 0.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ferenc Beutel