name_dot_com_api 0.3 → 0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -132,13 +132,16 @@ module NameDotComApi
132
132
  # }
133
133
  # ])
134
134
  def create_domain(domain, period = 1, nameservers = nil, contacts = nil)
135
- connection.post '/domain/create', {
135
+ options = {
136
136
  'domain_name' => domain,
137
137
  'period' => period,
138
138
  'nameservers' => nameservers,
139
139
  'contacts' => contacts,
140
140
  'username' => connection.username
141
141
  }
142
+ options.delete('nameservers') unless nameservers
143
+ options.delete('contacts') unless contacts
144
+ connection.post '/domain/create', options
142
145
  end
143
146
 
144
147
  # response = client.get_domain('example.com')
@@ -1,3 +1,3 @@
1
1
  module NameDotComApi
2
- VERSION = "0.3"
2
+ VERSION = "0.4"
3
3
  end
metadata CHANGED
@@ -4,8 +4,8 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 3
8
- version: "0.3"
7
+ - 4
8
+ version: "0.4"
9
9
  platform: ruby
10
10
  authors:
11
11
  - Nicholas Barthelemy
@@ -13,7 +13,7 @@ autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
15
 
16
- date: 2011-12-13 00:00:00 -06:00
16
+ date: 2011-12-15 00:00:00 -06:00
17
17
  default_executable:
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency