google-apis-merchantapi_reports_v1beta 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 MerchantapiReportsV1beta
18
+ # Version of the google-apis-merchantapi_reports_v1beta gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.15.0"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20240611"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,507 @@
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 MerchantapiReportsV1beta
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 BestSellersBrandView
152
+ # @private
153
+ class Representation < Google::Apis::Core::JsonRepresentation
154
+ property :brand, as: 'brand'
155
+ property :previous_rank, :numeric_string => true, as: 'previousRank'
156
+ property :previous_relative_demand, as: 'previousRelativeDemand'
157
+ property :rank, :numeric_string => true, as: 'rank'
158
+ property :relative_demand, as: 'relativeDemand'
159
+ property :relative_demand_change, as: 'relativeDemandChange'
160
+ property :report_category_id, :numeric_string => true, as: 'reportCategoryId'
161
+ property :report_country_code, as: 'reportCountryCode'
162
+ property :report_date, as: 'reportDate', class: Google::Apis::MerchantapiReportsV1beta::Date, decorator: Google::Apis::MerchantapiReportsV1beta::Date::Representation
163
+
164
+ property :report_granularity, as: 'reportGranularity'
165
+ end
166
+ end
167
+
168
+ class BestSellersProductClusterView
169
+ # @private
170
+ class Representation < Google::Apis::Core::JsonRepresentation
171
+ property :brand, as: 'brand'
172
+ property :brand_inventory_status, as: 'brandInventoryStatus'
173
+ property :category_l1, as: 'categoryL1'
174
+ property :category_l2, as: 'categoryL2'
175
+ property :category_l3, as: 'categoryL3'
176
+ property :category_l4, as: 'categoryL4'
177
+ property :category_l5, as: 'categoryL5'
178
+ property :inventory_status, as: 'inventoryStatus'
179
+ property :previous_rank, :numeric_string => true, as: 'previousRank'
180
+ property :previous_relative_demand, as: 'previousRelativeDemand'
181
+ property :rank, :numeric_string => true, as: 'rank'
182
+ property :relative_demand, as: 'relativeDemand'
183
+ property :relative_demand_change, as: 'relativeDemandChange'
184
+ property :report_category_id, :numeric_string => true, as: 'reportCategoryId'
185
+ property :report_country_code, as: 'reportCountryCode'
186
+ property :report_date, as: 'reportDate', class: Google::Apis::MerchantapiReportsV1beta::Date, decorator: Google::Apis::MerchantapiReportsV1beta::Date::Representation
187
+
188
+ property :report_granularity, as: 'reportGranularity'
189
+ property :title, as: 'title'
190
+ collection :variant_gtins, as: 'variantGtins'
191
+ end
192
+ end
193
+
194
+ class CompetitiveVisibilityBenchmarkView
195
+ # @private
196
+ class Representation < Google::Apis::Core::JsonRepresentation
197
+ property :category_benchmark_visibility_trend, as: 'categoryBenchmarkVisibilityTrend'
198
+ property :date, as: 'date', class: Google::Apis::MerchantapiReportsV1beta::Date, decorator: Google::Apis::MerchantapiReportsV1beta::Date::Representation
199
+
200
+ property :report_category_id, :numeric_string => true, as: 'reportCategoryId'
201
+ property :report_country_code, as: 'reportCountryCode'
202
+ property :traffic_source, as: 'trafficSource'
203
+ property :your_domain_visibility_trend, as: 'yourDomainVisibilityTrend'
204
+ end
205
+ end
206
+
207
+ class CompetitiveVisibilityCompetitorView
208
+ # @private
209
+ class Representation < Google::Apis::Core::JsonRepresentation
210
+ property :ads_organic_ratio, as: 'adsOrganicRatio'
211
+ property :date, as: 'date', class: Google::Apis::MerchantapiReportsV1beta::Date, decorator: Google::Apis::MerchantapiReportsV1beta::Date::Representation
212
+
213
+ property :domain, as: 'domain'
214
+ property :higher_position_rate, as: 'higherPositionRate'
215
+ property :is_your_domain, as: 'isYourDomain'
216
+ property :page_overlap_rate, as: 'pageOverlapRate'
217
+ property :rank, :numeric_string => true, as: 'rank'
218
+ property :relative_visibility, as: 'relativeVisibility'
219
+ property :report_category_id, :numeric_string => true, as: 'reportCategoryId'
220
+ property :report_country_code, as: 'reportCountryCode'
221
+ property :traffic_source, as: 'trafficSource'
222
+ end
223
+ end
224
+
225
+ class CompetitiveVisibilityTopMerchantView
226
+ # @private
227
+ class Representation < Google::Apis::Core::JsonRepresentation
228
+ property :ads_organic_ratio, as: 'adsOrganicRatio'
229
+ property :date, as: 'date', class: Google::Apis::MerchantapiReportsV1beta::Date, decorator: Google::Apis::MerchantapiReportsV1beta::Date::Representation
230
+
231
+ property :domain, as: 'domain'
232
+ property :higher_position_rate, as: 'higherPositionRate'
233
+ property :is_your_domain, as: 'isYourDomain'
234
+ property :page_overlap_rate, as: 'pageOverlapRate'
235
+ property :rank, :numeric_string => true, as: 'rank'
236
+ property :report_category_id, :numeric_string => true, as: 'reportCategoryId'
237
+ property :report_country_code, as: 'reportCountryCode'
238
+ property :traffic_source, as: 'trafficSource'
239
+ end
240
+ end
241
+
242
+ class Date
243
+ # @private
244
+ class Representation < Google::Apis::Core::JsonRepresentation
245
+ property :day, as: 'day'
246
+ property :month, as: 'month'
247
+ property :year, as: 'year'
248
+ end
249
+ end
250
+
251
+ class IssueSeverityPerReportingContext
252
+ # @private
253
+ class Representation < Google::Apis::Core::JsonRepresentation
254
+ collection :demoted_countries, as: 'demotedCountries'
255
+ collection :disapproved_countries, as: 'disapprovedCountries'
256
+ property :reporting_context, as: 'reportingContext'
257
+ end
258
+ end
259
+
260
+ class ItemIssue
261
+ # @private
262
+ class Representation < Google::Apis::Core::JsonRepresentation
263
+ property :resolution, as: 'resolution'
264
+ property :severity, as: 'severity', class: Google::Apis::MerchantapiReportsV1beta::ItemIssueSeverity, decorator: Google::Apis::MerchantapiReportsV1beta::ItemIssueSeverity::Representation
265
+
266
+ property :type, as: 'type', class: Google::Apis::MerchantapiReportsV1beta::ItemIssueType, decorator: Google::Apis::MerchantapiReportsV1beta::ItemIssueType::Representation
267
+
268
+ end
269
+ end
270
+
271
+ class ItemIssueSeverity
272
+ # @private
273
+ class Representation < Google::Apis::Core::JsonRepresentation
274
+ property :aggregated_severity, as: 'aggregatedSeverity'
275
+ collection :severity_per_reporting_context, as: 'severityPerReportingContext', class: Google::Apis::MerchantapiReportsV1beta::IssueSeverityPerReportingContext, decorator: Google::Apis::MerchantapiReportsV1beta::IssueSeverityPerReportingContext::Representation
276
+
277
+ end
278
+ end
279
+
280
+ class ItemIssueType
281
+ # @private
282
+ class Representation < Google::Apis::Core::JsonRepresentation
283
+ property :canonical_attribute, as: 'canonicalAttribute'
284
+ property :code, as: 'code'
285
+ end
286
+ end
287
+
288
+ class NonProductPerformanceView
289
+ # @private
290
+ class Representation < Google::Apis::Core::JsonRepresentation
291
+ property :click_through_rate, as: 'clickThroughRate'
292
+ property :clicks, :numeric_string => true, as: 'clicks'
293
+ property :date, as: 'date', class: Google::Apis::MerchantapiReportsV1beta::Date, decorator: Google::Apis::MerchantapiReportsV1beta::Date::Representation
294
+
295
+ property :impressions, :numeric_string => true, as: 'impressions'
296
+ property :week, as: 'week', class: Google::Apis::MerchantapiReportsV1beta::Date, decorator: Google::Apis::MerchantapiReportsV1beta::Date::Representation
297
+
298
+ end
299
+ end
300
+
301
+ class Price
302
+ # @private
303
+ class Representation < Google::Apis::Core::JsonRepresentation
304
+ property :amount_micros, :numeric_string => true, as: 'amountMicros'
305
+ property :currency_code, as: 'currencyCode'
306
+ end
307
+ end
308
+
309
+ class PriceCompetitivenessProductView
310
+ # @private
311
+ class Representation < Google::Apis::Core::JsonRepresentation
312
+ property :benchmark_price, as: 'benchmarkPrice', class: Google::Apis::MerchantapiReportsV1beta::Price, decorator: Google::Apis::MerchantapiReportsV1beta::Price::Representation
313
+
314
+ property :brand, as: 'brand'
315
+ property :category_l1, as: 'categoryL1'
316
+ property :category_l2, as: 'categoryL2'
317
+ property :category_l3, as: 'categoryL3'
318
+ property :category_l4, as: 'categoryL4'
319
+ property :category_l5, as: 'categoryL5'
320
+ property :id, as: 'id'
321
+ property :offer_id, as: 'offerId'
322
+ property :price, as: 'price', class: Google::Apis::MerchantapiReportsV1beta::Price, decorator: Google::Apis::MerchantapiReportsV1beta::Price::Representation
323
+
324
+ property :product_type_l1, as: 'productTypeL1'
325
+ property :product_type_l2, as: 'productTypeL2'
326
+ property :product_type_l3, as: 'productTypeL3'
327
+ property :product_type_l4, as: 'productTypeL4'
328
+ property :product_type_l5, as: 'productTypeL5'
329
+ property :report_country_code, as: 'reportCountryCode'
330
+ property :title, as: 'title'
331
+ end
332
+ end
333
+
334
+ class PriceInsightsProductView
335
+ # @private
336
+ class Representation < Google::Apis::Core::JsonRepresentation
337
+ property :brand, as: 'brand'
338
+ property :category_l1, as: 'categoryL1'
339
+ property :category_l2, as: 'categoryL2'
340
+ property :category_l3, as: 'categoryL3'
341
+ property :category_l4, as: 'categoryL4'
342
+ property :category_l5, as: 'categoryL5'
343
+ property :effectiveness, as: 'effectiveness'
344
+ property :id, as: 'id'
345
+ property :offer_id, as: 'offerId'
346
+ property :predicted_clicks_change_fraction, as: 'predictedClicksChangeFraction'
347
+ property :predicted_conversions_change_fraction, as: 'predictedConversionsChangeFraction'
348
+ property :predicted_impressions_change_fraction, as: 'predictedImpressionsChangeFraction'
349
+ property :price, as: 'price', class: Google::Apis::MerchantapiReportsV1beta::Price, decorator: Google::Apis::MerchantapiReportsV1beta::Price::Representation
350
+
351
+ property :product_type_l1, as: 'productTypeL1'
352
+ property :product_type_l2, as: 'productTypeL2'
353
+ property :product_type_l3, as: 'productTypeL3'
354
+ property :product_type_l4, as: 'productTypeL4'
355
+ property :product_type_l5, as: 'productTypeL5'
356
+ property :suggested_price, as: 'suggestedPrice', class: Google::Apis::MerchantapiReportsV1beta::Price, decorator: Google::Apis::MerchantapiReportsV1beta::Price::Representation
357
+
358
+ property :title, as: 'title'
359
+ end
360
+ end
361
+
362
+ class ProductChange
363
+ # @private
364
+ class Representation < Google::Apis::Core::JsonRepresentation
365
+ property :new_value, as: 'newValue'
366
+ property :old_value, as: 'oldValue'
367
+ property :region_code, as: 'regionCode'
368
+ property :reporting_context, as: 'reportingContext'
369
+ end
370
+ end
371
+
372
+ class ProductPerformanceView
373
+ # @private
374
+ class Representation < Google::Apis::Core::JsonRepresentation
375
+ property :brand, as: 'brand'
376
+ property :category_l1, as: 'categoryL1'
377
+ property :category_l2, as: 'categoryL2'
378
+ property :category_l3, as: 'categoryL3'
379
+ property :category_l4, as: 'categoryL4'
380
+ property :category_l5, as: 'categoryL5'
381
+ property :click_through_rate, as: 'clickThroughRate'
382
+ property :clicks, :numeric_string => true, as: 'clicks'
383
+ property :conversion_rate, as: 'conversionRate'
384
+ property :conversion_value, as: 'conversionValue', class: Google::Apis::MerchantapiReportsV1beta::Price, decorator: Google::Apis::MerchantapiReportsV1beta::Price::Representation
385
+
386
+ property :conversions, as: 'conversions'
387
+ property :custom_label0, as: 'customLabel0'
388
+ property :custom_label1, as: 'customLabel1'
389
+ property :custom_label2, as: 'customLabel2'
390
+ property :custom_label3, as: 'customLabel3'
391
+ property :custom_label4, as: 'customLabel4'
392
+ property :customer_country_code, as: 'customerCountryCode'
393
+ property :date, as: 'date', class: Google::Apis::MerchantapiReportsV1beta::Date, decorator: Google::Apis::MerchantapiReportsV1beta::Date::Representation
394
+
395
+ property :impressions, :numeric_string => true, as: 'impressions'
396
+ property :marketing_method, as: 'marketingMethod'
397
+ property :offer_id, as: 'offerId'
398
+ property :product_type_l1, as: 'productTypeL1'
399
+ property :product_type_l2, as: 'productTypeL2'
400
+ property :product_type_l3, as: 'productTypeL3'
401
+ property :product_type_l4, as: 'productTypeL4'
402
+ property :product_type_l5, as: 'productTypeL5'
403
+ property :title, as: 'title'
404
+ property :week, as: 'week', class: Google::Apis::MerchantapiReportsV1beta::Date, decorator: Google::Apis::MerchantapiReportsV1beta::Date::Representation
405
+
406
+ end
407
+ end
408
+
409
+ class ProductStatusChangeMessage
410
+ # @private
411
+ class Representation < Google::Apis::Core::JsonRepresentation
412
+ property :account, as: 'account'
413
+ property :attribute, as: 'attribute'
414
+ collection :changes, as: 'changes', class: Google::Apis::MerchantapiReportsV1beta::ProductChange, decorator: Google::Apis::MerchantapiReportsV1beta::ProductChange::Representation
415
+
416
+ property :managing_account, as: 'managingAccount'
417
+ property :resource, as: 'resource'
418
+ property :resource_id, as: 'resourceId'
419
+ property :resource_type, as: 'resourceType'
420
+ end
421
+ end
422
+
423
+ class ProductView
424
+ # @private
425
+ class Representation < Google::Apis::Core::JsonRepresentation
426
+ property :aggregated_reporting_context_status, as: 'aggregatedReportingContextStatus'
427
+ property :availability, as: 'availability'
428
+ property :brand, as: 'brand'
429
+ property :category_l1, as: 'categoryL1'
430
+ property :category_l2, as: 'categoryL2'
431
+ property :category_l3, as: 'categoryL3'
432
+ property :category_l4, as: 'categoryL4'
433
+ property :category_l5, as: 'categoryL5'
434
+ property :channel, as: 'channel'
435
+ property :click_potential, as: 'clickPotential'
436
+ property :click_potential_rank, :numeric_string => true, as: 'clickPotentialRank'
437
+ property :condition, as: 'condition'
438
+ property :creation_time, as: 'creationTime'
439
+ property :expiration_date, as: 'expirationDate', class: Google::Apis::MerchantapiReportsV1beta::Date, decorator: Google::Apis::MerchantapiReportsV1beta::Date::Representation
440
+
441
+ property :feed_label, as: 'feedLabel'
442
+ collection :gtin, as: 'gtin'
443
+ property :id, as: 'id'
444
+ property :item_group_id, as: 'itemGroupId'
445
+ collection :item_issues, as: 'itemIssues', class: Google::Apis::MerchantapiReportsV1beta::ItemIssue, decorator: Google::Apis::MerchantapiReportsV1beta::ItemIssue::Representation
446
+
447
+ property :language_code, as: 'languageCode'
448
+ property :offer_id, as: 'offerId'
449
+ property :price, as: 'price', class: Google::Apis::MerchantapiReportsV1beta::Price, decorator: Google::Apis::MerchantapiReportsV1beta::Price::Representation
450
+
451
+ property :product_type_l1, as: 'productTypeL1'
452
+ property :product_type_l2, as: 'productTypeL2'
453
+ property :product_type_l3, as: 'productTypeL3'
454
+ property :product_type_l4, as: 'productTypeL4'
455
+ property :product_type_l5, as: 'productTypeL5'
456
+ property :shipping_label, as: 'shippingLabel'
457
+ property :thumbnail_link, as: 'thumbnailLink'
458
+ property :title, as: 'title'
459
+ end
460
+ end
461
+
462
+ class ReportRow
463
+ # @private
464
+ class Representation < Google::Apis::Core::JsonRepresentation
465
+ property :best_sellers_brand_view, as: 'bestSellersBrandView', class: Google::Apis::MerchantapiReportsV1beta::BestSellersBrandView, decorator: Google::Apis::MerchantapiReportsV1beta::BestSellersBrandView::Representation
466
+
467
+ property :best_sellers_product_cluster_view, as: 'bestSellersProductClusterView', class: Google::Apis::MerchantapiReportsV1beta::BestSellersProductClusterView, decorator: Google::Apis::MerchantapiReportsV1beta::BestSellersProductClusterView::Representation
468
+
469
+ property :competitive_visibility_benchmark_view, as: 'competitiveVisibilityBenchmarkView', class: Google::Apis::MerchantapiReportsV1beta::CompetitiveVisibilityBenchmarkView, decorator: Google::Apis::MerchantapiReportsV1beta::CompetitiveVisibilityBenchmarkView::Representation
470
+
471
+ property :competitive_visibility_competitor_view, as: 'competitiveVisibilityCompetitorView', class: Google::Apis::MerchantapiReportsV1beta::CompetitiveVisibilityCompetitorView, decorator: Google::Apis::MerchantapiReportsV1beta::CompetitiveVisibilityCompetitorView::Representation
472
+
473
+ property :competitive_visibility_top_merchant_view, as: 'competitiveVisibilityTopMerchantView', class: Google::Apis::MerchantapiReportsV1beta::CompetitiveVisibilityTopMerchantView, decorator: Google::Apis::MerchantapiReportsV1beta::CompetitiveVisibilityTopMerchantView::Representation
474
+
475
+ property :non_product_performance_view, as: 'nonProductPerformanceView', class: Google::Apis::MerchantapiReportsV1beta::NonProductPerformanceView, decorator: Google::Apis::MerchantapiReportsV1beta::NonProductPerformanceView::Representation
476
+
477
+ property :price_competitiveness_product_view, as: 'priceCompetitivenessProductView', class: Google::Apis::MerchantapiReportsV1beta::PriceCompetitivenessProductView, decorator: Google::Apis::MerchantapiReportsV1beta::PriceCompetitivenessProductView::Representation
478
+
479
+ property :price_insights_product_view, as: 'priceInsightsProductView', class: Google::Apis::MerchantapiReportsV1beta::PriceInsightsProductView, decorator: Google::Apis::MerchantapiReportsV1beta::PriceInsightsProductView::Representation
480
+
481
+ property :product_performance_view, as: 'productPerformanceView', class: Google::Apis::MerchantapiReportsV1beta::ProductPerformanceView, decorator: Google::Apis::MerchantapiReportsV1beta::ProductPerformanceView::Representation
482
+
483
+ property :product_view, as: 'productView', class: Google::Apis::MerchantapiReportsV1beta::ProductView, decorator: Google::Apis::MerchantapiReportsV1beta::ProductView::Representation
484
+
485
+ end
486
+ end
487
+
488
+ class SearchRequest
489
+ # @private
490
+ class Representation < Google::Apis::Core::JsonRepresentation
491
+ property :page_size, as: 'pageSize'
492
+ property :page_token, as: 'pageToken'
493
+ property :query, as: 'query'
494
+ end
495
+ end
496
+
497
+ class SearchResponse
498
+ # @private
499
+ class Representation < Google::Apis::Core::JsonRepresentation
500
+ property :next_page_token, as: 'nextPageToken'
501
+ collection :results, as: 'results', class: Google::Apis::MerchantapiReportsV1beta::ReportRow, decorator: Google::Apis::MerchantapiReportsV1beta::ReportRow::Representation
502
+
503
+ end
504
+ end
505
+ end
506
+ end
507
+ end
@@ -0,0 +1,99 @@
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 MerchantapiReportsV1beta
23
+ # Merchant API
24
+ #
25
+ # Programmatically manage your Merchant Center Accounts.
26
+ #
27
+ # @example
28
+ # require 'google/apis/merchantapi_reports_v1beta'
29
+ #
30
+ # Merchantapi = Google::Apis::MerchantapiReportsV1beta # Alias the module
31
+ # service = Merchantapi::MerchantService.new
32
+ #
33
+ # @see https://developers.devsite.corp.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_v1beta',
50
+ client_version: Google::Apis::MerchantapiReportsV1beta::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.
57
+ # @param [String] parent
58
+ # Required. Id of the account making the call. Must be a standalone account or
59
+ # an MCA subaccount. Format: accounts/`account`
60
+ # @param [Google::Apis::MerchantapiReportsV1beta::SearchRequest] search_request_object
61
+ # @param [String] fields
62
+ # Selector specifying which fields to include in a partial response.
63
+ # @param [String] quota_user
64
+ # Available to use for quota purposes for server-side applications. Can be any
65
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
66
+ # @param [Google::Apis::RequestOptions] options
67
+ # Request-specific options
68
+ #
69
+ # @yield [result, err] Result & error if block supplied
70
+ # @yieldparam result [Google::Apis::MerchantapiReportsV1beta::SearchResponse] parsed result object
71
+ # @yieldparam err [StandardError] error object if request failed
72
+ #
73
+ # @return [Google::Apis::MerchantapiReportsV1beta::SearchResponse]
74
+ #
75
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
76
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
77
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
78
+ def search_report(parent, search_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
79
+ command = make_simple_command(:post, 'reports/v1beta/{+parent}/reports:search', options)
80
+ command.request_representation = Google::Apis::MerchantapiReportsV1beta::SearchRequest::Representation
81
+ command.request_object = search_request_object
82
+ command.response_representation = Google::Apis::MerchantapiReportsV1beta::SearchResponse::Representation
83
+ command.response_class = Google::Apis::MerchantapiReportsV1beta::SearchResponse
84
+ command.params['parent'] = parent unless parent.nil?
85
+ command.query['fields'] = fields unless fields.nil?
86
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
87
+ execute_or_queue_command(command, &block)
88
+ end
89
+
90
+ protected
91
+
92
+ def apply_command_defaults(command)
93
+ command.query['key'] = key unless key.nil?
94
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
95
+ end
96
+ end
97
+ end
98
+ end
99
+ end
@@ -0,0 +1,36 @@
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/merchantapi_reports_v1beta/service.rb'
16
+ require 'google/apis/merchantapi_reports_v1beta/classes.rb'
17
+ require 'google/apis/merchantapi_reports_v1beta/representations.rb'
18
+ require 'google/apis/merchantapi_reports_v1beta/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Merchant API
23
+ #
24
+ # Programmatically manage your Merchant Center Accounts.
25
+ #
26
+ # @see https://developers.devsite.corp.google.com/merchant/api
27
+ module MerchantapiReportsV1beta
28
+ # Version of the Merchant API this client connects to.
29
+ # This is NOT the gem version.
30
+ VERSION = 'ReportsV1beta'
31
+
32
+ # Manage your product listings and accounts for Google Shopping
33
+ AUTH_CONTENT = 'https://www.googleapis.com/auth/content'
34
+ end
35
+ end
36
+ end