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,28 @@
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
+ module Google
16
+ module Apis
17
+ module MerchantapiReportsV1
18
+ # Version of the google-apis-merchantapi_reports_v1 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.19.3"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20261116"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,530 @@
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
+ class BestSellersBrandView
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class BestSellersProductClusterView
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class CompetitiveVisibilityBenchmarkView
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class CompetitiveVisibilityCompetitorView
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class CompetitiveVisibilityTopMerchantView
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class Date
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class IssueSeverityPerReportingContext
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class ItemIssue
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class ItemIssueSeverity
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class ItemIssueType
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class NonProductPerformanceView
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class Price
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class PriceCompetitivenessProductView
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class PriceInsightsProductView
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class ProductChange
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class ProductPerformanceView
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class ProductStatusChangeMessage
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class ProductView
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class ReportRow
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
139
+ class SearchRequest
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class SearchResponse
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
151
+ class StatusPerReportingContext
152
+ class Representation < Google::Apis::Core::JsonRepresentation; end
153
+
154
+ include Google::Apis::Core::JsonObjectSupport
155
+ end
156
+
157
+ class BestSellersBrandView
158
+ # @private
159
+ class Representation < Google::Apis::Core::JsonRepresentation
160
+ property :brand, as: 'brand'
161
+ property :previous_rank, :numeric_string => true, as: 'previousRank'
162
+ property :previous_relative_demand, as: 'previousRelativeDemand'
163
+ property :rank, :numeric_string => true, as: 'rank'
164
+ property :relative_demand, as: 'relativeDemand'
165
+ property :relative_demand_change, as: 'relativeDemandChange'
166
+ property :report_category_id, :numeric_string => true, as: 'reportCategoryId'
167
+ property :report_country_code, as: 'reportCountryCode'
168
+ property :report_date, as: 'reportDate', class: Google::Apis::MerchantapiReportsV1::Date, decorator: Google::Apis::MerchantapiReportsV1::Date::Representation
169
+
170
+ property :report_granularity, as: 'reportGranularity'
171
+ end
172
+ end
173
+
174
+ class BestSellersProductClusterView
175
+ # @private
176
+ class Representation < Google::Apis::Core::JsonRepresentation
177
+ property :brand, as: 'brand'
178
+ property :brand_inventory_status, as: 'brandInventoryStatus'
179
+ property :category_l1, as: 'categoryL1'
180
+ property :category_l2, as: 'categoryL2'
181
+ property :category_l3, as: 'categoryL3'
182
+ property :category_l4, as: 'categoryL4'
183
+ property :category_l5, as: 'categoryL5'
184
+ property :inventory_status, as: 'inventoryStatus'
185
+ property :previous_rank, :numeric_string => true, as: 'previousRank'
186
+ property :previous_relative_demand, as: 'previousRelativeDemand'
187
+ property :rank, :numeric_string => true, as: 'rank'
188
+ property :relative_demand, as: 'relativeDemand'
189
+ property :relative_demand_change, as: 'relativeDemandChange'
190
+ property :report_category_id, :numeric_string => true, as: 'reportCategoryId'
191
+ property :report_country_code, as: 'reportCountryCode'
192
+ property :report_date, as: 'reportDate', class: Google::Apis::MerchantapiReportsV1::Date, decorator: Google::Apis::MerchantapiReportsV1::Date::Representation
193
+
194
+ property :report_granularity, as: 'reportGranularity'
195
+ property :title, as: 'title'
196
+ collection :variant_gtins, as: 'variantGtins'
197
+ end
198
+ end
199
+
200
+ class CompetitiveVisibilityBenchmarkView
201
+ # @private
202
+ class Representation < Google::Apis::Core::JsonRepresentation
203
+ property :category_benchmark_visibility_trend, as: 'categoryBenchmarkVisibilityTrend'
204
+ property :date, as: 'date', class: Google::Apis::MerchantapiReportsV1::Date, decorator: Google::Apis::MerchantapiReportsV1::Date::Representation
205
+
206
+ property :report_category_id, :numeric_string => true, as: 'reportCategoryId'
207
+ property :report_country_code, as: 'reportCountryCode'
208
+ property :traffic_source, as: 'trafficSource'
209
+ property :your_domain_visibility_trend, as: 'yourDomainVisibilityTrend'
210
+ end
211
+ end
212
+
213
+ class CompetitiveVisibilityCompetitorView
214
+ # @private
215
+ class Representation < Google::Apis::Core::JsonRepresentation
216
+ property :ads_organic_ratio, as: 'adsOrganicRatio'
217
+ property :date, as: 'date', class: Google::Apis::MerchantapiReportsV1::Date, decorator: Google::Apis::MerchantapiReportsV1::Date::Representation
218
+
219
+ property :domain, as: 'domain'
220
+ property :higher_position_rate, as: 'higherPositionRate'
221
+ property :is_your_domain, as: 'isYourDomain'
222
+ property :page_overlap_rate, as: 'pageOverlapRate'
223
+ property :rank, :numeric_string => true, as: 'rank'
224
+ property :relative_visibility, as: 'relativeVisibility'
225
+ property :report_category_id, :numeric_string => true, as: 'reportCategoryId'
226
+ property :report_country_code, as: 'reportCountryCode'
227
+ property :traffic_source, as: 'trafficSource'
228
+ end
229
+ end
230
+
231
+ class CompetitiveVisibilityTopMerchantView
232
+ # @private
233
+ class Representation < Google::Apis::Core::JsonRepresentation
234
+ property :ads_organic_ratio, as: 'adsOrganicRatio'
235
+ property :date, as: 'date', class: Google::Apis::MerchantapiReportsV1::Date, decorator: Google::Apis::MerchantapiReportsV1::Date::Representation
236
+
237
+ property :domain, as: 'domain'
238
+ property :higher_position_rate, as: 'higherPositionRate'
239
+ property :is_your_domain, as: 'isYourDomain'
240
+ property :page_overlap_rate, as: 'pageOverlapRate'
241
+ property :rank, :numeric_string => true, as: 'rank'
242
+ property :report_category_id, :numeric_string => true, as: 'reportCategoryId'
243
+ property :report_country_code, as: 'reportCountryCode'
244
+ property :traffic_source, as: 'trafficSource'
245
+ end
246
+ end
247
+
248
+ class Date
249
+ # @private
250
+ class Representation < Google::Apis::Core::JsonRepresentation
251
+ property :day, as: 'day'
252
+ property :month, as: 'month'
253
+ property :year, as: 'year'
254
+ end
255
+ end
256
+
257
+ class IssueSeverityPerReportingContext
258
+ # @private
259
+ class Representation < Google::Apis::Core::JsonRepresentation
260
+ collection :demoted_countries, as: 'demotedCountries'
261
+ collection :disapproved_countries, as: 'disapprovedCountries'
262
+ property :reporting_context, as: 'reportingContext'
263
+ end
264
+ end
265
+
266
+ class ItemIssue
267
+ # @private
268
+ class Representation < Google::Apis::Core::JsonRepresentation
269
+ property :resolution, as: 'resolution'
270
+ property :severity, as: 'severity', class: Google::Apis::MerchantapiReportsV1::ItemIssueSeverity, decorator: Google::Apis::MerchantapiReportsV1::ItemIssueSeverity::Representation
271
+
272
+ property :type, as: 'type', class: Google::Apis::MerchantapiReportsV1::ItemIssueType, decorator: Google::Apis::MerchantapiReportsV1::ItemIssueType::Representation
273
+
274
+ end
275
+ end
276
+
277
+ class ItemIssueSeverity
278
+ # @private
279
+ class Representation < Google::Apis::Core::JsonRepresentation
280
+ property :aggregated_severity, as: 'aggregatedSeverity'
281
+ collection :severity_per_reporting_context, as: 'severityPerReportingContext', class: Google::Apis::MerchantapiReportsV1::IssueSeverityPerReportingContext, decorator: Google::Apis::MerchantapiReportsV1::IssueSeverityPerReportingContext::Representation
282
+
283
+ end
284
+ end
285
+
286
+ class ItemIssueType
287
+ # @private
288
+ class Representation < Google::Apis::Core::JsonRepresentation
289
+ property :canonical_attribute, as: 'canonicalAttribute'
290
+ property :code, as: 'code'
291
+ end
292
+ end
293
+
294
+ class NonProductPerformanceView
295
+ # @private
296
+ class Representation < Google::Apis::Core::JsonRepresentation
297
+ property :click_through_rate, as: 'clickThroughRate'
298
+ property :clicks, :numeric_string => true, as: 'clicks'
299
+ property :date, as: 'date', class: Google::Apis::MerchantapiReportsV1::Date, decorator: Google::Apis::MerchantapiReportsV1::Date::Representation
300
+
301
+ property :impressions, :numeric_string => true, as: 'impressions'
302
+ property :week, as: 'week', class: Google::Apis::MerchantapiReportsV1::Date, decorator: Google::Apis::MerchantapiReportsV1::Date::Representation
303
+
304
+ end
305
+ end
306
+
307
+ class Price
308
+ # @private
309
+ class Representation < Google::Apis::Core::JsonRepresentation
310
+ property :amount_micros, :numeric_string => true, as: 'amountMicros'
311
+ property :currency_code, as: 'currencyCode'
312
+ end
313
+ end
314
+
315
+ class PriceCompetitivenessProductView
316
+ # @private
317
+ class Representation < Google::Apis::Core::JsonRepresentation
318
+ property :benchmark_price, as: 'benchmarkPrice', class: Google::Apis::MerchantapiReportsV1::Price, decorator: Google::Apis::MerchantapiReportsV1::Price::Representation
319
+
320
+ property :brand, as: 'brand'
321
+ property :category_l1, as: 'categoryL1'
322
+ property :category_l2, as: 'categoryL2'
323
+ property :category_l3, as: 'categoryL3'
324
+ property :category_l4, as: 'categoryL4'
325
+ property :category_l5, as: 'categoryL5'
326
+ property :id, as: 'id'
327
+ property :offer_id, as: 'offerId'
328
+ property :price, as: 'price', class: Google::Apis::MerchantapiReportsV1::Price, decorator: Google::Apis::MerchantapiReportsV1::Price::Representation
329
+
330
+ property :product_type_l1, as: 'productTypeL1'
331
+ property :product_type_l2, as: 'productTypeL2'
332
+ property :product_type_l3, as: 'productTypeL3'
333
+ property :product_type_l4, as: 'productTypeL4'
334
+ property :product_type_l5, as: 'productTypeL5'
335
+ property :report_country_code, as: 'reportCountryCode'
336
+ property :title, as: 'title'
337
+ end
338
+ end
339
+
340
+ class PriceInsightsProductView
341
+ # @private
342
+ class Representation < Google::Apis::Core::JsonRepresentation
343
+ property :brand, as: 'brand'
344
+ property :category_l1, as: 'categoryL1'
345
+ property :category_l2, as: 'categoryL2'
346
+ property :category_l3, as: 'categoryL3'
347
+ property :category_l4, as: 'categoryL4'
348
+ property :category_l5, as: 'categoryL5'
349
+ property :effectiveness, as: 'effectiveness'
350
+ property :id, as: 'id'
351
+ property :offer_id, as: 'offerId'
352
+ property :predicted_clicks_change_fraction, as: 'predictedClicksChangeFraction'
353
+ property :predicted_conversions_change_fraction, as: 'predictedConversionsChangeFraction'
354
+ property :predicted_impressions_change_fraction, as: 'predictedImpressionsChangeFraction'
355
+ property :price, as: 'price', class: Google::Apis::MerchantapiReportsV1::Price, decorator: Google::Apis::MerchantapiReportsV1::Price::Representation
356
+
357
+ property :product_type_l1, as: 'productTypeL1'
358
+ property :product_type_l2, as: 'productTypeL2'
359
+ property :product_type_l3, as: 'productTypeL3'
360
+ property :product_type_l4, as: 'productTypeL4'
361
+ property :product_type_l5, as: 'productTypeL5'
362
+ property :suggested_price, as: 'suggestedPrice', class: Google::Apis::MerchantapiReportsV1::Price, decorator: Google::Apis::MerchantapiReportsV1::Price::Representation
363
+
364
+ property :title, as: 'title'
365
+ end
366
+ end
367
+
368
+ class ProductChange
369
+ # @private
370
+ class Representation < Google::Apis::Core::JsonRepresentation
371
+ property :new_value, as: 'newValue'
372
+ property :old_value, as: 'oldValue'
373
+ property :region_code, as: 'regionCode'
374
+ property :reporting_context, as: 'reportingContext'
375
+ end
376
+ end
377
+
378
+ class ProductPerformanceView
379
+ # @private
380
+ class Representation < Google::Apis::Core::JsonRepresentation
381
+ property :brand, as: 'brand'
382
+ property :category_l1, as: 'categoryL1'
383
+ property :category_l2, as: 'categoryL2'
384
+ property :category_l3, as: 'categoryL3'
385
+ property :category_l4, as: 'categoryL4'
386
+ property :category_l5, as: 'categoryL5'
387
+ property :click_through_rate, as: 'clickThroughRate'
388
+ property :clicks, :numeric_string => true, as: 'clicks'
389
+ property :conversion_rate, as: 'conversionRate'
390
+ property :conversion_value, as: 'conversionValue', class: Google::Apis::MerchantapiReportsV1::Price, decorator: Google::Apis::MerchantapiReportsV1::Price::Representation
391
+
392
+ property :conversions, as: 'conversions'
393
+ property :custom_label0, as: 'customLabel0'
394
+ property :custom_label1, as: 'customLabel1'
395
+ property :custom_label2, as: 'customLabel2'
396
+ property :custom_label3, as: 'customLabel3'
397
+ property :custom_label4, as: 'customLabel4'
398
+ property :customer_country_code, as: 'customerCountryCode'
399
+ property :date, as: 'date', class: Google::Apis::MerchantapiReportsV1::Date, decorator: Google::Apis::MerchantapiReportsV1::Date::Representation
400
+
401
+ property :impressions, :numeric_string => true, as: 'impressions'
402
+ property :marketing_method, as: 'marketingMethod'
403
+ property :network, as: 'network'
404
+ property :offer_id, as: 'offerId'
405
+ property :product_type_l1, as: 'productTypeL1'
406
+ property :product_type_l2, as: 'productTypeL2'
407
+ property :product_type_l3, as: 'productTypeL3'
408
+ property :product_type_l4, as: 'productTypeL4'
409
+ property :product_type_l5, as: 'productTypeL5'
410
+ property :store_type, as: 'storeType'
411
+ property :title, as: 'title'
412
+ property :week, as: 'week', class: Google::Apis::MerchantapiReportsV1::Date, decorator: Google::Apis::MerchantapiReportsV1::Date::Representation
413
+
414
+ end
415
+ end
416
+
417
+ class ProductStatusChangeMessage
418
+ # @private
419
+ class Representation < Google::Apis::Core::JsonRepresentation
420
+ property :account, as: 'account'
421
+ property :attribute, as: 'attribute'
422
+ collection :changes, as: 'changes', class: Google::Apis::MerchantapiReportsV1::ProductChange, decorator: Google::Apis::MerchantapiReportsV1::ProductChange::Representation
423
+
424
+ property :event_time, as: 'eventTime'
425
+ property :expiration_time, as: 'expirationTime'
426
+ property :managing_account, as: 'managingAccount'
427
+ property :resource, as: 'resource'
428
+ property :resource_id, as: 'resourceId'
429
+ property :resource_type, as: 'resourceType'
430
+ end
431
+ end
432
+
433
+ class ProductView
434
+ # @private
435
+ class Representation < Google::Apis::Core::JsonRepresentation
436
+ property :aggregated_reporting_context_status, as: 'aggregatedReportingContextStatus'
437
+ property :availability, as: 'availability'
438
+ property :brand, as: 'brand'
439
+ property :category_l1, as: 'categoryL1'
440
+ property :category_l2, as: 'categoryL2'
441
+ property :category_l3, as: 'categoryL3'
442
+ property :category_l4, as: 'categoryL4'
443
+ property :category_l5, as: 'categoryL5'
444
+ property :channel, as: 'channel'
445
+ property :click_potential, as: 'clickPotential'
446
+ property :click_potential_rank, :numeric_string => true, as: 'clickPotentialRank'
447
+ property :condition, as: 'condition'
448
+ property :creation_time, as: 'creationTime'
449
+ property :expiration_date, as: 'expirationDate', class: Google::Apis::MerchantapiReportsV1::Date, decorator: Google::Apis::MerchantapiReportsV1::Date::Representation
450
+
451
+ property :feed_label, as: 'feedLabel'
452
+ collection :gtin, as: 'gtin'
453
+ property :id, as: 'id'
454
+ property :item_group_id, as: 'itemGroupId'
455
+ collection :item_issues, as: 'itemIssues', class: Google::Apis::MerchantapiReportsV1::ItemIssue, decorator: Google::Apis::MerchantapiReportsV1::ItemIssue::Representation
456
+
457
+ property :language_code, as: 'languageCode'
458
+ property :offer_id, as: 'offerId'
459
+ property :price, as: 'price', class: Google::Apis::MerchantapiReportsV1::Price, decorator: Google::Apis::MerchantapiReportsV1::Price::Representation
460
+
461
+ property :product_type_l1, as: 'productTypeL1'
462
+ property :product_type_l2, as: 'productTypeL2'
463
+ property :product_type_l3, as: 'productTypeL3'
464
+ property :product_type_l4, as: 'productTypeL4'
465
+ property :product_type_l5, as: 'productTypeL5'
466
+ property :reporting_context, as: 'reportingContext'
467
+ property :shipping_label, as: 'shippingLabel'
468
+ collection :status_per_reporting_context, as: 'statusPerReportingContext', class: Google::Apis::MerchantapiReportsV1::StatusPerReportingContext, decorator: Google::Apis::MerchantapiReportsV1::StatusPerReportingContext::Representation
469
+
470
+ property :thumbnail_link, as: 'thumbnailLink'
471
+ property :title, as: 'title'
472
+ end
473
+ end
474
+
475
+ class ReportRow
476
+ # @private
477
+ class Representation < Google::Apis::Core::JsonRepresentation
478
+ property :best_sellers_brand_view, as: 'bestSellersBrandView', class: Google::Apis::MerchantapiReportsV1::BestSellersBrandView, decorator: Google::Apis::MerchantapiReportsV1::BestSellersBrandView::Representation
479
+
480
+ property :best_sellers_product_cluster_view, as: 'bestSellersProductClusterView', class: Google::Apis::MerchantapiReportsV1::BestSellersProductClusterView, decorator: Google::Apis::MerchantapiReportsV1::BestSellersProductClusterView::Representation
481
+
482
+ property :competitive_visibility_benchmark_view, as: 'competitiveVisibilityBenchmarkView', class: Google::Apis::MerchantapiReportsV1::CompetitiveVisibilityBenchmarkView, decorator: Google::Apis::MerchantapiReportsV1::CompetitiveVisibilityBenchmarkView::Representation
483
+
484
+ property :competitive_visibility_competitor_view, as: 'competitiveVisibilityCompetitorView', class: Google::Apis::MerchantapiReportsV1::CompetitiveVisibilityCompetitorView, decorator: Google::Apis::MerchantapiReportsV1::CompetitiveVisibilityCompetitorView::Representation
485
+
486
+ property :competitive_visibility_top_merchant_view, as: 'competitiveVisibilityTopMerchantView', class: Google::Apis::MerchantapiReportsV1::CompetitiveVisibilityTopMerchantView, decorator: Google::Apis::MerchantapiReportsV1::CompetitiveVisibilityTopMerchantView::Representation
487
+
488
+ property :non_product_performance_view, as: 'nonProductPerformanceView', class: Google::Apis::MerchantapiReportsV1::NonProductPerformanceView, decorator: Google::Apis::MerchantapiReportsV1::NonProductPerformanceView::Representation
489
+
490
+ property :price_competitiveness_product_view, as: 'priceCompetitivenessProductView', class: Google::Apis::MerchantapiReportsV1::PriceCompetitivenessProductView, decorator: Google::Apis::MerchantapiReportsV1::PriceCompetitivenessProductView::Representation
491
+
492
+ property :price_insights_product_view, as: 'priceInsightsProductView', class: Google::Apis::MerchantapiReportsV1::PriceInsightsProductView, decorator: Google::Apis::MerchantapiReportsV1::PriceInsightsProductView::Representation
493
+
494
+ property :product_performance_view, as: 'productPerformanceView', class: Google::Apis::MerchantapiReportsV1::ProductPerformanceView, decorator: Google::Apis::MerchantapiReportsV1::ProductPerformanceView::Representation
495
+
496
+ property :product_view, as: 'productView', class: Google::Apis::MerchantapiReportsV1::ProductView, decorator: Google::Apis::MerchantapiReportsV1::ProductView::Representation
497
+
498
+ end
499
+ end
500
+
501
+ class SearchRequest
502
+ # @private
503
+ class Representation < Google::Apis::Core::JsonRepresentation
504
+ property :page_size, as: 'pageSize'
505
+ property :page_token, as: 'pageToken'
506
+ property :query, as: 'query'
507
+ end
508
+ end
509
+
510
+ class SearchResponse
511
+ # @private
512
+ class Representation < Google::Apis::Core::JsonRepresentation
513
+ property :next_page_token, as: 'nextPageToken'
514
+ collection :results, as: 'results', class: Google::Apis::MerchantapiReportsV1::ReportRow, decorator: Google::Apis::MerchantapiReportsV1::ReportRow::Representation
515
+
516
+ end
517
+ end
518
+
519
+ class StatusPerReportingContext
520
+ # @private
521
+ class Representation < Google::Apis::Core::JsonRepresentation
522
+ collection :approved_countries, as: 'approvedCountries'
523
+ collection :disapproved_countries, as: 'disapprovedCountries'
524
+ collection :pending_countries, as: 'pendingCountries'
525
+ property :reporting_context, as: 'reportingContext'
526
+ end
527
+ end
528
+ end
529
+ end
530
+ end
@@ -0,0 +1,105 @@
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 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module MerchantapiReportsV1
23
+ # Merchant API
24
+ #
25
+ # Programmatically manage your Merchant Center Accounts.
26
+ #
27
+ # @example
28
+ # require 'google/apis/merchantapi_reports_v1'
29
+ #
30
+ # Merchantapi = Google::Apis::MerchantapiReportsV1 # Alias the module
31
+ # service = Merchantapi::MerchantService.new
32
+ #
33
+ # @see https://developers.google.com/merchant/api
34
+ class MerchantService < Google::Apis::Core::BaseService
35
+ DEFAULT_ENDPOINT_TEMPLATE = "https://merchantapi.$UNIVERSE_DOMAIN$/"
36
+
37
+ # @return [String]
38
+ # API key. Your API key identifies your project and provides you with API access,
39
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
40
+ attr_accessor :key
41
+
42
+ # @return [String]
43
+ # Available to use for quota purposes for server-side applications. Can be any
44
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
45
+ attr_accessor :quota_user
46
+
47
+ def initialize
48
+ super(DEFAULT_ENDPOINT_TEMPLATE, '',
49
+ client_name: 'google-apis-merchantapi_reports_v1',
50
+ client_version: Google::Apis::MerchantapiReportsV1::GEM_VERSION)
51
+ @batch_path = 'batch'
52
+ end
53
+
54
+ # Retrieves a report defined by a search query. The response might contain fewer
55
+ # rows than specified by `page_size`. Rely on `next_page_token` to determine if
56
+ # there are more rows to be requested. Executing this method requires the
57
+ # Performance and insights (`PERFORMANCE_REPORTING`) or admin (`ADMIN`) access
58
+ # right. For more information, see [Get started](https://developers.google.com/
59
+ # merchant/api/guides/reports/get-started), [Use Merchant Center Query Language](
60
+ # https://developers.google.com/merchant/api/guides/reports/query-language), and
61
+ # [Paginate query results](https://developers.google.com/merchant/api/guides/
62
+ # reports/paging).
63
+ # @param [String] parent
64
+ # Required. Id of the account making the call. Must be a standalone account or a
65
+ # subaccount of an advanced account. Format: accounts/`account`
66
+ # @param [Google::Apis::MerchantapiReportsV1::SearchRequest] search_request_object
67
+ # @param [String] fields
68
+ # Selector specifying which fields to include in a partial response.
69
+ # @param [String] quota_user
70
+ # Available to use for quota purposes for server-side applications. Can be any
71
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
72
+ # @param [Google::Apis::RequestOptions] options
73
+ # Request-specific options
74
+ #
75
+ # @yield [result, err] Result & error if block supplied
76
+ # @yieldparam result [Google::Apis::MerchantapiReportsV1::SearchResponse] parsed result object
77
+ # @yieldparam err [StandardError] error object if request failed
78
+ #
79
+ # @return [Google::Apis::MerchantapiReportsV1::SearchResponse]
80
+ #
81
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
82
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
83
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
84
+ def search_report(parent, search_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
85
+ command = make_simple_command(:post, 'reports/v1/{+parent}/reports:search', options)
86
+ command.request_representation = Google::Apis::MerchantapiReportsV1::SearchRequest::Representation
87
+ command.request_object = search_request_object
88
+ command.response_representation = Google::Apis::MerchantapiReportsV1::SearchResponse::Representation
89
+ command.response_class = Google::Apis::MerchantapiReportsV1::SearchResponse
90
+ command.params['parent'] = parent unless parent.nil?
91
+ command.query['fields'] = fields unless fields.nil?
92
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
93
+ execute_or_queue_command(command, &block)
94
+ end
95
+
96
+ protected
97
+
98
+ def apply_command_defaults(command)
99
+ command.query['key'] = key unless key.nil?
100
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
101
+ end
102
+ end
103
+ end
104
+ end
105
+ end