google-shopping-merchant-conversions-v1beta 0.1.0 → 0.2.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 +4 -4
- data/README.md +30 -21
- data/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/client.rb +43 -13
- data/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb +43 -13
- data/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb +62 -38
- data/lib/google/shopping/merchant/conversions/v1beta/version.rb +1 -1
- data/proto_docs/google/api/client.rb +70 -10
- data/proto_docs/google/api/resource.rb +7 -2
- data/proto_docs/google/shopping/merchant/conversions/v1beta/conversionsources.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e58c60b883bf4417c213e159d4b713164d914fc2899c722de57358e972a325e
|
4
|
+
data.tar.gz: '09098291aa690feda0c0abcd0c4bd7389f4967fdb01e8ad44683208c71579337'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5bf934f0cfb236bf88244e359866e8f11ae94af5fedc66834228c8256d469b36cef64eb86ab414c0befc2554eac416a506c757d21e55ddd708896352153fc7a
|
7
|
+
data.tar.gz: 77777e3d0a9eff07b97bc97e11dd9427eb28b7adccd344a5c28302648727782403cdef9fdfec1237047348679c7bcace5ffd3ceb5660c53ff50f81e7cb344f36
|
data/README.md
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
Programmatically manage your Merchant Center accounts.
|
4
4
|
|
5
|
-
Programmatically manage your Merchant Center accounts.
|
6
5
|
|
7
6
|
https://github.com/googleapis/google-cloud-ruby
|
8
7
|
|
@@ -43,33 +42,43 @@ for class and method documentation.
|
|
43
42
|
See also the [Product Documentation](https://developers.google.com/merchant/api)
|
44
43
|
for general usage information.
|
45
44
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
45
|
+
## Debug Logging
|
46
|
+
|
47
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
48
|
+
your application's integration with the API. When logging is activated, key
|
49
|
+
events such as requests and responses, along with data payloads and metadata
|
50
|
+
such as headers and client configuration, are logged to the standard error
|
51
|
+
stream.
|
52
|
+
|
53
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
54
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
55
|
+
customers, private keys, or other security data that could be compromising if
|
56
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
57
|
+
the principle of least access. Google also recommends that Client Library Debug
|
58
|
+
Logging be enabled only temporarily during active debugging, and not used
|
59
|
+
permanently in production.
|
60
|
+
|
61
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
62
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
63
|
+
list of client library gem names. This will select the default logging behavior,
|
64
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
65
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
66
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
67
|
+
results in logs appearing alongside your application logs in the
|
68
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
69
|
+
|
70
|
+
You can customize logging by modifying the `logger` configuration when
|
71
|
+
constructing a client object. For example:
|
55
72
|
|
56
73
|
```ruby
|
74
|
+
require "google/shopping/merchant/conversions/v1beta"
|
57
75
|
require "logger"
|
58
76
|
|
59
|
-
|
60
|
-
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
77
|
+
client = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSourcesService::Client.new do |config|
|
78
|
+
config.logger = Logger.new "my-app.log"
|
69
79
|
end
|
70
80
|
```
|
71
81
|
|
72
|
-
|
73
82
|
## Google Cloud Samples
|
74
83
|
|
75
84
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
@@ -31,6 +31,9 @@ module Google
|
|
31
31
|
# Service for managing conversion sources for a merchant account.
|
32
32
|
#
|
33
33
|
class Client
|
34
|
+
# @private
|
35
|
+
API_VERSION = ""
|
36
|
+
|
34
37
|
# @private
|
35
38
|
DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$"
|
36
39
|
|
@@ -160,8 +163,28 @@ module Google
|
|
160
163
|
universe_domain: @config.universe_domain,
|
161
164
|
channel_args: @config.channel_args,
|
162
165
|
interceptors: @config.interceptors,
|
163
|
-
channel_pool_config: @config.channel_pool
|
166
|
+
channel_pool_config: @config.channel_pool,
|
167
|
+
logger: @config.logger
|
164
168
|
)
|
169
|
+
|
170
|
+
@conversion_sources_service_stub.stub_logger&.info do |entry|
|
171
|
+
entry.set_system_name
|
172
|
+
entry.set_service
|
173
|
+
entry.message = "Created client for #{entry.service}"
|
174
|
+
entry.set_credentials_fields credentials
|
175
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
176
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
177
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
##
|
182
|
+
# The logger used for request/response debug logging.
|
183
|
+
#
|
184
|
+
# @return [Logger]
|
185
|
+
#
|
186
|
+
def logger
|
187
|
+
@conversion_sources_service_stub.logger
|
165
188
|
end
|
166
189
|
|
167
190
|
# Service calls
|
@@ -225,10 +248,11 @@ module Google
|
|
225
248
|
# Customize the options with defaults
|
226
249
|
metadata = @config.rpcs.create_conversion_source.metadata.to_h
|
227
250
|
|
228
|
-
# Set x-goog-api-client
|
251
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
229
252
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
230
253
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
231
254
|
gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION
|
255
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
232
256
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
233
257
|
|
234
258
|
header_params = {}
|
@@ -249,7 +273,6 @@ module Google
|
|
249
273
|
|
250
274
|
@conversion_sources_service_stub.call_rpc :create_conversion_source, request, options: options do |response, operation|
|
251
275
|
yield response, operation if block_given?
|
252
|
-
return response
|
253
276
|
end
|
254
277
|
rescue ::GRPC::BadStatus => e
|
255
278
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -314,10 +337,11 @@ module Google
|
|
314
337
|
# Customize the options with defaults
|
315
338
|
metadata = @config.rpcs.update_conversion_source.metadata.to_h
|
316
339
|
|
317
|
-
# Set x-goog-api-client
|
340
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
318
341
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
319
342
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
320
343
|
gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION
|
344
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
321
345
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
322
346
|
|
323
347
|
header_params = {}
|
@@ -338,7 +362,6 @@ module Google
|
|
338
362
|
|
339
363
|
@conversion_sources_service_stub.call_rpc :update_conversion_source, request, options: options do |response, operation|
|
340
364
|
yield response, operation if block_given?
|
341
|
-
return response
|
342
365
|
end
|
343
366
|
rescue ::GRPC::BadStatus => e
|
344
367
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -403,10 +426,11 @@ module Google
|
|
403
426
|
# Customize the options with defaults
|
404
427
|
metadata = @config.rpcs.delete_conversion_source.metadata.to_h
|
405
428
|
|
406
|
-
# Set x-goog-api-client
|
429
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
407
430
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
408
431
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
409
432
|
gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION
|
433
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
410
434
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
411
435
|
|
412
436
|
header_params = {}
|
@@ -427,7 +451,6 @@ module Google
|
|
427
451
|
|
428
452
|
@conversion_sources_service_stub.call_rpc :delete_conversion_source, request, options: options do |response, operation|
|
429
453
|
yield response, operation if block_given?
|
430
|
-
return response
|
431
454
|
end
|
432
455
|
rescue ::GRPC::BadStatus => e
|
433
456
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -490,10 +513,11 @@ module Google
|
|
490
513
|
# Customize the options with defaults
|
491
514
|
metadata = @config.rpcs.undelete_conversion_source.metadata.to_h
|
492
515
|
|
493
|
-
# Set x-goog-api-client
|
516
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
494
517
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
495
518
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
496
519
|
gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION
|
520
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
497
521
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
498
522
|
|
499
523
|
header_params = {}
|
@@ -514,7 +538,6 @@ module Google
|
|
514
538
|
|
515
539
|
@conversion_sources_service_stub.call_rpc :undelete_conversion_source, request, options: options do |response, operation|
|
516
540
|
yield response, operation if block_given?
|
517
|
-
return response
|
518
541
|
end
|
519
542
|
rescue ::GRPC::BadStatus => e
|
520
543
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -576,10 +599,11 @@ module Google
|
|
576
599
|
# Customize the options with defaults
|
577
600
|
metadata = @config.rpcs.get_conversion_source.metadata.to_h
|
578
601
|
|
579
|
-
# Set x-goog-api-client
|
602
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
580
603
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
581
604
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
582
605
|
gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION
|
606
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
583
607
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
584
608
|
|
585
609
|
header_params = {}
|
@@ -600,7 +624,6 @@ module Google
|
|
600
624
|
|
601
625
|
@conversion_sources_service_stub.call_rpc :get_conversion_source, request, options: options do |response, operation|
|
602
626
|
yield response, operation if block_given?
|
603
|
-
return response
|
604
627
|
end
|
605
628
|
rescue ::GRPC::BadStatus => e
|
606
629
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -676,10 +699,11 @@ module Google
|
|
676
699
|
# Customize the options with defaults
|
677
700
|
metadata = @config.rpcs.list_conversion_sources.metadata.to_h
|
678
701
|
|
679
|
-
# Set x-goog-api-client
|
702
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
680
703
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
681
704
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
682
705
|
gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION
|
706
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
683
707
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
684
708
|
|
685
709
|
header_params = {}
|
@@ -701,7 +725,7 @@ module Google
|
|
701
725
|
@conversion_sources_service_stub.call_rpc :list_conversion_sources, request, options: options do |response, operation|
|
702
726
|
response = ::Gapic::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, request, response, operation, options
|
703
727
|
yield response, operation if block_given?
|
704
|
-
|
728
|
+
throw :response, response
|
705
729
|
end
|
706
730
|
rescue ::GRPC::BadStatus => e
|
707
731
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -790,6 +814,11 @@ module Google
|
|
790
814
|
# default endpoint URL. The default value of nil uses the environment
|
791
815
|
# universe (usually the default "googleapis.com" universe).
|
792
816
|
# @return [::String,nil]
|
817
|
+
# @!attribute [rw] logger
|
818
|
+
# A custom logger to use for request/response debug logging, or the value
|
819
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
820
|
+
# explicitly disable logging.
|
821
|
+
# @return [::Logger,:default,nil]
|
793
822
|
#
|
794
823
|
class Configuration
|
795
824
|
extend ::Gapic::Config
|
@@ -814,6 +843,7 @@ module Google
|
|
814
843
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
815
844
|
config_attr :quota_project, nil, ::String, nil
|
816
845
|
config_attr :universe_domain, nil, ::String, nil
|
846
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
817
847
|
|
818
848
|
# @private
|
819
849
|
def initialize parent_config = nil
|
data/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/client.rb
CHANGED
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# Service for managing conversion sources for a merchant account.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
API_VERSION = ""
|
38
|
+
|
36
39
|
# @private
|
37
40
|
DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$"
|
38
41
|
|
@@ -153,8 +156,28 @@ module Google
|
|
153
156
|
endpoint: @config.endpoint,
|
154
157
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
155
158
|
universe_domain: @config.universe_domain,
|
156
|
-
credentials: credentials
|
159
|
+
credentials: credentials,
|
160
|
+
logger: @config.logger
|
157
161
|
)
|
162
|
+
|
163
|
+
@conversion_sources_service_stub.logger(stub: true)&.info do |entry|
|
164
|
+
entry.set_system_name
|
165
|
+
entry.set_service
|
166
|
+
entry.message = "Created client for #{entry.service}"
|
167
|
+
entry.set_credentials_fields credentials
|
168
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
169
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
170
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
##
|
175
|
+
# The logger used for request/response debug logging.
|
176
|
+
#
|
177
|
+
# @return [Logger]
|
178
|
+
#
|
179
|
+
def logger
|
180
|
+
@conversion_sources_service_stub.logger
|
158
181
|
end
|
159
182
|
|
160
183
|
# Service calls
|
@@ -217,12 +240,13 @@ module Google
|
|
217
240
|
# Customize the options with defaults
|
218
241
|
call_metadata = @config.rpcs.create_conversion_source.metadata.to_h
|
219
242
|
|
220
|
-
# Set x-goog-api-client
|
243
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
221
244
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
222
245
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
223
246
|
gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION,
|
224
247
|
transports_version_send: [:rest]
|
225
248
|
|
249
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
226
250
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
227
251
|
|
228
252
|
options.apply_defaults timeout: @config.rpcs.create_conversion_source.timeout,
|
@@ -235,7 +259,6 @@ module Google
|
|
235
259
|
|
236
260
|
@conversion_sources_service_stub.create_conversion_source request, options do |result, operation|
|
237
261
|
yield result, operation if block_given?
|
238
|
-
return result
|
239
262
|
end
|
240
263
|
rescue ::Gapic::Rest::Error => e
|
241
264
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -299,12 +322,13 @@ module Google
|
|
299
322
|
# Customize the options with defaults
|
300
323
|
call_metadata = @config.rpcs.update_conversion_source.metadata.to_h
|
301
324
|
|
302
|
-
# Set x-goog-api-client
|
325
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
303
326
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
304
327
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
305
328
|
gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION,
|
306
329
|
transports_version_send: [:rest]
|
307
330
|
|
331
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
308
332
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
309
333
|
|
310
334
|
options.apply_defaults timeout: @config.rpcs.update_conversion_source.timeout,
|
@@ -317,7 +341,6 @@ module Google
|
|
317
341
|
|
318
342
|
@conversion_sources_service_stub.update_conversion_source request, options do |result, operation|
|
319
343
|
yield result, operation if block_given?
|
320
|
-
return result
|
321
344
|
end
|
322
345
|
rescue ::Gapic::Rest::Error => e
|
323
346
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -381,12 +404,13 @@ module Google
|
|
381
404
|
# Customize the options with defaults
|
382
405
|
call_metadata = @config.rpcs.delete_conversion_source.metadata.to_h
|
383
406
|
|
384
|
-
# Set x-goog-api-client
|
407
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
385
408
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
386
409
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
387
410
|
gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION,
|
388
411
|
transports_version_send: [:rest]
|
389
412
|
|
413
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
390
414
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
391
415
|
|
392
416
|
options.apply_defaults timeout: @config.rpcs.delete_conversion_source.timeout,
|
@@ -399,7 +423,6 @@ module Google
|
|
399
423
|
|
400
424
|
@conversion_sources_service_stub.delete_conversion_source request, options do |result, operation|
|
401
425
|
yield result, operation if block_given?
|
402
|
-
return result
|
403
426
|
end
|
404
427
|
rescue ::Gapic::Rest::Error => e
|
405
428
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -461,12 +484,13 @@ module Google
|
|
461
484
|
# Customize the options with defaults
|
462
485
|
call_metadata = @config.rpcs.undelete_conversion_source.metadata.to_h
|
463
486
|
|
464
|
-
# Set x-goog-api-client
|
487
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
465
488
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
466
489
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
467
490
|
gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION,
|
468
491
|
transports_version_send: [:rest]
|
469
492
|
|
493
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
470
494
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
471
495
|
|
472
496
|
options.apply_defaults timeout: @config.rpcs.undelete_conversion_source.timeout,
|
@@ -479,7 +503,6 @@ module Google
|
|
479
503
|
|
480
504
|
@conversion_sources_service_stub.undelete_conversion_source request, options do |result, operation|
|
481
505
|
yield result, operation if block_given?
|
482
|
-
return result
|
483
506
|
end
|
484
507
|
rescue ::Gapic::Rest::Error => e
|
485
508
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -540,12 +563,13 @@ module Google
|
|
540
563
|
# Customize the options with defaults
|
541
564
|
call_metadata = @config.rpcs.get_conversion_source.metadata.to_h
|
542
565
|
|
543
|
-
# Set x-goog-api-client
|
566
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
544
567
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
545
568
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
546
569
|
gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION,
|
547
570
|
transports_version_send: [:rest]
|
548
571
|
|
572
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
549
573
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
550
574
|
|
551
575
|
options.apply_defaults timeout: @config.rpcs.get_conversion_source.timeout,
|
@@ -558,7 +582,6 @@ module Google
|
|
558
582
|
|
559
583
|
@conversion_sources_service_stub.get_conversion_source request, options do |result, operation|
|
560
584
|
yield result, operation if block_given?
|
561
|
-
return result
|
562
585
|
end
|
563
586
|
rescue ::Gapic::Rest::Error => e
|
564
587
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -633,12 +656,13 @@ module Google
|
|
633
656
|
# Customize the options with defaults
|
634
657
|
call_metadata = @config.rpcs.list_conversion_sources.metadata.to_h
|
635
658
|
|
636
|
-
# Set x-goog-api-client
|
659
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
637
660
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
638
661
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
639
662
|
gapic_version: ::Google::Shopping::Merchant::Conversions::V1beta::VERSION,
|
640
663
|
transports_version_send: [:rest]
|
641
664
|
|
665
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
642
666
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
643
667
|
|
644
668
|
options.apply_defaults timeout: @config.rpcs.list_conversion_sources.timeout,
|
@@ -652,7 +676,7 @@ module Google
|
|
652
676
|
@conversion_sources_service_stub.list_conversion_sources request, options do |result, operation|
|
653
677
|
result = ::Gapic::Rest::PagedEnumerable.new @conversion_sources_service_stub, :list_conversion_sources, "conversion_sources", request, result, options
|
654
678
|
yield result, operation if block_given?
|
655
|
-
|
679
|
+
throw :response, result
|
656
680
|
end
|
657
681
|
rescue ::Gapic::Rest::Error => e
|
658
682
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -732,6 +756,11 @@ module Google
|
|
732
756
|
# default endpoint URL. The default value of nil uses the environment
|
733
757
|
# universe (usually the default "googleapis.com" universe).
|
734
758
|
# @return [::String,nil]
|
759
|
+
# @!attribute [rw] logger
|
760
|
+
# A custom logger to use for request/response debug logging, or the value
|
761
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
762
|
+
# explicitly disable logging.
|
763
|
+
# @return [::Logger,:default,nil]
|
735
764
|
#
|
736
765
|
class Configuration
|
737
766
|
extend ::Gapic::Config
|
@@ -753,6 +782,7 @@ module Google
|
|
753
782
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
754
783
|
config_attr :quota_project, nil, ::String, nil
|
755
784
|
config_attr :universe_domain, nil, ::String, nil
|
785
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
756
786
|
|
757
787
|
# @private
|
758
788
|
def initialize parent_config = nil
|
data/lib/google/shopping/merchant/conversions/v1beta/conversion_sources_service/rest/service_stub.rb
CHANGED
@@ -31,7 +31,8 @@ module Google
|
|
31
31
|
# including transcoding, making the REST call, and deserialing the response.
|
32
32
|
#
|
33
33
|
class ServiceStub
|
34
|
-
|
34
|
+
# @private
|
35
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
35
36
|
# These require statements are intentionally placed here to initialize
|
36
37
|
# the REST modules only when it's required.
|
37
38
|
require "gapic/rest"
|
@@ -41,7 +42,9 @@ module Google
|
|
41
42
|
universe_domain: universe_domain,
|
42
43
|
credentials: credentials,
|
43
44
|
numeric_enums: true,
|
44
|
-
|
45
|
+
service_name: self.class,
|
46
|
+
raise_faraday_errors: false,
|
47
|
+
logger: logger
|
45
48
|
end
|
46
49
|
|
47
50
|
##
|
@@ -62,6 +65,15 @@ module Google
|
|
62
65
|
@client_stub.endpoint
|
63
66
|
end
|
64
67
|
|
68
|
+
##
|
69
|
+
# The logger used for request/response debug logging.
|
70
|
+
#
|
71
|
+
# @return [Logger]
|
72
|
+
#
|
73
|
+
def logger stub: false
|
74
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
75
|
+
end
|
76
|
+
|
65
77
|
##
|
66
78
|
# Baseline implementation for the create_conversion_source REST call
|
67
79
|
#
|
@@ -88,16 +100,18 @@ module Google
|
|
88
100
|
|
89
101
|
response = @client_stub.make_http_request(
|
90
102
|
verb,
|
91
|
-
uri:
|
92
|
-
body:
|
93
|
-
params:
|
103
|
+
uri: uri,
|
104
|
+
body: body || "",
|
105
|
+
params: query_string_params,
|
106
|
+
method_name: "create_conversion_source",
|
94
107
|
options: options
|
95
108
|
)
|
96
109
|
operation = ::Gapic::Rest::TransportOperation.new response
|
97
110
|
result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.decode_json response.body, ignore_unknown_fields: true
|
98
|
-
|
99
|
-
|
100
|
-
|
111
|
+
catch :response do
|
112
|
+
yield result, operation if block_given?
|
113
|
+
result
|
114
|
+
end
|
101
115
|
end
|
102
116
|
|
103
117
|
##
|
@@ -126,16 +140,18 @@ module Google
|
|
126
140
|
|
127
141
|
response = @client_stub.make_http_request(
|
128
142
|
verb,
|
129
|
-
uri:
|
130
|
-
body:
|
131
|
-
params:
|
143
|
+
uri: uri,
|
144
|
+
body: body || "",
|
145
|
+
params: query_string_params,
|
146
|
+
method_name: "update_conversion_source",
|
132
147
|
options: options
|
133
148
|
)
|
134
149
|
operation = ::Gapic::Rest::TransportOperation.new response
|
135
150
|
result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.decode_json response.body, ignore_unknown_fields: true
|
136
|
-
|
137
|
-
|
138
|
-
|
151
|
+
catch :response do
|
152
|
+
yield result, operation if block_given?
|
153
|
+
result
|
154
|
+
end
|
139
155
|
end
|
140
156
|
|
141
157
|
##
|
@@ -164,16 +180,18 @@ module Google
|
|
164
180
|
|
165
181
|
response = @client_stub.make_http_request(
|
166
182
|
verb,
|
167
|
-
uri:
|
168
|
-
body:
|
169
|
-
params:
|
183
|
+
uri: uri,
|
184
|
+
body: body || "",
|
185
|
+
params: query_string_params,
|
186
|
+
method_name: "delete_conversion_source",
|
170
187
|
options: options
|
171
188
|
)
|
172
189
|
operation = ::Gapic::Rest::TransportOperation.new response
|
173
190
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
174
|
-
|
175
|
-
|
176
|
-
|
191
|
+
catch :response do
|
192
|
+
yield result, operation if block_given?
|
193
|
+
result
|
194
|
+
end
|
177
195
|
end
|
178
196
|
|
179
197
|
##
|
@@ -202,16 +220,18 @@ module Google
|
|
202
220
|
|
203
221
|
response = @client_stub.make_http_request(
|
204
222
|
verb,
|
205
|
-
uri:
|
206
|
-
body:
|
207
|
-
params:
|
223
|
+
uri: uri,
|
224
|
+
body: body || "",
|
225
|
+
params: query_string_params,
|
226
|
+
method_name: "undelete_conversion_source",
|
208
227
|
options: options
|
209
228
|
)
|
210
229
|
operation = ::Gapic::Rest::TransportOperation.new response
|
211
230
|
result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.decode_json response.body, ignore_unknown_fields: true
|
212
|
-
|
213
|
-
|
214
|
-
|
231
|
+
catch :response do
|
232
|
+
yield result, operation if block_given?
|
233
|
+
result
|
234
|
+
end
|
215
235
|
end
|
216
236
|
|
217
237
|
##
|
@@ -240,16 +260,18 @@ module Google
|
|
240
260
|
|
241
261
|
response = @client_stub.make_http_request(
|
242
262
|
verb,
|
243
|
-
uri:
|
244
|
-
body:
|
245
|
-
params:
|
263
|
+
uri: uri,
|
264
|
+
body: body || "",
|
265
|
+
params: query_string_params,
|
266
|
+
method_name: "get_conversion_source",
|
246
267
|
options: options
|
247
268
|
)
|
248
269
|
operation = ::Gapic::Rest::TransportOperation.new response
|
249
270
|
result = ::Google::Shopping::Merchant::Conversions::V1beta::ConversionSource.decode_json response.body, ignore_unknown_fields: true
|
250
|
-
|
251
|
-
|
252
|
-
|
271
|
+
catch :response do
|
272
|
+
yield result, operation if block_given?
|
273
|
+
result
|
274
|
+
end
|
253
275
|
end
|
254
276
|
|
255
277
|
##
|
@@ -278,16 +300,18 @@ module Google
|
|
278
300
|
|
279
301
|
response = @client_stub.make_http_request(
|
280
302
|
verb,
|
281
|
-
uri:
|
282
|
-
body:
|
283
|
-
params:
|
303
|
+
uri: uri,
|
304
|
+
body: body || "",
|
305
|
+
params: query_string_params,
|
306
|
+
method_name: "list_conversion_sources",
|
284
307
|
options: options
|
285
308
|
)
|
286
309
|
operation = ::Gapic::Rest::TransportOperation.new response
|
287
310
|
result = ::Google::Shopping::Merchant::Conversions::V1beta::ListConversionSourcesResponse.decode_json response.body, ignore_unknown_fields: true
|
288
|
-
|
289
|
-
|
290
|
-
|
311
|
+
catch :response do
|
312
|
+
yield result, operation if block_given?
|
313
|
+
result
|
314
|
+
end
|
291
315
|
end
|
292
316
|
|
293
317
|
##
|
@@ -28,6 +28,9 @@ module Google
|
|
28
28
|
# @!attribute [rw] destinations
|
29
29
|
# @return [::Array<::Google::Api::ClientLibraryDestination>]
|
30
30
|
# The destination where API teams want this client library to be published.
|
31
|
+
# @!attribute [rw] selective_gapic_generation
|
32
|
+
# @return [::Google::Api::SelectiveGapicGeneration]
|
33
|
+
# Configuration for which RPCs should be generated in the GAPIC client.
|
31
34
|
class CommonLanguageSettings
|
32
35
|
include ::Google::Protobuf::MessageExts
|
33
36
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -196,9 +199,32 @@ module Google
|
|
196
199
|
# @!attribute [rw] common
|
197
200
|
# @return [::Google::Api::CommonLanguageSettings]
|
198
201
|
# Some settings.
|
202
|
+
# @!attribute [rw] experimental_features
|
203
|
+
# @return [::Google::Api::PythonSettings::ExperimentalFeatures]
|
204
|
+
# Experimental features to be included during client library generation.
|
199
205
|
class PythonSettings
|
200
206
|
include ::Google::Protobuf::MessageExts
|
201
207
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
208
|
+
|
209
|
+
# Experimental features to be included during client library generation.
|
210
|
+
# These fields will be deprecated once the feature graduates and is enabled
|
211
|
+
# by default.
|
212
|
+
# @!attribute [rw] rest_async_io_enabled
|
213
|
+
# @return [::Boolean]
|
214
|
+
# Enables generation of asynchronous REST clients if `rest` transport is
|
215
|
+
# enabled. By default, asynchronous REST clients will not be generated.
|
216
|
+
# This feature will be enabled by default 1 month after launching the
|
217
|
+
# feature in preview packages.
|
218
|
+
# @!attribute [rw] protobuf_pythonic_types_enabled
|
219
|
+
# @return [::Boolean]
|
220
|
+
# Enables generation of protobuf code using new types that are more
|
221
|
+
# Pythonic which are included in `protobuf>=5.29.x`. This feature will be
|
222
|
+
# enabled by default 1 month after launching the feature in preview
|
223
|
+
# packages.
|
224
|
+
class ExperimentalFeatures
|
225
|
+
include ::Google::Protobuf::MessageExts
|
226
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
227
|
+
end
|
202
228
|
end
|
203
229
|
|
204
230
|
# Settings for Node client libraries.
|
@@ -280,9 +306,28 @@ module Google
|
|
280
306
|
# @!attribute [rw] common
|
281
307
|
# @return [::Google::Api::CommonLanguageSettings]
|
282
308
|
# Some settings.
|
309
|
+
# @!attribute [rw] renamed_services
|
310
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
311
|
+
# Map of service names to renamed services. Keys are the package relative
|
312
|
+
# service names and values are the name to be used for the service client
|
313
|
+
# and call options.
|
314
|
+
#
|
315
|
+
# publishing:
|
316
|
+
# go_settings:
|
317
|
+
# renamed_services:
|
318
|
+
# Publisher: TopicAdmin
|
283
319
|
class GoSettings
|
284
320
|
include ::Google::Protobuf::MessageExts
|
285
321
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
322
|
+
|
323
|
+
# @!attribute [rw] key
|
324
|
+
# @return [::String]
|
325
|
+
# @!attribute [rw] value
|
326
|
+
# @return [::String]
|
327
|
+
class RenamedServicesEntry
|
328
|
+
include ::Google::Protobuf::MessageExts
|
329
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
330
|
+
end
|
286
331
|
end
|
287
332
|
|
288
333
|
# Describes the generator configuration for a method.
|
@@ -290,6 +335,13 @@ module Google
|
|
290
335
|
# @return [::String]
|
291
336
|
# The fully qualified name of the method, for which the options below apply.
|
292
337
|
# This is used to find the method to apply the options.
|
338
|
+
#
|
339
|
+
# Example:
|
340
|
+
#
|
341
|
+
# publishing:
|
342
|
+
# method_settings:
|
343
|
+
# - selector: google.storage.control.v2.StorageControl.CreateFolder
|
344
|
+
# # method settings for CreateFolder...
|
293
345
|
# @!attribute [rw] long_running
|
294
346
|
# @return [::Google::Api::MethodSettings::LongRunning]
|
295
347
|
# Describes settings to use for long-running operations when generating
|
@@ -298,17 +350,14 @@ module Google
|
|
298
350
|
#
|
299
351
|
# Example of a YAML configuration::
|
300
352
|
#
|
301
|
-
#
|
302
|
-
#
|
353
|
+
# publishing:
|
354
|
+
# method_settings:
|
303
355
|
# - selector: google.cloud.speech.v2.Speech.BatchRecognize
|
304
356
|
# long_running:
|
305
|
-
# initial_poll_delay:
|
306
|
-
# seconds: 60 # 1 minute
|
357
|
+
# initial_poll_delay: 60s # 1 minute
|
307
358
|
# poll_delay_multiplier: 1.5
|
308
|
-
# max_poll_delay:
|
309
|
-
#
|
310
|
-
# total_poll_timeout:
|
311
|
-
# seconds: 54000 # 90 minutes
|
359
|
+
# max_poll_delay: 360s # 6 minutes
|
360
|
+
# total_poll_timeout: 54000s # 90 minutes
|
312
361
|
# @!attribute [rw] auto_populated_fields
|
313
362
|
# @return [::Array<::String>]
|
314
363
|
# List of top-level fields of the request message, that should be
|
@@ -317,8 +366,8 @@ module Google
|
|
317
366
|
#
|
318
367
|
# Example of a YAML configuration:
|
319
368
|
#
|
320
|
-
#
|
321
|
-
#
|
369
|
+
# publishing:
|
370
|
+
# method_settings:
|
322
371
|
# - selector: google.example.v1.ExampleService.CreateExample
|
323
372
|
# auto_populated_fields:
|
324
373
|
# - request_id
|
@@ -354,6 +403,17 @@ module Google
|
|
354
403
|
end
|
355
404
|
end
|
356
405
|
|
406
|
+
# This message is used to configure the generation of a subset of the RPCs in
|
407
|
+
# a service for client libraries.
|
408
|
+
# @!attribute [rw] methods
|
409
|
+
# @return [::Array<::String>]
|
410
|
+
# An allowlist of the fully qualified names of RPCs that should be included
|
411
|
+
# on public client surfaces.
|
412
|
+
class SelectiveGapicGeneration
|
413
|
+
include ::Google::Protobuf::MessageExts
|
414
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
415
|
+
end
|
416
|
+
|
357
417
|
# The organization for which the client libraries are being published.
|
358
418
|
# Affects the url where generated docs are published, etc.
|
359
419
|
module ClientLibraryOrganization
|
@@ -124,8 +124,13 @@ module Google
|
|
124
124
|
# @return [::String]
|
125
125
|
# The plural name used in the resource name and permission names, such as
|
126
126
|
# 'projects' for the resource name of 'projects/\\{project}' and the permission
|
127
|
-
# name of 'cloudresourcemanager.googleapis.com/projects.get'.
|
128
|
-
#
|
127
|
+
# name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception
|
128
|
+
# to this is for Nested Collections that have stuttering names, as defined
|
129
|
+
# in [AIP-122](https://google.aip.dev/122#nested-collections), where the
|
130
|
+
# collection ID in the resource name pattern does not necessarily directly
|
131
|
+
# match the `plural` value.
|
132
|
+
#
|
133
|
+
# It is the same concept of the `plural` field in k8s CRD spec
|
129
134
|
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
130
135
|
#
|
131
136
|
# Note: The plural form is required even for singleton resources. See
|
@@ -164,7 +164,7 @@ module Google
|
|
164
164
|
end
|
165
165
|
|
166
166
|
# "Merchant Center Destination" sources can be used to send conversion events
|
167
|
-
# from
|
167
|
+
# from an online store using a Google tag directly to a Merchant Center account
|
168
168
|
# where the source is created.
|
169
169
|
# @!attribute [r] destination
|
170
170
|
# @return [::String]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-shopping-merchant-conversions-v1beta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.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: 2024-
|
11
|
+
date: 2024-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.24.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.24.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
|
-
rubygems_version: 3.5.
|
102
|
+
rubygems_version: 3.5.23
|
103
103
|
signing_key:
|
104
104
|
specification_version: 4
|
105
105
|
summary: Programmatically manage your Merchant Center accounts.
|