Class: EPP::Domain::CreateResponse
- Defined in:
- lib/epp-client/domain/create_response.rb
Instance Method Summary collapse
-
#creation_date ⇒ Time
Return the creation/registration date of the domain if the request was successful.
-
#expiration_date ⇒ Time
Return the expiration date of the domain if the request was successful.
-
#name ⇒ String
Return the name of the domain created if successful.
Methods inherited from Response
#initialize, #method, #method_missing, #respond_to?, #respond_to_missing?
Methods included from ResponseHelper
#nodes_for_xpath, #value_for_xpath, #values_for_xpath
Constructor Details
This class inherits a constructor from EPP::Domain::Response
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class EPP::Domain::Response
Instance Method Details
#creation_date ⇒ Time
Return the creation/registration date of the domain if the request was successful.
16 17 18 19 |
# File 'lib/epp-client/domain/create_response.rb', line 16 def creation_date return nil unless success? @crdate ||= value_for_xpath('//domain:crDate') && Time.parse(value_for_xpath('//domain:crDate')) end |
#expiration_date ⇒ Time
Return the expiration date of the domain if the request was successful.
23 24 25 26 |
# File 'lib/epp-client/domain/create_response.rb', line 23 def expiration_date return nil unless success? @exdate ||= value_for_xpath('//domain:exDate') && Time.parse(value_for_xpath('//domain:exDate')) end |
#name ⇒ String
Return the name of the domain created if successful
9 10 11 12 |
# File 'lib/epp-client/domain/create_response.rb', line 9 def name return nil unless success? @name ||= value_for_xpath('//domain:name') end |