Class: Google::Apis::ContentV2_1::Segments

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

Overview

Dimensions according to which metrics are segmented in the response. Values of product dimensions, such as offer_id, reflect the state of a product at the time of the corresponding event, for example, impression or order. Segment fields cannot be selected in queries without also selecting at least one metric field. Values are only set for dimensions requested explicitly in the request's search query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Segments

Returns a new instance of Segments.



12910
12911
12912
# File 'lib/google/apis/content_v2_1/classes.rb', line 12910

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

Instance Attribute Details

#brandString

Brand of the product. Corresponds to the JSON property brand

Returns:

  • (String)


12760
12761
12762
# File 'lib/google/apis/content_v2_1/classes.rb', line 12760

def brand
  @brand
end

#category_l1String

Product category (1st level) in Google's product taxonomy. Corresponds to the JSON property categoryL1

Returns:

  • (String)


12767
12768
12769
# File 'lib/google/apis/content_v2_1/classes.rb', line 12767

def category_l1
  @category_l1
end

#category_l2String

Product category (2nd level) in Google's product taxonomy. Corresponds to the JSON property categoryL2

Returns:

  • (String)


12774
12775
12776
# File 'lib/google/apis/content_v2_1/classes.rb', line 12774

def category_l2
  @category_l2
end

#category_l3String

Product category (3rd level) in Google's product taxonomy. Corresponds to the JSON property categoryL3

Returns:

  • (String)


12781
12782
12783
# File 'lib/google/apis/content_v2_1/classes.rb', line 12781

def category_l3
  @category_l3
end

#category_l4String

Product category (4th level) in Google's product taxonomy. Corresponds to the JSON property categoryL4

Returns:

  • (String)


12788
12789
12790
# File 'lib/google/apis/content_v2_1/classes.rb', line 12788

def category_l4
  @category_l4
end

#category_l5String

Product category (5th level) in Google's product taxonomy. Corresponds to the JSON property categoryL5

Returns:

  • (String)


12795
12796
12797
# File 'lib/google/apis/content_v2_1/classes.rb', line 12795

def category_l5
  @category_l5
end

#currency_codeString

Currency in which price metrics are represented, for example, if you select ordered_item_sales_micros, the returned value will be represented by this currency. Corresponds to the JSON property currencyCode

Returns:

  • (String)


12802
12803
12804
# File 'lib/google/apis/content_v2_1/classes.rb', line 12802

def currency_code
  @currency_code
end

#custom_label0String

Custom label 0 for custom grouping of products. Corresponds to the JSON property customLabel0

Returns:

  • (String)


12807
12808
12809
# File 'lib/google/apis/content_v2_1/classes.rb', line 12807

def custom_label0
  @custom_label0
end

#custom_label1String

Custom label 1 for custom grouping of products. Corresponds to the JSON property customLabel1

Returns:

  • (String)


12812
12813
12814
# File 'lib/google/apis/content_v2_1/classes.rb', line 12812

def custom_label1
  @custom_label1
end

#custom_label2String

Custom label 2 for custom grouping of products. Corresponds to the JSON property customLabel2

Returns:

  • (String)


12817
12818
12819
# File 'lib/google/apis/content_v2_1/classes.rb', line 12817

def custom_label2
  @custom_label2
end

#custom_label3String

Custom label 3 for custom grouping of products. Corresponds to the JSON property customLabel3

Returns:

  • (String)


12822
12823
12824
# File 'lib/google/apis/content_v2_1/classes.rb', line 12822

def custom_label3
  @custom_label3
end

#custom_label4String

Custom label 4 for custom grouping of products. Corresponds to the JSON property customLabel4

Returns:

  • (String)


12827
12828
12829
# File 'lib/google/apis/content_v2_1/classes.rb', line 12827

def custom_label4
  @custom_label4
end

#customer_country_codeString

Code of the country where the customer is located at the time of the event. Represented in the ISO 3166 format. If the customer country cannot be determined, a special 'ZZ' code is returned. Corresponds to the JSON property customerCountryCode

Returns:

  • (String)


12834
12835
12836
# File 'lib/google/apis/content_v2_1/classes.rb', line 12834

def customer_country_code
  @customer_country_code
end

#dateGoogle::Apis::ContentV2_1::Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type. TimeOfDay * google.type.DateTime * google.protobuf.Timestamp Corresponds to the JSON property date



