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

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 +435 -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 +402 -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 +433 -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 +400 -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 +734 -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 +680 -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 +183 -0
  49. metadata +108 -10
@@ -0,0 +1,433 @@
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/lfpsale_pb"
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module Lfp
26
+ module V1beta
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
+ DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$"
38
+
39
+ include Paths
40
+
41
+ # @private
42
+ attr_reader :lfp_sale_service_stub
43
+
44
+ ##
45
+ # Configure the LfpSaleService Client class.
46
+ #
47
+ # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client::Configuration}
48
+ # for a description of the configuration fields.
49
+ #
50
+ # @example
51
+ #
52
+ # # Modify the configuration for all LfpSaleService clients
53
+ # ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.configure do |config|
54
+ # config.timeout = 10.0
55
+ # end
56
+ #
57
+ # @yield [config] Configure the Client client.
58
+ # @yieldparam config [Client::Configuration]
59
+ #
60
+ # @return [Client::Configuration]
61
+ #
62
+ def self.configure
63
+ @configure ||= begin
64
+ namespace = ["Google", "Shopping", "Merchant", "Lfp", "V1beta"]
65
+ parent_config = while namespace.any?
66
+ parent_name = namespace.join "::"
67
+ parent_const = const_get parent_name
68
+ break parent_const.configure if parent_const.respond_to? :configure
69
+ namespace.pop
70
+ end
71
+ default_config = Client::Configuration.new parent_config
72
+
73
+ default_config.timeout = 60.0
74
+ default_config.retry_policy = {
75
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
76
+ }
77
+
78
+ default_config
79
+ end
80
+ yield @configure if block_given?
81
+ @configure
82
+ end
83
+
84
+ ##
85
+ # Configure the LfpSaleService Client instance.
86
+ #
87
+ # The configuration is set to the derived mode, meaning that values can be changed,
88
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
89
+ # should be made on {Client.configure}.
90
+ #
91
+ # See {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client::Configuration}
92
+ # for a description of the configuration fields.
93
+ #
94
+ # @yield [config] Configure the Client client.
95
+ # @yieldparam config [Client::Configuration]
96
+ #
97
+ # @return [Client::Configuration]
98
+ #
99
+ def configure
100
+ yield @config if block_given?
101
+ @config
102
+ end
103
+
104
+ ##
105
+ # The effective universe domain
106
+ #
107
+ # @return [String]
108
+ #
109
+ def universe_domain
110
+ @lfp_sale_service_stub.universe_domain
111
+ end
112
+
113
+ ##
114
+ # Create a new LfpSaleService client object.
115
+ #
116
+ # @example
117
+ #
118
+ # # Create a client using the default configuration
119
+ # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new
120
+ #
121
+ # # Create a client using a custom configuration
122
+ # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config|
123
+ # config.timeout = 10.0
124
+ # end
125
+ #
126
+ # @yield [config] Configure the LfpSaleService client.
127
+ # @yieldparam config [Client::Configuration]
128
+ #
129
+ def initialize
130
+ # These require statements are intentionally placed here to initialize
131
+ # the gRPC module only when it's required.
132
+ # See https://github.com/googleapis/toolkit/issues/446
133
+ require "gapic/grpc"
134
+ require "google/shopping/merchant/lfp/v1beta/lfpsale_services_pb"
135
+
136
+ # Create the configuration object
137
+ @config = Configuration.new Client.configure
138
+
139
+ # Yield the configuration if needed
140
+ yield @config if block_given?
141
+
142
+ # Create credentials
143
+ credentials = @config.credentials
144
+ # Use self-signed JWT if the endpoint is unchanged from default,
145
+ # but only if the default endpoint does not have a region prefix.
146
+ enable_self_signed_jwt = @config.endpoint.nil? ||
147
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
148
+ !@config.endpoint.split(".").first.include?("-"))
149
+ credentials ||= Credentials.default scope: @config.scope,
150
+ enable_self_signed_jwt: enable_self_signed_jwt
151
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
152
+ credentials = Credentials.new credentials, scope: @config.scope
153
+ end
154
+ @quota_project_id = @config.quota_project
155
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
156
+
157
+ @lfp_sale_service_stub = ::Gapic::ServiceStub.new(
158
+ ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Stub,
159
+ credentials: credentials,
160
+ endpoint: @config.endpoint,
161
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
162
+ universe_domain: @config.universe_domain,
163
+ channel_args: @config.channel_args,
164
+ interceptors: @config.interceptors,
165
+ channel_pool_config: @config.channel_pool
166
+ )
167
+ end
168
+
169
+ # Service calls
170
+
171
+ ##
172
+ # Inserts a `LfpSale` for the given merchant.
173
+ #
174
+ # @overload insert_lfp_sale(request, options = nil)
175
+ # Pass arguments to `insert_lfp_sale` via a request object, either of type
176
+ # {::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest} or an equivalent Hash.
177
+ #
178
+ # @param request [::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest, ::Hash]
179
+ # A request object representing the call parameters. Required. To specify no
180
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
181
+ # @param options [::Gapic::CallOptions, ::Hash]
182
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
183
+ #
184
+ # @overload insert_lfp_sale(parent: nil, lfp_sale: nil)
185
+ # Pass arguments to `insert_lfp_sale` via keyword arguments. Note that at
186
+ # least one keyword argument is required. To specify no parameters, or to keep all
187
+ # the default parameter values, pass an empty Hash as a request object (see above).
188
+ #
189
+ # @param parent [::String]
190
+ # Required. The LFP provider account.
191
+ # Format: `accounts/{lfp_partner}`
192
+ # @param lfp_sale [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale, ::Hash]
193
+ # Required. The sale to insert.
194
+ #
195
+ # @yield [response, operation] Access the result along with the RPC operation
196
+ # @yieldparam response [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale]
197
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
198
+ #
199
+ # @return [::Google::Shopping::Merchant::Lfp::V1beta::LfpSale]
200
+ #
201
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
202
+ #
203
+ # @example Basic example
204
+ # require "google/shopping/merchant/lfp/v1beta"
205
+ #
206
+ # # Create a client object. The client can be reused for multiple calls.
207
+ # client = Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new
208
+ #
209
+ # # Create a request. To set request fields, pass in keyword arguments.
210
+ # request = Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest.new
211
+ #
212
+ # # Call the insert_lfp_sale method.
213
+ # result = client.insert_lfp_sale request
214
+ #
215
+ # # The returned object is of type Google::Shopping::Merchant::Lfp::V1beta::LfpSale.
216
+ # p result
217
+ #
218
+ def insert_lfp_sale request, options = nil
219
+ raise ::ArgumentError, "request must be provided" if request.nil?
220
+
221
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Lfp::V1beta::InsertLfpSaleRequest
222
+
223
+ # Converts hash and nil to an options object
224
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
225
+
226
+ # Customize the options with defaults
227
+ metadata = @config.rpcs.insert_lfp_sale.metadata.to_h
228
+
229
+ # Set x-goog-api-client and x-goog-user-project headers
230
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
231
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
232
+ gapic_version: ::Google::Shopping::Merchant::Lfp::V1beta::VERSION
233
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
+
235
+ header_params = {}
236
+ if request.parent
237
+ header_params["parent"] = request.parent
238
+ end
239
+
240
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
241
+ metadata[:"x-goog-request-params"] ||= request_params_header
242
+
243
+ options.apply_defaults timeout: @config.rpcs.insert_lfp_sale.timeout,
244
+ metadata: metadata,
245
+ retry_policy: @config.rpcs.insert_lfp_sale.retry_policy
246
+
247
+ options.apply_defaults timeout: @config.timeout,
248
+ metadata: @config.metadata,
249
+ retry_policy: @config.retry_policy
250
+
251
+ @lfp_sale_service_stub.call_rpc :insert_lfp_sale, request, options: options do |response, operation|
252
+ yield response, operation if block_given?
253
+ return response
254
+ end
255
+ rescue ::GRPC::BadStatus => e
256
+ raise ::Google::Cloud::Error.from_error(e)
257
+ end
258
+
259
+ ##
260
+ # Configuration class for the LfpSaleService API.
261
+ #
262
+ # This class represents the configuration for LfpSaleService,
263
+ # providing control over timeouts, retry behavior, logging, transport
264
+ # parameters, and other low-level controls. Certain parameters can also be
265
+ # applied individually to specific RPCs. See
266
+ # {::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client::Configuration::Rpcs}
267
+ # for a list of RPCs that can be configured independently.
268
+ #
269
+ # Configuration can be applied globally to all clients, or to a single client
270
+ # on construction.
271
+ #
272
+ # @example
273
+ #
274
+ # # Modify the global config, setting the timeout for
275
+ # # insert_lfp_sale to 20 seconds,
276
+ # # and all remaining timeouts to 10 seconds.
277
+ # ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.configure do |config|
278
+ # config.timeout = 10.0
279
+ # config.rpcs.insert_lfp_sale.timeout = 20.0
280
+ # end
281
+ #
282
+ # # Apply the above configuration only to a new client.
283
+ # client = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config|
284
+ # config.timeout = 10.0
285
+ # config.rpcs.insert_lfp_sale.timeout = 20.0
286
+ # end
287
+ #
288
+ # @!attribute [rw] endpoint
289
+ # A custom service endpoint, as a hostname or hostname:port. The default is
290
+ # nil, indicating to use the default endpoint in the current universe domain.
291
+ # @return [::String,nil]
292
+ # @!attribute [rw] credentials
293
+ # Credentials to send with calls. You may provide any of the following types:
294
+ # * (`String`) The path to a service account key file in JSON format
295
+ # * (`Hash`) A service account key as a Hash
296
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
297
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
298
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
299
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
300
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
301
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
302
+ # * (`nil`) indicating no credentials
303
+ # @return [::Object]
304
+ # @!attribute [rw] scope
305
+ # The OAuth scopes
306
+ # @return [::Array<::String>]
307
+ # @!attribute [rw] lib_name
308
+ # The library name as recorded in instrumentation and logging
309
+ # @return [::String]
310
+ # @!attribute [rw] lib_version
311
+ # The library version as recorded in instrumentation and logging
312
+ # @return [::String]
313
+ # @!attribute [rw] channel_args
314
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
315
+ # `GRPC::Core::Channel` object is provided as the credential.
316
+ # @return [::Hash]
317
+ # @!attribute [rw] interceptors
318
+ # An array of interceptors that are run before calls are executed.
319
+ # @return [::Array<::GRPC::ClientInterceptor>]
320
+ # @!attribute [rw] timeout
321
+ # The call timeout in seconds.
322
+ # @return [::Numeric]
323
+ # @!attribute [rw] metadata
324
+ # Additional gRPC headers to be sent with the call.
325
+ # @return [::Hash{::Symbol=>::String}]
326
+ # @!attribute [rw] retry_policy
327
+ # The retry policy. The value is a hash with the following keys:
328
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
329
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
330
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
331
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
332
+ # trigger a retry.
333
+ # @return [::Hash]
334
+ # @!attribute [rw] quota_project
335
+ # A separate project against which to charge quota.
336
+ # @return [::String]
337
+ # @!attribute [rw] universe_domain
338
+ # The universe domain within which to make requests. This determines the
339
+ # default endpoint URL. The default value of nil uses the environment
340
+ # universe (usually the default "googleapis.com" universe).
341
+ # @return [::String,nil]
342
+ #
343
+ class Configuration
344
+ extend ::Gapic::Config
345
+
346
+ # @private
347
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
348
+ DEFAULT_ENDPOINT = "merchantapi.googleapis.com"
349
+
350
+ config_attr :endpoint, nil, ::String, nil
351
+ config_attr :credentials, nil do |value|
352
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
353
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
354
+ allowed.any? { |klass| klass === value }
355
+ end
356
+ config_attr :scope, nil, ::String, ::Array, nil
357
+ config_attr :lib_name, nil, ::String, nil
358
+ config_attr :lib_version, nil, ::String, nil
359
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
360
+ config_attr :interceptors, nil, ::Array, nil
361
+ config_attr :timeout, nil, ::Numeric, nil
362
+ config_attr :metadata, nil, ::Hash, nil
363
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
364
+ config_attr :quota_project, nil, ::String, nil
365
+ config_attr :universe_domain, nil, ::String, nil
366
+
367
+ # @private
368
+ def initialize parent_config = nil
369
+ @parent_config = parent_config unless parent_config.nil?
370
+
371
+ yield self if block_given?
372
+ end
373
+
374
+ ##
375
+ # Configurations for individual RPCs
376
+ # @return [Rpcs]
377
+ #
378
+ def rpcs
379
+ @rpcs ||= begin
380
+ parent_rpcs = nil
381
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
382
+ Rpcs.new parent_rpcs
383
+ end
384
+ end
385
+
386
+ ##
387
+ # Configuration for the channel pool
388
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
389
+ #
390
+ def channel_pool
391
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
392
+ end
393
+
394
+ ##
395
+ # Configuration RPC class for the LfpSaleService API.
396
+ #
397
+ # Includes fields providing the configuration for each RPC in this service.
398
+ # Each configuration object is of type `Gapic::Config::Method` and includes
399
+ # the following configuration fields:
400
+ #
401
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
402
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
403
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
404
+ # include the following keys:
405
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
406
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
407
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
408
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
409
+ # trigger a retry.
410
+ #
411
+ class Rpcs
412
+ ##
413
+ # RPC-specific configuration for `insert_lfp_sale`
414
+ # @return [::Gapic::Config::Method]
415
+ #
416
+ attr_reader :insert_lfp_sale
417
+
418
+ # @private
419
+ def initialize parent_rpcs = nil
420
+ insert_lfp_sale_config = parent_rpcs.insert_lfp_sale if parent_rpcs.respond_to? :insert_lfp_sale
421
+ @insert_lfp_sale = ::Gapic::Config::Method.new insert_lfp_sale_config
422
+
423
+ yield self if block_given?
424
+ end
425
+ end
426
+ end
427
+ end
428
+ end
429
+ end
430
+ end
431
+ end
432
+ end
433
+ 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 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 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 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