google-apis-content_v2_1 0.3.0 → 0.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95cab701eb8cc992dde108a1d8d680eca0965390078623ab03f2b117f952d479
4
- data.tar.gz: ee77754f02a4e0a036594192117a8d6a457f4e1cb560a767f85c5af66fbc1298
3
+ metadata.gz: 5cefc82b40f01f2d0c9af41758c2b094b21857c24d86a9be3eb13d8edd92daf4
4
+ data.tar.gz: 7911c0470d42ee19acd979a4814da864b5e0f40d58eddce7342a7d2d48ee30b6
5
5
  SHA512:
6
- metadata.gz: 8d5608f514689d98ef99cdd17c781967ecafe22677b7262c59f5b63b5aea9d6a8bd66d2188f09d2f3a5e679fd1be6acdddced2a794632133fbde5b02cb46163a
7
- data.tar.gz: 68a6f0e35d7894c271e7a65b54a4ef45d1923ffc5449bb1c268a1fed87feb948615621e16a4becf3d16683932ff7f1be8c88a90e58d1d7e1d2d5fe2d6faa3b8f
6
+ metadata.gz: 505cb62db2c9f9dcba8c6a26f37df069abd81a5ad437614ce295f7f4f6957d055a36df64443677caa10c5a9edc13a19d5e5f421762e1f22bf22a8efc16e021da
7
+ data.tar.gz: 6207bf4fa6c17bee20aa7965ee25260f0f8ccb2f16c51923f17a36b8984abd20861eeebc5d892ac434b06464add599a634d5499f2f0a0c2d04664d22b92bac4f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release history for google-apis-content_v2_1
2
2
 
3
+ ### v0.4.0 (2021-02-16)
4
+
5
+ * Regenerated from discovery document revision 20210211
6
+
3
7
  ### v0.3.0 (2021-02-11)
4
8
 
5
9
  * Regenerated from discovery document revision 20210210
@@ -4703,6 +4703,39 @@ module Google
4703
4703
  end
4704
4704
  end
4705
4705
 
4706
+ # Performance metrics. Values are only set for metrics requested explicitly in
4707
+ # the request's search query.
4708
+ class Metrics
4709
+ include Google::Apis::Core::Hashable
4710
+
4711
+ # Number of clicks.
4712
+ # Corresponds to the JSON property `clicks`
4713
+ # @return [Fixnum]
4714
+ attr_accessor :clicks
4715
+
4716
+ # Number of clicks merchant's products receive (clicks) divided by the number of
4717
+ # times the products are shown (impressions).
4718
+ # Corresponds to the JSON property `ctr`
4719
+ # @return [Float]
4720
+ attr_accessor :ctr
4721
+
4722
+ # Number of times merchant's products are shown.
4723
+ # Corresponds to the JSON property `impressions`
4724
+ # @return [Fixnum]
4725
+ attr_accessor :impressions
4726
+
4727
+ def initialize(**args)
4728
+ update!(**args)
4729
+ end
4730
+
4731
+ # Update properties of this object
4732
+ def update!(**args)
4733
+ @clicks = args[:clicks] if args.key?(:clicks)
4734
+ @ctr = args[:ctr] if args.key?(:ctr)
4735
+ @impressions = args[:impressions] if args.key?(:impressions)
4736
+ end
4737
+ end
4738
+
4706
4739
  #
4707
4740
  class MinimumOrderValueTable
4708
4741
  include Google::Apis::Core::Hashable
@@ -11316,6 +11349,37 @@ module Google
11316
11349
  end
11317
11350
  end
11318
11351
 
11352
+ # Result row returned from the search query.
11353
+ class ReportRow
11354
+ include Google::Apis::Core::Hashable
11355
+
11356
+ # Performance metrics. Values are only set for metrics requested explicitly in
11357
+ # the request's search query.
11358
+ # Corresponds to the JSON property `metrics`
11359
+ # @return [Google::Apis::ContentV2_1::Metrics]
11360
+ attr_accessor :metrics
11361
+
11362
+ # Dimensions according to which metrics are segmented in the response. Values of
11363
+ # product dimensions, e.g., offer id, reflect the state of a product at the time
11364
+ # of the corresponding event, e.g., impression or order. Segment fields cannot
11365
+ # be selected in queries without also selecting at least one metric field.
11366
+ # Values are only set for dimensions requested explicitly in the request's
11367
+ # search query.
11368
+ # Corresponds to the JSON property `segments`
11369
+ # @return [Google::Apis::ContentV2_1::Segments]
11370
+ attr_accessor :segments
11371
+
11372
+ def initialize(**args)
11373
+ update!(**args)
11374
+ end
11375
+
11376
+ # Update properties of this object
11377
+ def update!(**args)
11378
+ @metrics = args[:metrics] if args.key?(:metrics)
11379
+ @segments = args[:segments] if args.key?(:segments)
11380
+ end
11381
+ end
11382
+
11319
11383
  # Resource that represents a daily Repricing product report. Each report
