Sha256: 48d4a1d80ff94afff36467d510cab89616f063b997286c7daad7a7d056997f9f

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

Contents

module SmsNotify
  # Represents an SMS message status in the form
  # of a Ruby-like object.
  class MessageStatus
    attr_reader :completed, :demo, :scheduled_time, :status_code, :status_text, :text_id, :received_date, :responded

    # Create a new instance of a #MessageStatus
    #
    # == Example
    #   SmsNotify::MessageStatus.new(
    #     :completed => '1',
    #     :demo => '0',
    #     :scheduled_time => '2010-04-03T14:29:14.7',
    #     :status_code => '6',
    #     :status_text => 'Completed',
    #     :received_date => '2010-04-03T14:29:14.7',
    #     :responded => '0')
    def initialize(attrs)
      @completed      = attrs[:completed] || nil
      @demo           = attrs[:demo] || nil
      @scheduled_time = attrs[:scheduled_time] || nil
      @status_code    = attrs[:status_code] || nil
      @status_text    = attrs[:status_text] || nil
      @text_id        = attrs[:text_id] || nil
      @received_date  = attrs[:received_date] || nil
      @responded      = attrs[:responded] || nil
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cdyne-sms-notify-0.7.1 lib/sms_notify/message_status.rb
cdyne-sms-notify-0.7.0 lib/sms_notify/message_status.rb