# Dialogflow V2 API - Class Google::Cloud::Dialogflow::V2::Fulfillments::Rest::Client (v1.16.1)

1.16.1 (latest) 1.16.0 1.15.0 1.14.0 1.13.0 1.12.1 1.11.0 1.10.1 1.9.1 1.8.0 1.7.0 1.6.0 1.5.0 1.4.1 1.3.0 1.2.0 1.1.1 1.0.0 0.34.0 0.33.0 0.32.2 0.31.0 0.30.0 0.29.0 0.28.0 0.27.0 0.26.2 0.25.0 0.24.0 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.18.0 0.17.1 0.16.0 0.15.2 0.14.0 0.13.0 0.12.0 Reference documentation and code samples for the Dialogflow V2 API class Google::Cloud::Dialogflow::V2::Fulfillments::Rest::Client.

REST client for the Fulfillments service.


<br />

Service for managing [Fulfillments](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-Fulfillment "Google::Cloud::Dialogflow::V2::Fulfillment (class)").

## Inherits

- Object

## Includes

- [Google::Cloud::Dialogflow::V2::Fulfillments::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-Fulfillments-Paths)

## Methods

### .configure

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

Configure the Fulfillments Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-Fulfillments-Rest-Client-Configuration "Google::Cloud::Dialogflow::V2::Fulfillments::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-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-Fulfillments-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-Fulfillments-Rest-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all Fulfillments clients
::Google::Cloud::Dialogflow::V2::Fulfillments::Rest::Client.configure do |config|
  config.timeout = 10.0
end
```

### #configure

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

Configure the Fulfillments 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-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-Fulfillments-Rest-Client#Google__Cloud__Dialogflow__V2__Fulfillments__Rest__Client_configure_class_ "Google::Cloud::Dialogflow::V2::Fulfillments::Rest::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-Fulfillments-Rest-Client-Configuration "Google::Cloud::Dialogflow::V2::Fulfillments::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-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-Fulfillments-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-Fulfillments-Rest-Client-Configuration))

### #get_fulfillment

    def get_fulfillment(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::Fulfillment
    def get_fulfillment(name: nil) -> ::Google::Cloud::Dialogflow::V2::Fulfillment

Retrieves the fulfillment.
**Overloads**

    def get_fulfillment(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::Fulfillment

Pass arguments to `get_fulfillment` via a request object, either of type [GetFulfillmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-GetFulfillmentRequest "Google::Cloud::Dialogflow::V2::GetFulfillmentRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::V2::GetFulfillmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-GetFulfillmentRequest), ::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 get_fulfillment(name: nil) -> ::Google::Cloud::Dialogflow::V2::Fulfillment

Pass arguments to `get_fulfillment` 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). **Parameter**

- **name** (::String) --- Required. The name of the fulfillment. Format: `projects/<Project ID>/agent/fulfillment`.
**Yields**

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

- **result** ([::Google::Cloud::Dialogflow::V2::Fulfillment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-Fulfillment))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::Dialogflow::V2::Fulfillment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-Fulfillment))
**Raises**

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

Basic example

```ruby
require "google/cloud/dialogflow/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::V2::Fulfillments::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::V2::GetFulfillmentRequest.new

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

# The returned object is of type Google::Cloud::Dialogflow::V2::Fulfillment.
p result
```

### #initialize

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

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

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

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-Fulfillments-Rest-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-Fulfillments-Rest-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::Dialogflow::V2::Fulfillments::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Dialogflow::V2::Fulfillments::Rest::Client.new do |config|
  config.timeout = 10.0
end
```

### #location_client

    def location_client() -> Google::Cloud::Location::Locations::Rest::Client

Get the associated client for mix-in of the Locations.
**Returns**

- (Google::Cloud::Location::Locations::Rest::Client)

### #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)

### #update_fulfillment

    def update_fulfillment(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::Fulfillment
    def update_fulfillment(fulfillment: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::V2::Fulfillment

Updates the fulfillment.
**Overloads**

    def update_fulfillment(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::Fulfillment

Pass arguments to `update_fulfillment` via a request object, either of type [UpdateFulfillmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-UpdateFulfillmentRequest "Google::Cloud::Dialogflow::V2::UpdateFulfillmentRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::V2::UpdateFulfillmentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-UpdateFulfillmentRequest), ::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 update_fulfillment(fulfillment: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::V2::Fulfillment

Pass arguments to `update_fulfillment` 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**

- **fulfillment** ([::Google::Cloud::Dialogflow::V2::Fulfillment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-Fulfillment), ::Hash) --- Required. The fulfillment to update.
- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Protobuf-FieldMask), ::Hash) --- Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated.
**Yields**

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

- **result** ([::Google::Cloud::Dialogflow::V2::Fulfillment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-Fulfillment))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::Dialogflow::V2::Fulfillment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-Fulfillment))
**Raises**

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

Basic example

```ruby
require "google/cloud/dialogflow/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::V2::Fulfillments::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::V2::UpdateFulfillmentRequest.new

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

# The returned object is of type Google::Cloud::Dialogflow::V2::Fulfillment.
p result
```