Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBranchProductCountStatistic

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/retail_v2alpha/classes.rb,
lib/google/apis/retail_v2alpha/representations.rb,
lib/google/apis/retail_v2alpha/representations.rb

Overview

A statistic about the number of products in a branch.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2alphaBranchProductCountStatistic

Returns a new instance of GoogleCloudRetailV2alphaBranchProductCountStatistic.



1767
1768
1769
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1767

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#countsHash<String,Fixnum>

The number of products in scope broken down into different groups. The key is a group representing a set of products, and the value is the number of products in that group. Note: keys in this map may change over time. Possible keys: * "primary-in-stock", products have Product.Type.PRIMARY type and Product.Availability.IN_STOCK availability. * "primary-out-of-stock", products have Product.Type.PRIMARY type and Product.Availability.OUT_OF_STOCK availability. * "primary-preorder", products have Product.Type.PRIMARY type and Product.Availability.PREORDER availability. * "primary-backorder", products have Product.Type.PRIMARY type and Product.Availability.BACKORDER availability. * "variant-in-stock", products have Product.Type.VARIANT type and Product.Availability.IN_STOCK availability. * "variant-out-of-stock", products have Product.Type.VARIANT type and Product.Availability.OUT_OF_STOCK availability. * "variant-preorder", products have Product.Type.VARIANT type and Product.Availability.PREORDER availability. * "variant-backorder", products have Product.Type.VARIANT type and Product.Availability.BACKORDER availability. * "price-discounted", products have [Product.price_info.price] < [Product.price_info.original_price]. Corresponds to the JSON property counts

Returns:

  • (Hash<String,Fixnum>)


1760
1761
1762
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1760

def counts
  @counts
end

#scopeString

[ProductCountScope] of the [counts]. Corresponds to the JSON property scope

Returns:

  • (String)


1765
1766
1767
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1765

def scope
  @scope
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1772
1773
1774
1775
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1772

def update!(**args)
  @counts = args[:counts] if args.key?(:counts)
  @scope = args[:scope] if args.key?(:scope)
end