Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAudience

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

An intended audience of the Product for whom it's sold.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2alphaAudience

Returns a new instance of GoogleCloudRetailV2alphaAudience.



1524
1525
1526
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1524

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

Instance Attribute Details

#age_groupsArray<String>

The age groups of the audience. Strongly encouraged to use the standard values: "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property age_group. Schema.org property Product.audience. suggestedMinAge and Product.audience. suggestedMaxAge. Corresponds to the JSON property ageGroups

Returns:

  • (Array<String>)


1512
1513
1514
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1512

def age_groups
  @age_groups
end

#gendersArray<String>

The genders of the audience. Strongly encouraged to use the standard values: " male", "female", "unisex". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property gender. Schema.org property Product.audience.suggestedGender. Corresponds to the JSON property genders

Returns:

  • (Array<String>)


1522
1523
1524
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1522

def genders
  @genders
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1529
1530
1531
1532
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1529

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