Class: GovDelivery::TMS::Keyword
- Inherits:
-
Object
- Object
- GovDelivery::TMS::Keyword
- Includes:
- InstanceResource
- Defined in:
- lib/govdelivery/tms/resource/keyword.rb
Overview
A Keyword is a word that TMS will detect in an incoming SMS message. Keywords can have Commands, and when an incoming text message has a keyword, TMS will execute the keyword’s Commands. Keywords may also have a response text field. If the response text is not blank, the system will send an SMS reply to the user immediately with the given text.
Instance Attribute Summary collapse
-
#name ⇒ String
The name of the keyword.
-
#response_text ⇒ String
(Optional) The static text with which to reply to an SMS to this keyword.
Attributes included from InstanceResource
Instance Method Summary collapse
-
#commands ⇒ Object
A CollectionResource of Command objects.
Methods included from InstanceResource
Instance Attribute Details
#name ⇒ String
The name of the keyword. The system will scan an incoming SMS for this string (in a case-insensitive manner).
19 20 21 |
# File 'lib/govdelivery/tms/resource/keyword.rb', line 19 def name @name end |
#response_text ⇒ String
(Optional) The static text with which to reply to an SMS to this keyword. This value can be blank, in which case the handset user will not receive a response. Note that all keyword commands will be executed, regardless of the value of response_text.
19 20 21 |
# File 'lib/govdelivery/tms/resource/keyword.rb', line 19 def response_text @response_text end |
Instance Method Details
#commands ⇒ Object
A CollectionResource of Command objects
27 |
# File 'lib/govdelivery/tms/resource/keyword.rb', line 27 collection_attributes :commands |