Class: Epp::Eis::ContactInfoResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/epp-eis/contact.rb

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ContactInfoResponse

Returns a new instance of ContactInfoResponse.



84
85
86
# File 'lib/epp-eis/contact.rb', line 84

def initialize(response)
  @response = Nokogiri::XML(response)
end

Instance Method Details

#codeObject



88
89
90
# File 'lib/epp-eis/contact.rb', line 88

def code
  @response.css('epp response result').first['code'].to_i
end

#contact_cityObject



116
117
118
# File 'lib/epp-eis/contact.rb', line 116

def contact_city
  @response.css('contact|infData contact|addr contact|city', 'contact' => XML_NS_CONTACT).text
end

#contact_country_codeObject



124
125
126
# File 'lib/epp-eis/contact.rb', line 124

def contact_country_code
  @response.css('contact|infData contact|addr contact|cc', 'contact' => XML_NS_CONTACT).text
end

#contact_emailObject



128
129
130
# File 'lib/epp-eis/contact.rb', line 128

def contact_email
  @response.css('contact|infData contact|email', 'contact' => XML_NS_CONTACT).text
end

#contact_idObject



96
97
98
# File 'lib/epp-eis/contact.rb', line 96

def contact_id
  @response.css('contact|infData contact|id', 'contact' => XML_NS_CONTACT).text
end

#contact_nameObject



108
109
110
# File 'lib/epp-eis/contact.rb', line 108

def contact_name
  @response.css('contact|infData contact|postalInfo contact|name', 'contact' => XML_NS_CONTACT).text
end

#contact_postal_codeObject



120
121
122
# File 'lib/epp-eis/contact.rb', line 120

def contact_postal_code
  @response.css('contact|infData contact|addr contact|pc', 'contact' => XML_NS_CONTACT).text
end

#contact_roidObject



100
101
102
# File 'lib/epp-eis/contact.rb', line 100

def contact_roid
  @response.css('contact|infData contact|roid', 'contact' => XML_NS_CONTACT).text
end

#contact_statusObject



104
105
106
# File 'lib/epp-eis/contact.rb', line 104

def contact_status
  @response.css('contact|infData contact|status', 'contact' => XML_NS_CONTACT).first['s']
end

#contact_streetObject



112
113
114
# File 'lib/epp-eis/contact.rb', line 112

def contact_street
  @response.css('contact|infData contact|addr contact|street', 'contact' => XML_NS_CONTACT).text
end

#messageObject



92
93
94
# File 'lib/epp-eis/contact.rb', line 92

def message
  @response.css('epp response result msg').text
end