google-shopping-merchant-lfp-v1 0.a → 0.1.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 (59) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb +471 -0
  6. data/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials.rb +49 -0
  7. data/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb +70 -0
  8. data/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb +438 -0
  9. data/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.rb +145 -0
  10. data/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb +56 -0
  11. data/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb +59 -0
  12. data/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb +471 -0
  13. data/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials.rb +49 -0
  14. data/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths.rb +52 -0
  15. data/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb +438 -0
  16. data/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.rb +144 -0
  17. data/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest.rb +59 -0
  18. data/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service.rb +62 -0
  19. data/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb +469 -0
  20. data/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/credentials.rb +49 -0
  21. data/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/paths.rb +52 -0
  22. data/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb +436 -0
  23. data/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.rb +145 -0
  24. data/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb +56 -0
  25. data/lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb +59 -0
  26. data/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.rb +771 -0
  27. data/lib/google/shopping/merchant/lfp/v1/lfp_store_service/credentials.rb +49 -0
  28. data/lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb +68 -0
  29. data/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb +717 -0
  30. data/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb +328 -0
  31. data/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb +56 -0
  32. data/lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb +59 -0
  33. data/lib/google/shopping/merchant/lfp/v1/lfpinventory_pb.rb +54 -0
  34. data/lib/google/shopping/merchant/lfp/v1/lfpinventory_services_pb.rb +51 -0
  35. data/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_pb.rb +56 -0
  36. data/lib/google/shopping/merchant/lfp/v1/lfpmerchantstate_services_pb.rb +52 -0
  37. data/lib/google/shopping/merchant/lfp/v1/lfpsale_pb.rb +55 -0
  38. data/lib/google/shopping/merchant/lfp/v1/lfpsale_services_pb.rb +49 -0
  39. data/lib/google/shopping/merchant/lfp/v1/lfpstore_pb.rb +56 -0
  40. data/lib/google/shopping/merchant/lfp/v1/lfpstore_services_pb.rb +57 -0
  41. data/lib/google/shopping/merchant/lfp/v1/rest.rb +42 -0
  42. data/lib/google/shopping/merchant/lfp/v1/version.rb +7 -2
  43. data/lib/google/shopping/merchant/lfp/v1.rb +50 -0
  44. data/lib/google-shopping-merchant-lfp-v1.rb +21 -0
  45. data/proto_docs/README.md +4 -0
  46. data/proto_docs/google/api/client.rb +473 -0
  47. data/proto_docs/google/api/field_behavior.rb +85 -0
  48. data/proto_docs/google/api/field_info.rb +88 -0
  49. data/proto_docs/google/api/launch_stage.rb +71 -0
  50. data/proto_docs/google/api/resource.rb +227 -0
  51. data/proto_docs/google/protobuf/duration.rb +98 -0
  52. data/proto_docs/google/protobuf/empty.rb +34 -0
  53. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  54. data/proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb +113 -0
  55. data/proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb +181 -0
  56. data/proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb +96 -0
  57. data/proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb +185 -0
  58. data/proto_docs/google/shopping/type/types.rb +210 -0
  59. metadata +117 -9
