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