Class: Telnyx::Resources::Messaging::Rcs::Agents
- Inherits:
-
Object
- Object
- Telnyx::Resources::Messaging::Rcs::Agents
- Defined in:
- lib/telnyx/resources/messaging/rcs/agents.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Agents
constructor
private
A new instance of Agents.
-
#list(page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::RcsAgent>
List all RCS agents.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::RcsAgentResponse
Retrieve an RCS agent.
-
#update(id, profile_id: nil, webhook_failover_url: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::RcsAgentResponse
Modify an RCS agent.
Constructor Details
#initialize(client:) ⇒ Agents
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 Agents.
82 83 84 |
# File 'lib/telnyx/resources/messaging/rcs/agents.rb', line 82 def initialize(client:) @client = client end |
Instance Method Details
#list(page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::RcsAgent>
List all RCS agents
67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/telnyx/resources/messaging/rcs/agents.rb', line 67 def list(params = {}) parsed, = Telnyx::Messaging::Rcs::AgentListParams.dump_request(params) @client.request( method: :get, path: "messaging/rcs/agents", query: parsed.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::RcsAgent, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::RcsAgentResponse
Retrieve an RCS agent
19 20 21 22 23 24 25 26 |
# File 'lib/telnyx/resources/messaging/rcs/agents.rb', line 19 def retrieve(id, params = {}) @client.request( method: :get, path: ["messaging/rcs/agents/%1$s", id], model: Telnyx::RcsAgentResponse, options: params[:request_options] ) end |
#update(id, profile_id: nil, webhook_failover_url: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::RcsAgentResponse
Modify an RCS agent
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/telnyx/resources/messaging/rcs/agents.rb', line 45 def update(id, params = {}) parsed, = Telnyx::Messaging::Rcs::AgentUpdateParams.dump_request(params) @client.request( method: :patch, path: ["messaging/rcs/agents/%1$s", id], body: parsed, model: Telnyx::RcsAgentResponse, options: ) end |