11320
11384
  # contains stats for a single type of Repricing rule for a single product on a
11321
11385
  # given day. If there are multiple rules of the same type for the product on
@@ -12568,6 +12632,110 @@ module Google
12568
12632
  end
12569
12633
  end
12570
12634
 
12635
+ # Request message for the ReportService.Search method.
12636
+ class SearchRequest
12637
+ include Google::Apis::Core::Hashable
12638
+
12639
+ # Number of ReportRows to retrieve in a single page. Defaults to the maximum of
12640
+ # 1000. Values above 1000 are coerced to 1000.
12641
+ # Corresponds to the JSON property `pageSize`
12642
+ # @return [Fixnum]
12643
+ attr_accessor :page_size
12644
+
12645
+ # Token of the page to retrieve. If not specified, the first page of results is
12646
+ # returned. In order to request the next page of results, the value obtained
12647
+ # from `next_page_token` in the previous response should be used.
12648
+ # Corresponds to the JSON property `pageToken`
12649
+ # @return [String]
12650
+ attr_accessor :page_token
12651
+
12652
+ # Required. Search query that defines performance metrics to retrieve and
12653
+ # dimensions according to which the metrics are to be segmented.
12654
+ # Corresponds to the JSON property `query`
12655
+ # @return [String]
12656
+ attr_accessor :query
12657
+
12658
+ def initialize(**args)
12659
+ update!(**args)
12660
+ end
12661
+
12662
+ # Update properties of this object
12663
+ def update!(**args)
12664
+ @page_size = args[:page_size] if args.key?(:page_size)
12665
+ @page_token = args[:page_token] if args.key?(:page_token)
12666
+ @query = args[:query] if args.key?(:query)
12667
+ end
12668
+ end
12669
+
12670
+ # Response message for the ReportService.Search method.
12671
+ class SearchResponse
12672
+ include Google::Apis::Core::Hashable
12673
+
12674
+ # Token which can be sent as `page_token` to retrieve the next page. If omitted,
12675
+ # there are no subsequent pages.
12676
+ # Corresponds to the JSON property `nextPageToken`
12677
+ # @return [String]
12678
+ attr_accessor :next_page_token
12679
+
12680
+ # Rows that matched the search query.
12681
+ # Corresponds to the JSON property `results`
12682
+ # @return [Array<Google::Apis::ContentV2_1::ReportRow>]
12683
+ attr_accessor :results
12684
+
12685
+ def initialize(**args)
12686
+ update!(**args)
12687
+ end
12688
+
12689
+ # Update properties of this object
12690
+ def update!(**args)
12691
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
12692
+ @results = args[:results] if args.key?(:results)
12693
+ end
12694
+ end
12695
+
12696
+ # Dimensions according to which metrics are segmented in the response. Values of
12697
+ # product dimensions, e.g., offer id, reflect the state of a product at the time
12698
+ # of the corresponding event, e.g., impression or order. Segment fields cannot
12699
+ # be selected in queries without also selecting at least one metric field.
12700
+ # Values are only set for dimensions requested explicitly in the request's
12701
+ # search query.
12702
+ class Segments
12703
+ include Google::Apis::Core::Hashable
12704
+
12705
+ # Represents a whole or partial calendar date, such as a birthday. The time of
12706
+ # day and time zone are either specified elsewhere or are insignificant. The
12707
+ # date is relative to the Gregorian Calendar. This can represent one of the
12708
+ # following: * A full date, with non-zero year, month, and day values * A month
12709
+ # and day value, with a zero year, such as an anniversary * A year on its own,
12710
+ # with zero month and day values * A year and month value, with a zero day, such
12711
+ # as a credit card expiration date Related types are google.type.TimeOfDay and `
12712
+ # google.protobuf.Timestamp`.
12713
+ # Corresponds to the JSON property `date`
12714
+ # @return [Google::Apis::ContentV2_1::Date]
12715
+ attr_accessor :date
12716
+
12717
+ # Merchant-provided id of the product.
12718
+ # Corresponds to the JSON property `offerId`
12719
+ # @return [String]
12720
+ attr_accessor :offer_id
12721
+
12722
+ # Program to which metrics apply, e.g., Free Product Listing.
12723
+ # Corresponds to the JSON property `program`
12724
+ # @return [String]
12725
+ attr_accessor :program
12726
+
12727
+ def initialize(**args)
12728
+ update!(**args)
12729
+ end
12730
+
12731
+ # Update properties of this object
12732
+ def update!(**args)
12733
+ @date = args[:date] if args.key?(:date)
12734
+ @offer_id = args[:offer_id] if args.key?(:offer_id)
12735
+ @program = args[:program] if args.key?(:program)
12736
+ end
12737
+ end
12738
+
12571
12739
  #
