google-shopping-merchant-lfp-v1beta 0.a → 0.1.1

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