google-cloud-billing 1.2.0 → 1.3.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: c4b1a8d7ceebe2cee35553c9ca55163585cd154b4e28fc4c649a2b9b5c0d8ff3
4
- data.tar.gz: f6489b3c1227d12223454318bfadb914ec3e7a36ce64fa0131439150b52a4a1a
3
+ metadata.gz: cc325fe2d99a87ae11fd2b4c9bb17ade03c5a705a22d1770084ff2b20d4b85e9
4
+ data.tar.gz: 3273f9c8a9a8fa7c91996e09a55d5ba911bc63c1e06f4ee7058b8250edbdf788
5
5
  SHA512:
6
- metadata.gz: 4f91c5c1e1d67604e84fd2d4869b3a9db31e31a15f721b30ebe4af4aeeac5f1fd33442b9aa4e4f3cdebd1565494c781784d238e2fc2b8032776869b59d459e66
7
- data.tar.gz: b120e84f7c0939e7c32726cc3401847ebdbc1b7abff1839ba728fe1f0562f4ca364a91690c7a9c276a0a00979b55e45f788adae512587417afcc8fa962199c9e
6
+ metadata.gz: 96864b9693c6bc735143f693074ea718401e446ced4e8f4727fd122d9294e2284f647747d074f3ada40d6fb9514135d9860be6a41697b3d2976c28e1da8794ce
7
+ data.tar.gz: cf87df37d9e05aa2688bad386a4beffbb5357ad192c9631083867513ebb2f68e6631f24706176fc80d6986d45da36c309ec98158f0fef29191ccdac2adc0ebe0
data/AUTHENTICATION.md CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
114
114
  To configure your system for this, simply:
115
115
 
116
116
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
117
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
117
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
118
118
  3. Write code as if already authenticated.
119
119
 
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -34,32 +34,6 @@ In order to use this library, you first need to go through the following steps:
34
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/cloudbilling.googleapis.com)
35
35
  1. {file:AUTHENTICATION.md Set up authentication.}
36
36
 
37
- ## Enabling Logging
38
-
39
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
40
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
41
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
42
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
43
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
44
-
45
- Configuring a Ruby stdlib logger:
46
-
47
- ```ruby
48
- require "logger"
49
-
50
- module MyLogger
51
- LOGGER = Logger.new $stderr, level: Logger::WARN
52
- def logger
53
- LOGGER
54
- end
55
- end
56
-
57
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
58
- module GRPC
59
- extend MyLogger
60
- end
61
- ```
62
-
63
37
  ## Supported Ruby Versions
64
38
 
65
39
  This library is supported on Ruby 2.6+.
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Billing
19
- VERSION = "1.2.0".freeze
19
+ VERSION = "1.3.0".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -49,29 +49,34 @@ module Google
49
49
  #
50
50
  # By default, this returns an instance of
51
51
  # [Google::Cloud::Billing::V1::CloudBilling::Client](https://googleapis.dev/ruby/google-cloud-billing-v1/latest/Google/Cloud/Billing/V1/CloudBilling/Client.html)
52
- # for version V1 of the API.
53
- # However, you can specify specify a different API version by passing it in the
52
+ # for a gRPC client for version V1 of the API.
53
+ # However, you can specify a different API version by passing it in the
54
54
  # `version` parameter. If the CloudBilling service is
55
55
  # supported by that API version, and the corresponding gem is available, the
56
56
  # appropriate versioned client will be returned.
57
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
58
+ # the `transport` parameter.
57
59
  #
58
60
  # ## About CloudBilling
59
61
  #
60
- # Retrieves GCP Console billing accounts and associates them with projects.
62
+ # Retrieves the Google Cloud Console billing accounts and associates them with
63
+ # projects.
61
64
  #
62
65
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
63
66
  # Defaults to `:v1`.
64
- # @return [CloudBilling::Client] A client object for the specified version.
67
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
68
+ # @return [::Object] A client object for the specified version.
65
69
  #
66
- def self.cloud_billing_service version: :v1, &block
70
+ def self.cloud_billing_service version: :v1, transport: :grpc, &block
67
71
  require "google/cloud/billing/#{version.to_s.downcase}"
68
72
 
69
73
  package_name = Google::Cloud::Billing
70
74
  .constants
71
75
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
72
76
  .first
73
- package_module = Google::Cloud::Billing.const_get package_name
74
- package_module.const_get(:CloudBilling).const_get(:Client).new(&block)
77
+ service_module = Google::Cloud::Billing.const_get(package_name).const_get(:CloudBilling)
78
+ service_module = service_module.const_get(:Rest) if transport == :rest
79
+ service_module.const_get(:Client).new(&block)
75
80
  end
76
81
 
77
82
  ##
@@ -79,11 +84,13 @@ module Google
79
84
  #
80
85
  # By default, this returns an instance of
81
86
  # [Google::Cloud::Billing::V1::CloudCatalog::Client](https://googleapis.dev/ruby/google-cloud-billing-v1/latest/Google/Cloud/Billing/V1/CloudCatalog/Client.html)
82
- # for version V1 of the API.
83
- # However, you can specify specify a different API version by passing it in the
87
+ # for a gRPC client for version V1 of the API.
88
+ # However, you can specify a different API version by passing it in the
84
89
  # `version` parameter. If the CloudCatalog service is
85
90
  # supported by that API version, and the corresponding gem is available, the
86
91
  # appropriate versioned client will be returned.
92
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
93
+ # the `transport` parameter.
87
94
  #
88
95
  # ## About CloudCatalog
89
96
  #
@@ -93,17 +100,19 @@ module Google
93
100
  #
94
101
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
95
102
  # Defaults to `:v1`.
96
- # @return [CloudCatalog::Client] A client object for the specified version.
103
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
104
+ # @return [::Object] A client object for the specified version.
97
105
  #
98
- def self.cloud_catalog_service version: :v1, &block
106
+ def self.cloud_catalog_service version: :v1, transport: :grpc, &block
99
107
  require "google/cloud/billing/#{version.to_s.downcase}"
100
108
 
101
109
  package_name = Google::Cloud::Billing
102
110
  .constants
103
111
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
104
112
  .first
105
- package_module = Google::Cloud::Billing.const_get package_name
106
- package_module.const_get(:CloudCatalog).const_get(:Client).new(&block)
113
+ service_module = Google::Cloud::Billing.const_get(package_name).const_get(:CloudCatalog)
114
+ service_module = service_module.const_get(:Rest) if transport == :rest
115
+ service_module.const_get(:Client).new(&block)
107
116
  end
108
117
 
109
118
  ##
@@ -123,7 +132,7 @@ module Google
123
132
  # * `timeout` (*type:* `Numeric`) -
124
133
  # Default timeout in seconds.
125
134
  # * `metadata` (*type:* `Hash{Symbol=>String}`) -
126
- # Additional gRPC headers to be sent with the call.
135
+ # Additional headers to be sent with the call.
127
136
  # * `retry_policy` (*type:* `Hash`) -
128
137
  # The retry policy. The value is a hash with the following keys:
129
138
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-billing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-01 00:00:00.000000000 Z
11
+ date: 2023-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-billing-v1
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.1'
19
+ version: '0.11'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.1'
29
+ version: '0.11'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  - !ruby/object:Gem::Version
190
190
  version: '0'
191
191
  requirements: []
192
- rubygems_version: 3.3.14
192
+ rubygems_version: 3.4.2
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: API Client library for the Billing API