12572
12740
  class Service
12573
12741
  include Google::Apis::Core::Hashable
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module ContentV2_1
18
18
  # Version of the google-apis-content_v2_1 gem
19
- GEM_VERSION = "0.3.0"
19
+ GEM_VERSION = "0.4.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.1.2"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20210210"
25
+ REVISION = "20210211"
26
26
  end
27
27
  end
28
28
  end
@@ -772,6 +772,12 @@ module Google
772
772
  include Google::Apis::Core::JsonObjectSupport
773
773
  end
774
774
 
775
+ class Metrics
776
+ class Representation < Google::Apis::Core::JsonRepresentation; end
777
+
778
+ include Google::Apis::Core::JsonObjectSupport
779
+ end
780
+
775
781
  class MinimumOrderValueTable
776
782
  class Representation < Google::Apis::Core::JsonRepresentation; end
777
783
 
@@ -1678,6 +1684,12 @@ module Google
1678
1684
  include Google::Apis::Core::JsonObjectSupport
1679
1685
  end
1680
1686
 
1687
+ class ReportRow
1688
+ class Representation < Google::Apis::Core::JsonRepresentation; end
1689
+
1690
+ include Google::Apis::Core::JsonObjectSupport
1691
+ end
1692
+
1681
1693
  class RepricingProductReport
1682
1694
  class Representation < Google::Apis::Core::JsonRepresentation; end
1683
1695
 
@@ -1864,6 +1876,24 @@ module Google
1864
1876
  include Google::Apis::Core::JsonObjectSupport
1865
1877
  end
1866
1878
 
1879
+ class SearchRequest
1880
+ class Representation < Google::Apis::Core::JsonRepresentation; end
1881
+
1882
+ include Google::Apis::Core::JsonObjectSupport
1883
+ end
1884
+
1885
+ class SearchResponse
1886
+ class Representation < Google::Apis::Core::JsonRepresentation; end
1887
+
1888
+ include Google::Apis::Core::JsonObjectSupport
1889
+ end
1890
+
1891
+ class Segments
1892
+ class Representation < Google::Apis::Core::JsonRepresentation; end
1893
+
1894
+ include Google::Apis::Core::JsonObjectSupport
1895
+ end
1896
+
1867
1897
  class Service
1868
1898
  class Representation < Google::Apis::Core::JsonRepresentation; end
1869
1899
 
@@ -3408,6 +3438,15 @@ module Google
3408
3438
  end
3409
3439
  end
3410
3440
 
3441
+ class Metrics
3442
+ # @private
3443
+ class Representation < Google::Apis::Core::JsonRepresentation
3444
+ property :clicks, :numeric_string => true, as: 'clicks'
3445
+ property :ctr, as: 'ctr'
3446
+ property :impressions, :numeric_string => true, as: 'impressions'
3447
+ end
3448
+ end
3449
+
3411
3450
  class MinimumOrderValueTable
3412
3451
  # @private
3413
3452
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -5154,6 +5193,16 @@ module Google
5154
5193
  end
5155
5194
  end
5156
5195
 
