Class: ValidatedNumber

Inherits:
Object
  • Object
show all
Defined in:
lib/sms_service/sms_get_validated_numbers_response.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(number, validated_until) ⇒ ValidatedNumber

Returns a new instance of ValidatedNumber.



37
38
39
40
# File 'lib/sms_service/sms_get_validated_numbers_response.rb', line 37

def initialize(number, validated_until)
  @number           = number
  @validated_until  = validated_until
end

Instance Attribute Details

#numberObject

Returns the value of attribute number.



35
36
37
# File 'lib/sms_service/sms_get_validated_numbers_response.rb', line 35

def number
  @number
end

#validated_untilObject

Returns the value of attribute validated_until.



35
36
37
# File 'lib/sms_service/sms_get_validated_numbers_response.rb', line 35

def validated_until
  @validated_until
end

Class Method Details

.build_from_xml(xml_doc) ⇒ Object



42
43
44
45
46
47
# File 'lib/sms_service/sms_get_validated_numbers_response.rb', line 42

def self.build_from_xml(xml_doc)
  number = xml_doc.xpath("number").to_s
  validated_until = xml_doc.xpath("validUntil").to_s

  return ValidatedNumber.new(number, validated_until)
end

Instance Method Details

#to_sObject



49
50
51
# File 'lib/sms_service/sms_get_validated_numbers_response.rb', line 49

def to_s
  self.inspect
end