Module: Dnsimple::Client::RegistrarTransferLock

Included in:
RegistrarService
Defined in:
lib/dnsimple/client/registrar_transfer_lock.rb

Instance Method Summary collapse

Instance Method Details

#disable_domain_transfer_lock(account_id, domain_name, options = {}) ⇒ Struct::TransferLock

Disable trasnfer lock for the domain in the account.

Parameters:

  • account_id (Integer)

    the account ID

  • domain_name (#to_s)

    the domain name

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

Returns:

Raises:

See Also:



53
54
55
56
57
# File 'lib/dnsimple/client/registrar_transfer_lock.rb', line 53

def disable_domain_transfer_lock(, domain_name, options = {})
  response = client.delete(Client.versioned("/%s/registrar/domains/%s/transfer_lock" % [, domain_name]), nil, options)

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

#enable_domain_transfer_lock(account_id, domain_name, options = {}) ⇒ Struct::TransferLock

Enable transfer lock for the domain in the account.

Parameters:

  • account_id (Integer)

    the account ID

  • domain_name (#to_s)

    the domain name

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

Returns:

Raises:

See Also:



36
37
38
39
40
# File 'lib/dnsimple/client/registrar_transfer_lock.rb', line 36

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

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

#get_domain_transfer_lock(account_id, domain_name, options = {}) ⇒ Struct::TransferLock

Gets the transfer lock for the domain.

Examples:

Get the transfer lock for “example.com”:

client.registrar.get_domain_transfer_lock(1010, "example.com")

Parameters:

  • account_id (#to_s)

    the account ID

  • domain_name (#to_s)

    the domain name

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

Returns:

Raises:



19
20
21
22
23
# File 'lib/dnsimple/client/registrar_transfer_lock.rb', line 19

def get_domain_transfer_lock(, domain_name, options = {})
  response = client.get(Client.versioned("/%s/registrar/domains/%s/transfer_lock" % [, domain_name]), options)

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