google-cloud-billing-v1 0.10.0 → 0.12.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: d5d09e6b80c1c7253a34912a55c87335062a3c7f8934ca0330c1fc8bb170aafc
4
- data.tar.gz: 7c9acff077fcee48d8e581ce50cf74404d27b0f7ad846491fc24131c6a455477
3
+ metadata.gz: 75169da47651b8aaf8c1566b0ce1c858d3dcb893d4c7b7eaad691a27c1ec67cc
4
+ data.tar.gz: 8e7512b59892b697d879c444c718e0aebe07094170cbe57109baaab692b0f3c5
5
5
  SHA512:
6
- metadata.gz: f906aa45ca02904e554c00c7d21f4112c04cebfb4ad23a7664d962941a74412d97e88c2c384114ce06aac6ecc672d3ae0aaa2b41d312e00ce81b8eb6441b0758
7
- data.tar.gz: 8604f25706da081b7e0e8b5afb8f185d0d5643db636b952e88f8469bbf4dd02592b74c85730ff4c968300b824195fd66e60b1a0853214b76890987da6bab3bde
6
+ metadata.gz: d86b0238a45b3b93548827e25839c72fcaa05ad3d7c75953a48fbceb1d08f140af1fc5994259dccb63be22c25032136cd06c129e989afb73afa4ce54d5540350
7
+ data.tar.gz: 611b877e54c057bdfb756c254543388371085a995dc0af57f984f85998b4f9877ce342f1123694e055a985bedb21a720ffbd8fbb742f6d387a0bdeb31d23590c
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Billing V1 API
2
2
 
3
- API Client library for the Billing V1 API
3
+ Allows developers to manage billing for their Google Cloud Platform projects programmatically.
4
4
 
5
5
  Allows developers to manage billing for their Google Cloud Platform projects programmatically.
6
6
 
@@ -46,8 +46,8 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
+ or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
51
  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)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
53
 
@@ -171,7 +171,7 @@ module Google
171
171
  credentials = @config.credentials
172
172
  # Use self-signed JWT if the endpoint is unchanged from default,
173
173
  # but only if the default endpoint does not have a region prefix.
174
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
174
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
175
175
  !@config.endpoint.split(".").first.include?("-")
176
176
  credentials ||= Credentials.default scope: @config.scope,
177
177
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -213,8 +213,8 @@ module Google
213
213
  # the default parameter values, pass an empty Hash as a request object (see above).
214
214
  #
215
215
  # @param name [::String]
216
- # Required. The resource name of the billing account to retrieve. For example,
217
- # `billingAccounts/012345-567890-ABCDEF`.
216
+ # Required. The resource name of the billing account to retrieve. For
217
+ # example, `billingAccounts/012345-567890-ABCDEF`.
218
218
  #
219
219
  # @yield [response, operation] Access the result along with the RPC operation
220
220
  # @yieldparam response [::Google::Cloud::Billing::V1::BillingAccount]
@@ -335,13 +335,11 @@ module Google
335
335
  # # Call the list_billing_accounts method.
336
336
  # result = client.list_billing_accounts request
337
337
  #
338
- # # The returned object is of type Gapic::PagedEnumerable. You can
339
- # # iterate over all elements by calling #each, and the enumerable
340
- # # will lazily make API calls to fetch subsequent pages. Other
341
- # # methods are also available for managing paging directly.
342
- # result.each do |response|
338
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
339
+ # # over elements, and API calls will be issued to fetch pages as needed.
340
+ # result.each do |item|
343
341
  # # Each element is of type ::Google::Cloud::Billing::V1::BillingAccount.
344
- # p response
342
+ # p item
345
343
  # end
346
344
  #
347
345
  def list_billing_accounts request, options = nil
@@ -404,7 +402,8 @@ module Google
404
402
  # @param name [::String]
405
403
  # Required. The name of the billing account resource to be updated.
406
404
  # @param account [::Google::Cloud::Billing::V1::BillingAccount, ::Hash]
407
- # Required. The billing account resource to replace the resource on the server.
405
+ # Required. The billing account resource to replace the resource on the
406
+ # server.
408
407
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
409
408
  # The update mask applied to the resource.
410
409
  # Only "display_name" is currently supported.
@@ -589,8 +588,9 @@ module Google
589
588
  # the default parameter values, pass an empty Hash as a request object (see above).
590
589
  #
591
590
  # @param name [::String]
592
- # Required. The resource name of the billing account associated with the projects that
593
- # you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
591
+ # Required. The resource name of the billing account associated with the
592
+ # projects that you want to list. For example,
593
+ # `billingAccounts/012345-567890-ABCDEF`.
594
594
  # @param page_size [::Integer]
595
595
  # Requested page size. The maximum page size is 100; this is also the
596
596
  # default.
@@ -619,13 +619,11 @@ module Google
619
619
  # # Call the list_project_billing_info method.
620
620
  # result = client.list_project_billing_info request
621
621
  #
622
- # # The returned object is of type Gapic::PagedEnumerable. You can
623
- # # iterate over all elements by calling #each, and the enumerable
624
- # # will lazily make API calls to fetch subsequent pages. Other
625
- # # methods are also available for managing paging directly.
626
- # result.each do |response|
622
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
623
+ # # over elements, and API calls will be issued to fetch pages as needed.
624
+ # result.each do |item|
627
625
  # # Each element is of type ::Google::Cloud::Billing::V1::ProjectBillingInfo.
628
- # p response
626
+ # p item
629
627
  # end
630
628
  #
631
629
  def list_project_billing_info request, options = nil
@@ -809,8 +807,9 @@ module Google
809
807
  # the default parameter values, pass an empty Hash as a request object (see above).
810
808
  #
811
809
  # @param name [::String]
812
- # Required. The resource name of the project associated with the billing information
813
- # that you want to update. For example, `projects/tokyo-rain-123`.
810
+ # Required. The resource name of the project associated with the billing
811
+ # information that you want to update. For example,
812
+ # `projects/tokyo-rain-123`.
814
813
  # @param project_billing_info [::Google::Cloud::Billing::V1::ProjectBillingInfo, ::Hash]
815
814
  # The new billing information for the project. Read-only fields are ignored;
816
815
  # thus, you can leave empty all fields except `billing_account_name`.
@@ -1203,9 +1202,9 @@ module Google
1203
1202
  # * (`String`) The path to a service account key file in JSON format
1204
1203
  # * (`Hash`) A service account key as a Hash
1205
1204
  # * (`Google::Auth::Credentials`) A googleauth credentials object
1206
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1205
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1207
1206
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1208
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1207
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1209
1208
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1210
1209
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1211
1210
  # * (`nil`) indicating no credentials
@@ -1247,7 +1246,9 @@ module Google
1247
1246
  class Configuration
1248
1247
  extend ::Gapic::Config
1249
1248
 
1250
- config_attr :endpoint, "cloudbilling.googleapis.com", ::String
1249
+ DEFAULT_ENDPOINT = "cloudbilling.googleapis.com"
1250
+
1251
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1251
1252
  config_attr :credentials, nil do |value|
1252
1253
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1253
1254
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC