google-apis-merchantapi_reports_v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1973 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module MerchantapiReportsV1
24
+
25
+ # Fields available for query in `best_sellers_brand_view` table. [Best sellers](
26
+ # https://support.google.com/merchants/answer/9488679) report with top brands.
27
+ # Values are only set for fields requested explicitly in the request's search
28
+ # query. For more information, see [Understand the market](https://developers.
29
+ # google.com/merchant/api/guides/reports/understand-the-market).
30
+ class BestSellersBrandView
31
+ include Google::Apis::Core::Hashable
32
+
33
+ # Name of the brand.
34
+ # Corresponds to the JSON property `brand`
35
+ # @return [String]
36
+ attr_accessor :brand
37
+
38
+ # Popularity rank in the previous week or month.
39
+ # Corresponds to the JSON property `previousRank`
40
+ # @return [Fixnum]
41
+ attr_accessor :previous_rank
42
+
43
+ # Estimated demand in relation to the brand with the highest popularity rank in
44
+ # the same category and country in the previous week or month.
45
+ # Corresponds to the JSON property `previousRelativeDemand`
46
+ # @return [String]
47
+ attr_accessor :previous_relative_demand
48
+
49
+ # Popularity of the brand on Ads and organic surfaces, in the selected category
50
+ # and country, based on the estimated number of units sold.
51
+ # Corresponds to the JSON property `rank`
52
+ # @return [Fixnum]
53
+ attr_accessor :rank
54
+
55
+ # Estimated demand in relation to the brand with the highest popularity rank in
56
+ # the same category and country.
57
+ # Corresponds to the JSON property `relativeDemand`
58
+ # @return [String]
59
+ attr_accessor :relative_demand
60
+
61
+ # Change in the estimated demand. Whether it rose, sank or remained flat.
62
+ # Corresponds to the JSON property `relativeDemandChange`
63
+ # @return [String]
64
+ attr_accessor :relative_demand_change
65
+
66
+ # Google product category ID to calculate the ranking for, represented in [
67
+ # Google's product taxonomy](https://support.google.com/merchants/answer/6324436)
68
+ # . Required in the `SELECT` clause. If a `WHERE` condition on `
69
+ # report_category_id` is not specified in the query, rankings for all top-level
70
+ # categories are returned.
71
+ # Corresponds to the JSON property `reportCategoryId`
72
+ # @return [Fixnum]
73
+ attr_accessor :report_category_id
74
+
75
+ # Country where the ranking is calculated. Represented in the ISO 3166 format.
76
+ # Required in the `SELECT` clause. Condition on `report_country_code` is
77
+ # required in the `WHERE` clause.
78
+ # Corresponds to the JSON property `reportCountryCode`
79
+ # @return [String]
80
+ attr_accessor :report_country_code
81
+
82
+ # Represents a whole or partial calendar date, such as a birthday. The time of
83
+ # day and time zone are either specified elsewhere or are insignificant. The
84
+ # date is relative to the Gregorian Calendar. This can represent one of the
85
+ # following: * A full date, with non-zero year, month, and day values. * A month
86
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
87
+ # with a zero month and a zero day. * A year and month, with a zero day (for
88
+ # example, a credit card expiration date). Related types: * google.type.
89
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
90
+ # Corresponds to the JSON property `reportDate`
91
+ # @return [Google::Apis::MerchantapiReportsV1::Date]
92
+ attr_accessor :report_date
93
+
94
+ # Granularity of the report. The ranking can be done over a week or a month
95
+ # timeframe. Required in the `SELECT` clause. Condition on `report_granularity`
96
+ # is required in the `WHERE` clause.
97
+ # Corresponds to the JSON property `reportGranularity`
98
+ # @return [String]
99
+ attr_accessor :report_granularity
100
+
101
+ def initialize(**args)
102
+ update!(**args)
103
+ end
104
+
105
+ # Update properties of this object
106
+ def update!(**args)
107
+ @brand = args[:brand] if args.key?(:brand)
108
+ @previous_rank = args[:previous_rank] if args.key?(:previous_rank)
109
+ @previous_relative_demand = args[:previous_relative_demand] if args.key?(:previous_relative_demand)
110
+ @rank = args[:rank] if args.key?(:rank)
111
+ @relative_demand = args[:relative_demand] if args.key?(:relative_demand)
112
+ @relative_demand_change = args[:relative_demand_change] if args.key?(:relative_demand_change)
113
+ @report_category_id = args[:report_category_id] if args.key?(:report_category_id)
114
+ @report_country_code = args[:report_country_code] if args.key?(:report_country_code)
115
+ @report_date = args[:report_date] if args.key?(:report_date)
116
+ @report_granularity = args[:report_granularity] if args.key?(:report_granularity)
117
+ end
118
+ end
119
+
120
+ # Fields available for query in `best_sellers_product_cluster_view` table. [Best
121
+ # sellers](https://support.google.com/merchants/answer/9488679) report with top
122
+ # product clusters. A product cluster is a grouping for different offers and
123
+ # variants that represent the same product, for example, Google Pixel 7. Values
124
+ # are only set for fields requested explicitly in the request's search query.
125
+ # For more information, see [Understand the market](https://developers.google.
126
+ # com/merchant/api/guides/reports/understand-the-market).
127
+ class BestSellersProductClusterView
128
+ include Google::Apis::Core::Hashable
129
+
130
+ # Brand of the product cluster.
131
+ # Corresponds to the JSON property `brand`
132
+ # @return [String]
133
+ attr_accessor :brand
134
+
135
+ # Whether there is at least one product of the brand currently `IN_STOCK` in
136
+ # your product data source in at least one of the countries, all products are `
137
+ # OUT_OF_STOCK` in your product data source in all countries, or `
138
+ # NOT_IN_INVENTORY`. The field doesn't take the Best sellers report country
139
+ # filter into account.
140
+ # Corresponds to the JSON property `brandInventoryStatus`
141
+ # @return [String]
142
+ attr_accessor :brand_inventory_status
143
+
144
+ # Product category (1st level) of the product cluster, represented in [Google's
145
+ # product taxonomy](https://support.google.com/merchants/answer/6324436).
146
+ # Corresponds to the JSON property `categoryL1`
147
+ # @return [String]
148
+ attr_accessor :category_l1
149
+
150
+ # Product category (2nd level) of the product cluster, represented in [Google's
151
+ # product taxonomy](https://support.google.com/merchants/answer/6324436).
152
+ # Corresponds to the JSON property `categoryL2`
153
+ # @return [String]
154
+ attr_accessor :category_l2
155
+
156
+ # Product category (3rd level) of the product cluster, represented in [Google's
157
+ # product taxonomy](https://support.google.com/merchants/answer/6324436).
158
+ # Corresponds to the JSON property `categoryL3`
159
+ # @return [String]
160
+ attr_accessor :category_l3
161
+
162
+ # Product category (4th level) of the product cluster, represented in [Google's
163
+ # product taxonomy](https://support.google.com/merchants/answer/6324436).
164
+ # Corresponds to the JSON property `categoryL4`
165
+ # @return [String]
166
+ attr_accessor :category_l4
167
+
168
+ # Product category (5th level) of the product cluster, represented in [Google's
169
+ # product taxonomy](https://support.google.com/merchants/answer/6324436).
170
+ # Corresponds to the JSON property `categoryL5`
171
+ # @return [String]
172
+ attr_accessor :category_l5
173
+
174
+ # Whether the product cluster is `IN_STOCK` in your product data source in at
175
+ # least one of the countries, `OUT_OF_STOCK` in your product data source in all
176
+ # countries, or `NOT_IN_INVENTORY` at all. The field doesn't take the Best
177
+ # sellers report country filter into account.
178
+ # Corresponds to the JSON property `inventoryStatus`
179
+ # @return [String]
180
+ attr_accessor :inventory_status
181
+
182
+ # Popularity rank in the previous week or month.
183
+ # Corresponds to the JSON property `previousRank`
184
+ # @return [Fixnum]
185
+ attr_accessor :previous_rank
186
+
187
+ # Estimated demand in relation to the product cluster with the highest
188
+ # popularity rank in the same category and country in the previous week or month.
189
+ # Corresponds to the JSON property `previousRelativeDemand`
190
+ # @return [String]
191
+ attr_accessor :previous_relative_demand
192
+
193
+ # Popularity of the product cluster on Ads and organic surfaces, in the selected
194
+ # category and country, based on the estimated number of units sold.
195
+ # Corresponds to the JSON property `rank`
196
+ # @return [Fixnum]
197
+ attr_accessor :rank
198
+
199
+ # Estimated demand in relation to the product cluster with the highest
200
+ # popularity rank in the same category and country.
201
+ # Corresponds to the JSON property `relativeDemand`
202
+ # @return [String]
203
+ attr_accessor :relative_demand
204
+
205
+ # Change in the estimated demand. Whether it rose, sank or remained flat.
206
+ # Corresponds to the JSON property `relativeDemandChange`
207
+ # @return [String]
208
+ attr_accessor :relative_demand_change
209
+
210
+ # Google product category ID to calculate the ranking for, represented in [
211
+ # Google's product taxonomy](https://support.google.com/merchants/answer/6324436)
212
+ # . Required in the `SELECT` clause. If a `WHERE` condition on `
213
+ # report_category_id` is not specified in the query, rankings for all top-level
214
+ # categories are returned.
215
+ # Corresponds to the JSON property `reportCategoryId`
216
+ # @return [Fixnum]
217
+ attr_accessor :report_category_id
218
+
219
+ # Country where the ranking is calculated. Represented in the ISO 3166 format.
220
+ # Required in the `SELECT` clause. Condition on `report_country_code` is
221
+ # required in the `WHERE` clause.
222
+ # Corresponds to the JSON property `reportCountryCode`
223
+ # @return [String]
224
+ attr_accessor :report_country_code
225
+
226
+ # Represents a whole or partial calendar date, such as a birthday. The time of
227
+ # day and time zone are either specified elsewhere or are insignificant. The
228
+ # date is relative to the Gregorian Calendar. This can represent one of the
229
+ # following: * A full date, with non-zero year, month, and day values. * A month
230
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
231
+ # with a zero month and a zero day. * A year and month, with a zero day (for
232
+ # example, a credit card expiration date). Related types: * google.type.
233
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
234
+ # Corresponds to the JSON property `reportDate`
235
+ # @return [Google::Apis::MerchantapiReportsV1::Date]
236
+ attr_accessor :report_date
237
+
238
+ # Granularity of the report. The ranking can be done over a week or a month
239
+ # timeframe. Required in the `SELECT` clause. Condition on `report_granularity`
240
+ # is required in the `WHERE` clause.
241
+ # Corresponds to the JSON property `reportGranularity`
242
+ # @return [String]
243
+ attr_accessor :report_granularity
244
+
245
+ # Title of the product cluster.
246
+ # Corresponds to the JSON property `title`
247
+ # @return [String]
248
+ attr_accessor :title
249
+
250
+ # GTINs of example variants of the product cluster.
251
+ # Corresponds to the JSON property `variantGtins`
252
+ # @return [Array<String>]
253
+ attr_accessor :variant_gtins
254
+
255
+ def initialize(**args)
256
+ update!(**args)
257
+ end
258
+
259
+ # Update properties of this object
260
+ def update!(**args)
261
+ @brand = args[:brand] if args.key?(:brand)
262
+ @brand_inventory_status = args[:brand_inventory_status] if args.key?(:brand_inventory_status)
263
+ @category_l1 = args[:category_l1] if args.key?(:category_l1)
264
+ @category_l2 = args[:category_l2] if args.key?(:category_l2)
265
+ @category_l3 = args[:category_l3] if args.key?(:category_l3)
266
+ @category_l4 = args[:category_l4] if args.key?(:category_l4)
267
+ @category_l5 = args[:category_l5] if args.key?(:category_l5)
268
+ @inventory_status = args[:inventory_status] if args.key?(:inventory_status)
269
+ @previous_rank = args[:previous_rank] if args.key?(:previous_rank)
270
+ @previous_relative_demand = args[:previous_relative_demand] if args.key?(:previous_relative_demand)
271
+ @rank = args[:rank] if args.key?(:rank)
272
+ @relative_demand = args[:relative_demand] if args.key?(:relative_demand)
273
+ @relative_demand_change = args[:relative_demand_change] if args.key?(:relative_demand_change)
274
+ @report_category_id = args[:report_category_id] if args.key?(:report_category_id)
275
+ @report_country_code = args[:report_country_code] if args.key?(:report_country_code)
276
+ @report_date = args[:report_date] if args.key?(:report_date)
277
+ @report_granularity = args[:report_granularity] if args.key?(:report_granularity)
278
+ @title = args[:title] if args.key?(:title)
279
+ @variant_gtins = args[:variant_gtins] if args.key?(:variant_gtins)
280
+ end
281
+ end
282
+
283
+ # Fields available for query in `competitive_visibility_benchmark_view` table. [
284
+ # Competitive visibility](https://support.google.com/merchants/answer/11366442)
285
+ # report with the category benchmark. Values are only set for fields requested
286
+ # explicitly in the request's search query. For more information, see [Explore
287
+ # your competitive landscape](https://developers.google.com/merchant/api/guides/
288
+ # reports/explore-competitive-landscape).
289
+ class CompetitiveVisibilityBenchmarkView
290
+ include Google::Apis::Core::Hashable
291
+
292
+ # Change in visibility based on impressions with respect to the start of the
293
+ # selected time range (or first day with non-zero impressions) for a combined
294
+ # set of merchants with highest visibility approximating the market. Cannot be
295
+ # filtered on in the 'WHERE' clause.
296
+ # Corresponds to the JSON property `categoryBenchmarkVisibilityTrend`
297
+ # @return [Float]
298
+ attr_accessor :category_benchmark_visibility_trend
299
+
300
+ # Represents a whole or partial calendar date, such as a birthday. The time of
301
+ # day and time zone are either specified elsewhere or are insignificant. The
302
+ # date is relative to the Gregorian Calendar. This can represent one of the
303
+ # following: * A full date, with non-zero year, month, and day values. * A month
304
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
305
+ # with a zero month and a zero day. * A year and month, with a zero day (for
306
+ # example, a credit card expiration date). Related types: * google.type.
307
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
308
+ # Corresponds to the JSON property `date`
309
+ # @return [Google::Apis::MerchantapiReportsV1::Date]
310
+ attr_accessor :date
311
+
312
+ # Google product category ID to calculate the report for, represented in [Google'
313
+ # s product taxonomy](https://support.google.com/merchants/answer/6324436).
314
+ # Required in the `SELECT` clause. A condition on `report_category_id` is
315
+ # required in the `WHERE` clause.
316
+ # Corresponds to the JSON property `reportCategoryId`
317
+ # @return [Fixnum]
318
+ attr_accessor :report_category_id
319
+
320
+ # Country where impressions appeared. Required in the `SELECT` clause. A
321
+ # condition on `report_country_code` is required in the `WHERE` clause.
322
+ # Corresponds to the JSON property `reportCountryCode`
323
+ # @return [String]
324
+ attr_accessor :report_country_code
325
+
326
+ # Traffic source of impressions. Required in the `SELECT` clause.
327
+ # Corresponds to the JSON property `trafficSource`
328
+ # @return [String]
329
+ attr_accessor :traffic_source
330
+
331
+ # Change in visibility based on impressions for your domain with respect to the
332
+ # start of the selected time range (or first day with non-zero impressions).
333
+ # Cannot be filtered on in the 'WHERE' clause.
334
+ # Corresponds to the JSON property `yourDomainVisibilityTrend`
335
+ # @return [Float]
336
+ attr_accessor :your_domain_visibility_trend
337
+
338
+ def initialize(**args)
339
+ update!(**args)
340
+ end
341
+
342
+ # Update properties of this object
343
+ def update!(**args)
344
+ @category_benchmark_visibility_trend = args[:category_benchmark_visibility_trend] if args.key?(:category_benchmark_visibility_trend)
345
+ @date = args[:date] if args.key?(:date)
346
+ @report_category_id = args[:report_category_id] if args.key?(:report_category_id)
347
+ @report_country_code = args[:report_country_code] if args.key?(:report_country_code)
348
+ @traffic_source = args[:traffic_source] if args.key?(:traffic_source)
349
+ @your_domain_visibility_trend = args[:your_domain_visibility_trend] if args.key?(:your_domain_visibility_trend)
350
+ end
351
+ end
352
+
353
+ # Fields available for query in `competitive_visibility_competitor_view` table. [
354
+ # Competitive visibility](https://support.google.com/merchants/answer/11366442)
355
+ # report with businesses with similar visibility. Values are only set for fields
356
+ # requested explicitly in the request's search query. For more information, see [
357
+ # Explore your competitive landscape](https://developers.google.com/merchant/api/
358
+ # guides/reports/explore-competitive-landscape).
359
+ class CompetitiveVisibilityCompetitorView
360
+ include Google::Apis::Core::Hashable
361
+
362
+ # [Ads / organic ratio] (https://support.google.com/merchants/answer/11366442#
363
+ # zippy=%2Cads-free-ratio) shows how often the domain receives impressions from
364
+ # Shopping ads compared to organic traffic. The number is rounded and bucketed.
365
+ # Cannot be filtered on in the 'WHERE' clause.
366
+ # Corresponds to the JSON property `adsOrganicRatio`
367
+ # @return [Float]
368
+ attr_accessor :ads_organic_ratio
369
+
370
+ # Represents a whole or partial calendar date, such as a birthday. The time of
371
+ # day and time zone are either specified elsewhere or are insignificant. The
372
+ # date is relative to the Gregorian Calendar. This can represent one of the
373
+ # following: * A full date, with non-zero year, month, and day values. * A month
374
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
375
+ # with a zero month and a zero day. * A year and month, with a zero day (for
376
+ # example, a credit card expiration date). Related types: * google.type.
377
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
378
+ # Corresponds to the JSON property `date`
379
+ # @return [Google::Apis::MerchantapiReportsV1::Date]
380
+ attr_accessor :date
381
+
382
+ # Domain of your competitor or your domain, if `is_your_domain` is true.
383
+ # Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE' clause.
384
+ # Corresponds to the JSON property `domain`
385
+ # @return [String]
386
+ attr_accessor :domain
387
+
388
+ # [Higher position rate] (https://support.google.com/merchants/answer/11366442#
389
+ # zippy=%2Chigher-position-rate) shows how often a competitor’s offer got placed
390
+ # in a higher position on the page than your offer. Cannot be filtered on in the
391
+ # 'WHERE' clause.
392
+ # Corresponds to the JSON property `higherPositionRate`
393
+ # @return [Float]
394
+ attr_accessor :higher_position_rate
395
+
396
+ # True if this row contains data for your domain. Cannot be filtered on in the '
397
+ # WHERE' clause.
398
+ # Corresponds to the JSON property `isYourDomain`
399
+ # @return [Boolean]
400
+ attr_accessor :is_your_domain
401
+ alias_method :is_your_domain?, :is_your_domain
402
+
403
+ # [Page overlap rate] (https://support.google.com/merchants/answer/11366442#
404
+ # zippy=%2Cpage-overlap-rate) shows how frequently competing retailers’ offers
405
+ # are shown together with your offers on the same page. Cannot be filtered on in
406
+ # the 'WHERE' clause.
407
+ # Corresponds to the JSON property `pageOverlapRate`
408
+ # @return [Float]
409
+ attr_accessor :page_overlap_rate
410
+
411
+ # Position of the domain in the similar businesses ranking for the selected keys
412
+ # (`date`, `report_category_id`, `report_country_code`, `traffic_source`) based
413
+ # on impressions. 1 is the highest. Cannot be filtered on in the 'WHERE' clause.
414
+ # Corresponds to the JSON property `rank`
415
+ # @return [Fixnum]
416
+ attr_accessor :rank
417
+
418
+ # [Relative visibility] (https://support.google.com/merchants/answer/11366442#
419
+ # zippy=%2Crelative-visibility) shows how often your competitors’ offers are
420
+ # shown compared to your offers. In other words, this is the number of displayed
421
+ # impressions of a competitor retailer divided by the number of your displayed
422
+ # impressions during a selected time range for a selected product category and
423
+ # country. Cannot be filtered on in the 'WHERE' clause.
424
+ # Corresponds to the JSON property `relativeVisibility`
425
+ # @return [Float]
426
+ attr_accessor :relative_visibility
427
+
428
+ # Google product category ID to calculate the report for, represented in [Google'
429
+ # s product taxonomy](https://support.google.com/merchants/answer/6324436).
430
+ # Required in the `SELECT` clause. A condition on `report_category_id` is
431
+ # required in the `WHERE` clause.
432
+ # Corresponds to the JSON property `reportCategoryId`
433
+ # @return [Fixnum]
434
+ attr_accessor :report_category_id
435
+
436
+ # Country where impressions appeared. Required in the `SELECT` clause. A
437
+ # condition on `report_country_code` is required in the `WHERE` clause.
438
+ # Corresponds to the JSON property `reportCountryCode`
439
+ # @return [String]
440
+ attr_accessor :report_country_code
441
+
442
+ # Traffic source of impressions. Required in the `SELECT` clause.
443
+ # Corresponds to the JSON property `trafficSource`
444
+ # @return [String]
445
+ attr_accessor :traffic_source
446
+
447
+ def initialize(**args)
448
+ update!(**args)
449
+ end
450
+
451
+ # Update properties of this object
452
+ def update!(**args)
453
+ @ads_organic_ratio = args[:ads_organic_ratio] if args.key?(:ads_organic_ratio)
454
+ @date = args[:date] if args.key?(:date)
455
+ @domain = args[:domain] if args.key?(:domain)
456
+ @higher_position_rate = args[:higher_position_rate] if args.key?(:higher_position_rate)
457
+ @is_your_domain = args[:is_your_domain] if args.key?(:is_your_domain)
458
+ @page_overlap_rate = args[:page_overlap_rate] if args.key?(:page_overlap_rate)
459
+ @rank = args[:rank] if args.key?(:rank)
460
+ @relative_visibility = args[:relative_visibility] if args.key?(:relative_visibility)
461
+ @report_category_id = args[:report_category_id] if args.key?(:report_category_id)
462
+ @report_country_code = args[:report_country_code] if args.key?(:report_country_code)
463
+ @traffic_source = args[:traffic_source] if args.key?(:traffic_source)
464
+ end
465
+ end
466
+
467
+ # Fields available for query in `competitive_visibility_top_merchant_view` table.
468
+ # [Competitive visibility](https://support.google.com/merchants/answer/11366442)
469
+ # report with business with highest visibility. Values are only set for fields
470
+ # requested explicitly in the request's search query. For more information, see [
471
+ # Explore your competitive landscape](https://developers.google.com/merchant/api/
472
+ # guides/reports/explore-competitive-landscape).
473
+ class CompetitiveVisibilityTopMerchantView
474
+ include Google::Apis::Core::Hashable
475
+
476
+ # [Ads / organic ratio] (https://support.google.com/merchants/answer/11366442#
477
+ # zippy=%2Cads-free-ratio) shows how often the domain receives impressions from
478
+ # Shopping ads compared to organic traffic. The number is rounded and bucketed.
479
+ # Cannot be filtered on in the 'WHERE' clause.
480
+ # Corresponds to the JSON property `adsOrganicRatio`
481
+ # @return [Float]
482
+ attr_accessor :ads_organic_ratio
483
+
484
+ # Represents a whole or partial calendar date, such as a birthday. The time of
485
+ # day and time zone are either specified elsewhere or are insignificant. The
486
+ # date is relative to the Gregorian Calendar. This can represent one of the
487
+ # following: * A full date, with non-zero year, month, and day values. * A month
488
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
489
+ # with a zero month and a zero day. * A year and month, with a zero day (for
490
+ # example, a credit card expiration date). Related types: * google.type.
491
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
492
+ # Corresponds to the JSON property `date`
493
+ # @return [Google::Apis::MerchantapiReportsV1::Date]
494
+ attr_accessor :date
495
+
496
+ # Domain of your competitor or your domain, if `is_your_domain` is true.
497
+ # Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE' clause.
498
+ # Corresponds to the JSON property `domain`
499
+ # @return [String]
500
+ attr_accessor :domain
501
+
502
+ # [Higher position rate] (https://support.google.com/merchants/answer/11366442#
503
+ # zippy=%2Chigher-position-rate) shows how often a competitor’s offer got placed
504
+ # in a higher position on the page than your offer. Cannot be filtered on in the
505
+ # 'WHERE' clause.
506
+ # Corresponds to the JSON property `higherPositionRate`
507
+ # @return [Float]
508
+ attr_accessor :higher_position_rate
509
+
510
+ # True if this row contains data for your domain. Cannot be filtered on in the '
511
+ # WHERE' clause.
512
+ # Corresponds to the JSON property `isYourDomain`
513
+ # @return [Boolean]
514
+ attr_accessor :is_your_domain
515
+ alias_method :is_your_domain?, :is_your_domain
516
+
517
+ # [Page overlap rate] (https://support.google.com/merchants/answer/11366442#
518
+ # zippy=%2Cpage-overlap-rate) shows how frequently competing retailers’ offers
519
+ # are shown together with your offers on the same page. Cannot be filtered on in
520
+ # the 'WHERE' clause.
521
+ # Corresponds to the JSON property `pageOverlapRate`
522
+ # @return [Float]
523
+ attr_accessor :page_overlap_rate
524
+
525
+ # Position of the domain in the top merchants ranking for the selected keys (`
526
+ # date`, `report_category_id`, `report_country_code`, `traffic_source`) based on
527
+ # impressions. 1 is the highest. Cannot be filtered on in the 'WHERE' clause.
528
+ # Corresponds to the JSON property `rank`
529
+ # @return [Fixnum]
530
+ attr_accessor :rank
531
+
532
+ # Google product category ID to calculate the report for, represented in [Google'
533
+ # s product taxonomy](https://support.google.com/merchants/answer/6324436).
534
+ # Required in the `SELECT` clause. A condition on `report_category_id` is
535
+ # required in the `WHERE` clause.
536
+ # Corresponds to the JSON property `reportCategoryId`
537
+ # @return [Fixnum]
538
+ attr_accessor :report_category_id
539
+
540
+ # Country where impressions appeared. Required in the `SELECT` clause. A
541
+ # condition on `report_country_code` is required in the `WHERE` clause.
542
+ # Corresponds to the JSON property `reportCountryCode`
543
+ # @return [String]
544
+ attr_accessor :report_country_code
545
+
546
+ # Traffic source of impressions. Required in the `SELECT` clause.
547
+ # Corresponds to the JSON property `trafficSource`
548
+ # @return [String]
549
+ attr_accessor :traffic_source
550
+
551
+ def initialize(**args)
552
+ update!(**args)
553
+ end
554
+
555
+ # Update properties of this object
556
+ def update!(**args)
557
+ @ads_organic_ratio = args[:ads_organic_ratio] if args.key?(:ads_organic_ratio)
558
+ @date = args[:date] if args.key?(:date)
559
+ @domain = args[:domain] if args.key?(:domain)
560
+ @higher_position_rate = args[:higher_position_rate] if args.key?(:higher_position_rate)
561
+ @is_your_domain = args[:is_your_domain] if args.key?(:is_your_domain)
562
+ @page_overlap_rate = args[:page_overlap_rate] if args.key?(:page_overlap_rate)
563
+ @rank = args[:rank] if args.key?(:rank)
564
+ @report_category_id = args[:report_category_id] if args.key?(:report_category_id)
565
+ @report_country_code = args[:report_country_code] if args.key?(:report_country_code)
566
+ @traffic_source = args[:traffic_source] if args.key?(:traffic_source)
567
+ end
568
+ end
569
+
570
+ # Represents a whole or partial calendar date, such as a birthday. The time of
571
+ # day and time zone are either specified elsewhere or are insignificant. The
572
+ # date is relative to the Gregorian Calendar. This can represent one of the
573
+ # following: * A full date, with non-zero year, month, and day values. * A month
574
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
575
+ # with a zero month and a zero day. * A year and month, with a zero day (for
576
+ # example, a credit card expiration date). Related types: * google.type.
577
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
578
+ class Date
579
+ include Google::Apis::Core::Hashable
580
+
581
+ # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
582
+ # specify a year by itself or a year and month where the day isn't significant.
583
+ # Corresponds to the JSON property `day`
584
+ # @return [Fixnum]
585
+ attr_accessor :day
586
+
587
+ # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
588
+ # and day.
589
+ # Corresponds to the JSON property `month`
590
+ # @return [Fixnum]
591
+ attr_accessor :month
592
+
593
+ # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
594
+ # year.
595
+ # Corresponds to the JSON property `year`
596
+ # @return [Fixnum]
597
+ attr_accessor :year
598
+
599
+ def initialize(**args)
600
+ update!(**args)
601
+ end
602
+
603
+ # Update properties of this object
604
+ def update!(**args)
605
+ @day = args[:day] if args.key?(:day)
606
+ @month = args[:month] if args.key?(:month)
607
+ @year = args[:year] if args.key?(:year)
608
+ end
609
+ end
610
+
611
+ # Issue severity per reporting context.
612
+ class IssueSeverityPerReportingContext
613
+ include Google::Apis::Core::Hashable
614
+
615
+ # List of demoted countries in the reporting context, represented in ISO 3166
616
+ # format.
617
+ # Corresponds to the JSON property `demotedCountries`
618
+ # @return [Array<String>]
619
+ attr_accessor :demoted_countries
620
+
621
+ # List of disapproved countries in the reporting context, represented in ISO
622
+ # 3166 format.
623
+ # Corresponds to the JSON property `disapprovedCountries`
624
+ # @return [Array<String>]
625
+ attr_accessor :disapproved_countries
626
+
627
+ # Reporting context the issue applies to.
628
+ # Corresponds to the JSON property `reportingContext`
629
+ # @return [String]
630
+ attr_accessor :reporting_context
631
+
632
+ def initialize(**args)
633
+ update!(**args)
634
+ end
635
+
636
+ # Update properties of this object
637
+ def update!(**args)
638
+ @demoted_countries = args[:demoted_countries] if args.key?(:demoted_countries)
639
+ @disapproved_countries = args[:disapproved_countries] if args.key?(:disapproved_countries)
640
+ @reporting_context = args[:reporting_context] if args.key?(:reporting_context)
641
+ end
642
+ end
643
+
644
+ # Item issue associated with the product.
645
+ class ItemIssue
646
+ include Google::Apis::Core::Hashable
647
+
648
+ # Item issue resolution.
649
+ # Corresponds to the JSON property `resolution`
650
+ # @return [String]
651
+ attr_accessor :resolution
652
+
653
+ # How the issue affects the serving of the product.
654
+ # Corresponds to the JSON property `severity`
655
+ # @return [Google::Apis::MerchantapiReportsV1::ItemIssueSeverity]
656
+ attr_accessor :severity
657
+
658
+ # Issue type.
659
+ # Corresponds to the JSON property `type`
660
+ # @return [Google::Apis::MerchantapiReportsV1::ItemIssueType]
661
+ attr_accessor :type
662
+
663
+ def initialize(**args)
664
+ update!(**args)
665
+ end
666
+
667
+ # Update properties of this object
668
+ def update!(**args)
669
+ @resolution = args[:resolution] if args.key?(:resolution)
670
+ @severity = args[:severity] if args.key?(:severity)
671
+ @type = args[:type] if args.key?(:type)
672
+ end
673
+ end
674
+
675
+ # How the issue affects the serving of the product.
676
+ class ItemIssueSeverity
677
+ include Google::Apis::Core::Hashable
678
+
679
+ # Aggregated severity of the issue for all reporting contexts it affects.
680
+ # Reporting contexts included in the computation of the aggregated severity can
681
+ # be restricted using a filter on the `reporting_context` field. **This field
682
+ # can be used for filtering the results.**
683
+ # Corresponds to the JSON property `aggregatedSeverity`
684
+ # @return [String]
685
+ attr_accessor :aggregated_severity
686
+
687
+ # Issue severity per reporting context. Reporting contexts included in this list
688
+ # can be restricted using a filter on the `reporting_context` field.
689
+ # Corresponds to the JSON property `severityPerReportingContext`
690
+ # @return [Array<Google::Apis::MerchantapiReportsV1::IssueSeverityPerReportingContext>]
691
+ attr_accessor :severity_per_reporting_context
692
+
693
+ def initialize(**args)
694
+ update!(**args)
695
+ end
696
+
697
+ # Update properties of this object
698
+ def update!(**args)
699
+ @aggregated_severity = args[:aggregated_severity] if args.key?(:aggregated_severity)
700
+ @severity_per_reporting_context = args[:severity_per_reporting_context] if args.key?(:severity_per_reporting_context)
701
+ end
702
+ end
703
+
704
+ # Issue type.
705
+ class ItemIssueType
706
+ include Google::Apis::Core::Hashable
707
+
708
+ # Canonical attribute name for attribute-specific issues.
709
+ # Corresponds to the JSON property `canonicalAttribute`
710
+ # @return [String]
711
+ attr_accessor :canonical_attribute
712
+
713
+ # Error code of the issue, equivalent to the `code` of [Product issues](https://
714
+ # developers.google.com/merchant/api/guides/products/list-products-data-issues).
715
+ # Corresponds to the JSON property `code`
716
+ # @return [String]
717
+ attr_accessor :code
718
+
719
+ def initialize(**args)
720
+ update!(**args)
721
+ end
722
+
723
+ # Update properties of this object
724
+ def update!(**args)
725
+ @canonical_attribute = args[:canonical_attribute] if args.key?(:canonical_attribute)
726
+ @code = args[:code] if args.key?(:code)
727
+ end
728
+ end
729
+
730
+ # Fields available for query in `non_product_performance_view` table.
731
+ # Performance data on images and online store links leading to your non-product
732
+ # pages. This includes performance metrics (for example, `clicks`) and
733
+ # dimensions according to which performance metrics are segmented (for example, `
734
+ # date`). Segment fields cannot be selected in queries without also selecting at
735
+ # least one metric field. Values are only set for fields requested explicitly in
736
+ # the request's search query. For more information, see [Performance reports](
737
+ # https://developers.google.com/merchant/api/guides/reports/performance-reports).
738
+ class NonProductPerformanceView
739
+ include Google::Apis::Core::Hashable
740
+
741
+ # Click-through rate - the number of clicks (`clicks`) divided by the number of
742
+ # impressions (`impressions`) of images and online store links leading to your
743
+ # non-product pages. Metric.
744
+ # Corresponds to the JSON property `clickThroughRate`
745
+ # @return [Float]
746
+ attr_accessor :click_through_rate
747
+
748
+ # Number of clicks on images and online store links leading to your non-product
749
+ # pages. Metric.
750
+ # Corresponds to the JSON property `clicks`
751
+ # @return [Fixnum]
752
+ attr_accessor :clicks
753
+
754
+ # Represents a whole or partial calendar date, such as a birthday. The time of
755
+ # day and time zone are either specified elsewhere or are insignificant. The
756
+ # date is relative to the Gregorian Calendar. This can represent one of the
757
+ # following: * A full date, with non-zero year, month, and day values. * A month
758
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
759
+ # with a zero month and a zero day. * A year and month, with a zero day (for
760
+ # example, a credit card expiration date). Related types: * google.type.
761
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
762
+ # Corresponds to the JSON property `date`
763
+ # @return [Google::Apis::MerchantapiReportsV1::Date]
764
+ attr_accessor :date
765
+
766
+ # Number of times images and online store links leading to your non-product
767
+ # pages were shown. Metric.
768
+ # Corresponds to the JSON property `impressions`
769
+ # @return [Fixnum]
770
+ attr_accessor :impressions
771
+
772
+ # Represents a whole or partial calendar date, such as a birthday. The time of
773
+ # day and time zone are either specified elsewhere or are insignificant. The
774
+ # date is relative to the Gregorian Calendar. This can represent one of the
775
+ # following: * A full date, with non-zero year, month, and day values. * A month
776
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
777
+ # with a zero month and a zero day. * A year and month, with a zero day (for
778
+ # example, a credit card expiration date). Related types: * google.type.
779
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
780
+ # Corresponds to the JSON property `week`
781
+ # @return [Google::Apis::MerchantapiReportsV1::Date]
782
+ attr_accessor :week
783
+
784
+ def initialize(**args)
785
+ update!(**args)
786
+ end
787
+
788
+ # Update properties of this object
789
+ def update!(**args)
790
+ @click_through_rate = args[:click_through_rate] if args.key?(:click_through_rate)
791
+ @clicks = args[:clicks] if args.key?(:clicks)
792
+ @date = args[:date] if args.key?(:date)
793
+ @impressions = args[:impressions] if args.key?(:impressions)
794
+ @week = args[:week] if args.key?(:week)
795
+ end
796
+ end
797
+
798
+ # The price represented as a number and currency.
799
+ class Price
800
+ include Google::Apis::Core::Hashable
801
+
802
+ # The price represented as a number in micros (1 million micros is an equivalent
803
+ # to one's currency standard unit, for example, 1 USD = 1000000 micros).
804
+ # Corresponds to the JSON property `amountMicros`
805
+ # @return [Fixnum]
806
+ attr_accessor :amount_micros
807
+
808
+ # The currency of the price using three-letter acronyms according to [ISO 4217](
809
+ # http://en.wikipedia.org/wiki/ISO_4217).
810
+ # Corresponds to the JSON property `currencyCode`
811
+ # @return [String]
812
+ attr_accessor :currency_code
813
+
814
+ def initialize(**args)
815
+ update!(**args)
816
+ end
817
+
818
+ # Update properties of this object
819
+ def update!(**args)
820
+ @amount_micros = args[:amount_micros] if args.key?(:amount_micros)
821
+ @currency_code = args[:currency_code] if args.key?(:currency_code)
822
+ end
823
+ end
824
+
825
+ # Fields available for query in `price_competitiveness_product_view` table. [
826
+ # Price competitiveness](https://support.google.com/merchants/answer/9626903)
827
+ # report. Values are only set for fields requested explicitly in the request's
828
+ # search query. For more information, see [Understand the market](https://
829
+ # developers.google.com/merchant/api/guides/reports/understand-the-market).
830
+ class PriceCompetitivenessProductView
831
+ include Google::Apis::Core::Hashable
832
+
833
+ # The price represented as a number and currency.
834
+ # Corresponds to the JSON property `benchmarkPrice`
835
+ # @return [Google::Apis::MerchantapiReportsV1::Price]
836
+ attr_accessor :benchmark_price
837
+
838
+ # Brand of the product.
839
+ # Corresponds to the JSON property `brand`
840
+ # @return [String]
841
+ attr_accessor :brand
842
+
843
+ # Product category (1st level) in [Google's product taxonomy](https://support.
844
+ # google.com/merchants/answer/6324436).
845
+ # Corresponds to the JSON property `categoryL1`
846
+ # @return [String]
847
+ attr_accessor :category_l1
848
+
849
+ # Product category (2nd level) in [Google's product taxonomy](https://support.
850
+ # google.com/merchants/answer/6324436).
851
+ # Corresponds to the JSON property `categoryL2`
852
+ # @return [String]
853
+ attr_accessor :category_l2
854
+
855
+ # Product category (3rd level) in [Google's product taxonomy](https://support.
856
+ # google.com/merchants/answer/6324436).
857
+ # Corresponds to the JSON property `categoryL3`
858
+ # @return [String]
859
+ attr_accessor :category_l3
860
+
861
+ # Product category (4th level) in [Google's product taxonomy](https://support.
862
+ # google.com/merchants/answer/6324436).
863
+ # Corresponds to the JSON property `categoryL4`
864
+ # @return [String]
865
+ attr_accessor :category_l4
866
+
867
+ # Product category (5th level) in [Google's product taxonomy](https://support.
868
+ # google.com/merchants/answer/6324436).
869
+ # Corresponds to the JSON property `categoryL5`
870
+ # @return [String]
871
+ attr_accessor :category_l5
872
+
873
+ # REST ID of the product, in the form of `channel~languageCode~feedLabel~offerId`
874
+ # . Can be used to join data with the `product_view` table. Required in the `
875
+ # SELECT` clause.
876
+ # Corresponds to the JSON property `id`
877
+ # @return [String]
878
+ attr_accessor :id
879
+
880
+ # Merchant-provided id of the product.
881
+ # Corresponds to the JSON property `offerId`
882
+ # @return [String]
883
+ attr_accessor :offer_id
884
+
885
+ # The price represented as a number and currency.
886
+ # Corresponds to the JSON property `price`
887
+ # @return [Google::Apis::MerchantapiReportsV1::Price]
888
+ attr_accessor :price
889
+
890
+ # Product type (1st level) in merchant's own [product taxonomy](https://support.
891
+ # google.com/merchants/answer/6324406).
892
+ # Corresponds to the JSON property `productTypeL1`
893
+ # @return [String]
894
+ attr_accessor :product_type_l1
895
+
896
+ # Product type (2nd level) in merchant's own [product taxonomy](https://support.
897
+ # google.com/merchants/answer/6324406).
898
+ # Corresponds to the JSON property `productTypeL2`
899
+ # @return [String]
900
+ attr_accessor :product_type_l2
901
+
902
+ # Product type (3rd level) in merchant's own [product taxonomy](https://support.
903
+ # google.com/merchants/answer/6324406).
904
+ # Corresponds to the JSON property `productTypeL3`
905
+ # @return [String]
906
+ attr_accessor :product_type_l3
907
+
908
+ # Product type (4th level) in merchant's own [product taxonomy](https://support.
909
+ # google.com/merchants/answer/6324406).
910
+ # Corresponds to the JSON property `productTypeL4`
911
+ # @return [String]
912
+ attr_accessor :product_type_l4
913
+
914
+ # Product type (5th level) in merchant's own [product taxonomy](https://support.
915
+ # google.com/merchants/answer/6324406).
916
+ # Corresponds to the JSON property `productTypeL5`
917
+ # @return [String]
918
+ attr_accessor :product_type_l5
919
+
920
+ # Country of the price benchmark. Represented in the ISO 3166 format. Required
921
+ # in the `SELECT` clause.
922
+ # Corresponds to the JSON property `reportCountryCode`
923
+ # @return [String]
924
+ attr_accessor :report_country_code
925
+
926
+ # Title of the product.
927
+ # Corresponds to the JSON property `title`
928
+ # @return [String]
929
+ attr_accessor :title
930
+
931
+ def initialize(**args)
932
+ update!(**args)
933
+ end
934
+
935
+ # Update properties of this object
936
+ def update!(**args)
937
+ @benchmark_price = args[:benchmark_price] if args.key?(:benchmark_price)
938
+ @brand = args[:brand] if args.key?(:brand)
939
+ @category_l1 = args[:category_l1] if args.key?(:category_l1)
940
+ @category_l2 = args[:category_l2] if args.key?(:category_l2)
941
+ @category_l3 = args[:category_l3] if args.key?(:category_l3)
942
+ @category_l4 = args[:category_l4] if args.key?(:category_l4)
943
+ @category_l5 = args[:category_l5] if args.key?(:category_l5)
944
+ @id = args[:id] if args.key?(:id)
945
+ @offer_id = args[:offer_id] if args.key?(:offer_id)
946
+ @price = args[:price] if args.key?(:price)
947
+ @product_type_l1 = args[:product_type_l1] if args.key?(:product_type_l1)
948
+ @product_type_l2 = args[:product_type_l2] if args.key?(:product_type_l2)
949
+ @product_type_l3 = args[:product_type_l3] if args.key?(:product_type_l3)
950
+ @product_type_l4 = args[:product_type_l4] if args.key?(:product_type_l4)
951
+ @product_type_l5 = args[:product_type_l5] if args.key?(:product_type_l5)
952
+ @report_country_code = args[:report_country_code] if args.key?(:report_country_code)
953
+ @title = args[:title] if args.key?(:title)
954
+ end
955
+ end
956
+
957
+ # Fields available for query in `price_insights_product_view` table. [Price
958
+ # insights](https://support.google.com/merchants/answer/11916926) report. Values
959
+ # are only set for fields requested explicitly in the request's search query.
960
+ # For more information, see [Understand the market](https://developers.google.
961
+ # com/merchant/api/guides/reports/understand-the-market).
962
+ class PriceInsightsProductView
963
+ include Google::Apis::Core::Hashable
964
+
965
+ # Brand of the product.
966
+ # Corresponds to the JSON property `brand`
967
+ # @return [String]
968
+ attr_accessor :brand
969
+
970
+ # Product category (1st level) in [Google's product taxonomy](https://support.
971
+ # google.com/merchants/answer/6324436).
972
+ # Corresponds to the JSON property `categoryL1`
973
+ # @return [String]
974
+ attr_accessor :category_l1
975
+
976
+ # Product category (2nd level) in [Google's product taxonomy](https://support.
977
+ # google.com/merchants/answer/6324436).
978
+ # Corresponds to the JSON property `categoryL2`
979
+ # @return [String]
980
+ attr_accessor :category_l2
981
+
982
+ # Product category (3rd level) in [Google's product taxonomy](https://support.
983
+ # google.com/merchants/answer/6324436).
984
+ # Corresponds to the JSON property `categoryL3`
985
+ # @return [String]
986
+ attr_accessor :category_l3
987
+
988
+ # Product category (4th level) in [Google's product taxonomy](https://support.
989
+ # google.com/merchants/answer/6324436).
990
+ # Corresponds to the JSON property `categoryL4`
991
+ # @return [String]
992
+ attr_accessor :category_l4
993
+
994
+ # Product category (5th level) in [Google's product taxonomy](https://support.
995
+ # google.com/merchants/answer/6324436).
996
+ # Corresponds to the JSON property `categoryL5`
997
+ # @return [String]
998
+ attr_accessor :category_l5
999
+
1000
+ # The predicted effectiveness of applying the price suggestion, bucketed.
1001
+ # Corresponds to the JSON property `effectiveness`
1002
+ # @return [String]
1003
+ attr_accessor :effectiveness
1004
+
1005
+ # REST ID of the product, in the form of `channel~languageCode~feedLabel~offerId`
1006
+ # . Can be used to join data with the `product_view` table. Required in the `
1007
+ # SELECT` clause.
1008
+ # Corresponds to the JSON property `id`
1009
+ # @return [String]
1010
+ attr_accessor :id
1011
+
1012
+ # Merchant-provided id of the product.
1013
+ # Corresponds to the JSON property `offerId`
1014
+ # @return [String]
1015
+ attr_accessor :offer_id
1016
+
1017
+ # Predicted change in clicks as a fraction after introducing the suggested price
1018
+ # compared to current active price. For example, 0.05 is a 5% predicted increase
1019
+ # in clicks.
1020
+ # Corresponds to the JSON property `predictedClicksChangeFraction`
1021
+ # @return [Float]
1022
+ attr_accessor :predicted_clicks_change_fraction
1023
+
1024
+ # Predicted change in conversions as a fraction after introducing the suggested
1025
+ # price compared to current active price. For example, 0.05 is a 5% predicted
1026
+ # increase in conversions).
1027
+ # Corresponds to the JSON property `predictedConversionsChangeFraction`
1028
+ # @return [Float]
1029
+ attr_accessor :predicted_conversions_change_fraction
1030
+
1031
+ # Predicted change in impressions as a fraction after introducing the suggested
1032
+ # price compared to current active price. For example, 0.05 is a 5% predicted
1033
+ # increase in impressions.
1034
+ # Corresponds to the JSON property `predictedImpressionsChangeFraction`
1035
+ # @return [Float]
1036
+ attr_accessor :predicted_impressions_change_fraction
1037
+
1038
+ # The price represented as a number and currency.
1039
+ # Corresponds to the JSON property `price`
1040
+ # @return [Google::Apis::MerchantapiReportsV1::Price]
1041
+ attr_accessor :price
1042
+
1043
+ # Product type (1st level) in merchant's own [product taxonomy](https://support.
1044
+ # google.com/merchants/answer/6324406).
1045
+ # Corresponds to the JSON property `productTypeL1`
1046
+ # @return [String]
1047
+ attr_accessor :product_type_l1
1048
+
1049
+ # Product type (2nd level) in merchant's own [product taxonomy](https://support.
1050
+ # google.com/merchants/answer/6324406).
1051
+ # Corresponds to the JSON property `productTypeL2`
1052
+ # @return [String]
1053
+ attr_accessor :product_type_l2
1054
+
1055
+ # Product type (3rd level) in merchant's own [product taxonomy](https://support.
1056
+ # google.com/merchants/answer/6324406).
1057
+ # Corresponds to the JSON property `productTypeL3`
1058
+ # @return [String]
1059
+ attr_accessor :product_type_l3
1060
+
1061
+ # Product type (4th level) in merchant's own [product taxonomy](https://support.
1062
+ # google.com/merchants/answer/6324406).
1063
+ # Corresponds to the JSON property `productTypeL4`
1064
+ # @return [String]
1065
+ attr_accessor :product_type_l4
1066
+
1067
+ # Product type (5th level) in merchant's own [product taxonomy](https://support.
1068
+ # google.com/merchants/answer/6324406).
1069
+ # Corresponds to the JSON property `productTypeL5`
1070
+ # @return [String]
1071
+ attr_accessor :product_type_l5
1072
+
1073
+ # The price represented as a number and currency.
1074
+ # Corresponds to the JSON property `suggestedPrice`
1075
+ # @return [Google::Apis::MerchantapiReportsV1::Price]
1076
+ attr_accessor :suggested_price
1077
+
1078
+ # Title of the product.
1079
+ # Corresponds to the JSON property `title`
1080
+ # @return [String]
1081
+ attr_accessor :title
1082
+
1083
+ def initialize(**args)
1084
+ update!(**args)
1085
+ end
1086
+
1087
+ # Update properties of this object
1088
+ def update!(**args)
1089
+ @brand = args[:brand] if args.key?(:brand)
1090
+ @category_l1 = args[:category_l1] if args.key?(:category_l1)
1091
+ @category_l2 = args[:category_l2] if args.key?(:category_l2)
1092
+ @category_l3 = args[:category_l3] if args.key?(:category_l3)
1093
+ @category_l4 = args[:category_l4] if args.key?(:category_l4)
1094
+ @category_l5 = args[:category_l5] if args.key?(:category_l5)
1095
+ @effectiveness = args[:effectiveness] if args.key?(:effectiveness)
1096
+ @id = args[:id] if args.key?(:id)
1097
+ @offer_id = args[:offer_id] if args.key?(:offer_id)
1098
+ @predicted_clicks_change_fraction = args[:predicted_clicks_change_fraction] if args.key?(:predicted_clicks_change_fraction)
1099
+ @predicted_conversions_change_fraction = args[:predicted_conversions_change_fraction] if args.key?(:predicted_conversions_change_fraction)
1100
+ @predicted_impressions_change_fraction = args[:predicted_impressions_change_fraction] if args.key?(:predicted_impressions_change_fraction)
1101
+ @price = args[:price] if args.key?(:price)
1102
+ @product_type_l1 = args[:product_type_l1] if args.key?(:product_type_l1)
1103
+ @product_type_l2 = args[:product_type_l2] if args.key?(:product_type_l2)
1104
+ @product_type_l3 = args[:product_type_l3] if args.key?(:product_type_l3)
1105
+ @product_type_l4 = args[:product_type_l4] if args.key?(:product_type_l4)
1106
+ @product_type_l5 = args[:product_type_l5] if args.key?(:product_type_l5)
1107
+ @suggested_price = args[:suggested_price] if args.key?(:suggested_price)
1108
+ @title = args[:title] if args.key?(:title)
1109
+ end
1110
+ end
1111
+
1112
+ # The change that happened to the product including old value, new value,
1113
+ # country code as the region code and reporting context.
1114
+ class ProductChange
1115
+ include Google::Apis::Core::Hashable
1116
+
1117
+ # The new value of the changed resource or attribute. If empty, it means that
1118
+ # the product was deleted. Will have one of these values : (`approved`, `pending`
1119
+ # , `disapproved`, ``)
1120
+ # Corresponds to the JSON property `newValue`
1121
+ # @return [String]
1122
+ attr_accessor :new_value
1123
+
1124
+ # The old value of the changed resource or attribute. If empty, it means that
1125
+ # the product was created. Will have one of these values : (`approved`, `pending`
1126
+ # , `disapproved`, ``)
1127
+ # Corresponds to the JSON property `oldValue`
1128
+ # @return [String]
1129
+ attr_accessor :old_value
1130
+
1131
+ # Countries that have the change (if applicable). Represented in the ISO 3166
1132
+ # format.
1133
+ # Corresponds to the JSON property `regionCode`
1134
+ # @return [String]
1135
+ attr_accessor :region_code
1136
+
1137
+ # Reporting contexts that have the change (if applicable). Currently this field
1138
+ # supports only (`SHOPPING_ADS`, `LOCAL_INVENTORY_ADS`, `YOUTUBE_SHOPPING`, `
1139
+ # YOUTUBE_CHECKOUT`, `YOUTUBE_AFFILIATE`) from the enum value [
1140
+ # ReportingContextEnum](/merchant/api/reference/rest/Shared.Types/
1141
+ # ReportingContextEnum)
1142
+ # Corresponds to the JSON property `reportingContext`
1143
+ # @return [String]
1144
+ attr_accessor :reporting_context
1145
+
1146
+ def initialize(**args)
1147
+ update!(**args)
1148
+ end
1149
+
1150
+ # Update properties of this object
1151
+ def update!(**args)
1152
+ @new_value = args[:new_value] if args.key?(:new_value)
1153
+ @old_value = args[:old_value] if args.key?(:old_value)
1154
+ @region_code = args[:region_code] if args.key?(:region_code)
1155
+ @reporting_context = args[:reporting_context] if args.key?(:reporting_context)
1156
+ end
1157
+ end
1158
+
1159
+ # Fields available for query in `product_performance_view` table. Product
1160
+ # performance data for your account, including performance metrics (for example,
1161
+ # `clicks`) and dimensions according to which performance metrics are segmented (
1162
+ # for example, `offer_id`). Values of product dimensions, such as `offer_id`,
1163
+ # reflect the state of a product at the time of the impression. Segment fields
1164
+ # cannot be selected in queries without also selecting at least one metric field.
1165
+ # Values are only set for fields requested explicitly in the request's search
1166
+ # query. For more information, see [Performance reports](https://developers.
1167
+ # google.com/merchant/api/guides/reports/performance-reports).
1168
+ class ProductPerformanceView
1169
+ include Google::Apis::Core::Hashable
1170
+
1171
+ # Brand of the product. Segment.
1172
+ # Corresponds to the JSON property `brand`
1173
+ # @return [String]
1174
+ attr_accessor :brand
1175
+
1176
+ # [Product category (1st level)](https://developers.google.com/merchant/api/
1177
+ # guides/reports/performance-reports#category_and_product_type) in Google's
1178
+ # product taxonomy. Segment.
1179
+ # Corresponds to the JSON property `categoryL1`
1180
+ # @return [String]
1181
+ attr_accessor :category_l1
1182
+
1183
+ # [Product category (2nd level)](https://developers.google.com/merchant/api/
1184
+ # guides/reports/performance-reports#category_and_product_type) in Google's
1185
+ # product taxonomy. Segment.
1186
+ # Corresponds to the JSON property `categoryL2`
1187
+ # @return [String]
1188
+ attr_accessor :category_l2
1189
+
1190
+ # [Product category (3rd level)](https://developers.google.com/merchant/api/
1191
+ # guides/reports/performance-reports#category_and_product_type) in Google's
1192
+ # product taxonomy. Segment.
1193
+ # Corresponds to the JSON property `categoryL3`
1194
+ # @return [String]
1195
+ attr_accessor :category_l3
1196
+
1197
+ # [Product category (4th level)](https://developers.google.com/merchant/api/
1198
+ # guides/reports/performance-reports#category_and_product_type) in Google's
1199
+ # product taxonomy. Segment.
1200
+ # Corresponds to the JSON property `categoryL4`
1201
+ # @return [String]
1202
+ attr_accessor :category_l4
1203
+
1204
+ # [Product category (5th level)](https://developers.google.com/merchant/api/
1205
+ # guides/reports/performance-reports#category_and_product_type) in Google's
1206
+ # product taxonomy. Segment.
1207
+ # Corresponds to the JSON property `categoryL5`
1208
+ # @return [String]
1209
+ attr_accessor :category_l5
1210
+
1211
+ # Click-through rate - the number of clicks merchant's products receive (clicks)
1212
+ # divided by the number of times the products are shown (impressions). Metric.
1213
+ # Corresponds to the JSON property `clickThroughRate`
1214
+ # @return [Float]
1215
+ attr_accessor :click_through_rate
1216
+
1217
+ # Number of clicks. Metric.
1218
+ # Corresponds to the JSON property `clicks`
1219
+ # @return [Fixnum]
1220
+ attr_accessor :clicks
1221
+
1222
+ # Number of conversions divided by the number of clicks, reported on the
1223
+ # impression date. Metric. Available only for the `FREE` traffic source.
1224
+ # Corresponds to the JSON property `conversionRate`
1225
+ # @return [Float]
1226
+ attr_accessor :conversion_rate
1227
+
1228
+ # The price represented as a number and currency.
1229
+ # Corresponds to the JSON property `conversionValue`
1230
+ # @return [Google::Apis::MerchantapiReportsV1::Price]
1231
+ attr_accessor :conversion_value
1232
+
1233
+ # Number of conversions attributed to the product, reported on the conversion
1234
+ # date. Depending on the attribution model, a conversion might be distributed
1235
+ # across multiple clicks, where each click gets its own credit assigned. This
1236
+ # metric is a sum of all such credits. Metric. Available only for the `FREE`
1237
+ # traffic source.
1238
+ # Corresponds to the JSON property `conversions`
1239
+ # @return [Float]
1240
+ attr_accessor :conversions
1241
+
1242
+ # Custom label 0 for custom grouping of products. Segment.
1243
+ # Corresponds to the JSON property `customLabel0`
1244
+ # @return [String]
1245
+ attr_accessor :custom_label0
1246
+
1247
+ # Custom label 1 for custom grouping of products. Segment.
1248
+ # Corresponds to the JSON property `customLabel1`
1249
+ # @return [String]
1250
+ attr_accessor :custom_label1
1251
+
1252
+ # Custom label 2 for custom grouping of products. Segment.
1253
+ # Corresponds to the JSON property `customLabel2`
1254
+ # @return [String]
1255
+ attr_accessor :custom_label2
1256
+
1257
+ # Custom label 3 for custom grouping of products. Segment.
1258
+ # Corresponds to the JSON property `customLabel3`
1259
+ # @return [String]
1260
+ attr_accessor :custom_label3
1261
+
1262
+ # Custom label 4 for custom grouping of products. Segment.
1263
+ # Corresponds to the JSON property `customLabel4`
1264
+ # @return [String]
1265
+ attr_accessor :custom_label4
1266
+
1267
+ # Code of the country where the customer is located at the time of the event.
1268
+ # Represented in the ISO 3166 format. Segment. If the customer country cannot be
1269
+ # determined, a special 'ZZ' code is returned.
1270
+ # Corresponds to the JSON property `customerCountryCode`
1271
+ # @return [String]
1272
+ attr_accessor :customer_country_code
1273
+
1274
+ # Represents a whole or partial calendar date, such as a birthday. The time of
1275
+ # day and time zone are either specified elsewhere or are insignificant. The
1276
+ # date is relative to the Gregorian Calendar. This can represent one of the
1277
+ # following: * A full date, with non-zero year, month, and day values. * A month
1278
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
1279
+ # with a zero month and a zero day. * A year and month, with a zero day (for
1280
+ # example, a credit card expiration date). Related types: * google.type.
1281
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
1282
+ # Corresponds to the JSON property `date`
1283
+ # @return [Google::Apis::MerchantapiReportsV1::Date]
1284
+ attr_accessor :date
1285
+
1286
+ # Number of times merchant's products are shown. Metric.
1287
+ # Corresponds to the JSON property `impressions`
1288
+ # @return [Fixnum]
1289
+ attr_accessor :impressions
1290
+
1291
+ # Marketing method to which metrics apply. Segment.
1292
+ # Corresponds to the JSON property `marketingMethod`
1293
+ # @return [String]
1294
+ attr_accessor :marketing_method
1295
+
1296
+ # Network to which metrics apply. Segment.
1297
+ # Corresponds to the JSON property `network`
1298
+ # @return [String]
1299
+ attr_accessor :network
1300
+
1301
+ # Merchant-provided id of the product. Segment.
1302
+ # Corresponds to the JSON property `offerId`
1303
+ # @return [String]
1304
+ attr_accessor :offer_id
1305
+
1306
+ # [Product type (1st level)](https://developers.google.com/merchant/api/guides/
1307
+ # reports/performance-reports#category_and_product_type) in merchant's own
1308
+ # product taxonomy. Segment.
1309
+ # Corresponds to the JSON property `productTypeL1`
1310
+ # @return [String]
1311
+ attr_accessor :product_type_l1
1312
+
1313
+ # [Product type (2nd level)](https://developers.google.com/merchant/api/guides/
1314
+ # reports/performance-reports#category_and_product_type) in merchant's own
1315
+ # product taxonomy. Segment.
1316
+ # Corresponds to the JSON property `productTypeL2`
1317
+ # @return [String]
1318
+ attr_accessor :product_type_l2
1319
+
1320
+ # [Product type (3rd level)](https://developers.google.com/merchant/api/guides/
1321
+ # reports/performance-reports#category_and_product_type) in merchant's own
1322
+ # product taxonomy. Segment.
1323
+ # Corresponds to the JSON property `productTypeL3`
1324
+ # @return [String]
1325
+ attr_accessor :product_type_l3
1326
+
1327
+ # [Product type (4th level)](https://developers.google.com/merchant/api/guides/
1328
+ # reports/performance-reports#category_and_product_type) in merchant's own
1329
+ # product taxonomy. Segment.
1330
+ # Corresponds to the JSON property `productTypeL4`
1331
+ # @return [String]
1332
+ attr_accessor :product_type_l4
1333
+
1334
+ # [Product type (5th level)](https://developers.google.com/merchant/api/guides/
1335
+ # reports/performance-reports#category_and_product_type) in merchant's own
1336
+ # product taxonomy. Segment.
1337
+ # Corresponds to the JSON property `productTypeL5`
1338
+ # @return [String]
1339
+ attr_accessor :product_type_l5
1340
+
1341
+ # Store type to which metrics apply. Can be `ONLINE_STORE` or `LOCAL_STORES`.
1342
+ # Segment. For `LOCAL_STORES` store type, further segmentation by a specific
1343
+ # store is not available.
1344
+ # Corresponds to the JSON property `storeType`
1345
+ # @return [String]
1346
+ attr_accessor :store_type
1347
+
1348
+ # Title of the product. Segment.
1349
+ # Corresponds to the JSON property `title`
1350
+ # @return [String]
1351
+ attr_accessor :title
1352
+
1353
+ # Represents a whole or partial calendar date, such as a birthday. The time of
1354
+ # day and time zone are either specified elsewhere or are insignificant. The
1355
+ # date is relative to the Gregorian Calendar. This can represent one of the
1356
+ # following: * A full date, with non-zero year, month, and day values. * A month
1357
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
1358
+ # with a zero month and a zero day. * A year and month, with a zero day (for
1359
+ # example, a credit card expiration date). Related types: * google.type.
1360
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
1361
+ # Corresponds to the JSON property `week`
1362
+ # @return [Google::Apis::MerchantapiReportsV1::Date]
1363
+ attr_accessor :week
1364
+
1365
+ def initialize(**args)
1366
+ update!(**args)
1367
+ end
1368
+
1369
+ # Update properties of this object
1370
+ def update!(**args)
1371
+ @brand = args[:brand] if args.key?(:brand)
1372
+ @category_l1 = args[:category_l1] if args.key?(:category_l1)
1373
+ @category_l2 = args[:category_l2] if args.key?(:category_l2)
1374
+ @category_l3 = args[:category_l3] if args.key?(:category_l3)
1375
+ @category_l4 = args[:category_l4] if args.key?(:category_l4)
1376
+ @category_l5 = args[:category_l5] if args.key?(:category_l5)
1377
+ @click_through_rate = args[:click_through_rate] if args.key?(:click_through_rate)
1378
+ @clicks = args[:clicks] if args.key?(:clicks)
1379
+ @conversion_rate = args[:conversion_rate] if args.key?(:conversion_rate)
1380
+ @conversion_value = args[:conversion_value] if args.key?(:conversion_value)
1381
+ @conversions = args[:conversions] if args.key?(:conversions)
1382
+ @custom_label0 = args[:custom_label0] if args.key?(:custom_label0)
1383
+ @custom_label1 = args[:custom_label1] if args.key?(:custom_label1)
1384
+ @custom_label2 = args[:custom_label2] if args.key?(:custom_label2)
1385
+ @custom_label3 = args[:custom_label3] if args.key?(:custom_label3)
1386
+ @custom_label4 = args[:custom_label4] if args.key?(:custom_label4)
1387
+ @customer_country_code = args[:customer_country_code] if args.key?(:customer_country_code)
1388
+ @date = args[:date] if args.key?(:date)
1389
+ @impressions = args[:impressions] if args.key?(:impressions)
1390
+ @marketing_method = args[:marketing_method] if args.key?(:marketing_method)
1391
+ @network = args[:network] if args.key?(:network)
1392
+ @offer_id = args[:offer_id] if args.key?(:offer_id)
1393
+ @product_type_l1 = args[:product_type_l1] if args.key?(:product_type_l1)
1394
+ @product_type_l2 = args[:product_type_l2] if args.key?(:product_type_l2)
1395
+ @product_type_l3 = args[:product_type_l3] if args.key?(:product_type_l3)
1396
+ @product_type_l4 = args[:product_type_l4] if args.key?(:product_type_l4)
1397
+ @product_type_l5 = args[:product_type_l5] if args.key?(:product_type_l5)
1398
+ @store_type = args[:store_type] if args.key?(:store_type)
1399
+ @title = args[:title] if args.key?(:title)
1400
+ @week = args[:week] if args.key?(:week)
1401
+ end
1402
+ end
1403
+
1404
+ # The message that the merchant will receive to notify about product status
1405
+ # change event. For more information, see [Product status changes](https://
1406
+ # developers.google.com/merchant/api/guides/notifications/product-status-changes)
1407
+ # .
1408
+ class ProductStatusChangeMessage
1409
+ include Google::Apis::Core::Hashable
1410
+
1411
+ # The target account that owns the entity that changed. Format : `accounts/`
1412
+ # merchant_id``
1413
+ # Corresponds to the JSON property `account`
1414
+ # @return [String]
1415
+ attr_accessor :account
1416
+
1417
+ # The attribute in the resource that changed, in this case it will be always `
1418
+ # Status`.
1419
+ # Corresponds to the JSON property `attribute`
1420
+ # @return [String]
1421
+ attr_accessor :attribute
1422
+
1423
+ # A message to describe the change that happened to the product
1424
+ # Corresponds to the JSON property `changes`
1425
+ # @return [Array<Google::Apis::MerchantapiReportsV1::ProductChange>]
1426
+ attr_accessor :changes
1427
+
1428
+ # The time at which the event was generated. If you want to order the
1429
+ # notification messages you receive you should rely on this field not on the
1430
+ # order of receiving the notifications.
1431
+ # Corresponds to the JSON property `eventTime`
1432
+ # @return [String]
1433
+ attr_accessor :event_time
1434
+
1435
+ # Optional. The product expiration time. This field will not be set if the
1436
+ # notification is sent for a product deletion event.
1437
+ # Corresponds to the JSON property `expirationTime`
1438
+ # @return [String]
1439
+ attr_accessor :expiration_time
1440
+
1441
+ # The account that manages the merchant's account. can be the same as merchant
1442
+ # id if it is standalone account. Format : `accounts/`service_provider_id``
1443
+ # Corresponds to the JSON property `managingAccount`
1444
+ # @return [String]
1445
+ attr_accessor :managing_account
1446
+
1447
+ # The product name. Format: `accounts/`account`/products/`product``
1448
+ # Corresponds to the JSON property `resource`
1449
+ # @return [String]
1450
+ attr_accessor :resource
1451
+
1452
+ # The product id.
1453
+ # Corresponds to the JSON property `resourceId`
1454
+ # @return [String]
1455
+ attr_accessor :resource_id
1456
+
1457
+ # The resource that changed, in this case it will always be `Product`.
1458
+ # Corresponds to the JSON property `resourceType`
1459
+ # @return [String]
1460
+ attr_accessor :resource_type
1461
+
1462
+ def initialize(**args)
1463
+ update!(**args)
1464
+ end
1465
+
1466
+ # Update properties of this object
1467
+ def update!(**args)
1468
+ @account = args[:account] if args.key?(:account)
1469
+ @attribute = args[:attribute] if args.key?(:attribute)
1470
+ @changes = args[:changes] if args.key?(:changes)
1471
+ @event_time = args[:event_time] if args.key?(:event_time)
1472
+ @expiration_time = args[:expiration_time] if args.key?(:expiration_time)
1473
+ @managing_account = args[:managing_account] if args.key?(:managing_account)
1474
+ @resource = args[:resource] if args.key?(:resource)
1475
+ @resource_id = args[:resource_id] if args.key?(:resource_id)
1476
+ @resource_type = args[:resource_type] if args.key?(:resource_type)
1477
+ end
1478
+ end
1479
+
1480
+ # Fields available for query in `product_view` table. Products in the current
1481
+ # inventory. Products in this table are the same as a [Product resource in
1482
+ # Products sub-API](https://developers.google.com/merchant/api/reference/rest/
1483
+ # products_v1/accounts.products) but not all product attributes from Products
1484
+ # sub-API are available for query in this table. In contrast to Products sub-API,
1485
+ # this table allows to filter the returned list of products by product
1486
+ # attributes. To retrieve a single product by `id` or list all products,
1487
+ # Products sub-API should be used. Values are only set for fields requested
1488
+ # explicitly in the request's search query. For more information, see [Evaluate
1489
+ # your products](https://developers.google.com/merchant/api/guides/reports/
1490
+ # evaluate-products).
1491
+ class ProductView
1492
+ include Google::Apis::Core::Hashable
1493
+
1494
+ # Aggregated status across all reporting contexts. Reporting contexts included
1495
+ # in the computation of the aggregated status can be restricted using a filter
1496
+ # on the `reporting_context` field.
1497
+ # Corresponds to the JSON property `aggregatedReportingContextStatus`
1498
+ # @return [String]
1499
+ attr_accessor :aggregated_reporting_context_status
1500
+
1501
+ # [Availability](https://support.google.com/merchants/answer/6324448) of the
1502
+ # product.
1503
+ # Corresponds to the JSON property `availability`
1504
+ # @return [String]
1505
+ attr_accessor :availability
1506
+
1507
+ # Brand of the product.
1508
+ # Corresponds to the JSON property `brand`
1509
+ # @return [String]
1510
+ attr_accessor :brand
1511
+
1512
+ # Product category (1st level) in [Google's product taxonomy](https://support.
1513
+ # google.com/merchants/answer/6324436).
1514
+ # Corresponds to the JSON property `categoryL1`
1515
+ # @return [String]
1516
+ attr_accessor :category_l1
1517
+
1518
+ # Product category (2nd level) in [Google's product taxonomy](https://support.
1519
+ # google.com/merchants/answer/6324436).
1520
+ # Corresponds to the JSON property `categoryL2`
1521
+ # @return [String]
1522
+ attr_accessor :category_l2
1523
+
1524
+ # Product category (3rd level) in [Google's product taxonomy](https://support.
1525
+ # google.com/merchants/answer/6324436).
1526
+ # Corresponds to the JSON property `categoryL3`
1527
+ # @return [String]
1528
+ attr_accessor :category_l3
1529
+
1530
+ # Product category (4th level) in [Google's product taxonomy](https://support.
1531
+ # google.com/merchants/answer/6324436).
1532
+ # Corresponds to the JSON property `categoryL4`
1533
+ # @return [String]
1534
+ attr_accessor :category_l4
1535
+
1536
+ # Product category (5th level) in [Google's product taxonomy](https://support.
1537
+ # google.com/merchants/answer/6324436).
1538
+ # Corresponds to the JSON property `categoryL5`
1539
+ # @return [String]
1540
+ attr_accessor :category_l5
1541
+
1542
+ # Channel of the product. Can be `ONLINE` or `LOCAL`.
1543
+ # Corresponds to the JSON property `channel`
1544
+ # @return [String]
1545
+ attr_accessor :channel
1546
+
1547
+ # Estimated performance potential compared to highest performing products of the
1548
+ # merchant.
1549
+ # Corresponds to the JSON property `clickPotential`
1550
+ # @return [String]
1551
+ attr_accessor :click_potential
1552
+
1553
+ # Normalized click potential of the product. Values range from 1 to 1000, where
1554
+ # 1 is the highest click potential and 1000 is the theoretical lowest.
1555
+ # Corresponds to the JSON property `clickPotentialRank`
1556
+ # @return [Fixnum]
1557
+ attr_accessor :click_potential_rank
1558
+
1559
+ # [Condition](https://support.google.com/merchants/answer/6324469) of the
1560
+ # product.
1561
+ # Corresponds to the JSON property `condition`
1562
+ # @return [String]
1563
+ attr_accessor :condition
1564
+
1565
+ # The time the merchant created the product in timestamp seconds.
1566
+ # Corresponds to the JSON property `creationTime`
1567
+ # @return [String]
1568
+ attr_accessor :creation_time
1569
+
1570
+ # Represents a whole or partial calendar date, such as a birthday. The time of
1571
+ # day and time zone are either specified elsewhere or are insignificant. The
1572
+ # date is relative to the Gregorian Calendar. This can represent one of the
1573
+ # following: * A full date, with non-zero year, month, and day values. * A month
1574
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
1575
+ # with a zero month and a zero day. * A year and month, with a zero day (for
1576
+ # example, a credit card expiration date). Related types: * google.type.
1577
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
1578
+ # Corresponds to the JSON property `expirationDate`
1579
+ # @return [Google::Apis::MerchantapiReportsV1::Date]
1580
+ attr_accessor :expiration_date
1581
+
1582
+ # Feed label of the product.
1583
+ # Corresponds to the JSON property `feedLabel`
1584
+ # @return [String]
1585
+ attr_accessor :feed_label
1586
+
1587
+ # List of Global Trade Item Numbers (GTINs) of the product.
1588
+ # Corresponds to the JSON property `gtin`
1589
+ # @return [Array<String>]
1590
+ attr_accessor :gtin
1591
+
1592
+ # REST ID of the product, in the form of `channel~languageCode~feedLabel~offerId`
1593
+ # . Merchant API methods that operate on products take this as their `name`
1594
+ # parameter. Required in the `SELECT` clause.
1595
+ # Corresponds to the JSON property `id`
1596
+ # @return [String]
1597
+ attr_accessor :id
1598
+
1599
+ # Item group id provided by the merchant for grouping variants together.
1600
+ # Corresponds to the JSON property `itemGroupId`
1601
+ # @return [String]
1602
+ attr_accessor :item_group_id
1603
+
1604
+ # List of item issues for the product. **This field cannot be used for sorting
1605
+ # the results.** **Only selected attributes of this field (for example, `
1606
+ # item_issues.severity.aggregated_severity`) can be used for filtering the
1607
+ # results.**
1608
+ # Corresponds to the JSON property `itemIssues`
1609
+ # @return [Array<Google::Apis::MerchantapiReportsV1::ItemIssue>]
1610
+ attr_accessor :item_issues
1611
+
1612
+ # Language code of the product in BCP 47 format.
1613
+ # Corresponds to the JSON property `languageCode`
1614
+ # @return [String]
1615
+ attr_accessor :language_code
1616
+
1617
+ # Merchant-provided id of the product.
1618
+ # Corresponds to the JSON property `offerId`
1619
+ # @return [String]
1620
+ attr_accessor :offer_id
1621
+
1622
+ # The price represented as a number and currency.
1623
+ # Corresponds to the JSON property `price`
1624
+ # @return [Google::Apis::MerchantapiReportsV1::Price]
1625
+ attr_accessor :price
1626
+
1627
+ # Product type (1st level) in merchant's own [product taxonomy](https://support.
1628
+ # google.com/merchants/answer/6324406).
1629
+ # Corresponds to the JSON property `productTypeL1`
1630
+ # @return [String]
1631
+ attr_accessor :product_type_l1
1632
+
1633
+ # Product type (2nd level) in merchant's own [product taxonomy](https://support.
1634
+ # google.com/merchants/answer/6324406).
1635
+ # Corresponds to the JSON property `productTypeL2`
1636
+ # @return [String]
1637
+ attr_accessor :product_type_l2
1638
+
1639
+ # Product type (3rd level) in merchant's own [product taxonomy](https://support.
1640
+ # google.com/merchants/answer/6324406).
1641
+ # Corresponds to the JSON property `productTypeL3`
1642
+ # @return [String]
1643
+ attr_accessor :product_type_l3
1644
+
1645
+ # Product type (4th level) in merchant's own [product taxonomy](https://support.
1646
+ # google.com/merchants/answer/6324406).
1647
+ # Corresponds to the JSON property `productTypeL4`
1648
+ # @return [String]
1649
+ attr_accessor :product_type_l4
1650
+
1651
+ # Product type (5th level) in merchant's own [product taxonomy](https://support.
1652
+ # google.com/merchants/answer/6324406).
1653
+ # Corresponds to the JSON property `productTypeL5`
1654
+ # @return [String]
1655
+ attr_accessor :product_type_l5
1656
+
1657
+ # Reporting context to restrict the query to. Restricts the reporting contexts
1658
+ # returned in `status_per_reporting_context` and `item_issues`, and used to
1659
+ # compute `aggregated_reporting_context_status`. **This field can only be used
1660
+ # in the `WHERE` clause and cannot be selected in the `SELECT` clause.**
1661
+ # Corresponds to the JSON property `reportingContext`
1662
+ # @return [String]
1663
+ attr_accessor :reporting_context
1664
+
1665
+ # Normalized [shipping label](https://support.google.com/merchants/answer/
1666
+ # 6324504) specified in the data source.
1667
+ # Corresponds to the JSON property `shippingLabel`
1668
+ # @return [String]
1669
+ attr_accessor :shipping_label
1670
+
1671
+ # Detailed product status per reporting context. Reporting contexts included in
1672
+ # this list can be restricted using a filter on the `reporting_context` field.
1673
+ # Equivalent to `ProductStatus.destination_statuses` in Products API. **This
1674
+ # field cannot be used for sorting or filtering the results.**
1675
+ # Corresponds to the JSON property `statusPerReportingContext`
1676
+ # @return [Array<Google::Apis::MerchantapiReportsV1::StatusPerReportingContext>]
1677
+ attr_accessor :status_per_reporting_context
1678
+
1679
+ # Link to the processed image of the product, hosted on the Google
1680
+ # infrastructure.
1681
+ # Corresponds to the JSON property `thumbnailLink`
1682
+ # @return [String]
1683
+ attr_accessor :thumbnail_link
1684
+
1685
+ # Title of the product.
1686
+ # Corresponds to the JSON property `title`
1687
+ # @return [String]
1688
+ attr_accessor :title
1689
+
1690
+ def initialize(**args)
1691
+ update!(**args)
1692
+ end
1693
+
1694
+ # Update properties of this object
1695
+ def update!(**args)
1696
+ @aggregated_reporting_context_status = args[:aggregated_reporting_context_status] if args.key?(:aggregated_reporting_context_status)
1697
+ @availability = args[:availability] if args.key?(:availability)
1698
+ @brand = args[:brand] if args.key?(:brand)
1699
+ @category_l1 = args[:category_l1] if args.key?(:category_l1)
1700
+ @category_l2 = args[:category_l2] if args.key?(:category_l2)
1701
+ @category_l3 = args[:category_l3] if args.key?(:category_l3)
1702
+ @category_l4 = args[:category_l4] if args.key?(:category_l4)
1703
+ @category_l5 = args[:category_l5] if args.key?(:category_l5)
1704
+ @channel = args[:channel] if args.key?(:channel)
1705
+ @click_potential = args[:click_potential] if args.key?(:click_potential)
1706
+ @click_potential_rank = args[:click_potential_rank] if args.key?(:click_potential_rank)
1707
+ @condition = args[:condition] if args.key?(:condition)
1708
+ @creation_time = args[:creation_time] if args.key?(:creation_time)
1709
+ @expiration_date = args[:expiration_date] if args.key?(:expiration_date)
1710
+ @feed_label = args[:feed_label] if args.key?(:feed_label)
1711
+ @gtin = args[:gtin] if args.key?(:gtin)
1712
+ @id = args[:id] if args.key?(:id)
1713
+ @item_group_id = args[:item_group_id] if args.key?(:item_group_id)
1714
+ @item_issues = args[:item_issues] if args.key?(:item_issues)
1715
+ @language_code = args[:language_code] if args.key?(:language_code)
1716
+ @offer_id = args[:offer_id] if args.key?(:offer_id)
1717
+ @price = args[:price] if args.key?(:price)
1718
+ @product_type_l1 = args[:product_type_l1] if args.key?(:product_type_l1)
1719
+ @product_type_l2 = args[:product_type_l2] if args.key?(:product_type_l2)
1720
+ @product_type_l3 = args[:product_type_l3] if args.key?(:product_type_l3)
1721
+ @product_type_l4 = args[:product_type_l4] if args.key?(:product_type_l4)
1722
+ @product_type_l5 = args[:product_type_l5] if args.key?(:product_type_l5)
1723
+ @reporting_context = args[:reporting_context] if args.key?(:reporting_context)
1724
+ @shipping_label = args[:shipping_label] if args.key?(:shipping_label)
1725
+ @status_per_reporting_context = args[:status_per_reporting_context] if args.key?(:status_per_reporting_context)
1726
+ @thumbnail_link = args[:thumbnail_link] if args.key?(:thumbnail_link)
1727
+ @title = args[:title] if args.key?(:title)
1728
+ end
1729
+ end
1730
+
1731
+ # Result row returned from the search query. Only the message corresponding to
1732
+ # the queried table is populated in the response. Within the populated message,
1733
+ # only the fields requested explicitly in the query are populated. For more
1734
+ # information, see [Reports overview](https://developers.google.com/merchant/api/
1735
+ # guides/reports/overview) and [Use Merchant Center Query Language](https://
1736
+ # developers.google.com/merchant/api/guides/reports/query-language).
1737
+ class ReportRow
1738
+ include Google::Apis::Core::Hashable
1739
+
1740
+ # Fields available for query in `best_sellers_brand_view` table. [Best sellers](
1741
+ # https://support.google.com/merchants/answer/9488679) report with top brands.
1742
+ # Values are only set for fields requested explicitly in the request's search
1743
+ # query. For more information, see [Understand the market](https://developers.
1744
+ # google.com/merchant/api/guides/reports/understand-the-market).
1745
+ # Corresponds to the JSON property `bestSellersBrandView`
1746
+ # @return [Google::Apis::MerchantapiReportsV1::BestSellersBrandView]
1747
+ attr_accessor :best_sellers_brand_view
1748
+
1749
+ # Fields available for query in `best_sellers_product_cluster_view` table. [Best
1750
+ # sellers](https://support.google.com/merchants/answer/9488679) report with top
1751
+ # product clusters. A product cluster is a grouping for different offers and
1752
+ # variants that represent the same product, for example, Google Pixel 7. Values
1753
+ # are only set for fields requested explicitly in the request's search query.
1754
+ # For more information, see [Understand the market](https://developers.google.
1755
+ # com/merchant/api/guides/reports/understand-the-market).
1756
+ # Corresponds to the JSON property `bestSellersProductClusterView`
1757
+ # @return [Google::Apis::MerchantapiReportsV1::BestSellersProductClusterView]
1758
+ attr_accessor :best_sellers_product_cluster_view
1759
+
1760
+ # Fields available for query in `competitive_visibility_benchmark_view` table. [
1761
+ # Competitive visibility](https://support.google.com/merchants/answer/11366442)
1762
+ # report with the category benchmark. Values are only set for fields requested
1763
+ # explicitly in the request's search query. For more information, see [Explore
1764
+ # your competitive landscape](https://developers.google.com/merchant/api/guides/
1765
+ # reports/explore-competitive-landscape).
1766
+ # Corresponds to the JSON property `competitiveVisibilityBenchmarkView`
1767
+ # @return [Google::Apis::MerchantapiReportsV1::CompetitiveVisibilityBenchmarkView]
1768
+ attr_accessor :competitive_visibility_benchmark_view
1769
+
1770
+ # Fields available for query in `competitive_visibility_competitor_view` table. [
1771
+ # Competitive visibility](https://support.google.com/merchants/answer/11366442)
1772
+ # report with businesses with similar visibility. Values are only set for fields
1773
+ # requested explicitly in the request's search query. For more information, see [
1774
+ # Explore your competitive landscape](https://developers.google.com/merchant/api/
1775
+ # guides/reports/explore-competitive-landscape).
1776
+ # Corresponds to the JSON property `competitiveVisibilityCompetitorView`
1777
+ # @return [Google::Apis::MerchantapiReportsV1::CompetitiveVisibilityCompetitorView]
1778
+ attr_accessor :competitive_visibility_competitor_view
1779
+
1780
+ # Fields available for query in `competitive_visibility_top_merchant_view` table.
1781
+ # [Competitive visibility](https://support.google.com/merchants/answer/11366442)
1782
+ # report with business with highest visibility. Values are only set for fields
1783
+ # requested explicitly in the request's search query. For more information, see [
1784
+ # Explore your competitive landscape](https://developers.google.com/merchant/api/
1785
+ # guides/reports/explore-competitive-landscape).
1786
+ # Corresponds to the JSON property `competitiveVisibilityTopMerchantView`
1787
+ # @return [Google::Apis::MerchantapiReportsV1::CompetitiveVisibilityTopMerchantView]
1788
+ attr_accessor :competitive_visibility_top_merchant_view
1789
+
1790
+ # Fields available for query in `non_product_performance_view` table.
1791
+ # Performance data on images and online store links leading to your non-product
1792
+ # pages. This includes performance metrics (for example, `clicks`) and
1793
+ # dimensions according to which performance metrics are segmented (for example, `
1794
+ # date`). Segment fields cannot be selected in queries without also selecting at
1795
+ # least one metric field. Values are only set for fields requested explicitly in
1796
+ # the request's search query. For more information, see [Performance reports](
1797
+ # https://developers.google.com/merchant/api/guides/reports/performance-reports).
1798
+ # Corresponds to the JSON property `nonProductPerformanceView`
1799
+ # @return [Google::Apis::MerchantapiReportsV1::NonProductPerformanceView]
1800
+ attr_accessor :non_product_performance_view
1801
+
1802
+ # Fields available for query in `price_competitiveness_product_view` table. [
1803
+ # Price competitiveness](https://support.google.com/merchants/answer/9626903)
1804
+ # report. Values are only set for fields requested explicitly in the request's
1805
+ # search query. For more information, see [Understand the market](https://
1806
+ # developers.google.com/merchant/api/guides/reports/understand-the-market).
1807
+ # Corresponds to the JSON property `priceCompetitivenessProductView`
1808
+ # @return [Google::Apis::MerchantapiReportsV1::PriceCompetitivenessProductView]
1809
+ attr_accessor :price_competitiveness_product_view
1810
+
1811
+ # Fields available for query in `price_insights_product_view` table. [Price
1812
+ # insights](https://support.google.com/merchants/answer/11916926) report. Values
1813
+ # are only set for fields requested explicitly in the request's search query.
1814
+ # For more information, see [Understand the market](https://developers.google.
1815
+ # com/merchant/api/guides/reports/understand-the-market).
1816
+ # Corresponds to the JSON property `priceInsightsProductView`
1817
+ # @return [Google::Apis::MerchantapiReportsV1::PriceInsightsProductView]
1818
+ attr_accessor :price_insights_product_view
1819
+
1820
+ # Fields available for query in `product_performance_view` table. Product
1821
+ # performance data for your account, including performance metrics (for example,
1822
+ # `clicks`) and dimensions according to which performance metrics are segmented (
1823
+ # for example, `offer_id`). Values of product dimensions, such as `offer_id`,
1824
+ # reflect the state of a product at the time of the impression. Segment fields
1825
+ # cannot be selected in queries without also selecting at least one metric field.
1826
+ # Values are only set for fields requested explicitly in the request's search
1827
+ # query. For more information, see [Performance reports](https://developers.
1828
+ # google.com/merchant/api/guides/reports/performance-reports).
1829
+ # Corresponds to the JSON property `productPerformanceView`
1830
+ # @return [Google::Apis::MerchantapiReportsV1::ProductPerformanceView]
1831
+ attr_accessor :product_performance_view
1832
+
1833
+ # Fields available for query in `product_view` table. Products in the current
1834
+ # inventory. Products in this table are the same as a [Product resource in
1835
+ # Products sub-API](https://developers.google.com/merchant/api/reference/rest/
1836
+ # products_v1/accounts.products) but not all product attributes from Products
1837
+ # sub-API are available for query in this table. In contrast to Products sub-API,
1838
+ # this table allows to filter the returned list of products by product
1839
+ # attributes. To retrieve a single product by `id` or list all products,
1840
+ # Products sub-API should be used. Values are only set for fields requested
1841
+ # explicitly in the request's search query. For more information, see [Evaluate
1842
+ # your products](https://developers.google.com/merchant/api/guides/reports/
1843
+ # evaluate-products).
1844
+ # Corresponds to the JSON property `productView`
1845
+ # @return [Google::Apis::MerchantapiReportsV1::ProductView]
1846
+ attr_accessor :product_view
1847
+
1848
+ def initialize(**args)
1849
+ update!(**args)
1850
+ end
1851
+
1852
+ # Update properties of this object
1853
+ def update!(**args)
1854
+ @best_sellers_brand_view = args[:best_sellers_brand_view] if args.key?(:best_sellers_brand_view)
1855
+ @best_sellers_product_cluster_view = args[:best_sellers_product_cluster_view] if args.key?(:best_sellers_product_cluster_view)
1856
+ @competitive_visibility_benchmark_view = args[:competitive_visibility_benchmark_view] if args.key?(:competitive_visibility_benchmark_view)
1857
+ @competitive_visibility_competitor_view = args[:competitive_visibility_competitor_view] if args.key?(:competitive_visibility_competitor_view)
1858
+ @competitive_visibility_top_merchant_view = args[:competitive_visibility_top_merchant_view] if args.key?(:competitive_visibility_top_merchant_view)
1859
+ @non_product_performance_view = args[:non_product_performance_view] if args.key?(:non_product_performance_view)
1860
+ @price_competitiveness_product_view = args[:price_competitiveness_product_view] if args.key?(:price_competitiveness_product_view)
1861
+ @price_insights_product_view = args[:price_insights_product_view] if args.key?(:price_insights_product_view)
1862
+ @product_performance_view = args[:product_performance_view] if args.key?(:product_performance_view)
1863
+ @product_view = args[:product_view] if args.key?(:product_view)
1864
+ end
1865
+ end
1866
+
1867
+ # Request message for the `ReportService.Search` method.
1868
+ class SearchRequest
1869
+ include Google::Apis::Core::Hashable
1870
+
1871
+ # Optional. Number of `ReportRows` to retrieve in a single page. Defaults to
1872
+ # 1000. Values above 100,000 are coerced to 100,000.
1873
+ # Corresponds to the JSON property `pageSize`
1874
+ # @return [Fixnum]
1875
+ attr_accessor :page_size
1876
+
1877
+ # Optional. Token of the page to retrieve. If not specified, the first page of
1878
+ # results is returned. In order to request the next page of results, the value
1879
+ # obtained from `next_page_token` in the previous response should be used.
1880
+ # Corresponds to the JSON property `pageToken`
1881
+ # @return [String]
1882
+ attr_accessor :page_token
1883
+
1884
+ # Required. Query that defines a report to be retrieved. For details on how to
1885
+ # construct your query, see the [Query Language guide](https://developers.google.
1886
+ # com/merchant/api/guides/reports/query-language). For the full list of
1887
+ # available tables and fields, see the Available fields.
1888
+ # Corresponds to the JSON property `query`
1889
+ # @return [String]
1890
+ attr_accessor :query
1891
+
1892
+ def initialize(**args)
1893
+ update!(**args)
1894
+ end
1895
+
1896
+ # Update properties of this object
1897
+ def update!(**args)
1898
+ @page_size = args[:page_size] if args.key?(:page_size)
1899
+ @page_token = args[:page_token] if args.key?(:page_token)
1900
+ @query = args[:query] if args.key?(:query)
1901
+ end
1902
+ end
1903
+
1904
+ # Response message for the `ReportService.Search` method.
1905
+ class SearchResponse
1906
+ include Google::Apis::Core::Hashable
1907
+
1908
+ # Token which can be sent as `page_token` to retrieve the next page. If omitted,
1909
+ # there are no subsequent pages.
1910
+ # Corresponds to the JSON property `nextPageToken`
1911
+ # @return [String]
1912
+ attr_accessor :next_page_token
1913
+
1914
+ # Rows that matched the search query.
1915
+ # Corresponds to the JSON property `results`
1916
+ # @return [Array<Google::Apis::MerchantapiReportsV1::ReportRow>]
1917
+ attr_accessor :results
1918
+
1919
+ def initialize(**args)
1920
+ update!(**args)
1921
+ end
1922
+
1923
+ # Update properties of this object
1924
+ def update!(**args)
1925
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1926
+ @results = args[:results] if args.key?(:results)
1927
+ end
1928
+ end
1929
+
1930
+ # Status of the product for a specific reporting context. Equivalent to `
1931
+ # DestinationStatus` in Products API.
1932
+ class StatusPerReportingContext
1933
+ include Google::Apis::Core::Hashable
1934
+
1935
+ # List of approved countries in the reporting context, represented in [ISO 3166](
1936
+ # https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, for example, `US`.
1937
+ # Corresponds to the JSON property `approvedCountries`
1938
+ # @return [Array<String>]
1939
+ attr_accessor :approved_countries
1940
+
1941
+ # List of disapproved countries in the reporting context, represented in [ISO
1942
+ # 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, for example, `
1943
+ # US`.
1944
+ # Corresponds to the JSON property `disapprovedCountries`
1945
+ # @return [Array<String>]
1946
+ attr_accessor :disapproved_countries
1947
+
1948
+ # List of pending countries in the reporting context, represented in [ISO 3166](
1949
+ # https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, for example, `US`.
1950
+ # Corresponds to the JSON property `pendingCountries`
1951
+ # @return [Array<String>]
1952
+ attr_accessor :pending_countries
1953
+
1954
+ # Reporting context the status applies to.
1955
+ # Corresponds to the JSON property `reportingContext`
1956
+ # @return [String]
1957
+ attr_accessor :reporting_context
1958
+
1959
+ def initialize(**args)
1960
+ update!(**args)
1961
+ end
1962
+
1963
+ # Update properties of this object
1964
+ def update!(**args)
1965
+ @approved_countries = args[:approved_countries] if args.key?(:approved_countries)
1966
+ @disapproved_countries = args[:disapproved_countries] if args.key?(:disapproved_countries)
1967
+ @pending_countries = args[:pending_countries] if args.key?(:pending_countries)
1968
+ @reporting_context = args[:reporting_context] if args.key?(:reporting_context)
1969
+ end
1970
+ end
1971
+ end
1972
+ end
1973
+ end