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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/client.rb +581 -0
  3. data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/credentials.rb +49 -0
  4. data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/paths.rb +49 -0
  5. data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/client.rb +541 -0
  6. data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest/service_stub.rb +206 -0
  7. data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service/rest.rb +57 -0
  8. data/lib/google/shopping/merchant/accounts/v1beta/gbp_accounts_service.rb +60 -0
  9. data/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_pb.rb +56 -0
  10. data/lib/google/shopping/merchant/accounts/v1beta/gbpaccounts_services_pb.rb +52 -0
  11. data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/client.rb +584 -0
  12. data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/credentials.rb +49 -0
  13. data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/paths.rb +71 -0
  14. data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/client.rb +544 -0
  15. data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest/service_stub.rb +206 -0
  16. data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service/rest.rb +56 -0
  17. data/lib/google/shopping/merchant/accounts/v1beta/lfp_providers_service.rb +59 -0
  18. data/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_pb.rb +55 -0
  19. data/lib/google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb.rb +51 -0
  20. data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/client.rb +875 -0
  21. data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/credentials.rb +49 -0
  22. data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/paths.rb +66 -0
  23. data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/client.rb +814 -0
  24. data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest/service_stub.rb +391 -0
  25. data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service/rest.rb +57 -0
  26. data/lib/google/shopping/merchant/accounts/v1beta/omnichannel_settings_service.rb +60 -0
  27. data/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_pb.rb +68 -0
  28. data/lib/google/shopping/merchant/accounts/v1beta/omnichannelsettings_services_pb.rb +58 -0
  29. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_pb.rb +8 -1
  30. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/client.rb +285 -4
  31. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/client.rb +264 -4
  32. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest/service_stub.rb +185 -0
  33. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service/rest.rb +1 -1
  34. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_service.rb +1 -1
  35. data/lib/google/shopping/merchant/accounts/v1beta/online_return_policy_services_pb.rb +9 -3
  36. data/lib/google/shopping/merchant/accounts/v1beta/rest.rb +3 -0
  37. data/lib/google/shopping/merchant/accounts/v1beta/version.rb +1 -1
  38. data/lib/google/shopping/merchant/accounts/v1beta.rb +3 -0
  39. data/proto_docs/google/shopping/merchant/accounts/v1beta/gbpaccounts.rb +123 -0
  40. data/proto_docs/google/shopping/merchant/accounts/v1beta/lfpproviders.rb +108 -0
  41. data/proto_docs/google/shopping/merchant/accounts/v1beta/omnichannelsettings.rb +336 -0
  42. data/proto_docs/google/shopping/merchant/accounts/v1beta/online_return_policy.rb +64 -10
  43. metadata +31 -1
