dnsimple 4.3.0 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +5 -0
  3. data/.rubocop_dnsimple.yml +28 -8
  4. data/.travis.yml +12 -7
  5. data/CHANGELOG.md +7 -0
  6. data/LICENSE.txt +1 -1
  7. data/README.md +1 -1
  8. data/lib/dnsimple/client.rb +1 -1
  9. data/lib/dnsimple/client/certificates.rb +185 -28
  10. data/lib/dnsimple/client/registrar.rb +5 -5
  11. data/lib/dnsimple/struct.rb +2 -0
  12. data/lib/dnsimple/struct/certificate.rb +9 -0
  13. data/lib/dnsimple/struct/certificate_purchase.rb +25 -0
  14. data/lib/dnsimple/struct/certificate_renewal.rb +28 -0
  15. data/lib/dnsimple/struct/domain_registration.rb +0 -3
  16. data/lib/dnsimple/struct/domain_renewal.rb +0 -3
  17. data/lib/dnsimple/struct/domain_transfer.rb +0 -3
  18. data/lib/dnsimple/struct/extended_attribute.rb +1 -1
  19. data/lib/dnsimple/struct/service.rb +1 -1
  20. data/lib/dnsimple/struct/whoami.rb +2 -2
  21. data/lib/dnsimple/version.rb +1 -1
  22. data/spec/dnsimple/client/certificates_spec.rb +225 -1
  23. data/spec/dnsimple/client/collaborators_spec.rb +1 -1
  24. data/spec/dnsimple/client/contacts_spec.rb +1 -1
  25. data/spec/dnsimple/client/domains_delegation_signer_records_spec.rb +1 -1
  26. data/spec/dnsimple/client/domains_dnssec_spec.rb +2 -2
  27. data/spec/dnsimple/client/domains_email_forwards_spec.rb +1 -1
  28. data/spec/dnsimple/client/domains_pushes_spec.rb +1 -1
  29. data/spec/dnsimple/client/domains_spec.rb +3 -3
  30. data/spec/dnsimple/client/registrar_spec.rb +3 -3
  31. data/spec/dnsimple/client/registrar_whois_privacy_spec.rb +3 -3
  32. data/spec/dnsimple/client/services_spec.rb +1 -1
  33. data/spec/dnsimple/client/tlds_spec.rb +7 -7
  34. data/spec/dnsimple/client/zones_records_spec.rb +2 -2
  35. data/spec/dnsimple/client/zones_spec.rb +2 -2
  36. data/spec/fixtures.http/{transferDomainOut → authorizeDomainTransferOut}/success.http +0 -0
  37. data/spec/fixtures.http/getCertificate/success.http +1 -1
  38. data/spec/fixtures.http/issueLetsencryptCertificate/success.http +21 -0
  39. data/spec/fixtures.http/issueRenewalLetsencryptCertificate/success.http +21 -0
  40. data/spec/fixtures.http/listCertificates/success.http +1 -1
  41. data/spec/fixtures.http/purchaseLetsencryptCertificate/success.http +21 -0
  42. data/spec/fixtures.http/purchaseRenewalLetsencryptCertificate/success.http +21 -0
  43. data/spec/fixtures.http/whoami/success-account.http +1 -1
  44. data/spec/fixtures.http/whoami/success-user.http +1 -1
  45. data/spec/fixtures.http/whoami/success.http +1 -1
  46. metadata +15 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ebcde22a916ca2575f93426b277d8fb2000da824
4
- data.tar.gz: d26271208dcf497b132004385a800ff229432287
3
+ metadata.gz: 5798dd92561074094a81017acdd5337d2497e6b0
4
+ data.tar.gz: cde903898b98b7d316d0542f7e9257de64f5196a
5
5
  SHA512:
