Class: Telnyx::Resources::Messaging::Rcs::Agents
- Inherits:
-
Object
- Object
- Telnyx::Resources::Messaging::Rcs::Agents
- Defined in:
- lib/telnyx/resources/messaging/rcs/agents.rb
Overview
Send RCS messages
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.
84 85 86 |
# File 'lib/telnyx/resources/messaging/rcs/agents.rb', line 84 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
68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/telnyx/resources/messaging/rcs/agents.rb', line 68 def list(params = {}) parsed, = Telnyx::Messaging::Rcs::AgentListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "messaging/rcs/agents", query: query.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
20 21 22 23 24 25 26 27 |
# File 'lib/telnyx/resources/messaging/rcs/agents.rb', line 20 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
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/telnyx/resources/messaging/rcs/agents.rb', line 46 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 |