5196
+ class ReportRow
5197
+ # @private
5198
+ class Representation < Google::Apis::Core::JsonRepresentation
5199
+ property :metrics, as: 'metrics', class: Google::Apis::ContentV2_1::Metrics, decorator: Google::Apis::ContentV2_1::Metrics::Representation
5200
+
5201
+ property :segments, as: 'segments', class: Google::Apis::ContentV2_1::Segments, decorator: Google::Apis::ContentV2_1::Segments::Representation
5202
+
5203
+ end
5204
+ end
5205
+
5157
5206
  class RepricingProductReport
5158
5207
  # @private
5159
5208
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -5503,6 +5552,34 @@ module Google
5503
5552
  end
5504
5553
  end
5505
5554
 
5555
+ class SearchRequest
5556
+ # @private
5557
+ class Representation < Google::Apis::Core::JsonRepresentation
5558
+ property :page_size, as: 'pageSize'
5559
+ property :page_token, as: 'pageToken'
5560
+ property :query, as: 'query'
5561
+ end
5562
+ end
5563
+
5564
+ class SearchResponse
5565
+ # @private
5566
+ class Representation < Google::Apis::Core::JsonRepresentation
5567
+ property :next_page_token, as: 'nextPageToken'
5568
+ collection :results, as: 'results', class: Google::Apis::ContentV2_1::ReportRow, decorator: Google::Apis::ContentV2_1::ReportRow::Representation
5569
+
5570
+ end
5571
+ end
5572
+
5573
+ class Segments
5574
+ # @private
5575
+ class Representation < Google::Apis::Core::JsonRepresentation
5576
+ property :date, as: 'date', class: Google::Apis::ContentV2_1::Date, decorator: Google::Apis::ContentV2_1::Date::Representation
5577
+
5578
+ property :offer_id, as: 'offerId'
5579
+ property :program, as: 'program'
5580
+ end
5581
+ end
5582
+
5506
5583
  class Service
5507
5584
  # @private
5508
5585
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -4250,6 +4250,41 @@ module Google
4250
4250
  execute_or_queue_command(command, &block)
4251
4251
  end
4252
4252
 
4253
+ # Retrieves merchant performance mertrics matching the search query and
4254
+ # optionally segmented by selected dimensions.
4255
+ # @param [Fixnum] merchant_id
4256
+ # Required. Id of the merchant making the call. Must be a standalone account or
4257
+ # an MCA subaccount.
4258
+ # @param [Google::Apis::ContentV2_1::SearchRequest] search_request_object
4259
+ # @param [String] fields
4260
+ # Selector specifying which fields to include in a partial response.
4261
+ # @param [String] quota_user
4262
+ # Available to use for quota purposes for server-side applications. Can be any
4263
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
4264
+ # @param [Google::Apis::RequestOptions] options
4265
+ # Request-specific options
4266
+ #
4267
+ # @yield [result, err] Result & error if block supplied
4268
+ # @yieldparam result [Google::Apis::ContentV2_1::SearchResponse] parsed result object
4269
+ # @yieldparam err [StandardError] error object if request failed
4270
+ #
4271
+ # @return [Google::Apis::ContentV2_1::SearchResponse]
4272
+ #
4273
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4274
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4275
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
4276
+ def search_report(merchant_id, search_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4277
+ command = make_simple_command(:post, 'content/v2.1/{merchantId}/reports/search', options)
4278
+ command.request_representation = Google::Apis::ContentV2_1::SearchRequest::Representation
4279
+ command.request_object = search_request_object
4280
+ command.response_representation = Google::Apis::ContentV2_1::SearchResponse::Representation
4281
+ command.response_class = Google::Apis::ContentV2_1::SearchResponse
4282
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
4283
+ command.query['fields'] = fields unless fields.nil?
4284
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4285
+ execute_or_queue_command(command, &block)
4286
+ end
4287
+
4253
4288
  # Creates a repricing rule for your Merchant Center account.
4254
4289
  # @param [Fixnum] merchant_id
4255
4290
  # Required. The id of the merchant who owns the repricing rule.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-content_v2_1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-15 00:00:00.000000000 Z
11
+ date: 2021-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -52,7 +52,7 @@ licenses:
52
52
  metadata:
53
53
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
54
54
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-content_v2_1/CHANGELOG.md
55
- documentation_uri: https://googleapis.dev/ruby/google-apis-content_v2_1/v0.3.0
55
+ documentation_uri: https://googleapis.dev/ruby/google-apis-content_v2_1/v0.4.0
56
56
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-content_v2_1
57
57
  post_install_message:
58
58
  rdoc_options: []