Sha256: 80cca3a735cdf3e620b5aee16d7c0cfdd8ff58f4c3d64b93ae8aedbb578525da

Contents?: true

Size: 1.28 KB

Versions: 13

Compression:

Stored size: 1.28 KB

Contents

module TMS #:nodoc:
  # 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. 
  #
  # @attr name [String] The name of the keyword.  The system will scan an incoming SMS for this string (in a case-insensitive manner). 
  # @attr 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.
  #  
  # @example
  #   keyword = client.keywords.build(:name => "HOWDY")
  #   keyword.post
  #   keyword.name = "INFO"
  #   keyword.response_text = "Please call our support staff at 1-555-555-5555"
  #   keyword.put
  #   keyword.delete
  class Keyword
    include InstanceResource

    # @!parse attr_accessor :name, :response_text
    writeable_attributes :name, :response_text

    ##
    # A CollectionResource of Command objects
    collection_attributes :commands

  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
govdelivery-tms-0.8.0 lib/govdelivery-tms/resource/keyword.rb
tms_client-0.6.0 lib/tms_client/resource/keyword.rb
tms_client-0.5.4 lib/tms_client/resource/keyword.rb
tms_client-0.5.3 lib/tms_client/resource/keyword.rb
tms_client-0.5.2 lib/tms_client/resource/keyword.rb
tms_client-0.5.1 lib/tms_client/resource/keyword.rb
tms_client-0.4.1 lib/tms_client/resource/keyword.rb
tms_client-0.4.0 lib/tms_client/resource/keyword.rb
tms_client-0.3.0 lib/tms_client/resource/keyword.rb
tms_client-0.2.2 lib/tms_client/resource/keyword.rb
tms_client-0.2.1 lib/tms_client/resource/keyword.rb
tms_client-0.2.0 lib/tms_client/resource/keyword.rb
tms_client-0.1.1 lib/tms_client/resource/keyword.rb