Class: Telnyx::Resources::CustomerServiceRecords
- Inherits:
-
Object
- Object
- Telnyx::Resources::CustomerServiceRecords
- Defined in:
- lib/telnyx/resources/customer_service_records.rb
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
Get a specific customer service record.
-
#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.
111 112 113 |
# File 'lib/telnyx/resources/customer_service_records.rb', line 111 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.
List customer service records.
73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/telnyx/resources/customer_service_records.rb', line 73 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
Get a specific customer service record.
44 45 46 47 48 49 50 51 |
# File 'lib/telnyx/resources/customer_service_records.rb', line 44 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.
97 98 99 100 101 102 103 104 105 106 |
# File 'lib/telnyx/resources/customer_service_records.rb', line 97 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 |