Module: Dnsimple::Client::TemplatesDomains

Included in:
TemplatesService
Defined in:
lib/dnsimple/client/templates_domains.rb

Instance Method Summary collapse

Instance Method Details

#apply_template(account_id, template_id, domain_id, options = {}) ⇒ Dnsimple::Response<nil>

Applies a template to the domain.

Examples:

Apply template 5401 for example.com in account 1010:

client.templates.apply_template(1010, 5401, "example.com")

Parameters:

  • account_id (Integer)

    The account ID

  • template_id (#to_s)

    The template ID

  • domain_id (#to_s)

    The Domain ID or name

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

Returns:

Raises:

See Also:


22
23
24
25
26
27
# File 'lib/dnsimple/client/templates_domains.rb', line 22

def apply_template(, template_id, domain_id, options = {})
  endpoint = Client.versioned("/%s/domains/%s/templates/%s" % [, domain_id, template_id])
  response = client.post(endpoint, options)

  Dnsimple::Response.new(response, nil)
end