Class: Telnyx::Resources::Rcs::Agents::TestDevices
- Inherits:
-
Object
- Object
- Telnyx::Resources::Rcs::Agents::TestDevices
- Defined in:
- lib/telnyx/resources/rcs/agents/test_devices.rb,
sig/telnyx/resources/rcs/agents/test_devices.rbs
Overview
Manage RCS agent registration, testing, verification, and launch.
Instance Method Summary collapse
-
#create(id, phone_number:, request_options: {}) ⇒ Telnyx::Models::Rcs::Agents::TestDeviceResponse
Adds an RCS-capable test number after provider agent creation.
-
#delete(test_device_id, id:, request_options: {}) ⇒ nil
Removes a test device from an RCS agent and its provider registration.
-
#initialize(client:) ⇒ TestDevices
constructor
private
A new instance of TestDevices.
-
#list(id, request_options: {}) ⇒ Array<Telnyx::Models::Rcs::Agents::TestDeviceResponse>
Lists test devices attached to an RCS agent.
Constructor Details
#initialize(client:) ⇒ TestDevices
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 TestDevices.
85 86 87 |
# File 'lib/telnyx/resources/rcs/agents/test_devices.rb', line 85 def initialize(client:) @client = client end |
Instance Method Details
#create(id, phone_number:, request_options: {}) ⇒ Telnyx::Models::Rcs::Agents::TestDeviceResponse
Adds an RCS-capable test number after provider agent creation. Repeating the request for a number already attached to the agent returns the existing test device.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/telnyx/resources/rcs/agents/test_devices.rb', line 24 def create(id, params) parsed, = Telnyx::Rcs::Agents::TestDeviceCreateParams.dump_request(params) @client.request( method: :post, path: ["rcs/agents/%1$s/test_devices", id], body: parsed, model: Telnyx::Rcs::Agents::TestDeviceResponse, options: ) end |
#delete(test_device_id, id:, request_options: {}) ⇒ nil
Removes a test device from an RCS agent and its provider registration.
68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/telnyx/resources/rcs/agents/test_devices.rb', line 68 def delete(test_device_id, params) parsed, = Telnyx::Rcs::Agents::TestDeviceDeleteParams.dump_request(params) id = parsed.delete(:id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :delete, path: ["rcs/agents/%1$s/test_devices/%2$s", id, test_device_id], model: NilClass, options: ) end |
#list(id, request_options: {}) ⇒ Array<Telnyx::Models::Rcs::Agents::TestDeviceResponse>
Lists test devices attached to an RCS agent.
46 47 48 49 50 51 52 53 |
# File 'lib/telnyx/resources/rcs/agents/test_devices.rb', line 46 def list(id, params = {}) @client.request( method: :get, path: ["rcs/agents/%1$s/test_devices", id], model: Telnyx::Internal::Type::ArrayOf[Telnyx::Rcs::Agents::TestDeviceResponse], options: params[:request_options] ) end |