lib/sms_notify/message_status.rb in cdyne-sms-notify-0.8.4 vs lib/sms_notify/message_status.rb in cdyne-sms-notify-0.8.5
- old
+ new
@@ -7,25 +7,25 @@
# 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')
+ # :Completed => '1',
+ # :Demo => '0',
+ # :ScheduledTime => '2010-04-03T14:29:14.7',
+ # :StatusCode => '6',
+ # :StatusText => 'Completed',
+ # :ReceivedDate => '2010-04-03T14:29:14.7',
+ # :Responded => '0')
def initialize(attrs)
- @completed = attrs[:completed] || nil
+ @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
+ @scheduled_time = attrs[:ScheduledTime] || nil
+ @status_code = attrs[:StatusCode] || nil
+ @status_text = attrs[:StatusText] || nil
@text_id = attrs[:text_id] || nil
- @received_date = attrs[:received_date] || nil
- @responded = attrs[:responded] || nil
+ @received_date = attrs[:ReceivedDate] || nil
+ @responded = attrs[:Responded] || nil
end
def fatal_error?
FATAL_ERRORS.include?(self.status_code)
end