google-shopping-merchant-lfp 0.1.0 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51e6a8de0d25ee5c72beb9849a38e04352822d70329d9ed2af57f991b568a795
4
- data.tar.gz: 9a501f2a9b22af32b16876c29eff02427d3d4c722f30856d5f44f5383d90cfb8
3
+ metadata.gz: 89f331f6c89e9aaccf5db957faf6209bfbabe17047f38a3762ad383f32a13629
4
+ data.tar.gz: 5d5e0f65c1083ca6980d8aa6119e0d90f862e3fffc4d2912499a3ce89fcc3588
5
5
  SHA512:
6
- metadata.gz: 16e88ba02d702763c7b25635719ed8b516003b3064425a9700e0810678e1cd796c1c58ae217068a1e68a200f665ecfc559777dd7d9d2044b38bfa6e9a0166320
7
- data.tar.gz: 0b415c28f4f2436748fa9724929644241001c7e25a0c53b7145240c92dfb179abcfd0558db6c07b33a3f75be2051cfaf32f53f729ac8732519231da6f21f4ced
6
+ metadata.gz: 35f192b85c8e524600f79e7816ec846a4892f41d357bb3017ebc4b7d98d6ab5547a49dda1649c1037cb6c7263727a9ec16baae8483e2e4f5850f7482c9067d44
7
+ data.tar.gz: f8c6e1be234372bd5b215369102004d30c5fd6b45301dfee0d106c96dfe498217f9393ca7cfda0b6c2837a436a9315ecaeee0599d39e094a39cdd4bf8fdff198
data/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  Programmatically manage your Merchant Center accounts.
4
4
 
5
- Programmatically manage your Merchant Center accounts.
6
5
 
7
6
  Actual client classes for the various versions of this API are defined in
8
7
  _versioned_ client gems, with names of the form `google-shopping-merchant-lfp-v*`.
@@ -34,9 +33,39 @@ In order to use this library, you first need to go through the following steps:
34
33
  1. [Enable the API.](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com)
35
34
  1. {file:AUTHENTICATION.md Set up authentication.}
36
35
 
36
+ ## Debug Logging
37
+
38
+ This library comes with opt-in Debug Logging that can help you troubleshoot
39
+ your application's integration with the API. When logging is activated, key
40
+ events such as requests and responses, along with data payloads and metadata
41
+ such as headers and client configuration, are logged to the standard error
42
+ stream.
43
+
44
+ **WARNING:** Client Library Debug Logging includes your data payloads in
45
+ plaintext, which could include sensitive data such as PII for yourself or your
46
+ customers, private keys, or other security data that could be compromising if
47
+ leaked. Always practice good data hygiene with your application logs, and follow
48
+ the principle of least access. Google also recommends that Client Library Debug
49
+ Logging be enabled only temporarily during active debugging, and not used
50
+ permanently in production.
51
+
52
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
53
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
54
+ list of client library gem names. This will select the default logging behavior,
55
+ which writes logs to the standard error stream. On a local workstation, this may
56
+ result in logs appearing on the console. When running on a Google Cloud hosting
57
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
58
+ results in logs appearing alongside your application logs in the
59
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
60
+
61
+ Debug logging also requires that the versioned clients for this service be
62
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
63
+ working, try updating the versioned clients in your bundle or installed gems:
64
+ [google-shopping-merchant-lfp-v1beta](https://rubydoc.info/gems/google-shopping-merchant-lfp-v1beta).
65
+
37
66
  ## Supported Ruby Versions
38
67
 
39
- This library is supported on Ruby 2.7+.
68
+ This library is supported on Ruby 3.0+.
40
69
 
41
70
  Google provides official support for Ruby versions that are actively supported
42
71
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -21,7 +21,7 @@ module Google
21
21
  module Shopping
22
22
  module Merchant
23
23
  module Lfp
24
- VERSION = "0.1.0"
24
+ VERSION = "0.2.0"
25
25
  end
26
26
  end
27
27
  end
@@ -41,6 +41,11 @@ module Google
41
41
  # You can also specify a different transport by passing `:rest` or `:grpc` in
42
42
  # the `transport` parameter.
43
43
  #
44
+ # Raises an exception if the currently installed versioned client gem for the
45
+ # given API version does not support the given transport of the LfpInventoryService service.
46
+ # You can determine whether the method will succeed by calling
47
+ # {Google::Shopping::Merchant::Lfp.lfp_inventory_service_available?}.
48
+ #
44
49
  # ## About LfpInventoryService
45
50
  #
46
51
  # Service for a [LFP
@@ -64,6 +69,37 @@ module Google
64
69
  service_module.const_get(:Client).new(&block)
65
70
  end
66
71
 
72
+ ##
73
+ # Determines whether the LfpInventoryService service is supported by the current client.
74
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Lfp.lfp_inventory_service}.
75
+ # If false, that method will raise an exception. This could happen if the given
76
+ # API version does not exist or does not support the LfpInventoryService service,
77
+ # or if the versioned client gem needs an update to support the LfpInventoryService service.
78
+ #
79
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
80
+ # Defaults to `:v1beta`.
81
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
82
+ # @return [boolean] Whether the service is available.
83
+ #
84
+ def self.lfp_inventory_service_available? version: :v1beta, transport: :grpc
85
+ require "google/shopping/merchant/lfp/#{version.to_s.downcase}"
86
+ package_name = Google::Shopping::Merchant::Lfp
87
+ .constants
88
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
89
+ .first
90
+ return false unless package_name
91
+ service_module = Google::Shopping::Merchant::Lfp.const_get package_name
92
+ return false unless service_module.const_defined? :LfpInventoryService
93
+ service_module = service_module.const_get :LfpInventoryService
94
+ if transport == :rest
95
+ return false unless service_module.const_defined? :Rest
96
+ service_module = service_module.const_get :Rest
97
+ end
98
+ service_module.const_defined? :Client
99
+ rescue ::LoadError
100
+ false
101
+ end
102
+
67
103
  ##
