Class: Telnyx::Resources::FaxApplications
- Inherits:
-
Object
- Object
- Telnyx::Resources::FaxApplications
- Defined in:
- lib/telnyx/resources/fax_applications.rb
Overview
Fax Applications operations
Instance Method Summary collapse
-
#create(application_name:, webhook_event_url:, active: nil, anchorsite_override: nil, inbound: nil, outbound: nil, tags: nil, webhook_event_failover_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::FaxApplicationCreateResponse
Some parameter documentations has been truncated, see Models::FaxApplicationCreateParams for more details.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::FaxApplicationDeleteResponse
Permanently deletes a Fax Application.
-
#initialize(client:) ⇒ FaxApplications
constructor
private
A new instance of FaxApplications.
-
#list(filter: nil, page_number: nil, page_size: nil, sort: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::FaxApplication>
Some parameter documentations has been truncated, see Models::FaxApplicationListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::FaxApplicationRetrieveResponse
Return the details of an existing Fax Application inside the ‘data’ attribute of the response.
-
#update(id, application_name:, webhook_event_url:, active: nil, anchorsite_override: nil, fax_email_recipient: nil, inbound: nil, outbound: nil, tags: nil, webhook_event_failover_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::FaxApplicationUpdateResponse
Some parameter documentations has been truncated, see Models::FaxApplicationUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ FaxApplications
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 FaxApplications.
177 178 179 |
# File 'lib/telnyx/resources/fax_applications.rb', line 177 def initialize(client:) @client = client end |
Instance Method Details
#create(application_name:, webhook_event_url:, active: nil, anchorsite_override: nil, inbound: nil, outbound: nil, tags: nil, webhook_event_failover_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::FaxApplicationCreateResponse
Some parameter documentations has been truncated, see Models::FaxApplicationCreateParams for more details.
Creates a new Fax Application based on the parameters sent in the request. The application name and webhook URL are required. Once created, you can assign phone numbers to your application using the ‘/phone_numbers` endpoint.
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/telnyx/resources/fax_applications.rb', line 39 def create(params) parsed, = Telnyx::FaxApplicationCreateParams.dump_request(params) @client.request( method: :post, path: "fax_applications", body: parsed, model: Telnyx::Models::FaxApplicationCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ Telnyx::Models::FaxApplicationDeleteResponse
Permanently deletes a Fax Application. Deletion may be prevented if the application is in use by phone numbers.
165 166 167 168 169 170 171 172 |
# File 'lib/telnyx/resources/fax_applications.rb', line 165 def delete(id, params = {}) @client.request( method: :delete, path: ["fax_applications/%1$s", id], model: Telnyx::Models::FaxApplicationDeleteResponse, options: params[:request_options] ) end |
#list(filter: nil, page_number: nil, page_size: nil, sort: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::FaxApplication>
Some parameter documentations has been truncated, see Models::FaxApplicationListParams for more details.
This endpoint returns a list of your Fax Applications inside the ‘data’ attribute of the response. You can adjust which applications are listed by using filters. Fax Applications are used to configure how you send and receive faxes using the Programmable Fax API with Telnyx.
140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/telnyx/resources/fax_applications.rb', line 140 def list(params = {}) parsed, = Telnyx::FaxApplicationListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "fax_applications", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::FaxApplication, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::FaxApplicationRetrieveResponse
Return the details of an existing Fax Application inside the ‘data’ attribute of the response.
62 63 64 65 66 67 68 69 |
# File 'lib/telnyx/resources/fax_applications.rb', line 62 def retrieve(id, params = {}) @client.request( method: :get, path: ["fax_applications/%1$s", id], model: Telnyx::Models::FaxApplicationRetrieveResponse, options: params[:request_options] ) end |
#update(id, application_name:, webhook_event_url:, active: nil, anchorsite_override: nil, fax_email_recipient: nil, inbound: nil, outbound: nil, tags: nil, webhook_event_failover_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::FaxApplicationUpdateResponse
Some parameter documentations has been truncated, see Models::FaxApplicationUpdateParams for more details.
Updates settings of an existing Fax Application based on the parameters of the request.
106 107 108 109 110 111 112 113 114 115 |
# File 'lib/telnyx/resources/fax_applications.rb', line 106 def update(id, params) parsed, = Telnyx::FaxApplicationUpdateParams.dump_request(params) @client.request( method: :patch, path: ["fax_applications/%1$s", id], body: parsed, model: Telnyx::Models::FaxApplicationUpdateResponse, options: ) end |