Class: Telnyx::Resources::CustomerServiceRecords
- Inherits:
-
Object
- Object
- Telnyx::Resources::CustomerServiceRecords
- Defined in:
- lib/telnyx/resources/customer_service_records.rb,
sig/telnyx/resources/customer_service_records.rbs
Overview
Customer Service Record operations
Instance Method Summary collapse
-
#create(phone_number:, additional_data: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::CustomerServiceRecordCreateResponse
Create a new customer service record for the provided phone number.
-
#initialize(client:) ⇒ CustomerServiceRecords
constructor
private
A new instance of CustomerServiceRecords.
-
#list(filter: nil, page_number: nil, page_size: nil, sort: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::CustomerServiceRecord>
Some parameter documentations has been truncated, see Models::CustomerServiceRecordListParams for more details.
-
#retrieve(customer_service_record_id, request_options: {}) ⇒ Telnyx::Models::CustomerServiceRecordRetrieveResponse
Returns the details of a single customer service record (CSR) request, including its status and any retrieved record data.
-
#verify_phone_number_coverage(phone_numbers:, request_options: {}) ⇒ Telnyx::Models::CustomerServiceRecordVerifyPhoneNumberCoverageResponse
Verify the coverage for a list of phone numbers.
Constructor Details
#initialize(client:) ⇒ CustomerServiceRecords
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 CustomerServiceRecords.
113 114 115 |
# File 'lib/telnyx/resources/customer_service_records.rb', line 113 def initialize(client:) @client = client end |
Instance Method Details
#create(phone_number:, additional_data: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::CustomerServiceRecordCreateResponse
Create a new customer service record for the provided phone number.
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/telnyx/resources/customer_service_records.rb', line 22 def create(params) parsed, = Telnyx::CustomerServiceRecordCreateParams.dump_request(params) @client.request( method: :post, path: "customer_service_records", body: parsed, model: Telnyx::Models::CustomerServiceRecordCreateResponse, options: ) end |
#list(filter: nil, page_number: nil, page_size: nil, sort: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::CustomerServiceRecord>
Some parameter documentations has been truncated, see Models::CustomerServiceRecordListParams for more details.
Returns a paginated list of your customer service record (CSR) requests, with support for filtering and sorting.
75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/telnyx/resources/customer_service_records.rb', line 75 def list(params = {}) parsed, = Telnyx::CustomerServiceRecordListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "customer_service_records", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::CustomerServiceRecord, options: ) end |
#retrieve(customer_service_record_id, request_options: {}) ⇒ Telnyx::Models::CustomerServiceRecordRetrieveResponse
Returns the details of a single customer service record (CSR) request, including its status and any retrieved record data.
45 46 47 48 49 50 51 52 |
# File 'lib/telnyx/resources/customer_service_records.rb', line 45 def retrieve(customer_service_record_id, params = {}) @client.request( method: :get, path: ["customer_service_records/%1$s", customer_service_record_id], model: Telnyx::Models::CustomerServiceRecordRetrieveResponse, options: params[:request_options] ) end |
#verify_phone_number_coverage(phone_numbers:, request_options: {}) ⇒ Telnyx::Models::CustomerServiceRecordVerifyPhoneNumberCoverageResponse
Verify the coverage for a list of phone numbers.
99 100 101 102 103 104 105 106 107 108 |
# File 'lib/telnyx/resources/customer_service_records.rb', line 99 def verify_phone_number_coverage(params) parsed, = Telnyx::CustomerServiceRecordVerifyPhoneNumberCoverageParams.dump_request(params) @client.request( method: :post, path: "customer_service_records/phone_number_coverages", body: parsed, model: Telnyx::Models::CustomerServiceRecordVerifyPhoneNumberCoverageResponse, options: ) end |