Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jacegu committed Mar 2, 2016
1 parent 4ddeb27 commit 856c7eb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/dnsimple/client/registrar.rb
Expand Up @@ -16,7 +16,8 @@ module Registrar
#
# @raise [RequestError] When the request fails.
def check(account_id, domain_name, options = {})
response = client.get(Client.versioned("/%s/registrar/domains/%s/check" % [account_id, domain_name]), options)
endpoint = Client.versioned("/%s/registrar/domains/%s/check" % [account_id, domain_name])
response = client.get(endpoint, options)

Dnsimple::Response.new(response, Struct::DomainCheck.new(response["data"]))
end
Expand All @@ -34,8 +35,8 @@ def check(account_id, domain_name, options = {})
# @raise [RequestError] When the request fails.
def register(account_id, domain_name, attributes = {}, options = {})
Extra.validate_mandatory_attributes(attributes, [:registrant_id])
options = options.merge(attributes)
response = client.post(Client.versioned("/%s/registrar/domains/%s/registration" % [account_id, domain_name]), options)
endpoint = Client.versioned("/%s/registrar/domains/%s/registration" % [account_id, domain_name])
response = client.post(endpoint, options.merge(attributes))

Dnsimple::Response.new(response, Struct::Domain.new(response["data"]))
end
Expand Down

0 comments on commit 856c7eb

Please sign in to comment.