@@ -0,0 +1,471 @@
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/lfp/v1/lfpinventory_pb"
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module Lfp
26
+ module V1
27
+ module LfpInventoryService
28
+ ##
29
+ # Client for the LfpInventoryService service.
30
+ #
31
+ # Service for a [LFP
32
+ # partner](https://support.google.com/merchants/answer/7676652) to submit local
33
+ # inventories for a merchant.
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_inventory_service_stub
46
+
47
+ ##
48
+ # Configure the LfpInventoryService Client class.
49
+ #
50
+ # See {::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all LfpInventoryService clients
56
+ # ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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", "Lfp", "V1"]
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 LfpInventoryService 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::Lfp::V1::LfpInventoryService::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_inventory_service_stub.universe_domain
114
+ end
115
+
116
+ ##
117
+ # Create a new LfpInventoryService client object.
118
+ #
119
+ # @example
120
+ #
121
+ # # Create a client using the default configuration
122
+ # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new
123
+ #
124
+ # # Create a client using a custom configuration
125
+ # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config|
126
+ # config.timeout = 10.0
127
+ # end
128
+ #
129
+ # @yield [config] Configure the LfpInventoryService 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/lfp/v1/lfpinventory_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_inventory_service_stub = ::Gapic::ServiceStub.new(
161
+ ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::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_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
190
+ end
191
+
192
+ # Service calls
193
+
194
+ ##
195
+ # Inserts a `LfpInventory` resource for the given target merchant account. If
196
+ # the resource already exists, it will be replaced. The inventory
197
+ # automatically expires after 30 days.
198
+ #
199
+ # @overload insert_lfp_inventory(request, options = nil)
200
+ # Pass arguments to `insert_lfp_inventory` via a request object, either of type
201
+ # {::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest} or an equivalent Hash.
202
+ #
203
+ # @param request [::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest, ::Hash]
204
+ # A request object representing the call parameters. Required. To specify no
205
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
206
+ # @param options [::Gapic::CallOptions, ::Hash]
207
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
208
+ #
209
+ # @overload insert_lfp_inventory(parent: nil, lfp_inventory: nil)
210
+ # Pass arguments to `insert_lfp_inventory` via keyword arguments. Note that at
211
+ # least one keyword argument is required. To specify no parameters, or to keep all
212
+ # the default parameter values, pass an empty Hash as a request object (see above).
213
+ #
214
+ # @param parent [::String]
215
+ # Required. The LFP provider account.
216
+ # Format: `accounts/{account}`
217
+ # @param lfp_inventory [::Google::Shopping::Merchant::Lfp::V1::LfpInventory, ::Hash]
218
+ # Required. The inventory to insert.
219
+ #
220
+ # @yield [response, operation] Access the result along with the RPC operation
221
+ # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1::LfpInventory]
222
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
223
+ #
224
+ # @return [::Google::Shopping::Merchant::Lfp::V1::LfpInventory]
225
+ #
226
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
227
+ #
228
+ # @example Basic example
229
+ # require "google/shopping/merchant/lfp/v1"
230
+ #
231
+ # # Create a client object. The client can be reused for multiple calls.
232
+ # client = Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new
233
+ #
234
+ # # Create a request. To set request fields, pass in keyword arguments.
235
+ # request = Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest.new
236
+ #
237
+ # # Call the insert_lfp_inventory method.
238
+ # result = client.insert_lfp_inventory request
239
+ #
240
+ # # The returned object is of type Google::Shopping::Merchant::Lfp::V1::LfpInventory.
241
+ # p result
242
+ #
243
+ def insert_lfp_inventory request, options = nil
244
+ raise ::ArgumentError, "request must be provided" if request.nil?
245
+
246
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1::InsertLfpInventoryRequest
247
+
248
+ # Converts hash and nil to an options object
249
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
250
+
251
+ # Customize the options with defaults
252
+ metadata = @config.rpcs.insert_lfp_inventory.metadata.to_h
253
+
254
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
255
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
256
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
257
+ gapic_version: ::Google::Shopping::Merchant::Lfp::V1::VERSION
258
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
259
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
260
+
261
+ header_params = {}
262
+ if request.parent
263
+ header_params["parent"] = request.parent
264
+ end
265
+
266
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
267
+ metadata[:"x-goog-request-params"] ||= request_params_header
268
+
269
+ options.apply_defaults timeout: @config.rpcs.insert_lfp_inventory.timeout,
270
+ metadata: metadata,
271
+ retry_policy: @config.rpcs.insert_lfp_inventory.retry_policy
272
+
273
+ options.apply_defaults timeout: @config.timeout,
274
+ metadata: @config.metadata,
275
+ retry_policy: @config.retry_policy
276
+
277
+ @lfp_inventory_service_stub.call_rpc :insert_lfp_inventory, request, options: options do |response, operation|
278
+ yield response, operation if block_given?
279
+ end
280
+ rescue ::GRPC::BadStatus => e
281
+ raise ::Google::Cloud::Error.from_error(e)
282
+ end
283
+
284
+ ##
285
+ # Configuration class for the LfpInventoryService API.
286
+ #
287
+ # This class represents the configuration for LfpInventoryService,
288
+ # providing control over timeouts, retry behavior, logging, transport
289
+ # parameters, and other low-level controls. Certain parameters can also be
290
+ # applied individually to specific RPCs. See
291
+ # {::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client::Configuration::Rpcs}
292
+ # for a list of RPCs that can be configured independently.
293
+ #
294
+ # Configuration can be applied globally to all clients, or to a single client
295
+ # on construction.
296
+ #
297
+ # @example
298
+ #
299
+ # # Modify the global config, setting the timeout for
300
+ # # insert_lfp_inventory to 20 seconds,
301
+ # # and all remaining timeouts to 10 seconds.
302
+ # ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.configure do |config|
303
+ # config.timeout = 10.0
304
+ # config.rpcs.insert_lfp_inventory.timeout = 20.0
305
+ # end
306
+ #
307
+ # # Apply the above configuration only to a new client.
308
+ # client = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config|
309
+ # config.timeout = 10.0
310
+ # config.rpcs.insert_lfp_inventory.timeout = 20.0
311
+ # end
312
+ #
313
+ # @!attribute [rw] endpoint
314
+ # A custom service endpoint, as a hostname or hostname:port. The default is
315
+ # nil, indicating to use the default endpoint in the current universe domain.
316
+ # @return [::String,nil]
317
+ # @!attribute [rw] credentials
318
+ # Credentials to send with calls. You may provide any of the following types:
319
+ # * (`String`) The path to a service account key file in JSON format
320
+ # * (`Hash`) A service account key as a Hash
321
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
322
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
323
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
324
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
325
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
326
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
327
+ # * (`nil`) indicating no credentials
328
+ #
329
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
330
+ # external source for authentication to Google Cloud, you must validate it before
331
+ # providing it to a Google API client library. Providing an unvalidated credential
332
+ # configuration to Google APIs can compromise the security of your systems and data.
333
+ # For more information, refer to [Validate credential configurations from external
334
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
335
+ # @return [::Object]
336
+ # @!attribute [rw] scope
337
+ # The OAuth scopes
338
+ # @return [::Array<::String>]
339
+ # @!attribute [rw] lib_name
340
+ # The library name as recorded in instrumentation and logging
341
+ # @return [::String]
342
+ # @!attribute [rw] lib_version
343
+ # The library version as recorded in instrumentation and logging
344
+ # @return [::String]
345
+ # @!attribute [rw] channel_args
346
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
347
+ # `GRPC::Core::Channel` object is provided as the credential.
348
+ # @return [::Hash]
349
+ # @!attribute [rw] interceptors
350
+ # An array of interceptors that are run before calls are executed.
351
+ # @return [::Array<::GRPC::ClientInterceptor>]
352
+ # @!attribute [rw] timeout
353
+ # The call timeout in seconds.
354
+ # @return [::Numeric]
355
+ # @!attribute [rw] metadata
356
+ # Additional gRPC headers to be sent with the call.
357
+ # @return [::Hash{::Symbol=>::String}]
358
+ # @!attribute [rw] retry_policy
359
+ # The retry policy. The value is a hash with the following keys:
360
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
361
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
362
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
363
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
364
+ # trigger a retry.
365
+ # @return [::Hash]
366
+ # @!attribute [rw] quota_project
367
+ # A separate project against which to charge quota.
368
+ # @return [::String]
369
+ # @!attribute [rw] universe_domain
370
+ # The universe domain within which to make requests. This determines the
371
+ # default endpoint URL. The default value of nil uses the environment
372
+ # universe (usually the default "googleapis.com" universe).
373
+ # @return [::String,nil]
374
+ # @!attribute [rw] logger
375
+ # A custom logger to use for request/response debug logging, or the value
376
+ # `:default` (the default) to construct a default logger, or `nil` to
377
+ # explicitly disable logging.
378
+ # @return [::Logger,:default,nil]
379
+ #
380
+ class Configuration
381
+ extend ::Gapic::Config
382
+
383
+ # @private
384
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
385
+ DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
386
+
387
+ config_attr :endpoint, nil, ::String, nil
388
+ config_attr :credentials, nil do |value|
389
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
390
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
391
+ allowed.any? { |klass| klass === value }
392
+ end
393
+ config_attr :scope, nil, ::String, ::Array, nil
394
+ config_attr :lib_name, nil, ::String, nil
395
+ config_attr :lib_version, nil, ::String, nil
396
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
397
+ config_attr :interceptors, nil, ::Array, nil
398
+ config_attr :timeout, nil, ::Numeric, nil
399
+ config_attr :metadata, nil, ::Hash, nil
400
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
401
+ config_attr :quota_project, nil, ::String, nil
402
+ config_attr :universe_domain, nil, ::String, nil
403
+ config_attr :logger, :default, ::Logger, nil, :default
404
+
405
+ # @private
406
+ def initialize parent_config = nil
407
+ @parent_config = parent_config unless parent_config.nil?
408
+
409
+ yield self if block_given?
410
+ end
411
+
412
+ ##
413
+ # Configurations for individual RPCs
414
+ # @return [Rpcs]
415
+ #
416
+ def rpcs
417
+ @rpcs ||= begin
418
+ parent_rpcs = nil
419
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
420
+ Rpcs.new parent_rpcs
421
+ end
422
+ end
423
+
424
+ ##
425
+ # Configuration for the channel pool
426
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
427
+ #
428
+ def channel_pool
429
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
430
+ end
431
+
432
+ ##
433
+ # Configuration RPC class for the LfpInventoryService API.
434
+ #
435
+ # Includes fields providing the configuration for each RPC in this service.
436
+ # Each configuration object is of type `Gapic::Config::Method` and includes
437
+ # the following configuration fields:
438
+ #
439
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
440
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
441
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
442
+ # include the following keys:
443
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
444
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
445
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
446
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
447
+ # trigger a retry.
448
+ #
449
+ class Rpcs
450
+ ##
451
+ # RPC-specific configuration for `insert_lfp_inventory`
452
+ # @return [::Gapic::Config::Method]
453
+ #
454
+ attr_reader :insert_lfp_inventory
455
+
456
+ # @private
457
+ def initialize parent_rpcs = nil
458
+ insert_lfp_inventory_config = parent_rpcs.insert_lfp_inventory if parent_rpcs.respond_to? :insert_lfp_inventory
459
+ @insert_lfp_inventory = ::Gapic::Config::Method.new insert_lfp_inventory_config
460
+
461
+ yield self if block_given?
462
+ end
463
+ end
464
+ end
465
+ end
466
+ end
467
+ end
468
+ end
469
+ end
470
+ end
471
+ 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 Lfp
25
+ module V1
26
+ module LfpInventoryService
27
+ # Credentials for the LfpInventoryService 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
@@ -0,0 +1,70 @@
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
+
20
+ module Google
21
+ module Shopping
22
+ module Merchant
23
+ module Lfp
24
+ module V1
25
+ module LfpInventoryService
26
+ # Path helper methods for the LfpInventoryService API.
27
+ module Paths
28
+ ##
29
+ # Create a fully-qualified Account resource string.
30
+ #
31
+ # The resource will be in the following format:
32
+ #
33
+ # `accounts/{account}`
34
+ #
35
+ # @param account [String]
36
+ #
37
+ # @return [::String]
38
+ def account_path account:
39
+ "accounts/#{account}"
40
+ end
41
+
42
+ ##
43
+ # Create a fully-qualified LfpInventory resource string.
44
+ #
45
+ # The resource will be in the following format:
46
+ #
47
+ # `accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}`
48
+ #
49
+ # @param account [String]
50
+ # @param target_merchant [String]
51
+ # @param store_code [String]
52
+ # @param offer [String]
53
+ #
54
+ # @return [::String]
55
+ def lfp_inventory_path account:, target_merchant:, store_code:, offer:
56
+ raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/"
57
+ raise ::ArgumentError, "target_merchant cannot contain /" if target_merchant.to_s.include? "/"
58
+ raise ::ArgumentError, "store_code cannot contain /" if store_code.to_s.include? "/"
59
+
60
+ "accounts/#{account}/lfpInventories/#{target_merchant}~#{store_code}~#{offer}"
61
+ end
62
+
63
+ extend self
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end