Sha256: 77cb47de56a2923382db108d1810969e7dcdc887c2288b0e6e18e2b7930cc957

Contents?: true

Size: 1.05 KB

Versions: 13

Compression:

Stored size: 1.05 KB

Contents

module TMS #:nodoc:
  # A command is a combination of behavior and parameters that should be executed 
  # when an incoming SMS message matches the associated Keyword.
  #
  # @attr name [String] The name of the command.  This will default to the command_type if not supplied. 
  # @attr command_type [String] The type of this command.  A list of valid types can be found by querying the CommandType list. 
  # @attr params [Hash] A Hash of string/string pairs used as configuration for this command.  
  # 
  # @example
  #    command = keyword.commands.build(:name => "subscribe to news", :command_type => "dcm_subscribe", :dcm_account_code => "NEWS", :dcm_topic_codes => "NEWS_1, NEWS_2")
  #    command.post
  #    command.dcm_topic_codes += ", NEWS_5"
  #    command.put
  #    command.delete
  class Command
    include InstanceResource

    # @!parse attr_accessor :name, :command_type, :params
    writeable_attributes :name, :command_type, :params
    
    # @!parse attr_reader :created_at, :updated_at
    readonly_attributes :created_at, :updated_at

  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

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