12846
12847
12848
# File 'lib/google/apis/content_v2_1/classes.rb', line 12846

def date
  @date
end

#offer_idString

Merchant-provided id of the product. Corresponds to the JSON property offerId

Returns:

  • (String)


12851
12852
12853
# File 'lib/google/apis/content_v2_1/classes.rb', line 12851

def offer_id
  @offer_id
end

#product_type_l1String

Product type (1st level) in merchant's own product taxonomy. Corresponds to the JSON property productTypeL1

Returns:

  • (String)


12858
12859
12860
# File 'lib/google/apis/content_v2_1/classes.rb', line 12858

def product_type_l1
  @product_type_l1
end

#product_type_l2String

Product type (2nd level) in merchant's own product taxonomy. Corresponds to the JSON property productTypeL2

Returns:

  • (String)


12865
12866
12867
# File 'lib/google/apis/content_v2_1/classes.rb', line 12865

def product_type_l2
  @product_type_l2
end

#product_type_l3String

Product type (3rd level) in merchant's own product taxonomy. Corresponds to the JSON property productTypeL3

Returns:

  • (String)


12872
12873
12874
# File 'lib/google/apis/content_v2_1/classes.rb', line 12872

def product_type_l3
  @product_type_l3
end

#product_type_l4String

Product type (4th level) in merchant's own product taxonomy. Corresponds to the JSON property productTypeL4

Returns:

  • (String)


12879
12880
12881
# File 'lib/google/apis/content_v2_1/classes.rb', line 12879

def product_type_l4
  @product_type_l4
end

#product_type_l5String

Product type (5th level) in merchant's own product taxonomy. Corresponds to the JSON property productTypeL5

Returns:

  • (String)


12886
12887
12888
# File 'lib/google/apis/content_v2_1/classes.rb', line 12886

def product_type_l5
  @product_type_l5
end

#programString

Program to which metrics apply, for example, Free Product Listing. Corresponds to the JSON property program

Returns:

  • (String)


12891
12892
12893
# File 'lib/google/apis/content_v2_1/classes.rb', line 12891

def program
  @program
end

#titleString

Title of the product. Corresponds to the JSON property title

Returns:

  • (String)


12896
12897
12898
# File 'lib/google/apis/content_v2_1/classes.rb', line 12896

def title
  @title
end

#weekGoogle::Apis::ContentV2_1::Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type. TimeOfDay * google.type.DateTime * google.protobuf.Timestamp Corresponds to the JSON property week



12908
12909
12910
# File 'lib/google/apis/content_v2_1/classes.rb', line 12908

def week
  @week
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
# File 'lib/google/apis/content_v2_1/classes.rb', line 12915

def update!(**args)
  @brand = args[:brand] if args.key?(:brand)
  @category_l1 = args[:category_l1] if args.key?(:category_l1)
  @category_l2 = args[:category_l2] if args.key?(:category_l2)
  @category_l3 = args[:category_l3] if args.key?(:category_l3)
  @category_l4 = args[:category_l4] if args.key?(:category_l4)
  @category_l5 = args[:category_l5] if args.key?(:category_l5)
  @currency_code = args[:currency_code] if args.key?(:currency_code)
  @custom_label0 = args[:custom_label0] if args.key?(:custom_label0)
  @custom_label1 = args[:custom_label1] if args.key?(:custom_label1)
  @custom_label2 = args[:custom_label2] if args.key?(:custom_label2)
  @custom_label3 = args[:custom_label3] if args.key?(:custom_label3)
  @custom_label4 = args[:custom_label4] if args.key?(:custom_label4)
  @customer_country_code = args[:customer_country_code] if args.key?(:customer_country_code)
  @date = args[:date] if args.key?(:date)
  @offer_id = args[:offer_id] if args.key?(:offer_id)
  @product_type_l1 = args[:product_type_l1] if args.key?(:product_type_l1)
  @product_type_l2 = args[:product_type_l2] if args.key?(:product_type_l2)
  @product_type_l3 = args[:product_type_l3] if args.key?(:product_type_l3)
  @product_type_l4 = args[:product_type_l4] if args.key?(:product_type_l4)
  @product_type_l5 = args[:product_type_l5] if args.key?(:product_type_l5)
  @program = args[:program] if args.key?(:program)
  @title = args[:title] if args.key?(:title)
  @week = args[:week] if args.key?(:week)
end