Class: SmsTraffic::Client::Reply

Inherits:
Object
  • Object
show all
Defined in:
lib/sms_traffic/client/reply.rb

Direct Known Subclasses

DeliverReply, StatusReply

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml, xml_parser: SmsTraffic.configuration.xml_parser) ⇒ Reply

Returns a new instance of Reply.



6
7
8
9
# File 'lib/sms_traffic/client/reply.rb', line 6

def initialize(xml, xml_parser: SmsTraffic.configuration.xml_parser)
  @xml  = xml.gsub!(/\s+/, ' ')
  @hash = fetch_value(xml_parser.parse(xml), :reply)
end

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash.



4
5
6
# File 'lib/sms_traffic/client/reply.rb', line 4

def hash
  @hash
end

#xmlObject (readonly)

Returns the value of attribute xml.



4
5
6
# File 'lib/sms_traffic/client/reply.rb', line 4

def xml
  @xml
end