google-cloud-billing 1.1.3 → 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: 230eb4fb83726c3173ac150a1f5902c989c174019a9fe0203a72d82191192a53
4
- data.tar.gz: b26d39f9a151b519df8b0b3945428ec3d5fd64001b3224a5254fdb7f19e15be9
3
+ metadata.gz: cc325fe2d99a87ae11fd2b4c9bb17ade03c5a705a22d1770084ff2b20d4b85e9
4
+ data.tar.gz: 3273f9c8a9a8fa7c91996e09a55d5ba911bc63c1e06f4ee7058b8250edbdf788
5
5
  SHA512:
6
- metadata.gz: fdc3e59e34517b5f5fc46ad433d9b8a4883b644792df55042c63529fdd770c9a92e1a7b7652ed1942bab717edf98d18424cd690d1d36d45dcdee7831c714d3dd
7
- data.tar.gz: 4381300006533fb74302ba196e918ea77b0904ff9fb2b1b8f35304fad210977b2e4a1794bfb4716a141b4451c569adbbcf1e85a63aeb3f1ca6955e12b8e14ebf
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
@@ -11,7 +11,7 @@ verisoned gems in as dependencies, and provides high-level methods for
11
11
  constructing clients. More information on versioned clients can be found below
12
12
  in the section titled *Which client should I use?*.
13
13
 
14
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-billing/latest)
14
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-billing/latest)
15
15
  for this library, google-cloud-billing, to see the convenience methods for
16
16
  constructing client objects. Reference documentation for the client objects
17
17
  themselves can be found in the client library documentation for the versioned
@@ -34,42 +34,16 @@ 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
- This library is supported on Ruby 2.5+.
39
+ This library is supported on Ruby 2.6+.
66
40
 
67
41
  Google provides official support for Ruby versions that are actively supported
68
42
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
69
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
70
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
71
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
72
- about the Ruby support schedule.
43
+ in security maintenance, and not end of life. Older versions of Ruby _may_
44
+ still work, but are unsupported and not recommended. See
45
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
46
+ support schedule.
73
47
 
74
48
  ## Which client should I use?
75
49
 
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Billing
19
- VERSION = "1.1.3".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.1.3
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-01-11 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
@@ -50,28 +50,28 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 1.25.1
53
+ version: 1.26.1
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 1.25.1
60
+ version: 1.26.1
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: minitest
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '5.14'
67
+ version: '5.16'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '5.14'
74
+ version: '5.16'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: minitest-focus
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -106,14 +106,14 @@ dependencies:
106
106
  requirements:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: '12.0'
109
+ version: '13.0'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: '12.0'
116
+ version: '13.0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: redcarpet
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -182,14 +182,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
182
182
  requirements:
183
183
  - - ">="
184
184
  - !ruby/object:Gem::Version
185
- version: '2.5'
185
+ version: '2.6'
186
186
  required_rubygems_version: !ruby/object:Gem::Requirement
187
187
  requirements:
188
188
  - - ">="
189
189
  - !ruby/object:Gem::Version
190
190
  version: '0'
191
191
  requirements: []
192
- rubygems_version: 3.3.4
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