@@ -0,0 +1,584 @@
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/lfpproviders_pb"
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module Accounts
26
+ module V1beta
27
+ module LfpProvidersService
28
+ ##
29
+ # Client for the LfpProvidersService service.
30
+ #
31
+ # The service facilitates the management of a merchant's LFP provider settings.
32
+ # This API defines the following resource model:
33
+ # - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider]
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$"
41
+
42
+ include Paths
43
+
44
+ # @private
45
+ attr_reader :lfp_providers_service_stub
46
+
47
+ ##
48
+ # Configure the LfpProvidersService Client class.
49
+ #
50
+ # See {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all LfpProvidersService clients
56
+ # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.configure do |config|
57
+ # config.timeout = 10.0
58
+ # end
59
+ #
60
+ # @yield [config] Configure the Client client.
61
+ # @yieldparam config [Client::Configuration]
62
+ #
63
+ # @return [Client::Configuration]
64
+ #
65
+ def self.configure
66
+ @configure ||= begin
67
+ namespace = ["Google", "Shopping", "Merchant", "Accounts", "V1beta"]
68
+ parent_config = while namespace.any?
69
+ parent_name = namespace.join "::"
70
+ parent_const = const_get parent_name
71
+ break parent_const.configure if parent_const.respond_to? :configure
72
+ namespace.pop
73
+ end
74
+ default_config = Client::Configuration.new parent_config
75
+
76
+ default_config.timeout = 60.0
77
+ default_config.retry_policy = {
78
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
79
+ }
80
+
81
+ default_config
82
+ end
83
+ yield @configure if block_given?
84
+ @configure
85
+ end
86
+
87
+ ##
88
+ # Configure the LfpProvidersService Client instance.
89
+ #
90
+ # The configuration is set to the derived mode, meaning that values can be changed,
91
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
92
+ # should be made on {Client.configure}.
93
+ #
94
+ # See {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client::Configuration}
95
+ # for a description of the configuration fields.
96
+ #
97
+ # @yield [config] Configure the Client client.
98
+ # @yieldparam config [Client::Configuration]
99
+ #
100
+ # @return [Client::Configuration]
101
+ #
102
+ def configure
103
+ yield @config if block_given?
104
+ @config
105
+ end
106
+
107
+ ##
108
+ # The effective universe domain
109
+ #
110
+ # @return [String]
111
+ #
112
+ def universe_domain
113
+ @lfp_providers_service_stub.universe_domain
114
+ end
115
+
116
+ ##
117
+ # Create a new LfpProvidersService client object.
118
+ #
119
+ # @example
120
+ #
121
+ # # Create a client using the default configuration
122
+ # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new
123
+ #
124
+ # # Create a client using a custom configuration
125
+ # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config|
126
+ # config.timeout = 10.0
127
+ # end
128
+ #
129
+ # @yield [config] Configure the LfpProvidersService client.
130
+ # @yieldparam config [Client::Configuration]
131
+ #
132
+ def initialize
133
+ # These require statements are intentionally placed here to initialize
134
+ # the gRPC module only when it's required.
135
+ # See https://github.com/googleapis/toolkit/issues/446
136
+ require "gapic/grpc"
137
+ require "google/shopping/merchant/accounts/v1beta/lfpproviders_services_pb"
138
+
139
+ # Create the configuration object
140
+ @config = Configuration.new Client.configure
141
+
142
+ # Yield the configuration if needed
143
+ yield @config if block_given?
144
+
145
+ # Create credentials
146
+ credentials = @config.credentials
147
+ # Use self-signed JWT if the endpoint is unchanged from default,
148
+ # but only if the default endpoint does not have a region prefix.
149
+ enable_self_signed_jwt = @config.endpoint.nil? ||
150
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
151
+ !@config.endpoint.split(".").first.include?("-"))
152
+ credentials ||= Credentials.default scope: @config.scope,
153
+ enable_self_signed_jwt: enable_self_signed_jwt
154
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
155
+ credentials = Credentials.new credentials, scope: @config.scope
156
+ end
157
+ @quota_project_id = @config.quota_project
158
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
159
+
160
+ @lfp_providers_service_stub = ::Gapic::ServiceStub.new(
161
+ ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Stub,
162
+ credentials: credentials,
163
+ endpoint: @config.endpoint,
164
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
165
+ universe_domain: @config.universe_domain,
166
+ channel_args: @config.channel_args,
167
+ interceptors: @config.interceptors,
168
+ channel_pool_config: @config.channel_pool,
169
+ logger: @config.logger
170
+ )
171
+
172
+ @lfp_providers_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_providers_service_stub.logger
190
+ end
191
+
192
+ # Service calls
193
+
194
+ ##
195
+ # Find the LFP provider candidates in a given country.
196
+ #
197
+ # @overload find_lfp_providers(request, options = nil)
198
+ # Pass arguments to `find_lfp_providers` via a request object, either of type
199
+ # {::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest} or an equivalent Hash.
200
+ #
201
+ # @param request [::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest, ::Hash]
202
+ # A request object representing the call parameters. Required. To specify no
203
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
204
+ # @param options [::Gapic::CallOptions, ::Hash]
205
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
206
+ #
207
+ # @overload find_lfp_providers(parent: nil, page_size: nil, page_token: nil)
208
+ # Pass arguments to `find_lfp_providers` via keyword arguments. Note that at
209
+ # least one keyword argument is required. To specify no parameters, or to keep all
210
+ # the default parameter values, pass an empty Hash as a request object (see above).
211
+ #
212
+ # @param parent [::String]
213
+ # Required. The name of the parent resource under which the LFP providers are
214
+ # found. Format:
215
+ # `accounts/{account}/omnichannelSettings/{omnichannel_setting}`.
216
+ # @param page_size [::Integer]
217
+ # Optional. The maximum number of `LfpProvider` resources to return. The
218
+ # service returns fewer than this value if the number of lfp providers is
219
+ # less that than the `pageSize`. The default value is 50. The maximum value
220
+ # is 1000; If a value higher than the maximum is specified, then the
221
+ # `pageSize` will default to the maximum.
222
+ # @param page_token [::String]
223
+ # Optional. A page token, received from a previous `FindLfpProviders` call.
224
+ # Provide the page token to retrieve the subsequent page.
225
+ #
226
+ # When paginating, all other parameters provided to `FindLfpProviders` must
227
+ # match the call that provided the page token.
228
+ #
229
+ # @yield [response, operation] Access the result along with the RPC operation
230
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>]
231
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
232
+ #
233
+ # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider>]
234
+ #
235
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
236
+ #
237
+ # @example Basic example
238
+ # require "google/shopping/merchant/accounts/v1beta"
239
+ #
240
+ # # Create a client object. The client can be reused for multiple calls.
241
+ # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new
242
+ #
243
+ # # Create a request. To set request fields, pass in keyword arguments.
244
+ # request = Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest.new
245
+ #
246
+ # # Call the find_lfp_providers method.
247
+ # result = client.find_lfp_providers request
248
+ #
249
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
250
+ # # over elements, and API calls will be issued to fetch pages as needed.
251
+ # result.each do |item|
252
+ # # Each element is of type ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvider.
253
+ # p item
254
+ # end
255
+ #
256
+ def find_lfp_providers request, options = nil
257
+ raise ::ArgumentError, "request must be provided" if request.nil?
258
+
259
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::FindLfpProvidersRequest
260
+
261
+ # Converts hash and nil to an options object
262
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
263
+
264
+ # Customize the options with defaults
265
+ metadata = @config.rpcs.find_lfp_providers.metadata.to_h
266
+
267
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
268
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
269
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
270
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION
271
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
272
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
273
+
274
+ header_params = {}
275
+ if request.parent
276
+ header_params["parent"] = request.parent
277
+ end
278
+
279
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
280
+ metadata[:"x-goog-request-params"] ||= request_params_header
281
+
282
+ options.apply_defaults timeout: @config.rpcs.find_lfp_providers.timeout,
283
+ metadata: metadata,
284
+ retry_policy: @config.rpcs.find_lfp_providers.retry_policy
285
+
286
+ options.apply_defaults timeout: @config.timeout,
287
+ metadata: @config.metadata,
288
+ retry_policy: @config.retry_policy
289
+
290
+ @lfp_providers_service_stub.call_rpc :find_lfp_providers, request, options: options do |response, operation|
291
+ response = ::Gapic::PagedEnumerable.new @lfp_providers_service_stub, :find_lfp_providers, request, response, operation, options
292
+ yield response, operation if block_given?
293
+ throw :response, response
294
+ end
295
+ rescue ::GRPC::BadStatus => e
296
+ raise ::Google::Cloud::Error.from_error(e)
297
+ end
298
+
299
+ ##
300
+ # Link the specified merchant to a LFP provider for the specified country.
301
+ #
302
+ # @overload link_lfp_provider(request, options = nil)
303
+ # Pass arguments to `link_lfp_provider` via a request object, either of type
304
+ # {::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest} or an equivalent Hash.
305
+ #
306
+ # @param request [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest, ::Hash]
307
+ # A request object representing the call parameters. Required. To specify no
308
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
309
+ # @param options [::Gapic::CallOptions, ::Hash]
310
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
311
+ #
312
+ # @overload link_lfp_provider(name: nil, external_account_id: nil)
313
+ # Pass arguments to `link_lfp_provider` via keyword arguments. Note that at
314
+ # least one keyword argument is required. To specify no parameters, or to keep all
315
+ # the default parameter values, pass an empty Hash as a request object (see above).
316
+ #
317
+ # @param name [::String]
318
+ # Required. The name of the LFP provider resource to link.
319
+ # Format:
320
+ # `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`.
321
+ # The `lfp_provider` is the LFP provider ID.
322
+ # @param external_account_id [::String]
323
+ # Required. The external account ID by which this merchant is known to the
324
+ # LFP provider.
325
+ #
326
+ # @yield [response, operation] Access the result along with the RPC operation
327
+ # @yieldparam response [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse]
328
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
329
+ #
330
+ # @return [::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse]
331
+ #
332
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
333
+ #
334
+ # @example Basic example
335
+ # require "google/shopping/merchant/accounts/v1beta"
336
+ #
337
+ # # Create a client object. The client can be reused for multiple calls.
338
+ # client = Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new
339
+ #
340
+ # # Create a request. To set request fields, pass in keyword arguments.
341
+ # request = Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest.new
342
+ #
343
+ # # Call the link_lfp_provider method.
344
+ # result = client.link_lfp_provider request
345
+ #
346
+ # # The returned object is of type Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderResponse.
347
+ # p result
348
+ #
349
+ def link_lfp_provider request, options = nil
350
+ raise ::ArgumentError, "request must be provided" if request.nil?
351
+
352
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Accounts::V1beta::LinkLfpProviderRequest
353
+
354
+ # Converts hash and nil to an options object
355
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
356
+
357
+ # Customize the options with defaults
358
+ metadata = @config.rpcs.link_lfp_provider.metadata.to_h
359
+
360
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
361
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
362
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
363
+ gapic_version: ::Google::Shopping::Merchant::Accounts::V1beta::VERSION
364
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
365
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
366
+
367
+ header_params = {}
368
+ if request.name
369
+ header_params["name"] = request.name
370
+ end
371
+
372
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
373
+ metadata[:"x-goog-request-params"] ||= request_params_header
374
+
375
+ options.apply_defaults timeout: @config.rpcs.link_lfp_provider.timeout,
376
+ metadata: metadata,
377
+ retry_policy: @config.rpcs.link_lfp_provider.retry_policy
378
+
379
+ options.apply_defaults timeout: @config.timeout,
380
+ metadata: @config.metadata,
381
+ retry_policy: @config.retry_policy
382
+
383
+ @lfp_providers_service_stub.call_rpc :link_lfp_provider, request, options: options do |response, operation|
384
+ yield response, operation if block_given?
385
+ end
386
+ rescue ::GRPC::BadStatus => e
387
+ raise ::Google::Cloud::Error.from_error(e)
388
+ end
389
+
390
+ ##
391
+ # Configuration class for the LfpProvidersService API.
392
+ #
393
+ # This class represents the configuration for LfpProvidersService,
394
+ # providing control over timeouts, retry behavior, logging, transport
395
+ # parameters, and other low-level controls. Certain parameters can also be
396
+ # applied individually to specific RPCs. See
397
+ # {::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client::Configuration::Rpcs}
398
+ # for a list of RPCs that can be configured independently.
399
+ #
400
+ # Configuration can be applied globally to all clients, or to a single client
401
+ # on construction.
402
+ #
403
+ # @example
404
+ #
405
+ # # Modify the global config, setting the timeout for
406
+ # # find_lfp_providers to 20 seconds,
407
+ # # and all remaining timeouts to 10 seconds.
408
+ # ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.configure do |config|
409
+ # config.timeout = 10.0
410
+ # config.rpcs.find_lfp_providers.timeout = 20.0
411
+ # end
412
+ #
413
+ # # Apply the above configuration only to a new client.
414
+ # client = ::Google::Shopping::Merchant::Accounts::V1beta::LfpProvidersService::Client.new do |config|
415
+ # config.timeout = 10.0
416
+ # config.rpcs.find_lfp_providers.timeout = 20.0
417
+ # end
418
+ #
419
+ # @!attribute [rw] endpoint
420
+ # A custom service endpoint, as a hostname or hostname:port. The default is
421
+ # nil, indicating to use the default endpoint in the current universe domain.
422
+ # @return [::String,nil]
423
+ # @!attribute [rw] credentials
424
+ # Credentials to send with calls. You may provide any of the following types:
425
+ # * (`String`) The path to a service account key file in JSON format
426
+ # * (`Hash`) A service account key as a Hash
427
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
428
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
429
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
430
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
431
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
432
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
433
+ # * (`nil`) indicating no credentials
434
+ #
435
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
436
+ # external source for authentication to Google Cloud, you must validate it before
437
+ # providing it to a Google API client library. Providing an unvalidated credential
438
+ # configuration to Google APIs can compromise the security of your systems and data.
439
+ # For more information, refer to [Validate credential configurations from external
440
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
441
+ # @return [::Object]
442
+ # @!attribute [rw] scope
443
+ # The OAuth scopes
444
+ # @return [::Array<::String>]
445
+ # @!attribute [rw] lib_name
446
+ # The library name as recorded in instrumentation and logging
447
+ # @return [::String]
448
+ # @!attribute [rw] lib_version
449
+ # The library version as recorded in instrumentation and logging
450
+ # @return [::String]
451
+ # @!attribute [rw] channel_args
452
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
453
+ # `GRPC::Core::Channel` object is provided as the credential.
454
+ # @return [::Hash]
455
+ # @!attribute [rw] interceptors
456
+ # An array of interceptors that are run before calls are executed.
457
+ # @return [::Array<::GRPC::ClientInterceptor>]
458
+ # @!attribute [rw] timeout
459
+ # The call timeout in seconds.
460
+ # @return [::Numeric]
461
+ # @!attribute [rw] metadata
462
+ # Additional gRPC headers to be sent with the call.
463
+ # @return [::Hash{::Symbol=>::String}]
464
+ # @!attribute [rw] retry_policy
465
+ # The retry policy. The value is a hash with the following keys:
466
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
467
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
468
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
469
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
470
+ # trigger a retry.
471
+ # @return [::Hash]
472
+ # @!attribute [rw] quota_project
473
+ # A separate project against which to charge quota.
474
+ # @return [::String]
475
+ # @!attribute [rw] universe_domain
476
+ # The universe domain within which to make requests. This determines the
477
+ # default endpoint URL. The default value of nil uses the environment
478
+ # universe (usually the default "googleapis.com" universe).
479
+ # @return [::String,nil]
480
+ # @!attribute [rw] logger
481
+ # A custom logger to use for request/response debug logging, or the value
482
+ # `:default` (the default) to construct a default logger, or `nil` to
483
+ # explicitly disable logging.
484
+ # @return [::Logger,:default,nil]
485
+ #
486
+ class Configuration
487
+ extend ::Gapic::Config
488
+
489
+ # @private
490
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
491
+ DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
492
+
493
+ config_attr :endpoint, nil, ::String, nil
494
+ config_attr :credentials, nil do |value|
495
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
496
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
497
+ allowed.any? { |klass| klass === value }
498
+ end
499
+ config_attr :scope, nil, ::String, ::Array, nil
500
+ config_attr :lib_name, nil, ::String, nil
501
+ config_attr :lib_version, nil, ::String, nil
502
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
503
+ config_attr :interceptors, nil, ::Array, nil
504
+ config_attr :timeout, nil, ::Numeric, nil
505
+ config_attr :metadata, nil, ::Hash, nil
506
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
507
+ config_attr :quota_project, nil, ::String, nil
508
+ config_attr :universe_domain, nil, ::String, nil
509
+ config_attr :logger, :default, ::Logger, nil, :default
510
+
511
+ # @private
512
+ def initialize parent_config = nil
513
+ @parent_config = parent_config unless parent_config.nil?
514
+
515
+ yield self if block_given?
516
+ end
517
+
518
+ ##
519
+ # Configurations for individual RPCs
520
+ # @return [Rpcs]
521
+ #
522
+ def rpcs
523
+ @rpcs ||= begin
524
+ parent_rpcs = nil
525
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
526
+ Rpcs.new parent_rpcs
527
+ end
528
+ end
529
+
530
+ ##
531
+ # Configuration for the channel pool
532
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
533
+ #
534
+ def channel_pool
535
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
536
+ end
537
+
538
+ ##
539
+ # Configuration RPC class for the LfpProvidersService API.
540
+ #
541
+ # Includes fields providing the configuration for each RPC in this service.
542
+ # Each configuration object is of type `Gapic::Config::Method` and includes
543
+ # the following configuration fields:
544
+ #
545
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
546
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
547
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
548
+ # include the following keys:
549
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
550
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
551
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
552
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
553
+ # trigger a retry.
554
+ #
555
+ class Rpcs
556
+ ##
557
+ # RPC-specific configuration for `find_lfp_providers`
558
+ # @return [::Gapic::Config::Method]
559
+ #
560
+ attr_reader :find_lfp_providers
561
+ ##
562
+ # RPC-specific configuration for `link_lfp_provider`
563
+ # @return [::Gapic::Config::Method]
564
+ #
565
+ attr_reader :link_lfp_provider
566
+
567
+ # @private
568
+ def initialize parent_rpcs = nil
569
+ find_lfp_providers_config = parent_rpcs.find_lfp_providers if parent_rpcs.respond_to? :find_lfp_providers
570
+ @find_lfp_providers = ::Gapic::Config::Method.new find_lfp_providers_config
571
+ link_lfp_provider_config = parent_rpcs.link_lfp_provider if parent_rpcs.respond_to? :link_lfp_provider
572
+ @link_lfp_provider = ::Gapic::Config::Method.new link_lfp_provider_config
573
+
574
+ yield self if block_given?
575
+ end
576
+ end
577
+ end
578
+ end
579
+ end
580
+ end
581
+ end
582
+ end
583
+ end
584
+ end
@@ -0,0 +1,49 @@
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 "googleauth"
20
+
21
+ module Google
22
+ module Shopping
23
+ module Merchant
24
+ module Accounts
25
+ module V1beta
26
+ module LfpProvidersService
27
+ # Credentials for the LfpProvidersService API.
28
+ class Credentials < ::Google::Auth::Credentials
29
+ self.scope = [
30
+ "https://www.googleapis.com/auth/content"
31
+ ]
32
+ self.env_vars = [
33
+ "GOOGLE_CLOUD_CREDENTIALS",
34
+ "GOOGLE_CLOUD_KEYFILE",
35
+ "GCLOUD_KEYFILE",
36
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
37
+ "GOOGLE_CLOUD_KEYFILE_JSON",
38
+ "GCLOUD_KEYFILE_JSON"
39
+ ]
40
+ self.paths = [
41
+ "~/.config/google_cloud/application_default_credentials.json"
42
+ ]
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end