Method: Dnsimple::Client::Registrar#renew_domain

Defined in:
lib/dnsimple/client/registrar.rb

#renew_domain(account_id, domain_name, attributes = nil, options = {}) ⇒ Struct::DomainRenewal

Renews a domain.

Examples:

Renew example.com for 3 years:

client.registrar.renew(1010, "example.com", period: 3)

Parameters:

  • account_id (Integer)

    the account ID

  • domain_name (#to_s)

    the domain name to renew

  • attributes (Hash) (defaults to: nil)
  • options (Hash) (defaults to: {})

Returns:

Raises:

See Also:



88
89
90
91
92
93
# File 'lib/dnsimple/client/registrar.rb', line 88

def renew_domain(, domain_name, attributes = nil, options = {})
  endpoint = Client.versioned("/%s/registrar/domains/%s/renewal" % [, domain_name])
  response = client.post(endpoint, attributes, options)

  Dnsimple::Response.new(response, Struct::DomainRenewal.new(response["data"]))
end