6
- metadata.gz: 68991131ad17ff8d9a7bf14ddf3fed6a2f298668074e39945537478eff76bad1f921db9e90c8b34aa311fda12e19f8267fb208bb7605001f965bb9f65bd73c1e
7
- data.tar.gz: 2993c7d50cd5a8eaf44a0d15276dc7b0ce6e1374f20be04f62ccac9bd650a7b43d7acfaf8ee7102ac66dc2b91be8baee72a2a297211b2b13039aae3e5ab6b267
6
+ metadata.gz: dc7c8c73aa1deace9034c3d5e4f8a392c0dbd966b73ff28c1771f581614f6efbe74e331b01225552513c63d006637f24d3df07ac68b44940aa9ada62d0a99c99
7
+ data.tar.gz: 6c1cc1d2121ccbbc316bcd55a99d3c4fca2a00410298c56f69bbc22b925ce0cee1b46bc30ed97467d202183a690982b61c49ad3d84fefecbb1800b91394fe924
@@ -2,6 +2,11 @@ inherit_from:
2
2
  - .rubocop_todo.yml
3
3
  - .rubocop_dnsimple.yml
4
4
 
5
+ AllCops:
6
+ Exclude:
7
+ - '*.gemspec'
8
+ - 'Rakefile'
9
+
5
10
  # [codesmell]
6
11
  # It's irrelevant here, but it could be a code smell.
7
12
  # Hence keep it disabled, but don't include it in the DNSimple suite.
@@ -84,6 +84,13 @@ Metrics/ParameterLists:
84
84
  Metrics/PerceivedComplexity:
85
85
  Enabled: false
86
86
 
87
+ # We use it from time to time, as it's not always possible (or maintainable)
88
+ # to use simple ? methods.
89
+ # Moreover, it's actually more efficient to not-use predicates:
90
+ # https://github.com/bbatsov/rubocop/issues/3633
91
+ Naming/PredicateName:
92
+ Enabled: false
93
+
87
94
  # [codesmell]
88
95
  # I don't really get the point of this cop.
89
96
  Performance/RedundantMerge:
@@ -119,12 +126,17 @@ Style/EmptyElse:
119
126
  Style/EmptyMethod:
120
127
  Enabled: false
121
128
 
122
- # I personally don't care about the format style.
123
- # In most cases I like to use %, but not at the point I want to enforce it
129
+ # We don't care about the format style.
130
+ # In most cases we use %, but not at the point we want to enforce it
124
131
  # as a convention in the entire code.
125
132
  Style/FormatString:
126
133
  Enabled: false
127
134
 
135
+ # Annotated tokens (like %<foo>s) are a good thing, but in most cases we don't need them.
136
+ # %s is a simpler and straightforward version that works in almost all cases. So don't complain.
137
+ Style/FormatStringToken:
138
+ Enabled: false
139
+
128
140
  # We don't support frozen strings.
129
141
  # This is an experimental feature and we don't know if it will be shipped with
130
142
  # Ruby 3.0 or not.
@@ -175,12 +187,16 @@ Style/NumericLiterals:
175
187
  Style/PercentLiteralDelimiters:
176
188
  Enabled: false
177
189
 
178
- # We use it from time to time, as it's not always possible (or maintainable)
179
- # to use simple ? methods.
180
- # Moreover, it's actually more efficient to not-use predicates:
181
- # https://github.com/bbatsov/rubocop/issues/3633
182
- Style/PredicateName:
183
- Enabled: false
190
+ # Enable but only for multiple returns value.
191
+ #
192
+ # return foo, bar
193
+ #
194
+ # reads much better than
195
+ #
196
+ # [foo, bar]
197
+ #
198
+ Style/RedundantReturn:
199
+ AllowMultipleReturnValues: true
184
200
 
185
201
  # Do we care?
186
202
  Style/RegexpLiteral:
@@ -265,6 +281,10 @@ Layout/DotPosition:
265
281
  Layout/EmptyLines:
266
282
  Enabled: false
267
283
 
284
+ # This is buggy. It detects as a style violation a few `class` and `module` definitions
285
+ Layout/EmptyLinesAroundArguments:
286
+ Enabled: false
287
+
268
288
  Layout/EmptyLinesAroundBlockBody:
