google-shopping-merchant-accounts-v1beta 0.8.0 → 0.9.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/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb +581 -0
- data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb +541 -0
- data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb +206 -0
- data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb +60 -0
- data/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb +52 -0
- data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb +584 -0
- data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb +71 -0
- data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb +544 -0
- data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb +206 -0
- data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb +56 -0
- data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb +59 -0
- data/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb +55 -0
- data/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb +51 -0
- data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb +875 -0
- data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb +814 -0
- data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb +391 -0
- data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb +57 -0
- data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb +60 -0
- data/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb +68 -0
- data/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_services_pb.rb +58 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_pb.rb +8 -1
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb +285 -4
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb +264 -4
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb +185 -0
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb +1 -1
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb +1 -1
- data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb +9 -3
- data/lib/google/shopping/merchant/accounts/v1beta/rest.rb +3 -0
- data/lib/google/shopping/merchant/accounts/v1beta/version.rb +1 -1
- data/lib/google/shopping/merchant/accounts/v1beta.rb +3 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb +123 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb +108 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb +336 -0
- data/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb +64 -10
- metadata +31 -1
@@ -0,0 +1,814 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb"
|
21
|
+
require "google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Shopping
|
25
|
+
module Merchant
|
26
|
+
module Accounts
|
27
|
+
module V1beta
|
28
|
+
module OmnichannelSettingsService
|
29
|
+
module Rest
|
30
|
+
##
|
31
|
+
# REST client for the OmnichannelSettingsService service.
|
32
|
+
#
|
33
|
+
# The service facilitates the management of a merchant's omnichannel settings.
|
34
|
+
# ## This API defines the following resource model:
|
35
|
+
#
|
36
|
+
# [OmnichannelSetting][google.shopping.merchant.accounts.v1.OmnichannelSetting]
|
37
|
+
#
|
38
|
+
class Client
|
39
|
+
# @private
|
40
|
+
API_VERSION = ""
|
41
|
+
|
42
|
+
# @private
|
43
|
+
DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$"
|
44
|
+
|
45
|
+
include Paths
|
46
|
+
|
47
|
+
# @private
|
48
|
+
attr_reader :omnichannel_settings_service_stub
|
49
|
+
|
50
|
+
##
|
51
|
+
# Configure the OmnichannelSettingsService Client class.
|
52
|
+
#
|
53
|
+
# See {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client::Configuration}
|
54
|
+
# for a description of the configuration fields.
|
55
|
+
#
|
56
|
+
# @example
|
57
|
+
#
|
58
|
+
# # Modify the configuration for all OmnichannelSettingsService clients
|
59
|
+
# ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.configure do |config|
|
60
|
+
# config.timeout = 10.0
|
61
|
+
# end
|
62
|
+
#
|
63
|
+
# @yield [config] Configure the Client client.
|
64
|
+
# @yieldparam config [Client::Configuration]
|
65
|
+
#
|
66
|
+
# @return [Client::Configuration]
|
67
|
+
#
|
68
|
+
def self.configure
|
69
|
+
@configure ||= begin
|
70
|
+
namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"]
|
71
|
+
parent_config = while namespace.any?
|
72
|
+
parent_name = namespace.join "::"
|
73
|
+
parent_const = const_get parent_name
|
74
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
75
|
+
namespace.pop
|
76
|
+
end
|
77
|
+
default_config = Client::Configuration.new parent_config
|
78
|
+
|
79
|
+
default_config.timeout = 60.0
|
80
|
+
default_config.retry_policy = {
|
81
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
82
|
+
}
|
83
|
+
|
84
|
+
default_config
|
85
|
+
end
|
86
|
+
yield @configure if block_given?
|
87
|
+
@configure
|
88
|
+
end
|
89
|
+
|
90
|
+
##
|
91
|
+
# Configure the OmnichannelSettingsService Client instance.
|
92
|
+
#
|
93
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
94
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
95
|
+
# should be made on {Client.configure}.
|
96
|
+
#
|
97
|
+
# See {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client::Configuration}
|
98
|
+
# for a description of the configuration fields.
|
99
|
+
#
|
100
|
+
# @yield [config] Configure the Client client.
|
101
|
+
# @yieldparam config [Client::Configuration]
|
102
|
+
#
|
103
|
+
# @return [Client::Configuration]
|
104
|
+
#
|
105
|
+
def configure
|
106
|
+
yield @config if block_given?
|
107
|
+
@config
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# The effective universe domain
|
112
|
+
#
|
113
|
+
# @return [String]
|
114
|
+
#
|
115
|
+
def universe_domain
|
116
|
+
@omnichannel_settings_service_stub.universe_domain
|
117
|
+
end
|
118
|
+
|
119
|
+
##
|
120
|
+
# Create a new OmnichannelSettingsService REST client object.
|
121
|
+
#
|
122
|
+
# @example
|
123
|
+
#
|
124
|
+
# # Create a client using the default configuration
|
125
|
+
# client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new
|
126
|
+
#
|
127
|
+
# # Create a client using a custom configuration
|
128
|
+
# client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config|
|
129
|
+
# config.timeout = 10.0
|
130
|
+
# end
|
131
|
+
#
|
132
|
+
# @yield [config] Configure the OmnichannelSettingsService client.
|
133
|
+
# @yieldparam config [Client::Configuration]
|
134
|
+
#
|
135
|
+
def initialize
|
136
|
+
# Create the configuration object
|
137
|
+
@config = Configuration.new Client.configure
|
138
|
+
|
139
|
+
# Yield the configuration if needed
|
140
|
+
yield @config if block_given?
|
141
|
+
|
142
|
+
# Create credentials
|
143
|
+
credentials = @config.credentials
|
144
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
145
|
+
# but only if the default endpoint does not have a region prefix.
|
146
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
147
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
148
|
+
!@config.endpoint.split(".").first.include?("-"))
|
149
|
+
credentials ||= Credentials.default scope: @config.scope,
|
150
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
151
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
152
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
153
|
+
end
|
154
|
+
|
155
|
+
@quota_project_id = @config.quota_project
|
156
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
157
|
+
|
158
|
+
@omnichannel_settings_service_stub = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::ServiceStub.new(
|
159
|
+
endpoint: @config.endpoint,
|
160
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
161
|
+
universe_domain: @config.universe_domain,
|
162
|
+
credentials: credentials,
|
163
|
+
logger: @config.logger
|
164
|
+
)
|
165
|
+
|
166
|
+
@omnichannel_settings_service_stub.logger(stub: true)&.info do |entry|
|
167
|
+
entry.set_system_name
|
168
|
+
entry.set_service
|
169
|
+
entry.message = "Created client for #{entry.service}"
|
170
|
+
entry.set_credentials_fields credentials
|
171
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
172
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
173
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
##
|
178
|
+
# The logger used for request/response debug logging.
|
179
|
+
#
|
180
|
+
# @return [Logger]
|
181
|
+
#
|
182
|
+
def logger
|
183
|
+
@omnichannel_settings_service_stub.logger
|
184
|
+
end
|
185
|
+
|
186
|
+
# Service calls
|
187
|
+
|
188
|
+
##
|
189
|
+
# Get the omnichannel settings for a given merchant.
|
190
|
+
#
|
191
|
+
# @overload get_omnichannel_setting(request, options = nil)
|
192
|
+
# Pass arguments to `get_omnichannel_setting` via a request object, either of type
|
193
|
+
# {::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest} or an equivalent Hash.
|
194
|
+
#
|
195
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest, ::Hash]
|
196
|
+
# A request object representing the call parameters. Required. To specify no
|
197
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
198
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
199
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
200
|
+
#
|
201
|
+
# @overload get_omnichannel_setting(name: nil)
|
202
|
+
# Pass arguments to `get_omnichannel_setting` via keyword arguments. Note that at
|
203
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
204
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
205
|
+
#
|
206
|
+
# @param name [::String]
|
207
|
+
# Required. The name of the omnichannel setting to retrieve.
|
208
|
+
# Format: `accounts/{account}/omnichannelSettings/{omnichannel_setting}`
|
209
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
210
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting]
|
211
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
212
|
+
#
|
213
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting]
|
214
|
+
#
|
215
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
216
|
+
#
|
217
|
+
# @example Basic example
|
218
|
+
# require "google/shopping/merchant/accounts/v1beta"
|
219
|
+
#
|
220
|
+
# # Create a client object. The client can be reused for multiple calls.
|
221
|
+
# client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new
|
222
|
+
#
|
223
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
224
|
+
# request = Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest.new
|
225
|
+
#
|
226
|
+
# # Call the get_omnichannel_setting method.
|
227
|
+
# result = client.get_omnichannel_setting request
|
228
|
+
#
|
229
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.
|
230
|
+
# p result
|
231
|
+
#
|
232
|
+
def get_omnichannel_setting request, options = nil
|
233
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
234
|
+
|
235
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::GetOmnichannelSettingRequest
|
236
|
+
|
237
|
+
# Converts hash and nil to an options object
|
238
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
239
|
+
|
240
|
+
# Customize the options with defaults
|
241
|
+
call_metadata = @config.rpcs.get_omnichannel_setting.metadata.to_h
|
242
|
+
|
243
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
244
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
245
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
246
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION,
|
247
|
+
transports_version_send: [:rest]
|
248
|
+
|
249
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
250
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
251
|
+
|
252
|
+
options.apply_defaults timeout: @config.rpcs.get_omnichannel_setting.timeout,
|
253
|
+
metadata: call_metadata,
|
254
|
+
retry_policy: @config.rpcs.get_omnichannel_setting.retry_policy
|
255
|
+
|
256
|
+
options.apply_defaults timeout: @config.timeout,
|
257
|
+
metadata: @config.metadata,
|
258
|
+
retry_policy: @config.retry_policy
|
259
|
+
|
260
|
+
@omnichannel_settings_service_stub.get_omnichannel_setting request, options do |result, operation|
|
261
|
+
yield result, operation if block_given?
|
262
|
+
end
|
263
|
+
rescue ::Gapic::Rest::Error => e
|
264
|
+
raise ::Google::Cloud::Error.from_error(e)
|
265
|
+
end
|
266
|
+
|
267
|
+
##
|
268
|
+
# List all the omnichannel settings for a given merchant.
|
269
|
+
#
|
270
|
+
# @overload list_omnichannel_settings(request, options = nil)
|
271
|
+
# Pass arguments to `list_omnichannel_settings` via a request object, either of type
|
272
|
+
# {::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest} or an equivalent Hash.
|
273
|
+
#
|
274
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest, ::Hash]
|
275
|
+
# A request object representing the call parameters. Required. To specify no
|
276
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
277
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
278
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
279
|
+
#
|
280
|
+
# @overload list_omnichannel_settings(parent: nil, page_size: nil, page_token: nil)
|
281
|
+
# Pass arguments to `list_omnichannel_settings` via keyword arguments. Note that at
|
282
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
283
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
284
|
+
#
|
285
|
+
# @param parent [::String]
|
286
|
+
# Required. The parent, which owns this collection of omnichannel settings.
|
287
|
+
# Format: `accounts/{account}`
|
288
|
+
# @param page_size [::Integer]
|
289
|
+
# Optional. The maximum number of omnichannel settings to return. The service
|
290
|
+
# may return fewer than this value. If unspecified, at most 50 omnichannel
|
291
|
+
# settings will be returned. The maximum value is 1000; values above 1000
|
292
|
+
# will be coerced to 1000.
|
293
|
+
# @param page_token [::String]
|
294
|
+
# Optional. A page token, received from a previous `ListOmnichannelSettings`
|
295
|
+
# call. Provide this to retrieve the subsequent page.
|
296
|
+
#
|
297
|
+
# When paginating, all other parameters provided to `ListOmnichannelSettings`
|
298
|
+
# must match the call that provided the page token.
|
299
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
300
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>]
|
301
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
302
|
+
#
|
303
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting>]
|
304
|
+
#
|
305
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
306
|
+
#
|
307
|
+
# @example Basic example
|
308
|
+
# require "google/shopping/merchant/accounts/v1beta"
|
309
|
+
#
|
310
|
+
# # Create a client object. The client can be reused for multiple calls.
|
311
|
+
# client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new
|
312
|
+
#
|
313
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
314
|
+
# request = Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest.new
|
315
|
+
#
|
316
|
+
# # Call the list_omnichannel_settings method.
|
317
|
+
# result = client.list_omnichannel_settings request
|
318
|
+
#
|
319
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
320
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
321
|
+
# result.each do |item|
|
322
|
+
# # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.
|
323
|
+
# p item
|
324
|
+
# end
|
325
|
+
#
|
326
|
+
def list_omnichannel_settings request, options = nil
|
327
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
328
|
+
|
329
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::ListOmnichannelSettingsRequest
|
330
|
+
|
331
|
+
# Converts hash and nil to an options object
|
332
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
333
|
+
|
334
|
+
# Customize the options with defaults
|
335
|
+
call_metadata = @config.rpcs.list_omnichannel_settings.metadata.to_h
|
336
|
+
|
337
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
338
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
339
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
340
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION,
|
341
|
+
transports_version_send: [:rest]
|
342
|
+
|
343
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
344
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
345
|
+
|
346
|
+
options.apply_defaults timeout: @config.rpcs.list_omnichannel_settings.timeout,
|
347
|
+
metadata: call_metadata,
|
348
|
+
retry_policy: @config.rpcs.list_omnichannel_settings.retry_policy
|
349
|
+
|
350
|
+
options.apply_defaults timeout: @config.timeout,
|
351
|
+
metadata: @config.metadata,
|
352
|
+
retry_policy: @config.retry_policy
|
353
|
+
|
354
|
+
@omnichannel_settings_service_stub.list_omnichannel_settings request, options do |result, operation|
|
355
|
+
result = ::Gapic::Rest::PagedEnumerable.new @omnichannel_settings_service_stub, :list_omnichannel_settings, "omnichannel_settings", request, result, options
|
356
|
+
yield result, operation if block_given?
|
357
|
+
throw :response, result
|
358
|
+
end
|
359
|
+
rescue ::Gapic::Rest::Error => e
|
360
|
+
raise ::Google::Cloud::Error.from_error(e)
|
361
|
+
end
|
362
|
+
|
363
|
+
##
|
364
|
+
# Create the omnichannel settings for a given merchant.
|
365
|
+
#
|
366
|
+
# @overload create_omnichannel_setting(request, options = nil)
|
367
|
+
# Pass arguments to `create_omnichannel_setting` via a request object, either of type
|
368
|
+
# {::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest} or an equivalent Hash.
|
369
|
+
#
|
370
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest, ::Hash]
|
371
|
+
# A request object representing the call parameters. Required. To specify no
|
372
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
373
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
374
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
375
|
+
#
|
376
|
+
# @overload create_omnichannel_setting(parent: nil, omnichannel_setting: nil)
|
377
|
+
# Pass arguments to `create_omnichannel_setting` via keyword arguments. Note that at
|
378
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
379
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
380
|
+
#
|
381
|
+
# @param parent [::String]
|
382
|
+
# Required. The parent resource where this omnichannel setting will be
|
383
|
+
# created. Format: `accounts/{account}`
|
384
|
+
# @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash]
|
385
|
+
# Required. The omnichannel setting to create.
|
386
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
387
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting]
|
388
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
389
|
+
#
|
390
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting]
|
391
|
+
#
|
392
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
393
|
+
#
|
394
|
+
# @example Basic example
|
395
|
+
# require "google/shopping/merchant/accounts/v1beta"
|
396
|
+
#
|
397
|
+
# # Create a client object. The client can be reused for multiple calls.
|
398
|
+
# client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new
|
399
|
+
#
|
400
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
401
|
+
# request = Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest.new
|
402
|
+
#
|
403
|
+
# # Call the create_omnichannel_setting method.
|
404
|
+
# result = client.create_omnichannel_setting request
|
405
|
+
#
|
406
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.
|
407
|
+
# p result
|
408
|
+
#
|
409
|
+
def create_omnichannel_setting request, options = nil
|
410
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
411
|
+
|
412
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::CreateOmnichannelSettingRequest
|
413
|
+
|
414
|
+
# Converts hash and nil to an options object
|
415
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
416
|
+
|
417
|
+
# Customize the options with defaults
|
418
|
+
call_metadata = @config.rpcs.create_omnichannel_setting.metadata.to_h
|
419
|
+
|
420
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
421
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
422
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
423
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION,
|
424
|
+
transports_version_send: [:rest]
|
425
|
+
|
426
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
427
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
428
|
+
|
429
|
+
options.apply_defaults timeout: @config.rpcs.create_omnichannel_setting.timeout,
|
430
|
+
metadata: call_metadata,
|
431
|
+
retry_policy: @config.rpcs.create_omnichannel_setting.retry_policy
|
432
|
+
|
433
|
+
options.apply_defaults timeout: @config.timeout,
|
434
|
+
metadata: @config.metadata,
|
435
|
+
retry_policy: @config.retry_policy
|
436
|
+
|
437
|
+
@omnichannel_settings_service_stub.create_omnichannel_setting request, options do |result, operation|
|
438
|
+
yield result, operation if block_given?
|
439
|
+
end
|
440
|
+
rescue ::Gapic::Rest::Error => e
|
441
|
+
raise ::Google::Cloud::Error.from_error(e)
|
442
|
+
end
|
443
|
+
|
444
|
+
##
|
445
|
+
# Update the omnichannel setting for a given merchant in a given country.
|
446
|
+
#
|
447
|
+
# @overload update_omnichannel_setting(request, options = nil)
|
448
|
+
# Pass arguments to `update_omnichannel_setting` via a request object, either of type
|
449
|
+
# {::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest} or an equivalent Hash.
|
450
|
+
#
|
451
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest, ::Hash]
|
452
|
+
# A request object representing the call parameters. Required. To specify no
|
453
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
454
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
455
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
456
|
+
#
|
457
|
+
# @overload update_omnichannel_setting(omnichannel_setting: nil, update_mask: nil)
|
458
|
+
# Pass arguments to `update_omnichannel_setting` via keyword arguments. Note that at
|
459
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
460
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
461
|
+
#
|
462
|
+
# @param omnichannel_setting [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting, ::Hash]
|
463
|
+
# Required. The omnichannel setting to update.
|
464
|
+
#
|
465
|
+
# The omnichannel setting's `name` field is used to identify the
|
466
|
+
# omnichannel setting to be updated.
|
467
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
468
|
+
# Required. The list of fields to be updated.
|
469
|
+
#
|
470
|
+
# The following fields are supported in snake_case only:
|
471
|
+
# - `lsf_type`
|
472
|
+
# - `in_stock`
|
473
|
+
# - `pickup`
|
474
|
+
# - `odo`
|
475
|
+
# - `about`
|
476
|
+
# - `inventory_verification`
|
477
|
+
#
|
478
|
+
# Full replacement with wildcard `*`is supported, while empty/implied update
|
479
|
+
# mask is not.
|
480
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
481
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting]
|
482
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
483
|
+
#
|
484
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting]
|
485
|
+
#
|
486
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
487
|
+
#
|
488
|
+
# @example Basic example
|
489
|
+
# require "google/shopping/merchant/accounts/v1beta"
|
490
|
+
#
|
491
|
+
# # Create a client object. The client can be reused for multiple calls.
|
492
|
+
# client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new
|
493
|
+
#
|
494
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
495
|
+
# request = Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest.new
|
496
|
+
#
|
497
|
+
# # Call the update_omnichannel_setting method.
|
498
|
+
# result = client.update_omnichannel_setting request
|
499
|
+
#
|
500
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSetting.
|
501
|
+
# p result
|
502
|
+
#
|
503
|
+
def update_omnichannel_setting request, options = nil
|
504
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
505
|
+
|
506
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::UpdateOmnichannelSettingRequest
|
507
|
+
|
508
|
+
# Converts hash and nil to an options object
|
509
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
510
|
+
|
511
|
+
# Customize the options with defaults
|
512
|
+
call_metadata = @config.rpcs.update_omnichannel_setting.metadata.to_h
|
513
|
+
|
514
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
515
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
516
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
517
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION,
|
518
|
+
transports_version_send: [:rest]
|
519
|
+
|
520
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
521
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
522
|
+
|
523
|
+
options.apply_defaults timeout: @config.rpcs.update_omnichannel_setting.timeout,
|
524
|
+
metadata: call_metadata,
|
525
|
+
retry_policy: @config.rpcs.update_omnichannel_setting.retry_policy
|
526
|
+
|
527
|
+
options.apply_defaults timeout: @config.timeout,
|
528
|
+
metadata: @config.metadata,
|
529
|
+
retry_policy: @config.retry_policy
|
530
|
+
|
531
|
+
@omnichannel_settings_service_stub.update_omnichannel_setting request, options do |result, operation|
|
532
|
+
yield result, operation if block_given?
|
533
|
+
end
|
534
|
+
rescue ::Gapic::Rest::Error => e
|
535
|
+
raise ::Google::Cloud::Error.from_error(e)
|
536
|
+
end
|
537
|
+
|
538
|
+
##
|
539
|
+
# Requests inventory verification for a given merchant in a given country.
|
540
|
+
#
|
541
|
+
# @overload request_inventory_verification(request, options = nil)
|
542
|
+
# Pass arguments to `request_inventory_verification` via a request object, either of type
|
543
|
+
# {::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest} or an equivalent Hash.
|
544
|
+
#
|
545
|
+
# @param request [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest, ::Hash]
|
546
|
+
# A request object representing the call parameters. Required. To specify no
|
547
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
548
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
549
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
550
|
+
#
|
551
|
+
# @overload request_inventory_verification(name: nil)
|
552
|
+
# Pass arguments to `request_inventory_verification` via keyword arguments. Note that at
|
553
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
554
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
555
|
+
#
|
556
|
+
# @param name [::String]
|
557
|
+
# Required. The name of the omnichannel setting to request inventory
|
558
|
+
# verification. Format:
|
559
|
+
# `accounts/{account}/omnichannelSettings/{omnichannel_setting}`
|
560
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
561
|
+
# @yieldparam result [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse]
|
562
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
563
|
+
#
|
564
|
+
# @return [::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse]
|
565
|
+
#
|
566
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
567
|
+
#
|
568
|
+
# @example Basic example
|
569
|
+
# require "google/shopping/merchant/accounts/v1beta"
|
570
|
+
#
|
571
|
+
# # Create a client object. The client can be reused for multiple calls.
|
572
|
+
# client = Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new
|
573
|
+
#
|
574
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
575
|
+
# request = Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest.new
|
576
|
+
#
|
577
|
+
# # Call the request_inventory_verification method.
|
578
|
+
# result = client.request_inventory_verification request
|
579
|
+
#
|
580
|
+
# # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationResponse.
|
581
|
+
# p result
|
582
|
+
#
|
583
|
+
def request_inventory_verification request, options = nil
|
584
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
585
|
+
|
586
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::RequestInventoryVerificationRequest
|
587
|
+
|
588
|
+
# Converts hash and nil to an options object
|
589
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
590
|
+
|
591
|
+
# Customize the options with defaults
|
592
|
+
call_metadata = @config.rpcs.request_inventory_verification.metadata.to_h
|
593
|
+
|
594
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
595
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
596
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
597
|
+
gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION,
|
598
|
+
transports_version_send: [:rest]
|
599
|
+
|
600
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
601
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
602
|
+
|
603
|
+
options.apply_defaults timeout: @config.rpcs.request_inventory_verification.timeout,
|
604
|
+
metadata: call_metadata,
|
605
|
+
retry_policy: @config.rpcs.request_inventory_verification.retry_policy
|
606
|
+
|
607
|
+
options.apply_defaults timeout: @config.timeout,
|
608
|
+
metadata: @config.metadata,
|
609
|
+
retry_policy: @config.retry_policy
|
610
|
+
|
611
|
+
@omnichannel_settings_service_stub.request_inventory_verification request, options do |result, operation|
|
612
|
+
yield result, operation if block_given?
|
613
|
+
end
|
614
|
+
rescue ::Gapic::Rest::Error => e
|
615
|
+
raise ::Google::Cloud::Error.from_error(e)
|
616
|
+
end
|
617
|
+
|
618
|
+
##
|
619
|
+
# Configuration class for the OmnichannelSettingsService REST API.
|
620
|
+
#
|
621
|
+
# This class represents the configuration for OmnichannelSettingsService REST,
|
622
|
+
# providing control over timeouts, retry behavior, logging, transport
|
623
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
624
|
+
# applied individually to specific RPCs. See
|
625
|
+
# {::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client::Configuration::Rpcs}
|
626
|
+
# for a list of RPCs that can be configured independently.
|
627
|
+
#
|
628
|
+
# Configuration can be applied globally to all clients, or to a single client
|
629
|
+
# on construction.
|
630
|
+
#
|
631
|
+
# @example
|
632
|
+
#
|
633
|
+
# # Modify the global config, setting the timeout for
|
634
|
+
# # get_omnichannel_setting to 20 seconds,
|
635
|
+
# # and all remaining timeouts to 10 seconds.
|
636
|
+
# ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.configure do |config|
|
637
|
+
# config.timeout = 10.0
|
638
|
+
# config.rpcs.get_omnichannel_setting.timeout = 20.0
|
639
|
+
# end
|
640
|
+
#
|
641
|
+
# # Apply the above configuration only to a new client.
|
642
|
+
# client = ::Google::Shopping::Merchant::Accounts::V1beta::OmnichannelSettingsService::Rest::Client.new do |config|
|
643
|
+
# config.timeout = 10.0
|
644
|
+
# config.rpcs.get_omnichannel_setting.timeout = 20.0
|
645
|
+
# end
|
646
|
+
#
|
647
|
+
# @!attribute [rw] endpoint
|
648
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
649
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
650
|
+
# @return [::String,nil]
|
651
|
+
# @!attribute [rw] credentials
|
652
|
+
# Credentials to send with calls. You may provide any of the following types:
|
653
|
+
# * (`String`) The path to a service account key file in JSON format
|
654
|
+
# * (`Hash`) A service account key as a Hash
|
655
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
656
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
657
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
658
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
659
|
+
# * (`nil`) indicating no credentials
|
660
|
+
#
|
661
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
662
|
+
# external source for authentication to Google Cloud, you must validate it before
|
663
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
664
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
665
|
+
# For more information, refer to [Validate credential configurations from external
|
666
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
667
|
+
# @return [::Object]
|
668
|
+
# @!attribute [rw] scope
|
669
|
+
# The OAuth scopes
|
670
|
+
# @return [::Array<::String>]
|
671
|
+
# @!attribute [rw] lib_name
|
672
|
+
# The library name as recorded in instrumentation and logging
|
673
|
+
# @return [::String]
|
674
|
+
# @!attribute [rw] lib_version
|
675
|
+
# The library version as recorded in instrumentation and logging
|
676
|
+
# @return [::String]
|
677
|
+
# @!attribute [rw] timeout
|
678
|
+
# The call timeout in seconds.
|
679
|
+
# @return [::Numeric]
|
680
|
+
# @!attribute [rw] metadata
|
681
|
+
# Additional headers to be sent with the call.
|
682
|
+
# @return [::Hash{::Symbol=>::String}]
|
683
|
+
# @!attribute [rw] retry_policy
|
684
|
+
# The retry policy. The value is a hash with the following keys:
|
685
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
686
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
687
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
688
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
689
|
+
# trigger a retry.
|
690
|
+
# @return [::Hash]
|
691
|
+
# @!attribute [rw] quota_project
|
692
|
+
# A separate project against which to charge quota.
|
693
|
+
# @return [::String]
|
694
|
+
# @!attribute [rw] universe_domain
|
695
|
+
# The universe domain within which to make requests. This determines the
|
696
|
+
# default endpoint URL. The default value of nil uses the environment
|
697
|
+
# universe (usually the default "googleapis.com" universe).
|
698
|
+
# @return [::String,nil]
|
699
|
+
# @!attribute [rw] logger
|
700
|
+
# A custom logger to use for request/response debug logging, or the value
|
701
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
702
|
+
# explicitly disable logging.
|
703
|
+
# @return [::Logger,:default,nil]
|
704
|
+
#
|
705
|
+
class Configuration
|
706
|
+
extend ::Gapic::Config
|
707
|
+
|
708
|
+
# @private
|
709
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
710
|
+
DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
|
711
|
+
|
712
|
+
config_attr :endpoint, nil, ::String, nil
|
713
|
+
config_attr :credentials, nil do |value|
|
714
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
715
|
+
allowed.any? { |klass| klass === value }
|
716
|
+
end
|
717
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
718
|
+
config_attr :lib_name, nil, ::String, nil
|
719
|
+
config_attr :lib_version, nil, ::String, nil
|
720
|
+
config_attr :timeout, nil, ::Numeric, nil
|
721
|
+
config_attr :metadata, nil, ::Hash, nil
|
722
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
723
|
+
config_attr :quota_project, nil, ::String, nil
|
724
|
+
config_attr :universe_domain, nil, ::String, nil
|
725
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
726
|
+
|
727
|
+
# @private
|
728
|
+
def initialize parent_config = nil
|
729
|
+
@parent_config = parent_config unless parent_config.nil?
|
730
|
+
|
731
|
+
yield self if block_given?
|
732
|
+
end
|
733
|
+
|
734
|
+
##
|
735
|
+
# Configurations for individual RPCs
|
736
|
+
# @return [Rpcs]
|
737
|
+
#
|
738
|
+
def rpcs
|
739
|
+
@rpcs ||= begin
|
740
|
+
parent_rpcs = nil
|
741
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
742
|
+
Rpcs.new parent_rpcs
|
743
|
+
end
|
744
|
+
end
|
745
|
+
|
746
|
+
##
|
747
|
+
# Configuration RPC class for the OmnichannelSettingsService API.
|
748
|
+
#
|
749
|
+
# Includes fields providing the configuration for each RPC in this service.
|
750
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
751
|
+
# the following configuration fields:
|
752
|
+
#
|
753
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
754
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
755
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
756
|
+
# include the following keys:
|
757
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
758
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
759
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
760
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
761
|
+
# trigger a retry.
|
762
|
+
#
|
763
|
+
class Rpcs
|
764
|
+
##
|
765
|
+
# RPC-specific configuration for `get_omnichannel_setting`
|
766
|
+
# @return [::Gapic::Config::Method]
|
767
|
+
#
|
768
|
+
attr_reader :get_omnichannel_setting
|
769
|
+
##
|
770
|
+
# RPC-specific configuration for `list_omnichannel_settings`
|
771
|
+
# @return [::Gapic::Config::Method]
|
772
|
+
#
|
773
|
+
attr_reader :list_omnichannel_settings
|
774
|
+
##
|
775
|
+
# RPC-specific configuration for `create_omnichannel_setting`
|
776
|
+
# @return [::Gapic::Config::Method]
|
777
|
+
#
|
778
|
+
attr_reader :create_omnichannel_setting
|
779
|
+
##
|
780
|
+
# RPC-specific configuration for `update_omnichannel_setting`
|
781
|
+
# @return [::Gapic::Config::Method]
|
782
|
+
#
|
783
|
+
attr_reader :update_omnichannel_setting
|
784
|
+
##
|
785
|
+
# RPC-specific configuration for `request_inventory_verification`
|
786
|
+
# @return [::Gapic::Config::Method]
|
787
|
+
#
|
788
|
+
attr_reader :request_inventory_verification
|
789
|
+
|
790
|
+
# @private
|
791
|
+
def initialize parent_rpcs = nil
|
792
|
+
get_omnichannel_setting_config = parent_rpcs.get_omnichannel_setting if parent_rpcs.respond_to? :get_omnichannel_setting
|
793
|
+
@get_omnichannel_setting = ::Gapic::Config::Method.new get_omnichannel_setting_config
|
794
|
+
list_omnichannel_settings_config = parent_rpcs.list_omnichannel_settings if parent_rpcs.respond_to? :list_omnichannel_settings
|
795
|
+
@list_omnichannel_settings = ::Gapic::Config::Method.new list_omnichannel_settings_config
|
796
|
+
create_omnichannel_setting_config = parent_rpcs.create_omnichannel_setting if parent_rpcs.respond_to? :create_omnichannel_setting
|
797
|
+
@create_omnichannel_setting = ::Gapic::Config::Method.new create_omnichannel_setting_config
|
798
|
+
update_omnichannel_setting_config = parent_rpcs.update_omnichannel_setting if parent_rpcs.respond_to? :update_omnichannel_setting
|
799
|
+
@update_omnichannel_setting = ::Gapic::Config::Method.new update_omnichannel_setting_config
|
800
|
+
request_inventory_verification_config = parent_rpcs.request_inventory_verification if parent_rpcs.respond_to? :request_inventory_verification
|
801
|
+
@request_inventory_verification = ::Gapic::Config::Method.new request_inventory_verification_config
|
802
|
+
|
803
|
+
yield self if block_given?
|
804
|
+
end
|
805
|
+
end
|
806
|
+
end
|
807
|
+
end
|
808
|
+
end
|
809
|
+
end
|
810
|
+
end
|
811
|
+
end
|
812
|
+
end
|
813
|
+
end
|
814
|
+
end
|