Sha256: d1e271e1c87f1c2a7d2987b6a5348648a9139a9204780121797febef85000d7e

Contents?: true

Size: 782 Bytes

Versions: 1

Compression:

Stored size: 782 Bytes

Contents

module SmsNotify
  # Represents an SMS message response (text reply) in the form
  # of a Ruby-like object.
  class MessageResponse
    attr_reader :response_id, :text_id, :status_code, :received_date, :message

    # Create a new instance of a #MessageResponse
    #
    # == Example
    #   SmsNotify::MessageResponse.new(
    #     :ResponseID => '1',
    #     :TextID => '123',
    #     :StatusCode => '6',
    #     :ReceivedDate => '2010-04-03T14:29:14.7',
    #     :Message => 'foo')
    def initialize(attrs)
      @response_id    = attrs[:ResponseID] || nil
      @text_id        = attrs[:TextID] || nil
      @status_code    = attrs[:StatusCode] || nil
      @received_date  = attrs[:ReceivedDate] || nil
      @message        = attrs[:Message] || nil
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cdyne-sms-notify-0.8.5 lib/sms_notify/message_response.rb