269
289
  Exclude:
270
290
  # RSpec is all made of blocks. Disable this config in RSpec
@@ -1,13 +1,18 @@
1
- sudo: false
2
1
  language: ruby
2
+
3
+ sudo: false
4
+
3
5
  rvm:
4
- - 2.0
5
- - 2.1
6
- - 2.2
7
- - 2.3.4
8
- - 2.4.1
9
- env: COVERALL=1
6
+ - 2.0
7
+ - 2.1
8
+ - 2.2
9
+ - 2.3
10
+ - 2.4
11
+
12
+ env:
13
+ - COVERALL=1
10
14
 
11
15
  before_install:
16
+ - rvm get latest
12
17
  - gem update --system
13
18
  - gem install bundler
@@ -3,6 +3,13 @@
3
3
  This project uses [Semantic Versioning 2.0.0](http://semver.org/).
4
4
 
5
5
 
6
+ #### 4.4.0
7
+
8
+ - NEW: Added Let's Encrypt certificate methods (GH-159)
9
+
10
+ - REMOVED: Removed premium_price attribute from registrar order responses (GH-163). Please do not rely on that attribute, as it returned an incorrect value. The attribute is going to be removed, and the API now returns a null value.
11
+
12
+
6
13
  #### 4.3.0
7
14
 
8
15
  - NEW: Added `certificates.all_certificates` (dnsimple/dnsimple-ruby#155)
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2010-2017 Aetrion LLC
3
+ Copyright (c) 2010-2018 Aetrion LLC
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -88,4 +88,4 @@ The value you provide will be appended to the default `User-Agent` the client us
88
88
 
89
89
  ## License
90
90
 
91
- Copyright (c) 2010-2017 Aetrion LLC. This is Free Software distributed under the MIT license.
91
+ Copyright (c) 2010-2018 Aetrion LLC. This is Free Software distributed under the MIT license.
@@ -61,7 +61,7 @@ module Dnsimple
61
61
  def initialize(options = {})
62
62
  defaults = Dnsimple::Default.options
63
63
 
64
- Dnsimple::Default.keys.each do |key|
64
+ Dnsimple::Default.keys.each do |key| # rubocop:disable Performance/HashEachMethods
65
65
  instance_variable_set(:"@#{key}", options[key] || defaults[key])
66
66
  end
67
67
 
@@ -2,9 +2,9 @@ module Dnsimple
2
2
  class Client
3
3
  module Certificates
4
4
 
5
- # Lists the certificates associated to the domain.
5
+ # List the certificates for the domain in the account.
6
6
  #
7
- # @see https://developer.dnsimple.com/v2/domains/certificates/#list
7
+ # @see https://developer.dnsimple.com/v2/certificates/#listCertificates
8
8
  # @see #all_certificates
9
9
  #
10
10
  # @example List certificates in the first page
@@ -16,9 +16,9 @@ module Dnsimple
16
16
  # @example List certificates, provide a sorting policy
17
17
  # client.certificates.list(1010, "example.com", sort: "email:asc")
18
18
  #
19
- # @param [Integer] account_id the account ID
20
- # @param [#to_s] domain_name the domain name
21
- # @param [Hash] options the filtering and sorting options
19
+ # @param account_id [Integer] the account ID
20
+ # @param domain_name [#to_s] The domain ID or domain name
21
+ # @param options [Hash] the filtering and sorting options
22
22
  # @option options [Integer] :page current page (pagination)
23
23
  # @option options [Integer] :per_page number of entries to return (pagination)
24
24
  # @return [Dnsimple::PaginatedResponse<Dnsimple::Struct::Certificate>]
@@ -30,7 +30,7 @@ module Dnsimple
30
30
  Dnsimple::PaginatedResponse.new(response, response["data"].map { |r| Struct::Certificate.new(r) })
31
31
  end
32
32
 
33
- # Lists ALL the certificates for the domain.
33
+ # List ALL the certificates for the domain in the account.
34
34
  #
35
35
  # This method is similar to {#certificates}, but instead of returning the results of a specific page
36
36
  # it iterates all the pages and returns the entire collection.
@@ -38,12 +38,12 @@ module Dnsimple
38
38
  # Please use this method carefully, as fetching the entire collection will increase the number of requests
39
39
  # you send to the API server and you may eventually risk to hit the throttle limit.
40
40
  #
41
- # @see https://developer.dnsimple.com/v2/domains/certificates/#list
41
+ # @see https://developer.dnsimple.com/v2/certificates/#listCertificates
42
42
  # @see #certificates
43
43
  #
44
- # @param [Integer] account_id the account ID
45
- # @param [#to_s] domain_name The domain ID or domain name
46
- # @param [Hash] options the filtering and sorting option
44
+ # @param account_id [Integer] the account ID
45
+ # @param domain_name [#to_s] The domain ID or domain name
46
+ # @param options [Hash] the filtering and sorting option
47
47
  # @option options [Integer] :page current page (pagination)
48
48
  # @option options [Integer] :per_page number of entries to return (pagination)
49
49
  # @option options [String] :sort sorting policy
@@ -54,14 +54,14 @@ module Dnsimple
54
54
  paginate(:certificates, account_id, domain_name, options)
55
55
  end
56
56
 
57
- # Gets a certificate associated to the domain.
57
+ # Get the details of a certificate.
58
58
  #
59
- # @see https://developer.dnsimple.com/v2/domains/certificates/#get
59
+ # @see https://developer.dnsimple.com/v2/certificates/#getCertificate
60
60
  #
61
- # @param [Integer] account_id the account ID
62
- # @param [#to_s] domain_id the domain ID or domain name
63
- # @param [Integer] certificate_id the certificate ID
64
- # @param [Hash] options
61
+ # @param account_id [Integer] the account ID
62
+ # @param domain_id [#to_s] the domain ID or domain name
63
+ # @param certificate_id [Integer] the certificate ID
64
+ # @param options [Hash]
65
65
  # @return [Dnsimple::Response<Dnsimple::Struct::Certificate>]
66
66
  #
67
67
  # @raise [Dnsimple::NotFoundError]
@@ -72,14 +72,14 @@ module Dnsimple
72
72
  Dnsimple::Response.new(response, Struct::Certificate.new(response["data"]))
73
73
  end
74
74
 
75
- # Downloads a certificate associated to the domain.
75
+ # Get the PEM-encoded certificate, along with the root certificate and intermediate chain.
76
76
  #
77
- # @see https://developer.dnsimple.com/v2/domains/certificates/#download
77
+ # @see https://developer.dnsimple.com/v2/certificates/#downloadCertificate
78
78
  #
79
- # @param [Integer] account_id the account ID
80
- # @param [#to_s] domain_id the domain ID or domain name
81
- # @param [Integer] certificate_id the certificate ID
82
- # @param [Hash] options
79
+ # @param account_id [Integer] the account ID
80
+ # @param domain_id [#to_s] the domain ID or domain name
81
+ # @param certificate_id [Integer] the certificate ID
82
+ # @param options [Hash]
83
83
  # @return [Dnsimple::Response<Dnsimple::Struct::CertificateBundle>]
84
84
  #
85
85
  # @raise [Dnsimple::NotFoundError]
@@ -90,14 +90,14 @@ module Dnsimple
90
90
  Dnsimple::Response.new(response, Struct::CertificateBundle.new(response["data"]))
91
91
  end
92
92
 
93
- # Get certificate private key associated to the domain.
93
+ # Get the PEM-encoded certificate private key.
94
94
  #
95
- # @see https://developer.dnsimple.com/v2/domains/certificates/#get-private-key
95
+ # @see https://developer.dnsimple.com/v2/certificates/#getCertificatePrivateKey
96
96
  #
97
- # @param [Integer] account_id the account ID
98
- # @param [#to_s] domain_id the domain ID or domain name
99
- # @param [Integer] certificate_id the certificate ID
100
- # @param [Hash] options
97
+ # @param account_id [Integer] the account ID
98
+ # @param domain_id [#to_s] the domain ID or domain name
99
+ # @param certificate_id [Integer] the certificate ID
100
+ # @param options [Hash]
101
101
  # @return [Dnsimple::Response<Dnsimple::Struct::CertificateBundle>]
102
102
  #
103
103
  # @raise [Dnsimple::NotFoundError]
@@ -108,6 +108,163 @@ module Dnsimple
108
108
  Dnsimple::Response.new(response, Struct::CertificateBundle.new(response["data"]))
109
109
  end
110
110
 
111
+ # Purchase a Let's Encrypt certificate.
112
+ #
113
+ # This method creates a new certificate order. The certificate ID should be used to
114
+ # request the issuance of the certificate using {#issue_letsencrypt_certificate}.
115
+ #
116
+ # @see https://developer.dnsimple.com/v2/certificates/#purchaseLetsencryptCertificate
117
+ #
118
+ # @param account_id [Integer] the account ID
119
+ # @param domain_id [#to_s] the domain ID or domain name
120
+ # @param attributes [Hash]
121
+ # @option attributes [Integer] :contact_id the contact ID (mandatory)
122
+ # @option attributes [String] :name the certificate name (optional)
123
+ # @option attributes [Array<String>] :alternate_names the certificate alternate names (optional)
124
+ # @option attributes [TrueClass,FalseClass] :auto_renew enable certificate auto renew (optional)
125
+ # @param options[Hash]
126
+ #
127
+ # @return [Dnsimple::Response<Dnsimple::Struct::CertificatPurchase>]
128
+ #
129
+ # @raise [Dnsimple::NotFoundError]
130
+ # @raise [Dnsimple::RequestError]
131
+ #
132
+ # @example Basic usage
133
+ # response = client.certificates.purchase_letsencrypt_certificate(1010, "example.com", contact_id: 1)
134
+ # certificate = response.data
135
+ #
136
+ # certificate.id # => 100
137
+ # certificate.common_name # => "www.example.com"
138
+ # certificate.alternate_names # => []
139
+ # certificate.auto_renew # => false
140
+ #
141
+ # @example Custom name
142
+ # response = client.certificates.purchase_letsencrypt_certificate(1010, "example.com", contact_id: 1, name: "docs")
143
+ # certificate = response.data
144
+ #
145
+ # certificate.id # => 100
146
+ # certificate.common_name # => "docs.example.com"
147
+ # certificate.alternate_names # => []
148
+ # certificate.auto_renew # => false
149
+ #
150
+ # @example SAN names
151
+ # response = client.certificates.purchase_letsencrypt_certificate(1010, "example.com", contact_id: 1, alternate_names: ["api.example.com", "status.example.com"])
152
+ # certificate = response.data
153
+ #
154
+ # certificate.id # => 100
155
+ # certificate.common_name # => "www.example.com"
156
+ # certificate.alternate_names # => ["api.example.com", "status.example.com"]
157
+ # certificate.auto_renew # => false
158
+ #
159
+ # @example Auto renew
160
+ # response = client.certificates.purchase_letsencrypt_certificate(1010, "example.com", contact_id: 1, auto_renew: true)
161
+ # certificate = response.data
162
+ #
163
+ # certificate.id # => 100
164
+ # certificate.common_name # => "www.example.com"
165
+ # certificate.alternate_names # => []
166
+ # certificate.auto_renew # => true
167
+ def purchase_letsencrypt_certificate(account_id, domain_id, attributes, options = {})
168
+ Extra.validate_mandatory_attributes(attributes, [:contact_id])
169
+ response = client.post(Client.versioned("/%s/domains/%s/certificates/letsencrypt" % [account_id, domain_id]), attributes, options)
170
+
171
+ Dnsimple::Response.new(response, Struct::CertificatePurchase.new(response["data"]))
172
+ end
173
+
174
+ # Issue a pending Let's Encrypt certificate order.
175
+ #
176
+ # Note that the issuance process is async. A successful response means the issuance
177
+ # request has been successfully acknowledged and queued for processing.
178
+ #
179
+ # @see https://developer.dnsimple.com/v2/certificates/#issueLetsencryptCertificate
180
+ #
181
+ # @param account_id [Integer] the account ID
182
+ # @param domain_id [#to_s] the domain ID or domain name
183
+ # @param certificate_id [Integer] the certificate ID returned by the purchase method
184
+ # @param options [Hash]
185
+ #
186
+ # @return [Dnsimple::Response<Dnsimple::Struct::Certificate>]
187
+ #
188
+ # @raise [Dnsimple::NotFoundError]
189
+ # @raise [Dnsimple::RequestError]
190
+ #
191
+ # @example Basic usage
192
+ # reponse = client.certificates.issue_letsencrypt_certificate(1010, "example.com", 100)
193
+ # certificate = response.data
194
+ #
195
+ # certificate.state # => "requesting"
196
+ def issue_letsencrypt_certificate(account_id, domain_id, certificate_id, options = {})
197
+ response = client.post(Client.versioned("/%s/domains/%s/certificates/letsencrypt/%s/issue" % [account_id, domain_id, certificate_id]), options)
198
+
199
+ Dnsimple::Response.new(response, Struct::Certificate.new(response["data"]))
200
+ end
201
+
202
+ # Purchase a Let's Encrypt certificate renewal.
203
+ #
204
+ # @see https://developer.dnsimple.com/v2/certificates/#purchaseRenewalLetsencryptCertificate
205
+ #
206
+ # @param account_id [Integer] the account ID
207
+ # @param domain_id [#to_s] the domain ID or domain name
208
+ # @param certificate_id [Integer] the certificate ID
209
+ # @param attributes [Hash]
210
+ # @option attributes [TrueClass,FalseClass] :auto_renew enable certificate auto renew (optional)
211
+ # @param options [Hash]
212
+ #
213
+ # @return [Dnsimple::Response<Dnsimple::Struct::CertificateRenewal>]
214
+ #
215
+ # @raise [Dnsimple::NotFoundError]
216
+ # @raise [Dnsimple::RequestError]
217
+ #
218
+ # @example Basic usage
219
+ # response = client.certificates.purchase_letsencrypt_certificate_renewal(1010, "example.com", 200)
220
+ # certificate_renewal = response.data
221
+ #
222
+ # certificate_renewal.id # => 999
223
+ # certificate_renewal.old_certificate_id # => 200
224
+ # certificate_renewal.new_certificate_id # => 300
225
+ #
226
+ # @example Auto renew
227
+ # response = client.certificates.purchase_letsencrypt_certificate_renewal(1010, "example.com", 200, auto_renew: true)
228
+ # certificate_renewal = response.data
229
+ #
230
+ # certificate_renewal.id # => 999
231
+ # certificate_renewal.old_certificate_id # => 200
232
+ # certificate_renewal.new_certificate_id # => 300
233
+ def purchase_letsencrypt_certificate_renewal(account_id, domain_id, certificate_id, attributes = {}, options = {})
234
+ response = client.post(Client.versioned("/%s/domains/%s/certificates/letsencrypt/%s/renewals" % [account_id, domain_id, certificate_id]), attributes, options)
235
+
236
+ Dnsimple::Response.new(response, Struct::CertificateRenewal.new(response["data"]))
237
+ end
238
+
239
+ # Issue a pending Let's Encrypt certificate renewal order.
240
+ #
241
+ # Note that the issuance process is async. A successful response means the issuance
242
+ # request has been successfully acknowledged and queued for processing.
243
+ #
244
+ # @see https://developer.dnsimple.com/v2/certificates/#issueRenewalLetsencryptCertificate
245
+ #
246
+ # @param account_id [Integer] the account ID
247
+ # @param domain_id [#to_s] the domain ID or domain name
248
+ # @param certificate_id [Integer] the certificate ID
249
+ # @param certificate_renewal_id [Integer] the certificate renewal ID
250
+ # @param options [Hash]
251
+ #
252
+ # @return [Dnsimple::Response<Dnsimple::Struct::Certificate>]
253
+ #
254
+ # @raise [Dnsimple::NotFoundError]
255
+ # @raise [Dnsimple::RequestError]
256
+ #
257
+ # @example Basic usage
258
+ # response = client.certificates.issue_letsencrypt_certificate_renewal(1010, "example.com", 100, 999)
259
+ # certificate = response.data
260
+ #
261
+ # certificate.state # => "requesting"
262
+ def issue_letsencrypt_certificate_renewal(account_id, domain_id, certificate_id, certificate_renewal_id, options = {})
263
+ response = client.post(Client.versioned("/%s/domains/%s/certificates/letsencrypt/%s/renewals/%s/issue" % [account_id, domain_id, certificate_id, certificate_renewal_id]), options)
264
+
265
+ Dnsimple::Response.new(response, Struct::Certificate.new(response["data"]))
266
+ end
267
+
111
268
  end
112
269
  end
113
270
  end
@@ -7,7 +7,7 @@ module Dnsimple
7
7
  # @see https://developer.dnsimple.com/v2/registrar/#check
8
8
  #
9
9
  # @example Check whether example.com is available:
10
- # client.registrar.check(1010, "example.com")
10
+ # client.registrar.check_domain(1010, "example.com")
11
11
  #
12
12
  # @param [Integer] account_id the account ID
13
13
  # @param [#to_s] domain_name the domain name to check
@@ -54,7 +54,7 @@ module Dnsimple
54
54
  #
55
55
  # @example Initiate the registration of example.com using the contact 1234 as registrant
56
56
  # including WHOIS privacy for the domain and enabling auto renewal:
57
- # client.registrar.register(1010, "example.com", registrant_id: 1234, private_whois: true, auto_renew: true)
57
+ # client.registrar.register_domain(1010, "example.com", registrant_id: 1234, private_whois: true, auto_renew: true)
58
58
  #
59
59
  # @param [Integer] account_id the account ID
60
60
  # @param [#to_s] domain_name the domain name to register
@@ -76,7 +76,7 @@ module Dnsimple
76
76
  # @see https://developer.dnsimple.com/v2/registrar/#renew
77
77
  #
78
78
  # @example Renew example.com for 3 years:
79
- # client.registrar.renew(1010, "example.com", period: 3)
79
+ # client.registrar.renew_domain(1010, "example.com", period: 3)
80
80
  #
81
81
  # @param [Integer] account_id the account ID
82
82
  # @param [#to_s] domain_name the domain name to renew
@@ -97,7 +97,7 @@ module Dnsimple
97
97
  # @see https://developer.dnsimple.com/v2/registrar/#transfer
98
98
  #
99
99
  # @example Initiate the transfer for example.com using the contact 1234 as registrant:
100
- # client.registrar.transfer(1010, "example.com", registrant_id: 1234, auth_code: "x1y2z3")
100
+ # client.registrar.transfer_domain(1010, "example.com", registrant_id: 1234, auth_code: "x1y2z3")
101
101
  #
102
102
  # @param [Integer] account_id the account ID
103
103
  # @param [#to_s] domain_name the domain name to transfer
@@ -119,7 +119,7 @@ module Dnsimple
119
119
  # @see https://developer.dnsimple.com/v2/registrar/#transfer-out
120
120
  #
121
121
  # @example Request to transfer of example.com out of DNSimple:
122
- # client.registrar.transfer_out(1010, "example.com")
122
+ # client.registrar.transfer_domain_out(1010, "example.com")
123
123
  #
124
124
  # @param [Integer] account_id the account ID
125
125
  # @param [#to_s] domain_name the domain name to transfer out