Module: Dnsimple::Client::DomainsAutorenewal

Included in:
DomainsService
Defined in:
lib/dnsimple/client/domains_autorenewal.rb

Instance Method Summary collapse

Instance Method Details

#disable_auto_renewal(domain, options = {}) ⇒ Struct::Domain

Disables auto-renewal for a domain.

Parameters:

  • domain (#to_s)

    The domain id or domain name.

Returns:

Raises:

See Also:



27
28
29
30
31
# File 'lib/dnsimple/client/domains_autorenewal.rb', line 27

def disable_auto_renewal(domain, options = {})
  response = client.delete(Client.versioned("/domains/#{domain}/auto_renewal"), options)

  Struct::Domain.new(response["domain"])
end

#enable_auto_renewal(domain, options = {}) ⇒ Struct::Domain

Enables auto-renewal for a domain.

Parameters:

  • domain (#to_s)

    The domain id or domain name.

Returns:

Raises:

See Also:



13
14
15
16
17
# File 'lib/dnsimple/client/domains_autorenewal.rb', line 13

def enable_auto_renewal(domain, options = {})
  response = client.post(Client.versioned("/domains/#{domain}/auto_renewal"), options)

  Struct::Domain.new(response["domain"])
end