Class: Telnyx::Resources::Faxes::Actions

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/faxes/actions.rb

Overview

Programmable fax command operations

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Actions

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 Actions.

Parameters:



52
53
54
# File 'lib/telnyx/resources/faxes/actions.rb', line 52

def initialize(client:)
  @client = client
end

Instance Method Details

#cancel(id, request_options: {}) ⇒ Telnyx::Models::Faxes::ActionCancelResponse

Cancel the outbound fax that is in one of the following states: ‘queued`, `media.processed`, `originated` or `sending`

Parameters:

  • id (String)

    The unique identifier of a fax.

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

Returns:

See Also:



20
21
22
23
24
25
26
27
# File 'lib/telnyx/resources/faxes/actions.rb', line 20

def cancel(id, params = {})
  @client.request(
    method: :post,
    path: ["faxes/%1$s/actions/cancel", id],
    model: Telnyx::Models::Faxes::ActionCancelResponse,
    options: params[:request_options]
  )
end

#refresh(id, request_options: {}) ⇒ Telnyx::Models::Faxes::ActionRefreshResponse

Refreshes the inbound fax’s media_url when it has expired

Parameters:

  • id (String)

    The unique identifier of a fax.

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

Returns:

See Also:



40
41
42
43
44
45
46
47
# File 'lib/telnyx/resources/faxes/actions.rb', line 40

def refresh(id, params = {})
  @client.request(
    method: :post,
    path: ["faxes/%1$s/actions/refresh", id],
    model: Telnyx::Models::Faxes::ActionRefreshResponse,
    options: params[:request_options]
  )
end