google-cloud-commerce-consumer-procurement 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58c870df8f993ada97374abb157a173920744909498929beecd19cb7d581ef1a
4
- data.tar.gz: 87227cf3baa1565cb21df0c2e774f6ddabc799184d5f06c4f64c848843afbdff
3
+ metadata.gz: 42fb610e1811260641429df7c7ac9ce2a190ea5ca64d59e497e44b2452c515e8
4
+ data.tar.gz: 9f576798dea0c7f51169294fb1554944e2166ab6721ad8388518bf94370a0bec
5
5
  SHA512:
6
- metadata.gz: e8d3ac8b477a1ca46bc2e06317b9142b68a84332e6811e34c47a8a3a51e6548cc0ad78772278c37fdaf81df5b03860bd1f1b32f813d5689a63c17d1e2db1f547
7
- data.tar.gz: 4a9627cae28fb51e8f8c112ba997dc02c18e2a6c7ec1805f131db15ef9a7b44f3cecbaea56f09594b1e85615d15ed0bd8bb2ab351866a1a4cdd507ea2e6f8139
6
+ metadata.gz: cdc763182804b53cc3f02032a700ef37da23da566a9480c0e1532d6eb77dcf5810438cdf097d2bdc368a3fd53189e2e42c4fc4e9d8dd74e64b611184f4cdb85b
7
+ data.tar.gz: 1fff4674060a61b49a6fe8be7e7524373ad35e954ef94f06bc839e1fbbb61316fbadadf694940d057a17058e33ed14b47ae98076b131084ef0092e926d0ae488
data/README.md CHANGED
@@ -33,9 +33,39 @@ In order to use this library, you first need to go through the following steps:
33
33
  1. [Enable the API.](https://console.cloud.google.com/apis/library/cloudcommerceconsumerprocurement.googleapis.com)
34
34
  1. {file:AUTHENTICATION.md Set up authentication.}
35
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-cloud-commerce-consumer-procurement-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-commerce-consumer-procurement-v1/latest).
65
+
36
66
  ## Supported Ruby Versions
37
67
 
38
- This library is supported on Ruby 2.7+.
68
+ This library is supported on Ruby 3.0+.
39
69
 
40
70
  Google provides official support for Ruby versions that are actively supported
41
71
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -22,7 +22,7 @@ module Google
22
22
  module Commerce
23
23
  module Consumer
24
24
  module Procurement
25
- VERSION = "1.1.0"
25
+ VERSION = "1.2.0"
26
26
  end
27
27
  end
28
28
  end
@@ -60,6 +60,11 @@ module Google
60
60
  # You can also specify a different transport by passing `:rest` or `:grpc` in
61
61
  # the `transport` parameter.
62
62
  #
63
+ # Raises an exception if the currently installed versioned client gem for the
64
+ # given API version does not support the given transport of the LicenseManagementService service.
65
+ # You can determine whether the method will succeed by calling
66
+ # {Google::Cloud::Commerce::Consumer::Procurement.license_management_service_available?}.
67
+ #
63
68
  # ## About LicenseManagementService
64
69
  #
65
70
  # Service for managing licenses.
@@ -81,6 +86,37 @@ module Google
81
86
  service_module.const_get(:Client).new(&block)
82
87
  end
83
88
 
89
+ ##
90
+ # Determines whether the LicenseManagementService service is supported by the current client.
91
+ # If true, you can retrieve a client object by calling {Google::Cloud::Commerce::Consumer::Procurement.license_management_service}.
92
+ # If false, that method will raise an exception. This could happen if the given
93
+ # API version does not exist or does not support the LicenseManagementService service,
94
+ # or if the versioned client gem needs an update to support the LicenseManagementService service.
95
+ #
96
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
97
+ # Defaults to `:v1`.
98
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
99
+ # @return [boolean] Whether the service is available.
100
+ #
101
+ def self.license_management_service_available? version: :v1, transport: :grpc
102
+ require "google/cloud/commerce/consumer/procurement/#{version.to_s.downcase}"
103
+ package_name = Google::Cloud::Commerce::Consumer::Procurement
104
+ .constants
105
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
106
+ .first
107
+ return false unless package_name
108
+ service_module = Google::Cloud::Commerce::Consumer::Procurement.const_get package_name
109
+ return false unless service_module.const_defined? :LicenseManagementService
110
+ service_module = service_module.const_get :LicenseManagementService
111
+ if transport == :rest
112
+ return false unless service_module.const_defined? :Rest
113
+ service_module = service_module.const_get :Rest
114
+ end
115
+ service_module.const_defined? :Client
116
+ rescue ::LoadError
117
+ false
118
+ end
119
+
84
120
  ##
