2011-02-23 22:35:05 -05:00
|
|
|
module Fog
|
2011-06-15 20:25:01 -04:00
|
|
|
module DNS
|
|
|
|
class DNSimple
|
2011-02-23 22:35:05 -05:00
|
|
|
class Real
|
|
|
|
|
|
|
|
# Delete the given domain from your account. You may use
|
|
|
|
# either the domain ID or the domain name.
|
|
|
|
#
|
|
|
|
# Please note that for domains which are registered with
|
|
|
|
# DNSimple this will not delete the domain from the registry.
|
|
|
|
#
|
|
|
|
# ==== Parameters
|
|
|
|
# * name<~String> - domain name or numeric ID
|
|
|
|
#
|
|
|
|
def delete_domain(name)
|
|
|
|
request(
|
|
|
|
:expects => 200,
|
|
|
|
:method => 'DELETE',
|
|
|
|
:path => "/domains/#{name}"
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
2013-07-28 14:07:29 -04:00
|
|
|
|
|
|
|
class Mock
|
|
|
|
|
|
|
|
def delete_domain(name)
|
|
|
|
self.data[:records].delete name
|
|
|
|
self.data[:domains].reject! { |domain| domain["domain"]["name"] == name }
|
|
|
|
response = Excon::Response.new
|
|
|
|
response.status = 200
|
|
|
|
response
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
2011-02-23 22:35:05 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|