Permalink
Browse files

removed unused parameters from domain_create call

  • Loading branch information...
1 parent 2e5276b commit 0c3f35487fdce5d1e5ace8f4abb9cd384d8e4a13 Nicholas Barthelemy committed Dec 15, 2011
Showing with 5 additions and 2 deletions.
  1. +4 −1 lib/name_dot_com_api/client.rb
  2. +1 −1 lib/name_dot_com_api/version.rb
@@ -132,13 +132,16 @@ def check_domain(keyword, tlds = nil, services = nil)
# }
# ])
def create_domain(domain, period = 1, nameservers = nil, contacts = nil)
- connection.post '/domain/create', {
+ options = {
'domain_name' => domain,
'period' => period,
'nameservers' => nameservers,
'contacts' => contacts,
'username' => connection.username
}
+ options.delete('nameservers') unless nameservers
+ options.delete('contacts') unless contacts
+ connection.post '/domain/create', options
end
# response = client.get_domain('example.com')
@@ -1,3 +1,3 @@
module NameDotComApi
- VERSION = "0.3"
+ VERSION = "0.4"
end

0 comments on commit 0c3f354

Please sign in to comment.