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.



1806
1807
1808
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1806

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>)


1799
1800
1801
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1799

def counts
  @counts
end

#scopeString

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

Returns:

  • (String)


1804
1805
1806
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1804

def scope
  @scope
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1811
1812
1813
1814
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1811

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