google-shopping-merchant-lfp-v1beta 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb +27 -2
- data/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb +27 -2
- data/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb +22 -8
- data/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb +27 -2
- data/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb +27 -2
- data/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb +22 -8
- data/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb +28 -5
- data/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb +28 -5
- data/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb +46 -26
- data/lib/google/shopping/merchant/lfp/v1beta/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- 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: 999045112bf29ea88311c8e8c153f60dd2641e8408f4b46bffecff10e7a6ef22
|
4
|
+
data.tar.gz: 5adb8e2074dae59416e9604ef1377ebfa5697190e98f9ed0829f924405a179a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f0d801f7d3929b0d003301fcc08bfe37c32921d214883d17f226b4f7d6e6e2fc57add01b243f07b95e0975ef06f0e1c5d91a5caed7312b7e30e9871c444a3da
|
7
|
+
data.tar.gz: 6b573e847f3dd5d3e665f01f295ece9ec1a2bbb8ffd73aea246ae7d4e1075a577bcfb4a6534d301d766916183c92351dbdd53cb2ff76caabc028775f8570e484
|
data/README.md
CHANGED
@@ -42,33 +42,43 @@ for class and method documentation.
|
|
42
42
|
See also the [Product Documentation](https://developers.google.com/merchant/api)
|
43
43
|
for general usage information.
|
44
44
|
|
45
|
-
##
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
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:
|
54
72
|
|
55
73
|
```ruby
|
74
|
+
require "google/shopping/merchant/lfp/v1beta"
|
56
75
|
require "logger"
|
57
76
|
|
58
|
-
|
59
|
-
|
60
|
-
def logger
|
61
|
-
LOGGER
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
66
|
-
module GRPC
|
67
|
-
extend MyLogger
|
77
|
+
client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config|
|
78
|
+
config.logger = Logger.new "my-app.log"
|
68
79
|
end
|
69
80
|
```
|
70
81
|
|
71
|
-
|
72
82
|
## Google Cloud Samples
|
73
83
|
|
74
84
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
@@ -165,8 +165,28 @@ module Google
|
|
165
165
|
universe_domain: @config.universe_domain,
|
166
166
|
channel_args: @config.channel_args,
|
167
167
|
interceptors: @config.interceptors,
|
168
|
-
channel_pool_config: @config.channel_pool
|
168
|
+
channel_pool_config: @config.channel_pool,
|
169
|
+
logger: @config.logger
|
169
170
|
)
|
171
|
+
|
172
|
+
@lfp_inventory_service_stub.stub_logger&.info do |entry|
|
173
|
+
entry.set_system_name
|
174
|
+
entry.set_service
|
175
|
+
entry.message = "Created client for #{entry.service}"
|
176
|
+
entry.set_credentials_fields credentials
|
177
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
178
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
179
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
##
|
184
|
+
# The logger used for request/response debug logging.
|
185
|
+
#
|
186
|
+
# @return [Logger]
|
187
|
+
#
|
188
|
+
def logger
|
189
|
+
@lfp_inventory_service_stub.logger
|
170
190
|
end
|
171
191
|
|
172
192
|
# Service calls
|
@@ -256,7 +276,6 @@ module Google
|
|
256
276
|
|
257
277
|
@lfp_inventory_service_stub.call_rpc :insert_lfp_inventory, request, options: options do |response, operation|
|
258
278
|
yield response, operation if block_given?
|
259
|
-
return response
|
260
279
|
end
|
261
280
|
rescue ::GRPC::BadStatus => e
|
262
281
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -345,6 +364,11 @@ module Google
|
|
345
364
|
# default endpoint URL. The default value of nil uses the environment
|
346
365
|
# universe (usually the default "googleapis.com" universe).
|
347
366
|
# @return [::String,nil]
|
367
|
+
# @!attribute [rw] logger
|
368
|
+
# A custom logger to use for request/response debug logging, or the value
|
369
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
370
|
+
# explicitly disable logging.
|
371
|
+
# @return [::Logger,:default,nil]
|
348
372
|
#
|
349
373
|
class Configuration
|
350
374
|
extend ::Gapic::Config
|
@@ -369,6 +393,7 @@ module Google
|
|
369
393
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
370
394
|
config_attr :quota_project, nil, ::String, nil
|
371
395
|
config_attr :universe_domain, nil, ::String, nil
|
396
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
372
397
|
|
373
398
|
# @private
|
374
399
|
def initialize parent_config = nil
|
@@ -158,8 +158,28 @@ module Google
|
|
158
158
|
endpoint: @config.endpoint,
|
159
159
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
160
160
|
universe_domain: @config.universe_domain,
|
161
|
-
credentials: credentials
|
161
|
+
credentials: credentials,
|
162
|
+
logger: @config.logger
|
162
163
|
)
|
164
|
+
|
165
|
+
@lfp_inventory_service_stub.logger(stub: true)&.info do |entry|
|
166
|
+
entry.set_system_name
|
167
|
+
entry.set_service
|
168
|
+
entry.message = "Created client for #{entry.service}"
|
169
|
+
entry.set_credentials_fields credentials
|
170
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
171
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
172
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
##
|
177
|
+
# The logger used for request/response debug logging.
|
178
|
+
#
|
179
|
+
# @return [Logger]
|
180
|
+
#
|
181
|
+
def logger
|
182
|
+
@lfp_inventory_service_stub.logger
|
163
183
|
end
|
164
184
|
|
165
185
|
# Service calls
|
@@ -242,7 +262,6 @@ module Google
|
|
242
262
|
|
243
263
|
@lfp_inventory_service_stub.insert_lfp_inventory request, options do |result, operation|
|
244
264
|
yield result, operation if block_given?
|
245
|
-
return result
|
246
265
|
end
|
247
266
|
rescue ::Gapic::Rest::Error => e
|
248
267
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -322,6 +341,11 @@ module Google
|
|
322
341
|
# default endpoint URL. The default value of nil uses the environment
|
323
342
|
# universe (usually the default "googleapis.com" universe).
|
324
343
|
# @return [::String,nil]
|
344
|
+
# @!attribute [rw] logger
|
345
|
+
# A custom logger to use for request/response debug logging, or the value
|
346
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
347
|
+
# explicitly disable logging.
|
348
|
+
# @return [::Logger,:default,nil]
|
325
349
|
#
|
326
350
|
class Configuration
|
327
351
|
extend ::Gapic::Config
|
@@ -343,6 +367,7 @@ module Google
|
|
343
367
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
344
368
|
config_attr :quota_project, nil, ::String, nil
|
345
369
|
config_attr :universe_domain, nil, ::String, nil
|
370
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
346
371
|
|
347
372
|
# @private
|
348
373
|
def initialize parent_config = nil
|
@@ -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 insert_lfp_inventory 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: "insert_lfp_inventory",
|
94
107
|
options: options
|
95
108
|
)
|
96
109
|
operation = ::Gapic::Rest::TransportOperation.new response
|
97
110
|
result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventory.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
|
##
|
@@ -165,8 +165,28 @@ module Google
|
|
165
165
|
universe_domain: @config.universe_domain,
|
166
166
|
channel_args: @config.channel_args,
|
167
167
|
interceptors: @config.interceptors,
|
168
|
-
channel_pool_config: @config.channel_pool
|
168
|
+
channel_pool_config: @config.channel_pool,
|
169
|
+
logger: @config.logger
|
169
170
|
)
|
171
|
+
|
172
|
+
@lfp_sale_service_stub.stub_logger&.info do |entry|
|
173
|
+
entry.set_system_name
|
174
|
+
entry.set_service
|
175
|
+
entry.message = "Created client for #{entry.service}"
|
176
|
+
entry.set_credentials_fields credentials
|
177
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
178
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
179
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
##
|
184
|
+
# The logger used for request/response debug logging.
|
185
|
+
#
|
186
|
+
# @return [Logger]
|
187
|
+
#
|
188
|
+
def logger
|
189
|
+
@lfp_sale_service_stub.logger
|
170
190
|
end
|
171
191
|
|
172
192
|
# Service calls
|
@@ -254,7 +274,6 @@ module Google
|
|
254
274
|
|
255
275
|
@lfp_sale_service_stub.call_rpc :insert_lfp_sale, request, options: options do |response, operation|
|
256
276
|
yield response, operation if block_given?
|
257
|
-
return response
|
258
277
|
end
|
259
278
|
rescue ::GRPC::BadStatus => e
|
260
279
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -343,6 +362,11 @@ module Google
|
|
343
362
|
# default endpoint URL. The default value of nil uses the environment
|
344
363
|
# universe (usually the default "googleapis.com" universe).
|
345
364
|
# @return [::String,nil]
|
365
|
+
# @!attribute [rw] logger
|
366
|
+
# A custom logger to use for request/response debug logging, or the value
|
367
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
368
|
+
# explicitly disable logging.
|
369
|
+
# @return [::Logger,:default,nil]
|
346
370
|
#
|
347
371
|
class Configuration
|
348
372
|
extend ::Gapic::Config
|
@@ -367,6 +391,7 @@ module Google
|
|
367
391
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
368
392
|
config_attr :quota_project, nil, ::String, nil
|
369
393
|
config_attr :universe_domain, nil, ::String, nil
|
394
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
370
395
|
|
371
396
|
# @private
|
372
397
|
def initialize parent_config = nil
|
@@ -158,8 +158,28 @@ module Google
|
|
158
158
|
endpoint: @config.endpoint,
|
159
159
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
160
160
|
universe_domain: @config.universe_domain,
|
161
|
-
credentials: credentials
|
161
|
+
credentials: credentials,
|
162
|
+
logger: @config.logger
|
162
163
|
)
|
164
|
+
|
165
|
+
@lfp_sale_service_stub.logger(stub: true)&.info do |entry|
|
166
|
+
entry.set_system_name
|
167
|
+
entry.set_service
|
168
|
+
entry.message = "Created client for #{entry.service}"
|
169
|
+
entry.set_credentials_fields credentials
|
170
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
171
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
172
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
##
|
177
|
+
# The logger used for request/response debug logging.
|
178
|
+
#
|
179
|
+
# @return [Logger]
|
180
|
+
#
|
181
|
+
def logger
|
182
|
+
@lfp_sale_service_stub.logger
|
163
183
|
end
|
164
184
|
|
165
185
|
# Service calls
|
@@ -240,7 +260,6 @@ module Google
|
|
240
260
|
|
241
261
|
@lfp_sale_service_stub.insert_lfp_sale request, options do |result, operation|
|
242
262
|
yield result, operation if block_given?
|
243
|
-
return result
|
244
263
|
end
|
245
264
|
rescue ::Gapic::Rest::Error => e
|
246
265
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -320,6 +339,11 @@ module Google
|
|
320
339
|
# default endpoint URL. The default value of nil uses the environment
|
321
340
|
# universe (usually the default "googleapis.com" universe).
|
322
341
|
# @return [::String,nil]
|
342
|
+
# @!attribute [rw] logger
|
343
|
+
# A custom logger to use for request/response debug logging, or the value
|
344
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
345
|
+
# explicitly disable logging.
|
346
|
+
# @return [::Logger,:default,nil]
|
323
347
|
#
|
324
348
|
class Configuration
|
325
349
|
extend ::Gapic::Config
|
@@ -341,6 +365,7 @@ module Google
|
|
341
365
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
342
366
|
config_attr :quota_project, nil, ::String, nil
|
343
367
|
config_attr :universe_domain, nil, ::String, nil
|
368
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
344
369
|
|
345
370
|
# @private
|
346
371
|
def initialize parent_config = nil
|
@@ -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 insert_lfp_sale 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: "insert_lfp_sale",
|
94
107
|
options: options
|
95
108
|
)
|
96
109
|
operation = ::Gapic::Rest::TransportOperation.new response
|
97
110
|
result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSale.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
|
##
|
@@ -165,8 +165,28 @@ module Google
|
|
165
165
|
universe_domain: @config.universe_domain,
|
166
166
|
channel_args: @config.channel_args,
|
167
167
|
interceptors: @config.interceptors,
|
168
|
-
channel_pool_config: @config.channel_pool
|
168
|
+
channel_pool_config: @config.channel_pool,
|
169
|
+
logger: @config.logger
|
169
170
|
)
|
171
|
+
|
172
|
+
@lfp_store_service_stub.stub_logger&.info do |entry|
|
173
|
+
entry.set_system_name
|
174
|
+
entry.set_service
|
175
|
+
entry.message = "Created client for #{entry.service}"
|
176
|
+
entry.set_credentials_fields credentials
|
177
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
178
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
179
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
##
|
184
|
+
# The logger used for request/response debug logging.
|
185
|
+
#
|
186
|
+
# @return [Logger]
|
187
|
+
#
|
188
|
+
def logger
|
189
|
+
@lfp_store_service_stub.logger
|
170
190
|
end
|
171
191
|
|
172
192
|
# Service calls
|
@@ -252,7 +272,6 @@ module Google
|
|
252
272
|
|
253
273
|
@lfp_store_service_stub.call_rpc :get_lfp_store, request, options: options do |response, operation|
|
254
274
|
yield response, operation if block_given?
|
255
|
-
return response
|
256
275
|
end
|
257
276
|
rescue ::GRPC::BadStatus => e
|
258
277
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -342,7 +361,6 @@ module Google
|
|
342
361
|
|
343
362
|
@lfp_store_service_stub.call_rpc :insert_lfp_store, request, options: options do |response, operation|
|
344
363
|
yield response, operation if block_given?
|
345
|
-
return response
|
346
364
|
end
|
347
365
|
rescue ::GRPC::BadStatus => e
|
348
366
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -429,7 +447,6 @@ module Google
|
|
429
447
|
|
430
448
|
@lfp_store_service_stub.call_rpc :delete_lfp_store, request, options: options do |response, operation|
|
431
449
|
yield response, operation if block_given?
|
432
|
-
return response
|
433
450
|
end
|
434
451
|
rescue ::GRPC::BadStatus => e
|
435
452
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -537,7 +554,7 @@ module Google
|
|
537
554
|
@lfp_store_service_stub.call_rpc :list_lfp_stores, request, options: options do |response, operation|
|
538
555
|
response = ::Gapic::PagedEnumerable.new @lfp_store_service_stub, :list_lfp_stores, request, response, operation, options
|
539
556
|
yield response, operation if block_given?
|
540
|
-
|
557
|
+
throw :response, response
|
541
558
|
end
|
542
559
|
rescue ::GRPC::BadStatus => e
|
543
560
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -626,6 +643,11 @@ module Google
|
|
626
643
|
# default endpoint URL. The default value of nil uses the environment
|
627
644
|
# universe (usually the default "googleapis.com" universe).
|
628
645
|
# @return [::String,nil]
|
646
|
+
# @!attribute [rw] logger
|
647
|
+
# A custom logger to use for request/response debug logging, or the value
|
648
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
649
|
+
# explicitly disable logging.
|
650
|
+
# @return [::Logger,:default,nil]
|
629
651
|
#
|
630
652
|
class Configuration
|
631
653
|
extend ::Gapic::Config
|
@@ -650,6 +672,7 @@ module Google
|
|
650
672
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
651
673
|
config_attr :quota_project, nil, ::String, nil
|
652
674
|
config_attr :universe_domain, nil, ::String, nil
|
675
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
653
676
|
|
654
677
|
# @private
|
655
678
|
def initialize parent_config = nil
|
@@ -158,8 +158,28 @@ module Google
|
|
158
158
|
endpoint: @config.endpoint,
|
159
159
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
160
160
|
universe_domain: @config.universe_domain,
|
161
|
-
credentials: credentials
|
161
|
+
credentials: credentials,
|
162
|
+
logger: @config.logger
|
162
163
|
)
|
164
|
+
|
165
|
+
@lfp_store_service_stub.logger(stub: true)&.info do |entry|
|
166
|
+
entry.set_system_name
|
167
|
+
entry.set_service
|
168
|
+
entry.message = "Created client for #{entry.service}"
|
169
|
+
entry.set_credentials_fields credentials
|
170
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
171
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
172
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
##
|
177
|
+
# The logger used for request/response debug logging.
|
178
|
+
#
|
179
|
+
# @return [Logger]
|
180
|
+
#
|
181
|
+
def logger
|
182
|
+
@lfp_store_service_stub.logger
|
163
183
|
end
|
164
184
|
|
165
185
|
# Service calls
|
@@ -238,7 +258,6 @@ module Google
|
|
238
258
|
|
239
259
|
@lfp_store_service_stub.get_lfp_store request, options do |result, operation|
|
240
260
|
yield result, operation if block_given?
|
241
|
-
return result
|
242
261
|
end
|
243
262
|
rescue ::Gapic::Rest::Error => e
|
244
263
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -321,7 +340,6 @@ module Google
|
|
321
340
|
|
322
341
|
@lfp_store_service_stub.insert_lfp_store request, options do |result, operation|
|
323
342
|
yield result, operation if block_given?
|
324
|
-
return result
|
325
343
|
end
|
326
344
|
rescue ::Gapic::Rest::Error => e
|
327
345
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -401,7 +419,6 @@ module Google
|
|
401
419
|
|
402
420
|
@lfp_store_service_stub.delete_lfp_store request, options do |result, operation|
|
403
421
|
yield result, operation if block_given?
|
404
|
-
return result
|
405
422
|
end
|
406
423
|
rescue ::Gapic::Rest::Error => e
|
407
424
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -502,7 +519,7 @@ module Google
|
|
502
519
|
@lfp_store_service_stub.list_lfp_stores request, options do |result, operation|
|
503
520
|
result = ::Gapic::Rest::PagedEnumerable.new @lfp_store_service_stub, :list_lfp_stores, "lfp_stores", request, result, options
|
504
521
|
yield result, operation if block_given?
|
505
|
-
|
522
|
+
throw :response, result
|
506
523
|
end
|
507
524
|
rescue ::Gapic::Rest::Error => e
|
508
525
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -582,6 +599,11 @@ module Google
|
|
582
599
|
# default endpoint URL. The default value of nil uses the environment
|
583
600
|
# universe (usually the default "googleapis.com" universe).
|
584
601
|
# @return [::String,nil]
|
602
|
+
# @!attribute [rw] logger
|
603
|
+
# A custom logger to use for request/response debug logging, or the value
|
604
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
605
|
+
# explicitly disable logging.
|
606
|
+
# @return [::Logger,:default,nil]
|
585
607
|
#
|
586
608
|
class Configuration
|
587
609
|
extend ::Gapic::Config
|
@@ -603,6 +625,7 @@ module Google
|
|
603
625
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
604
626
|
config_attr :quota_project, nil, ::String, nil
|
605
627
|
config_attr :universe_domain, nil, ::String, nil
|
628
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
606
629
|
|
607
630
|
# @private
|
608
631
|
def initialize parent_config = nil
|
@@ -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 get_lfp_store 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: "get_lfp_store",
|
94
107
|
options: options
|
95
108
|
)
|
96
109
|
operation = ::Gapic::Rest::TransportOperation.new response
|
97
110
|
result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.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: "insert_lfp_store",
|
132
147
|
options: options
|
133
148
|
)
|
134
149
|
operation = ::Gapic::Rest::TransportOperation.new response
|
135
150
|
result = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStore.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_lfp_store",
|
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: "list_lfp_stores",
|
208
227
|
options: options
|
209
228
|
)
|
210
229
|
operation = ::Gapic::Rest::TransportOperation.new response
|
211
230
|
result = ::Google::Shopping::Merchant::Lfp::V1beta::ListLfpStoresResponse.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
|
##
|
@@ -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
|
@@ -212,6 +215,12 @@ module Google
|
|
212
215
|
# enabled. By default, asynchronous REST clients will not be generated.
|
213
216
|
# This feature will be enabled by default 1 month after launching the
|
214
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.
|
215
224
|
class ExperimentalFeatures
|
216
225
|
include ::Google::Protobuf::MessageExts
|
217
226
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -297,9 +306,28 @@ module Google
|
|
297
306
|
# @!attribute [rw] common
|
298
307
|
# @return [::Google::Api::CommonLanguageSettings]
|
299
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
|
300
319
|
class GoSettings
|
301
320
|
include ::Google::Protobuf::MessageExts
|
302
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
|
303
331
|
end
|
304
332
|
|
305
333
|
# Describes the generator configuration for a method.
|
@@ -375,6 +403,17 @@ module Google
|
|
375
403
|
end
|
376
404
|
end
|
377
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
|
+
|
378
417
|
# The organization for which the client libraries are being published.
|
379
418
|
# Affects the url where generated docs are published, etc.
|
380
419
|
module ClientLibraryOrganization
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-shopping-merchant-lfp-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
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: '0'
|
142
142
|
requirements: []
|
143
|
-
rubygems_version: 3.5.
|
143
|
+
rubygems_version: 3.5.23
|
144
144
|
signing_key:
|
145
145
|
specification_version: 4
|
146
146
|
summary: Programmatically manage your Merchant Center accounts.
|