Class: AboutYou::SDK::Model::FacetCounts
- Inherits:
-
Object
- Object
- AboutYou::SDK::Model::FacetCounts
- Defined in:
- lib/AboutYou/Model/ProductSearchResult/facet_counts.rb
Overview
This class represents a FacetCounts model.
- author
-
Collins GmbH & Co KG
Instance Attribute Summary collapse
-
#facet_count_list ⇒ Object
an array of facetcount objects.
-
#group_id ⇒ Object
The group_id of the facetcounts.
-
#product_count_total ⇒ Object
the cont of the products.
-
#product_count_with_other_facet ⇒ Object
the count of the procuts with other facets.
-
#product_count_without_any_facet ⇒ Object
the count of the products without facets.
Class Method Summary collapse
-
.create_from_json(group_id, json_object, facet_count_list) ⇒ Object
This method is used for creating an instance of this class by a json_object.
Instance Method Summary collapse
-
#initialize(product_count_total, product_count_with_other_facet, product_count_without_any_facet) ⇒ FacetCounts
constructor
the Constructor for the facetcounts class.
Constructor Details
#initialize(product_count_total, product_count_with_other_facet, product_count_without_any_facet) ⇒ FacetCounts
the Constructor for the facetcounts class
-
Args :
-
product_count_total
-> the total productcount -
product_count_with_other_facet
-> the productcount without any facets -
product_count_without_any_facet
-> the productcount with other facets
-
-
Returns :
-
Instance of AboutYou::SDK::Model::FacetCounts
-
32 33 34 35 36 37 38 39 40 |
# File 'lib/AboutYou/Model/ProductSearchResult/facet_counts.rb', line 32 def initialize( product_count_total, product_count_with_other_facet, product_count_without_any_facet ) self.product_count_total = product_count_total self.product_count_with_other_facet = product_count_with_other_facet self.product_count_without_any_facet = product_count_without_any_facet end |
Instance Attribute Details
#facet_count_list ⇒ Object
an array of facetcount objects
13 14 15 |
# File 'lib/AboutYou/Model/ProductSearchResult/facet_counts.rb', line 13 def facet_count_list @facet_count_list end |
#group_id ⇒ Object
The group_id of the facetcounts
11 12 13 |
# File 'lib/AboutYou/Model/ProductSearchResult/facet_counts.rb', line 11 def group_id @group_id end |
#product_count_total ⇒ Object
the cont of the products
15 16 17 |
# File 'lib/AboutYou/Model/ProductSearchResult/facet_counts.rb', line 15 def product_count_total @product_count_total end |
#product_count_with_other_facet ⇒ Object
the count of the procuts with other facets
19 20 21 |
# File 'lib/AboutYou/Model/ProductSearchResult/facet_counts.rb', line 19 def product_count_with_other_facet @product_count_with_other_facet end |
#product_count_without_any_facet ⇒ Object
the count of the products without facets
17 18 19 |
# File 'lib/AboutYou/Model/ProductSearchResult/facet_counts.rb', line 17 def product_count_without_any_facet @product_count_without_any_facet end |
Class Method Details
.create_from_json(group_id, json_object, facet_count_list) ⇒ Object
This method is used for creating an instance of this class by a json_object.
-
Args :
-
group_id
-> the groupId of the facetcounts -
json_object
-> the jsonObject received from the api -
facet_count_list
-> a list of facetcount objects
-
-
Returns :
-
Instance of AboutYou::SDK::Model::FacetCounts
-
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/AboutYou/Model/ProductSearchResult/facet_counts.rb', line 53 def self.create_from_json(group_id, json_object, facet_count_list) facet_counts = new( json_object['total'], json_object['other'], json_object['missing'] ) facet_counts.group_id = group_id facet_counts.facet_count_list = facet_count_list facet_counts end |