View Source Dnsimple.Registrar (dnsimple v4.0.0)

Provides functions to interact with the registrar endpoints.

See:

Summary

Functions

Reverts all the operations performed to delegate to vanity name servers and delegates the domain back to DNSimple's name servers (if DNSimple is the registrar of the domain).

Checks if a domain name is available to be registered and whether premium pricing applies to that domain name.

Retrieves the requirements of a registrant change

Cancel an ongoing registrant change from the account.

Returns the name servers the domain is delegating to.

Retrieve the details of an existing domain registration.

Retrieve the details of an existing domain renewal.

Retrieves the transfer lock status for the domain.

Retrieves the details of an existing registrant change.

List registrant changes in the account.

Requests the transfer of a domain out of DNSimple.

Functions

Link to this function

cancel_domain_transfer(client, account_id, domain_name, domain_transfer_id, options \\ [])

View Source
@spec cancel_domain_transfer(
  Dnsimple.Client.t(),
  String.t() | integer(),
  String.t(),
  String.t() | integer(),
  Keyword.t()
) :: {:ok | :error, Dnsimple.Response.t()}

Cancels an in progress domain transfer.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.cancel_domain_transfer(client, account_id = 1010, domain_name = "example.com", transfer_id = 42)
Link to this function

change_domain_delegation(client, account_id, domain_name, name_servers, options \\ [])

View Source
@spec change_domain_delegation(
  Dnsimple.Client.t(),
  integer() | String.t(),
  String.t(),
  list(),
  keyword()
) :: {:ok | :error, Dnsimple.Response.t()}

Changes the domain's name servers and returns them.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.change_domain_delegation(client, account_id = 1010, domain_id = "example.com", [
  "ns1.provider.com",
  "ns2.provider.com",
  "ns3.provider.com",
  "ns4.provider.com",
])
Link to this function

change_domain_delegation_from_vanity(client, account_id, domain_name, options \\ [])

View Source
@spec change_domain_delegation_from_vanity(
  Dnsimple.Client.t(),
  integer() | String.t(),
  String.t(),
  Keyword.t()
) :: {:ok | :error, Dnsimple.Response.t()}

Reverts all the operations performed to delegate to vanity name servers and delegates the domain back to DNSimple's name servers (if DNSimple is the registrar of the domain).

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.change_domain_delegation_from_vanity(client, account_id = 1010, domain_id = "example.com")
Link to this function

change_domain_delegation_to_vanity(client, account_id, domain_name, name_servers, options \\ [])

View Source
@spec change_domain_delegation_to_vanity(
  Dnsimple.Client.t(),
  integer() | String.t(),
  String.t(),
  list(),
  keyword()
) :: {:ok | :error, Dnsimple.Response.t()}

Delegates the domain to vanity name servers.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.change_domain_delegation_to_vanity(client, account_id = 1010, domain_id = "example.com", [
  "ns1.example.com",
  "ns2.example.com",
  "ns3.example.com",
  "ns4.example.com",
])
Link to this function

check_domain(client, account_id, domain_name, options \\ [])

View Source
@spec check_domain(Dnsimple.Client.t(), String.t(), String.t(), keyword()) ::
  {:ok | :error, Dnsimple.Response.t()}

Checks if a domain name is available to be registered and whether premium pricing applies to that domain name.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.check_domain(client, account_id = 1010, domain_id = "example.com")
Link to this function

check_registrant_change(client, account_id, attributes, options \\ [])

View Source
@spec check_registrant_change(
  Dnsimple.Client.t(),
  integer() | String.t(),
  Keyword.t(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Retrieves the requirements of a registrant change

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"} {:ok, response} = Dnsimple.Registrar.check_registrant_change(client, account_id = 1010, %{

contact_id: 1,
domain_id: "example.com",

})

Link to this function

create_registrant_change(client, account_id, attributes, options \\ [])

View Source
@spec create_registrant_change(
  Dnsimple.Client.t(),
  integer() | String.t(),
  Keyword.t(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Start registrant change.

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"} {:ok, response} = Dnsimple.Registrar.create_registrant_change(client, account_id = 1010, %{

contact_id: 1,
domain_id: "example.com",
extended_attributes: %{
  "x-fake-attribute" => "value",
}

})

Link to this function

delete_registrant_change(client, account_id, registrant_change_id, options \\ [])

