Class: Epp::Eis::ContactCheckResponse
- Inherits:
-
Object
- Object
- Epp::Eis::ContactCheckResponse
- Defined in:
- lib/epp-eis/contact.rb
Instance Method Summary collapse
- #code ⇒ Object
-
#initialize(response) ⇒ ContactCheckResponse
constructor
A new instance of ContactCheckResponse.
- #items ⇒ Object
- #message ⇒ Object
Constructor Details
#initialize(response) ⇒ ContactCheckResponse
24 25 26 |
# File 'lib/epp-eis/contact.rb', line 24 def initialize(response) @response = Nokogiri::XML(response) end |
Instance Method Details
#code ⇒ Object
28 29 30 |
# File 'lib/epp-eis/contact.rb', line 28 def code @response.css('epp response result').first['code'].to_i end |
#items ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/epp-eis/contact.rb', line 36 def items @response.css('contact|chkData contact|cd', 'contact' => XML_NS_CONTACT).collect do |contact| ContactCheck.new( contact.css('contact|id', 'contact' => XML_NS_CONTACT).text, contact.css('contact|id', 'contact' => XML_NS_CONTACT).first['avail'].to_i == 1, contact.css('contact|reason', 'contact' => XML_NS_CONTACT).text ) end end |
#message ⇒ Object
32 33 34 |
# File 'lib/epp-eis/contact.rb', line 32 def @response.css('epp response result msg').text end |