Class: FinchAPI::Resources::RequestForwarding

Inherits:
Object
  • Object
show all
Defined in:
lib/finch_api/resources/request_forwarding.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ RequestForwarding

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of RequestForwarding.

Parameters:



45
46
47
# File 'lib/finch_api/resources/request_forwarding.rb', line 45

def initialize(client:)
  @client = client
end

Instance Method Details

#forward(method_: , route: , data: nil, headers: nil, params: nil, request_options: {}) ⇒ FinchAPI::Models::RequestForwardingForwardResponse

Some parameter documentations has been truncated, see Models::RequestForwardingForwardParams for more details.

The Forward API allows you to make direct requests to an employment system. If Finch’s unified API doesn’t have a data model that cleanly fits your needs, then Forward allows you to push or pull data models directly against an integration’s API.

Parameters:

  • method_ (String)

    The HTTP method for the forwarded request. Valid values include: ‘GET` , `POST`

  • route (String)

    The URL route path for the forwarded request. This value must begin with a forwa

  • data (String, nil)

    The body for the forwarded request. This value must be specified as either a str

  • headers (Hash{Symbol=>Object, nil}, nil)

    The HTTP headers to include on the forwarded request. This value must be specifi

  • params (Hash{Symbol=>Object, nil}, nil)

    The query parameters for the forwarded request. This value must be specified as

  • request_options (FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



31
32
33
34
35
36
37
38
39
40
# File 'lib/finch_api/resources/request_forwarding.rb', line 31

def forward(params)
  parsed, options = FinchAPI::RequestForwardingForwardParams.dump_request(params)
  @client.request(
    method: :post,
    path: "forward",
    body: parsed,
    model: FinchAPI::Models::RequestForwardingForwardResponse,
    options: options
  )
end