View Source
@spec delete_registrant_change(
  Dnsimple.Client.t(),
  integer() | String.t(),
  integer(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Cancel an ongoing registrant change from the account.

Examples

client = %Dnsimple.Client{access_token: "a1b2c3d4"} {:ok, response} = Dnsimple.Registrar.delete_registrant_change(client, account_id = 1010, registrant_change_id = 1)

Link to this function

disable_domain_auto_renewal(client, account_id, domain_name, options \\ [])

View Source
@spec disable_domain_auto_renewal(
  Dnsimple.Client.t(),
  integer() | String.t(),
  String.t(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Disables auto-renewal for the domain.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.disable_domain_auto_renewal(client, account_id = 1010, domain_id = "example.com")
Link to this function

disable_domain_transfer_lock(client, account_id, domain_name, options \\ [])

View Source
@spec disable_domain_transfer_lock(
  Dnsimple.Client.t(),
  integer() | String.t(),
  String.t(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Disables transfer lock for the domain.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.disable_domain_transfer_lock(client, account_id = 1010, domain_id = "example.com")
Link to this function

disable_whois_privacy(client, account_id, domain_name, options \\ [])

View Source
@spec disable_whois_privacy(
  Dnsimple.Client.t(),
  integer() | String.t(),
  String.t(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Disables whois privacy for the domain.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.disable_whois_privacy(client, account_id = 1010, domain_id = "example.com")
Link to this function

enable_domain_auto_renewal(client, account_id, domain_name, options \\ [])

View Source
@spec enable_domain_auto_renewal(
  Dnsimple.Client.t(),
  integer() | String.t(),
  String.t(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Enables auto-renewal for the domain.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.enable_domain_auto_renewal(client, account_id = 1010, domain_id = "example.com")
Link to this function

enable_domain_transfer_lock(client, account_id, domain_name, options \\ [])

View Source
@spec enable_domain_transfer_lock(
  Dnsimple.Client.t(),
  integer() | String.t(),
  String.t(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Enables transfer lock for the domain.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.enable_domain_transfer_lock(client, account_id = 1010, domain_id = "example.com")
Link to this function

enable_whois_privacy(client, account_id, domain_name, options \\ [])

View Source
@spec enable_whois_privacy(
  Dnsimple.Client.t(),
  integer() | String.t(),
  String.t(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Enables whois privacy for the domain.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.enable_whois_privacy(client, account_id = 1010, domain_id = "example.com")
Link to this function

get_domain_delegation(client, account_id, domain_name, options \\ [])

View Source
@spec get_domain_delegation(
  Dnsimple.Client.t(),
  integer() | String.t(),
  String.t(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Returns the name servers the domain is delegating to.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.get_domain_delegation(client, account_id = 1010, domain_id = "example.com")
Link to this function

get_domain_premium_price(client, account_id, domain_name, params \\ %{}, options \\ [])

View Source
This function is deprecated. Use get_domain_prices/4 instead.
@spec get_domain_premium_price(
  Dnsimple.Client.t(),
  String.t(),
  String.t(),
  map(),
  keyword()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Gets the premium price for a domain.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.get_domain_premium_price(client, account_id = "1010", domain_id = "example.com")
{:ok, response} = Dnsimple.Registrar.get_domain_premium_price(client, account_id = "1010", domain_id = "example.com", %{action: "registration"})
{:ok, response} = Dnsimple.Registrar.get_domain_premium_price(client, account_id = "1010", domain_id = "example.com", %{action: "renewal"})
{:ok, response} = Dnsimple.Registrar.get_domain_premium_price(client, account_id = "1010", domain_id = "example.com", %{action: "transfer"})
Link to this function

get_domain_prices(client, account_id, domain_name, options \\ [])

View Source
@spec get_domain_prices(Dnsimple.Client.t(), String.t(), String.t(), keyword()) ::
  {:ok | :error, Dnsimple.Response.t()}

Get prices for a domain.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.get_domain_prices(client, account_id = "1010", domain_id = "example.com")
Link to this function

get_domain_registration(client, account_id, domain_name, registration_id, options \\ [])

View Source
@spec get_domain_registration(
  Dnsimple.Client.t(),
  String.t() | integer(),
  String.t(),
  String.t() | integer(),
  Keyword.t()
) :: {:ok | :error, Dnsimple.Response.t()}

Retrieve the details of an existing domain registration.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.get_domain_registration(client, account_id = 1010, domain_id = "example.com", registration_id = 1)
Link to this function

get_domain_renewal(client, account_id, domain_name, renewal_id, options \\ [])

View Source
@spec get_domain_renewal(
  Dnsimple.Client.t(),
  String.t() | integer(),
  String.t(),
  String.t() | integer(),
  Keyword.t()
) :: {:ok | :error, Dnsimple.Response.t()}

Retrieve the details of an existing domain renewal.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.get_domain_renewal(client, account_id = 1010, domain_id = "example.com", renewal_id = 1)
Link to this function

get_domain_transfer(client, account_id, domain_name, domain_transfer_id, options \\ [])

View Source
@spec get_domain_transfer(
  Dnsimple.Client.t(),
  String.t() | integer(),
  String.t(),
  String.t() | integer(),
  Keyword.t()
) :: {:ok | :error, Dnsimple.Response.t()}

Retrieves the details of an existing domain transfer.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.get_domain_transfer(client, account_id = 1010, domain_name = "example.com", transfer_id = 42)
Link to this function

get_domain_transfer_lock(client, account_id, domain_name, options \\ [])

View Source
@spec get_domain_transfer_lock(
  Dnsimple.Client.t(),
  integer() | String.t(),
  String.t(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Retrieves the transfer lock status for the domain.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.get_domain_transfer_lock(client, account_id = 1010, domain_id = "example.com")
Link to this function

get_registrant_change(client, account_id, registrant_change_id, options \\ [])

View Source
@spec get_registrant_change(
  Dnsimple.Client.t(),
  integer() | String.t(),
  integer(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Retrieves the details of an existing registrant change.

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"} {:ok, response} = Dnsimple.Registrar.get_registrant_change(client, account_id = 1010, registrant_change_id = 1)

Link to this function

get_whois_privacy(client, account_id, domain_name, options \\ [])

View Source
@spec get_whois_privacy(
  Dnsimple.Client.t(),
  integer() | String.t(),
  String.t(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Returns the whois privacy of the domain.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.get_whois_privacy(client, account_id = 1010, domain_id = "example.com")
Link to this function

list_registrant_changes(client, account_id, options \\ [])

View Source
@spec list_registrant_changes(
  Dnsimple.Client.t(),
  integer() | String.t(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

List registrant changes in the account.

Examples

client = %Dnsimple.Client{access_token: "a1b2c3d4"} {:ok, response} = Dnsimple.Registrar.list_registrant_changes(client, account_id = 1010)

Link to this function

register_domain(client, account_id, domain_name, attributes \\ [], options \\ [])

View Source
@spec register_domain(
  Dnsimple.Client.t(),
  String.t(),
  String.t(),
  Keyword.t(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Registers a domain.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.register_domain(client, account_id = 1010, domain_id = "example.com", %{
  registrant_id: 1,
  privacy: true,
  auto_renew: false,
})
Link to this function

renew_domain(client, account_id, domain_name, attributes \\ [], options \\ [])

View Source
@spec renew_domain(
  Dnsimple.Client.t(),
  String.t(),
  String.t(),
  Keyword.t(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Renews a domain.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.renew_domain(client, account_id = 1010, domain_id = "example.com")
{:ok, response} = Dnsimple.Registrar.renew_domain(client, account_id = 1010, domain_id = "example.com", %{period: 5})
Link to this function

renew_whois_privacy(client, account_id, domain_name, options \\ [])

View Source
@spec renew_whois_privacy(
  Dnsimple.Client.t(),
  integer() | String.t(),
  String.t(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Renews whois privacy for the domain.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.renew_whois_privacy(client, account_id = 1010, domain_id = "example.com")
Link to this function

transfer_domain(client, account_id, domain_name, attributes \\ [], options \\ [])

View Source
@spec transfer_domain(
  Dnsimple.Client.t(),
  String.t(),
  String.t(),
  Keyword.t(),
  Keyword.t()
) ::
  {:ok | :error, Dnsimple.Response.t()}

Starts the transfer of a domain to DNSimple.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.transfer_domain(client, account_id = 1010, domain_id = "example.com", %{
  registrant_id: 1,
  auth_code: "XXXXXXXXX",
  privacy: true,
  auto_renew: true,
})
Link to this function

transfer_domain_out(client, account_id, domain_name, options \\ [])

View Source
@spec transfer_domain_out(Dnsimple.Client.t(), String.t(), String.t(), Keyword.t()) ::
  {:ok | :error, Dnsimple.Response.t()}

Requests the transfer of a domain out of DNSimple.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Registrar.transfer_domain_out(client, account_id = 1010, domain_id = "example.com")