Exception: Mobitex::DeliveryError
- Inherits:
-
StandardError
- Object
- StandardError
- Mobitex::DeliveryError
- Defined in:
- lib/mobitex/delivery_errors.rb
Overview
Delivery errors
Direct Known Subclasses
AccountInactive, BadMessageId, BadNumber, BadType, BlankText, DeliveryCallbackError, DestinationNetworkUnavailable, EmptyAccount, NoSender, SenderUnauthorized, System, TextTooLong, TypeNotSupported, UnauthorizedAccess
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response, message = nil) ⇒ DeliveryError
constructor
A new instance of DeliveryError.
- #to_s ⇒ Object
Constructor Details
#initialize(response, message = nil) ⇒ DeliveryError
Returns a new instance of DeliveryError.
7 8 9 10 |
# File 'lib/mobitex/delivery_errors.rb', line 7 def initialize(response, = nil) @response = response @message = end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/mobitex/delivery_errors.rb', line 5 def response @response end |
Instance Method Details
#to_s ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/mobitex/delivery_errors.rb', line 12 def to_s = "Delivery Failed." << " Delivery Status = #{response['Status']}." if response.has_key?('Status') << " Delivery Id = #{response['Id']}." if response.has_key?('Id') << " Delivery Number = #{response['Number']}." if response.has_key?('Number') end |