# Billing V1 API - Class Google::Cloud::Billing::V1::CloudCatalog::Rest::Client (v1.7.0)

1.7.0 (latest) 1.6.0 1.5.1 1.4.0 1.3.1 1.2.0 1.1.0 1.0.2 0.18.1 0.17.4 0.16.0 0.15.1 0.14.0 0.13.2 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.5 Reference documentation and code samples for the Billing V1 API class Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.

REST client for the CloudCatalog service.


<br />

A catalog of Google Cloud Platform services and SKUs.
Provides pricing information and metadata on Google Cloud Platform services
and SKUs.

## Inherits

- Object

## Includes

- [Google::Cloud::Billing::V1::CloudCatalog::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Cloud-Billing-V1-CloudCatalog-Paths)

## Methods

### .configure

    def self.configure() { |config| ... } -> Client::Configuration

Configure the CloudCatalog Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Cloud-Billing-V1-CloudCatalog-Rest-Client-Configuration "Google::Cloud::Billing::V1::CloudCatalog::Rest::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Cloud-Billing-V1-CloudCatalog-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Cloud-Billing-V1-CloudCatalog-Rest-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all CloudCatalog clients
::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.configure do |config|
  config.timeout = 10.0
end
```

### #configure

    def configure() { |config| ... } -> Client::Configuration

Configure the CloudCatalog Client instance.


The configuration is set to the derived mode, meaning that values can be changed,
but structural changes (adding new fields, etc.) are not allowed. Structural changes
should be made on [Client.configure](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Cloud-Billing-V1-CloudCatalog-Rest-Client#Google__Cloud__Billing__V1__CloudCatalog__Rest__Client_configure_class_ "Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Cloud-Billing-V1-CloudCatalog-Rest-Client-Configuration "Google::Cloud::Billing::V1::CloudCatalog::Rest::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Cloud-Billing-V1-CloudCatalog-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Cloud-Billing-V1-CloudCatalog-Rest-Client-Configuration))

### #initialize

    def initialize() { |config| ... } -> Client

Create a new CloudCatalog REST client object.
**Yields**

- (config) --- Configure the CloudCatalog client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Cloud-Billing-V1-CloudCatalog-Rest-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Cloud-Billing-V1-CloudCatalog-Rest-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new do |config|
  config.timeout = 10.0
end
```

### #list_services

    def list_services(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Service>
    def list_services(page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Service>

Lists all public cloud services.
**Overloads**

    def list_services(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Service>

Pass arguments to `list_services` via a request object, either of type [ListServicesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Cloud-Billing-V1-ListServicesRequest "Google::Cloud::Billing::V1::ListServicesRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Billing::V1::ListServicesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Cloud-Billing-V1-ListServicesRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def list_services(page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Service>

Pass arguments to `list_services` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **page_size** (::Integer) --- Requested page size. Defaults to 5000.
- **page_token** (::String) --- A token identifying a page of results to return. This should be a `next_page_token` value returned from a previous `ListServices` call. If unspecified, the first page of results is returned.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::Billing::V1::Service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Cloud-Billing-V1-Service)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::Billing::V1::Service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Cloud-Billing-V1-Service)\>)
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/billing/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Billing::V1::ListServicesRequest.new

# Call the list_services method.
result = client.list_services request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Billing::V1::Service.
  p item
end
```

### #list_skus

    def list_skus(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>
    def list_skus(parent: nil, start_time: nil, end_time: nil, currency_code: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>

Lists all publicly available SKUs for a given cloud service.
**Overloads**

    def list_skus(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>

Pass arguments to `list_skus` via a request object, either of type [ListSkusRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Cloud-Billing-V1-ListSkusRequest "Google::Cloud::Billing::V1::ListSkusRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Billing::V1::ListSkusRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Cloud-Billing-V1-ListSkusRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def list_skus(parent: nil, start_time: nil, end_time: nil, currency_code: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>

Pass arguments to `list_skus` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The name of the service. Example: "services/6F81-5844-456A"
- **start_time** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Protobuf-Timestamp), ::Hash) --- Optional inclusive start time of the time range for which the pricing versions will be returned. Timestamps in the future are not allowed. The time range has to be within a single calendar month in America/Los_Angeles timezone. Time range as a whole is optional. If not specified, the latest pricing will be returned (up to 12 hours old at most).
- **end_time** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Protobuf-Timestamp), ::Hash) --- Optional exclusive end time of the time range for which the pricing versions will be returned. Timestamps in the future are not allowed. The time range has to be within a single calendar month in America/Los_Angeles timezone. Time range as a whole is optional. If not specified, the latest pricing will be returned (up to 12 hours old at most).
- **currency_code** (::String) --- The ISO 4217 currency code for the pricing info in the response proto. Will use the conversion rate as of start_time. Optional. If not specified USD will be used.
- **page_size** (::Integer) --- Requested page size. Defaults to 5000.
- **page_token** (::String) --- A token identifying a page of results to return. This should be a `next_page_token` value returned from a previous `ListSkus` call. If unspecified, the first page of results is returned.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::Billing::V1::Sku](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Cloud-Billing-V1-Sku)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::Billing::V1::Sku](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest/Google-Cloud-Billing-V1-Sku)\>)
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/billing/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Billing::V1::ListSkusRequest.new

# Call the list_skus method.
result = client.list_skus request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Billing::V1::Sku.
  p item
end
```

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)