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