85
121
  # Create a new client object for ConsumerProcurementService.
86
122
  #
@@ -94,6 +130,11 @@ module Google
94
130
  # You can also specify a different transport by passing `:rest` or `:grpc` in
95
131
  # the `transport` parameter.
96
132
  #
133
+ # Raises an exception if the currently installed versioned client gem for the
134
+ # given API version does not support the given transport of the ConsumerProcurementService service.
135
+ # You can determine whether the method will succeed by calling
136
+ # {Google::Cloud::Commerce::Consumer::Procurement.consumer_procurement_service_available?}.
137
+ #
97
138
  # ## About ConsumerProcurementService
98
139
  #
99
140
  # ConsumerProcurementService allows customers to make purchases of products
@@ -123,6 +164,37 @@ module Google
123
164
  service_module.const_get(:Client).new(&block)
124
165
  end
125
166
 
167
+ ##
168
+ # Determines whether the ConsumerProcurementService service is supported by the current client.
169
+ # If true, you can retrieve a client object by calling {Google::Cloud::Commerce::Consumer::Procurement.consumer_procurement_service}.
170
+ # If false, that method will raise an exception. This could happen if the given
171
+ # API version does not exist or does not support the ConsumerProcurementService service,
172
+ # or if the versioned client gem needs an update to support the ConsumerProcurementService service.
173
+ #
174
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
175
+ # Defaults to `:v1`.
176
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
177
+ # @return [boolean] Whether the service is available.
178
+ #
179
+ def self.consumer_procurement_service_available? version: :v1, transport: :grpc
180
+ require "google/cloud/commerce/consumer/procurement/#{version.to_s.downcase}"
181
+ package_name = Google::Cloud::Commerce::Consumer::Procurement
182
+ .constants
183
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
184
+ .first
185
+ return false unless package_name
186
+ service_module = Google::Cloud::Commerce::Consumer::Procurement.const_get package_name
187
+ return false unless service_module.const_defined? :ConsumerProcurementService
188
+ service_module = service_module.const_get :ConsumerProcurementService
189
+ if transport == :rest
190
+ return false unless service_module.const_defined? :Rest
191
+ service_module = service_module.const_get :Rest
192
+ end
193
+ service_module.const_defined? :Client
194
+ rescue ::LoadError
195
+ false
196
+ end
197
+
126
198
  ##
127
199
  # Configure the google-cloud-commerce-consumer-procurement library.
128
200
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-commerce-consumer-procurement
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.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-10-24 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-commerce-consumer-procurement-v1
@@ -55,7 +54,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
55
54
  licenses:
56
55
  - Apache-2.0
57
56
  metadata: {}
58
- post_install_message:
59
57
  rdoc_options: []
60
58
  require_paths:
61
59
  - lib
@@ -63,15 +61,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
63
61
  requirements:
64
62
  - - ">="
65
63
  - !ruby/object:Gem::Version
66
- version: '2.7'
64
+ version: '3.0'
67
65
  required_rubygems_version: !ruby/object:Gem::Requirement
68
66
  requirements:
69
67
  - - ">="
70
68
  - !ruby/object:Gem::Version
71
69
  version: '0'
72
70
  requirements: []
73
- rubygems_version: 3.5.21
74
- signing_key:
71
+ rubygems_version: 3.6.2
75
72
  specification_version: 4
76
73
  summary: Enables consumers to procure products served by Cloud Marketplace platform.
77
74
  test_files: []