Class: Sendly::RcsAgentsResource
- Inherits:
-
Object
- Object
- Sendly::RcsAgentsResource
- Defined in:
- lib/sendly/rcs_resource.rb
Overview
List the RCS agents registered for your workspace.
Instance Method Summary collapse
-
#initialize(client) ⇒ RcsAgentsResource
constructor
A new instance of RcsAgentsResource.
-
#list ⇒ Hash
List your RCS agents, newest first.
Constructor Details
#initialize(client) ⇒ RcsAgentsResource
Returns a new instance of RcsAgentsResource.
140 141 142 |
# File 'lib/sendly/rcs_resource.rb', line 140 def initialize(client) @client = client end |
Instance Method Details
#list ⇒ Hash
List your RCS agents, newest first. An empty list means no agent is set up yet — contact support to register an RCS agent for your brand.
153 154 155 156 157 |
# File 'lib/sendly/rcs_resource.rb', line 153 def list response = @client.get("/rcs/agents") agents = (response["agents"] || []).map { |a| RcsAgent.new(a) } { agents: agents } end |