68
104
  # Create a new client object for LfpSaleService.
69
105
  #
@@ -77,6 +113,11 @@ module Google
77
113
  # You can also specify a different transport by passing `:rest` or `:grpc` in
78
114
  # the `transport` parameter.
79
115
  #
116
+ # Raises an exception if the currently installed versioned client gem for the
117
+ # given API version does not support the given transport of the LfpSaleService service.
118
+ # You can determine whether the method will succeed by calling
119
+ # {Google::Shopping::Merchant::Lfp.lfp_sale_service_available?}.
120
+ #
80
121
  # ## About LfpSaleService
81
122
  #
82
123
  # Service for a [LFP
@@ -100,6 +141,37 @@ module Google
100
141
  service_module.const_get(:Client).new(&block)
101
142
  end
102
143
 
144
+ ##
145
+ # Determines whether the LfpSaleService service is supported by the current client.
146
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Lfp.lfp_sale_service}.
147
+ # If false, that method will raise an exception. This could happen if the given
148
+ # API version does not exist or does not support the LfpSaleService service,
149
+ # or if the versioned client gem needs an update to support the LfpSaleService service.
150
+ #
151
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
152
+ # Defaults to `:v1beta`.
153
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
154
+ # @return [boolean] Whether the service is available.
155
+ #
156
+ def self.lfp_sale_service_available? version: :v1beta, transport: :grpc
157
+ require "google/shopping/merchant/lfp/#{version.to_s.downcase}"
158
+ package_name = Google::Shopping::Merchant::Lfp
159
+ .constants
160
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
161
+ .first
162
+ return false unless package_name
163
+ service_module = Google::Shopping::Merchant::Lfp.const_get package_name
164
+ return false unless service_module.const_defined? :LfpSaleService
165
+ service_module = service_module.const_get :LfpSaleService
166
+ if transport == :rest
167
+ return false unless service_module.const_defined? :Rest
168
+ service_module = service_module.const_get :Rest
169
+ end
170
+ service_module.const_defined? :Client
171
+ rescue ::LoadError
172
+ false
173
+ end
174
+
103
175
  ##
104
176
  # Create a new client object for LfpStoreService.
105
177
  #
@@ -113,6 +185,11 @@ module Google
113
185
  # You can also specify a different transport by passing `:rest` or `:grpc` in
114
186
  # the `transport` parameter.
115
187
  #
188
+ # Raises an exception if the currently installed versioned client gem for the
189
+ # given API version does not support the given transport of the LfpStoreService service.
190
+ # You can determine whether the method will succeed by calling
191
+ # {Google::Shopping::Merchant::Lfp.lfp_store_service_available?}.
192
+ #
116
193
  # ## About LfpStoreService
117
194
  #
118
195
  # Service for a [LFP
@@ -135,6 +212,37 @@ module Google
135
212
  service_module = service_module.const_get(:Rest) if transport == :rest
136
213
  service_module.const_get(:Client).new(&block)
137
214
  end
215
+
216
+ ##
217
+ # Determines whether the LfpStoreService service is supported by the current client.
218
+ # If true, you can retrieve a client object by calling {Google::Shopping::Merchant::Lfp.lfp_store_service}.
219
+ # If false, that method will raise an exception. This could happen if the given
220
+ # API version does not exist or does not support the LfpStoreService service,
221
+ # or if the versioned client gem needs an update to support the LfpStoreService service.
222
+ #
223
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
224
+ # Defaults to `:v1beta`.
225
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
226
+ # @return [boolean] Whether the service is available.
227
+ #
228
+ def self.lfp_store_service_available? version: :v1beta, transport: :grpc
229
+ require "google/shopping/merchant/lfp/#{version.to_s.downcase}"
230
+ package_name = Google::Shopping::Merchant::Lfp
231
+ .constants
232
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
233
+ .first
234
+ return false unless package_name
235
+ service_module = Google::Shopping::Merchant::Lfp.const_get package_name
236
+ return false unless service_module.const_defined? :LfpStoreService
237
+ service_module = service_module.const_get :LfpStoreService
238
+ if transport == :rest
239
+ return false unless service_module.const_defined? :Rest
240
+ service_module = service_module.const_get :Rest
241
+ end
242
+ service_module.const_defined? :Client
243
+ rescue ::LoadError
244
+ false
245
+ end
138
246
  end
139
247
  end
140
248
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-shopping-merchant-lfp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-04-25 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -61,7 +60,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
61
60
  licenses:
62
61
  - Apache-2.0
63
62
  metadata: {}
64
- post_install_message:
65
63
  rdoc_options: []
66
64
  require_paths:
67
65
  - lib
@@ -69,15 +67,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
67
  requirements:
70
68
  - - ">="
71
69
  - !ruby/object:Gem::Version
72
- version: '2.7'
70
+ version: '3.0'
73
71
  required_rubygems_version: !ruby/object:Gem::Requirement
74
72
  requirements:
75
73
  - - ">="
76
74
  - !ruby/object:Gem::Version
77
75
  version: '0'
78
76
  requirements: []
79
- rubygems_version: 3.5.6
80
- signing_key:
77
+ rubygems_version: 3.6.2
81
78
  specification_version: 4
82
79
  summary: Programmatically manage your Merchant Center accounts.
83
80
  test_files: []