dnsimple 4.0.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +1 -8
- data/lib/dnsimple/client/certificates.rb +7 -7
- data/lib/dnsimple/client/collaborators.rb +3 -3
- data/lib/dnsimple/client/contacts.rb +6 -6
- data/lib/dnsimple/client/domains.rb +6 -6
- data/lib/dnsimple/client/domains_email_forwards.rb +5 -5
- data/lib/dnsimple/client/domains_pushes.rb +6 -6
- data/lib/dnsimple/client/registrar.rb +37 -11
- data/lib/dnsimple/client/registrar_auto_renewal.rb +2 -2
- data/lib/dnsimple/client/registrar_delegation.rb +4 -4
- data/lib/dnsimple/client/registrar_whois_privacy.rb +3 -3
- data/lib/dnsimple/client/services_domains.rb +3 -3
- data/lib/dnsimple/client/templates.rb +6 -6
- data/lib/dnsimple/client/templates_domains.rb +1 -1
- data/lib/dnsimple/client/templates_records.rb +7 -7
- data/lib/dnsimple/client/vanity_name_servers.rb +2 -2
- data/lib/dnsimple/client/webhooks.rb +4 -4
- data/lib/dnsimple/client/zones.rb +4 -4
- data/lib/dnsimple/client/zones_records.rb +9 -9
- data/lib/dnsimple/response.rb +7 -7
- data/lib/dnsimple/struct.rb +4 -0
- data/lib/dnsimple/struct/account.rb +1 -1
- data/lib/dnsimple/struct/certificate.rb +3 -3
- data/lib/dnsimple/struct/collaborator.rb +3 -3
- data/lib/dnsimple/struct/contact.rb +2 -2
- data/lib/dnsimple/struct/domain.rb +3 -3
- data/lib/dnsimple/struct/domain_premium_price.rb +13 -0
- data/lib/dnsimple/struct/domain_push.rb +4 -4
- data/lib/dnsimple/struct/domain_registration.rb +37 -0
- data/lib/dnsimple/struct/domain_renewal.rb +28 -0
- data/lib/dnsimple/struct/domain_transfer.rb +34 -0
- data/lib/dnsimple/struct/email_forward.rb +2 -2
- data/lib/dnsimple/struct/oauth_token.rb +1 -1
- data/lib/dnsimple/struct/service.rb +3 -3
- data/lib/dnsimple/struct/template.rb +4 -4
- data/lib/dnsimple/struct/template_record.rb +4 -4
- data/lib/dnsimple/struct/tld.rb +2 -2
- data/lib/dnsimple/struct/user.rb +1 -1
- data/lib/dnsimple/struct/webhook.rb +1 -1
- data/lib/dnsimple/struct/whois_privacy.rb +1 -1
- data/lib/dnsimple/struct/zone.rb +2 -2
- data/lib/dnsimple/struct/zone_record.rb +4 -4
- data/lib/dnsimple/version.rb +1 -1
- data/spec/dnsimple/client/certificates_spec.rb +2 -2
- data/spec/dnsimple/client/contacts_spec.rb +2 -2
- data/spec/dnsimple/client/domains_email_forwards_spec.rb +2 -2
- data/spec/dnsimple/client/domains_spec.rb +2 -2
- data/spec/dnsimple/client/identity_spec.rb +2 -2
- data/spec/dnsimple/client/registrar_auto_renewal_spec.rb +2 -2
- data/spec/dnsimple/client/registrar_spec.rb +57 -7
- data/spec/dnsimple/client/services_domains_spec.rb +2 -2
- data/spec/dnsimple/client/services_spec.rb +8 -4
- data/spec/dnsimple/client/templates_records_spec.rb +4 -4
- data/spec/dnsimple/client/templates_spec.rb +4 -4
- data/spec/dnsimple/client/zones_records_spec.rb +4 -4
- data/spec/dnsimple/client/zones_spec.rb +2 -2
- data/spec/fixtures.http/accounts/success-account.http +21 -0
- data/spec/fixtures.http/accounts/success-user.http +21 -0
- data/spec/fixtures.http/addCollaborator/invite-success.http +1 -1
- data/spec/fixtures.http/addCollaborator/success.http +1 -1
- data/spec/fixtures.http/appliedServices/success.http +1 -1
- data/spec/fixtures.http/applyService/{created.http → success.http} +0 -0
- data/spec/fixtures.http/changeDomainDelegationToVanity/success.http +1 -1
- data/spec/fixtures.http/checkDomain/success.http +17 -17
- data/spec/fixtures.http/createContact/created.http +17 -17
- data/spec/fixtures.http/createDomain/created.http +1 -1
- data/spec/fixtures.http/createEmailForward/created.http +1 -1
- data/spec/fixtures.http/createTemplate/created.http +1 -1
- data/spec/fixtures.http/createTemplateRecord/created.http +1 -1
- data/spec/fixtures.http/createWebhook/created.http +17 -17
- data/spec/fixtures.http/createZoneRecord/created-apex.http +17 -0
- data/spec/fixtures.http/createZoneRecord/created.http +9 -13
- data/spec/fixtures.http/deleteContact/success.http +13 -13
- data/spec/fixtures.http/deleteEmailForward/success.http +13 -12
- data/spec/fixtures.http/deleteWebhook/success.http +13 -13
- data/spec/fixtures.http/disableDomainAutoRenewal/success.http +13 -0
- data/spec/fixtures.http/disableWhoisPrivacy/success.http +1 -1
- data/spec/fixtures.http/enableDomainAutoRenewal/success.http +13 -0
- data/spec/fixtures.http/enableVanityNameServers/success.http +1 -1
- data/spec/fixtures.http/enableWhoisPrivacy/created.http +1 -1
- data/spec/fixtures.http/enableWhoisPrivacy/success.http +1 -1
- data/spec/fixtures.http/getCertificate/success.http +1 -1
- data/spec/fixtures.http/getContact/success.http +17 -17
- data/spec/fixtures.http/getDomain/success.http +16 -16
- data/spec/fixtures.http/getDomainPremiumPrice/failure.http +16 -0
- data/spec/fixtures.http/getDomainPremiumPrice/success.http +21 -0
- data/spec/fixtures.http/getEmailForward/success.http +17 -17
- data/spec/fixtures.http/getService/success.http +1 -1
- data/spec/fixtures.http/getTemplate/success.http +1 -1
- data/spec/fixtures.http/getTemplateRecord/success.http +1 -1
- data/spec/fixtures.http/getTldExtendedAttributes/success-attributes.http +17 -0
- data/spec/fixtures.http/getWebhook/success.http +17 -17
- data/spec/fixtures.http/getWhoisPrivacy/success.http +1 -1
- data/spec/fixtures.http/getZone/success.http +17 -17
- data/spec/fixtures.http/getZoneRecord/success.http +1 -1
- data/spec/fixtures.http/initiatePush/success.http +1 -1
- data/spec/fixtures.http/listAccounts/success-account.http +1 -1
- data/spec/fixtures.http/listAccounts/success-user.http +1 -1
- data/spec/fixtures.http/listCertificates/success.http +1 -1
- data/spec/fixtures.http/listCollaborators/success.http +1 -1
- data/spec/fixtures.http/listContacts/success.http +17 -17
- data/spec/fixtures.http/listDomains/success.http +1 -1
- data/spec/fixtures.http/listEmailForwards/success.http +1 -1
- data/spec/fixtures.http/listPushes/success.http +1 -1
- data/spec/fixtures.http/listServices/success.http +12 -8
- data/spec/fixtures.http/listTemplateRecords/success.http +1 -1
- data/spec/fixtures.http/listTemplates/success.http +1 -1
- data/spec/fixtures.http/listWebhooks/success.http +17 -17
- data/spec/fixtures.http/listZoneRecords/success.http +1 -1
- data/spec/fixtures.http/listZones/success.http +17 -17
- data/spec/fixtures.http/method-not-allowed.http +11 -11
- data/spec/fixtures.http/notfound-contact.http +12 -12
- data/spec/fixtures.http/notfound-record.http +11 -11
- data/spec/fixtures.http/notfound-whoisprivacy.http +12 -0
- data/spec/fixtures.http/notfound-zone.http +11 -11
- data/spec/fixtures.http/oauthAccessToken/error-invalid-request.http +16 -0
- data/spec/fixtures.http/oauthAccessToken/success.http +17 -17
- data/spec/fixtures.http/registerDomain/success.http +21 -17
- data/spec/fixtures.http/renewDomain/success.http +13 -9
- data/spec/fixtures.http/resetDomainToken/success.http +1 -1
- data/spec/fixtures.http/success-with-malformed-json.http +13 -0
- data/spec/fixtures.http/transferDomain/success.http +13 -9
- data/spec/fixtures.http/updateContact/success.http +17 -17
- data/spec/fixtures.http/updateTemplate/success.http +1 -1
- data/spec/fixtures.http/updateZoneRecord/success.http +1 -1
- data/spec/fixtures.http/validation-error.http +19 -0
- data/spec/fixtures.http/whoami/{success_account.http → success-account.http} +15 -15
- data/spec/fixtures.http/whoami/{success_user.http → success-user.http} +15 -15
- data/spec/fixtures.http/whoami/success.http +15 -15
- metadata +37 -14
- data/.ruby-version +0 -1
- data/spec/fixtures.http/disableAutoRenewal/success.http +0 -12
- data/spec/fixtures.http/enableAutoRenewal/success.http +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0f3e109fc2b3c88b76f2f569764e32792a626f7
|
4
|
+
data.tar.gz: e092631aa456c81f5a77076fab26334f2c9f93a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6393c8b54b069a15bd4cdce2e259586f7dde2c979b50bcddbeae5aa40015b08e6c6429851eba324daabbb7e27d05aa42f333bc09244032bb22790967762b9a6
|
7
|
+
data.tar.gz: 6f403fdb0107e7f8e50bee41ce24244ee5a1ae398835670bbdf19b369b0116f8d70788dd72f07bf1fd61e82821b277acb798807ea605b00f2593391f060693ad
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
This project uses [Semantic Versioning 2.0.0](http://semver.org/).
|
4
4
|
|
5
|
+
#### 4.1.0
|
6
|
+
|
7
|
+
- NEW: Added domain premium price support (dnsimple/dnsimple-ruby#143)
|
8
|
+
|
9
|
+
- CHANGED: Updated registration, transfer, renewal response payload (dnsimple/dnsimple-developer#111, dnsimple/dnsimple-ruby#140).
|
10
|
+
- CHANGED: Normalize unique string identifiers to SID (dnsimple/dnsimple-ruby#141)
|
11
|
+
|
5
12
|
|
6
13
|
#### 4.0.0
|
7
14
|
|
data/README.md
CHANGED
@@ -9,13 +9,6 @@ A Ruby client for the [DNSimple API v2](https://developer.dnsimple.com/v2/).
|
|
9
9
|
We provide a full API and an easy-to-use web interface so you can get your domain registered and set up with a minimal amount of effort.
|
10
10
|
|
11
11
|
|
12
|
-
## :warning: Beta Warning
|
13
|
-
|
14
|
-
This branch targets the development of the API client for the [DNSimple API v2](https://developer.dnsimple.com/v2/). If you are looking for the stable version of the client for [DNSimple API v1](https://developer.dnsimple.com/v1/) then use the [`master-v1`](https://github.com/dnsimple/dnsimple-ruby/tree/master-v1) branch.
|
15
|
-
|
16
|
-
This library is currently in beta version, the methods and the implementation should be considered a work-in-progress. Changes in the method naming, method signatures, public or internal APIs may happen during the beta period.
|
17
|
-
|
18
|
-
|
19
12
|
## Installation
|
20
13
|
|
21
14
|
You can install the gem manually:
|
@@ -27,7 +20,7 @@ $ gem install dnsimple
|
|
27
20
|
Or use Bundler and define it as a dependency in your Gemfile:
|
28
21
|
|
29
22
|
```
|
30
|
-
gem 'dnsimple', '~>
|
23
|
+
gem 'dnsimple', '~> 4.0'
|
31
24
|
```
|
32
25
|
|
33
26
|
## Usage
|
@@ -16,7 +16,7 @@ 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 [
|
19
|
+
# @param [Integer] account_id the account ID
|
20
20
|
# @param [#to_s] domain_name the domain name
|
21
21
|
# @param [Hash] options the filtering and sorting options
|
22
22
|
# @option options [Integer] :page current page (pagination)
|
@@ -34,9 +34,9 @@ module Dnsimple
|
|
34
34
|
#
|
35
35
|
# @see https://developer.dnsimple.com/v2/domains/certificates/#get
|
36
36
|
#
|
37
|
-
# @param [
|
37
|
+
# @param [Integer] account_id the account ID
|
38
38
|
# @param [#to_s] domain_id the domain ID or domain name
|
39
|
-
# @param [
|
39
|
+
# @param [Integer] certificate_id the certificate ID
|
40
40
|
# @param [Hash] options
|
41
41
|
# @return [Dnsimple::Response<Dnsimple::Struct::Certificate>]
|
42
42
|
#
|
@@ -52,9 +52,9 @@ module Dnsimple
|
|
52
52
|
#
|
53
53
|
# @see https://developer.dnsimple.com/v2/domains/certificates/#download
|
54
54
|
#
|
55
|
-
# @param [
|
55
|
+
# @param [Integer] account_id the account ID
|
56
56
|
# @param [#to_s] domain_id the domain ID or domain name
|
57
|
-
# @param [
|
57
|
+
# @param [Integer] certificate_id the certificate ID
|
58
58
|
# @param [Hash] options
|
59
59
|
# @return [Dnsimple::Response<Dnsimple::Struct::CertificateBundle>]
|
60
60
|
#
|
@@ -70,9 +70,9 @@ module Dnsimple
|
|
70
70
|
#
|
71
71
|
# @see https://developer.dnsimple.com/v2/domains/certificates/#get-private-key
|
72
72
|
#
|
73
|
-
# @param [
|
73
|
+
# @param [Integer] account_id the account ID
|
74
74
|
# @param [#to_s] domain_id the domain ID or domain name
|
75
|
-
# @param [
|
75
|
+
# @param [Integer] certificate_id the certificate ID
|
76
76
|
# @param [Hash] options
|
77
77
|
# @return [Dnsimple::Response<Dnsimple::Struct::CertificateBundle>]
|
78
78
|
#
|
@@ -12,7 +12,7 @@ module Dnsimple
|
|
12
12
|
# @example List collaborators, provide a specific page
|
13
13
|
# client.domains.collaborators(1010, "example.com", page: 2)
|
14
14
|
#
|
15
|
-
# @param [
|
15
|
+
# @param [Integer] account_id the account ID
|
16
16
|
# @param [#to_s] domain_id the domain ID or name
|
17
17
|
# @param [Hash] request options
|
18
18
|
# @option options [Integer] :page current page (pagination)
|
@@ -33,7 +33,7 @@ module Dnsimple
|
|
33
33
|
# @example Add collaborator
|
34
34
|
# client.domains.add_collaborator(1010, "example.com", email: "user@example.com")
|
35
35
|
#
|
36
|
-
# @param [
|
36
|
+
# @param [Integer] account_id the account ID
|
37
37
|
# @param [#to_s] domain_id the domain ID or name
|
38
38
|
# @param [Hash] user attributes
|
39
39
|
# @param attributes [String] :email user email (mandatory)
|
@@ -57,7 +57,7 @@ module Dnsimple
|
|
57
57
|
# @example Remove collaborator
|
58
58
|
# client.domains.remove_collaborator(1010, "example.com", 999)
|
59
59
|
#
|
60
|
-
# @param [
|
60
|
+
# @param [Integer] account_id the account ID
|
61
61
|
# @param [#to_s] domain_id the domain ID or name
|
62
62
|
# @param [#to_s] contact_id the contact ID
|
63
63
|
# @param [Hash] request options
|
@@ -16,7 +16,7 @@ module Dnsimple
|
|
16
16
|
# @example List contacts, provide a sorting policy
|
17
17
|
# client.contacts.list(1010, sort: "email:asc")
|
18
18
|
#
|
19
|
-
# @param [
|
19
|
+
# @param [Integer] account_id the account ID
|
20
20
|
# @param [Hash] options the filtering and sorting options
|
21
21
|
# @option options [Integer] :page current page (pagination)
|
22
22
|
# @option options [Integer] :per_page number of entries to return (pagination)
|
@@ -43,7 +43,7 @@ module Dnsimple
|
|
43
43
|
# @see https://developer.dnsimple.com/v2/contacts/#list
|
44
44
|
# @see #contacts
|
45
45
|
#
|
46
|
-
# @param [
|
46
|
+
# @param [Integer] account_id the account ID
|
47
47
|
# @param [Hash] options the filtering and sorting options
|
48
48
|
# @option options [Integer] :page current page (pagination)
|
49
49
|
# @option options [Integer] :per_page number of entries to return (pagination)
|
@@ -60,7 +60,7 @@ module Dnsimple
|
|
60
60
|
#
|
61
61
|
# @see https://developer.dnsimple.com/v2/contacts/#create
|
62
62
|
#
|
63
|
-
# @param [
|
63
|
+
# @param [Integer] account_id the account ID
|
64
64
|
# @param [Hash] attributes
|
65
65
|
# @param [Hash] options
|
66
66
|
# @return [Dnsimple::Response<Dnsimple::Struct::Contact>]
|
@@ -78,7 +78,7 @@ module Dnsimple
|
|
78
78
|
#
|
79
79
|
# @see https://developer.dnsimple.com/v2/contacts/#get
|
80
80
|
#
|
81
|
-
# @param [
|
81
|
+
# @param [Integer] account_id the account ID
|
82
82
|
# @param [#to_s] contact_id the contact ID
|
83
83
|
# @param [Hash] options
|
84
84
|
# @return [Dnsimple::Response<Dnsimple::Struct::Contact>]
|
@@ -95,7 +95,7 @@ module Dnsimple
|
|
95
95
|
#
|
96
96
|
# @see https://developer.dnsimple.com/v2/contacts/#update
|
97
97
|
#
|
98
|
-
# @param [
|
98
|
+
# @param [Integer] account_id the account ID
|
99
99
|
# @param [#to_s] contact_id the contact ID
|
100
100
|
# @param [Hash] attributes
|
101
101
|
# @param [Hash] options
|
@@ -115,7 +115,7 @@ module Dnsimple
|
|
115
115
|
#
|
116
116
|
# @see https://developer.dnsimple.com/v2/contacts/#delete
|
117
117
|
#
|
118
|
-
# @param [
|
118
|
+
# @param [Integer] account_id the account ID
|
119
119
|
# @param [#to_s] contact_id the contact ID
|
120
120
|
# @param [Hash] options
|
121
121
|
# @return [Dnsimple::Response<nil>]
|
@@ -19,7 +19,7 @@ module Dnsimple
|
|
19
19
|
# @example List domains, provide a filtering policy
|
20
20
|
# client.domains.list(1010, filter: { name_like: "example" })
|
21
21
|
#
|
22
|
-
# @param [
|
22
|
+
# @param [Integer] account_id the account ID
|
23
23
|
# @param [Hash] options the filtering and sorting options
|
24
24
|
# @option options [Integer] :page current page (pagination)
|
25
25
|
# @option options [Integer] :per_page number of entries to return (pagination)
|
@@ -47,7 +47,7 @@ module Dnsimple
|
|
47
47
|
# @see https://developer.dnsimple.com/v2/domains/#list
|
48
48
|
# @see #domains
|
49
49
|
#
|
50
|
-
# @param [
|
50
|
+
# @param [Integer] account_id the account ID
|
51
51
|
# @param [Hash] options the filtering and sorting option
|
52
52
|
# @option options [Integer] :page current page (pagination)
|
53
53
|
# @option options [Integer] :per_page number of entries to return (pagination)
|
@@ -65,7 +65,7 @@ module Dnsimple
|
|
65
65
|
#
|
66
66
|
# @see https://developer.dnsimple.com/v2/domains/#create
|
67
67
|
#
|
68
|
-
# @param [
|
68
|
+
# @param [Integer] account_id the account ID
|
69
69
|
# @param [Hash] attributes
|
70
70
|
# @param [Hash] options
|
71
71
|
# @return [Dnsimple::Response<Dnsimple::Struct::Domain>]
|
@@ -84,7 +84,7 @@ module Dnsimple
|
|
84
84
|
#
|
85
85
|
# @see https://developer.dnsimple.com/v2/domains/#get
|
86
86
|
#
|
87
|
-
# @param [
|
87
|
+
# @param [Integer] account_id the account ID
|
88
88
|
# @param [#to_s] domain_id The domain ID or domain name
|
89
89
|
# @param [Hash] options
|
90
90
|
# @return [Dnsimple::Response<Dnsimple::Struct::Domain>]
|
@@ -103,7 +103,7 @@ module Dnsimple
|
|
103
103
|
#
|
104
104
|
# @see https://developer.dnsimple.com/v2/domains/#delete
|
105
105
|
#
|
106
|
-
# @param [
|
106
|
+
# @param [Integer] account_id the account ID
|
107
107
|
# @param [#to_s] domain_id The domain ID or domain name
|
108
108
|
# @param [Hash] options
|
109
109
|
# @return [Dnsimple::Response<nil>]
|
@@ -121,7 +121,7 @@ module Dnsimple
|
|
121
121
|
#
|
122
122
|
# @see https://developer.dnsimple.com/v2/domains/#reset-token
|
123
123
|
#
|
124
|
-
# @param [
|
124
|
+
# @param [Integer] account_id the account ID
|
125
125
|
# @param [#to_s] domain_id The domain ID or domain name
|
126
126
|
# @param [Hash] options
|
127
127
|
# @return [Dnsimple::Response<nil>]
|
@@ -15,7 +15,7 @@ module Dnsimple
|
|
15
15
|
# @example List email forwards, provide a sorting policy
|
16
16
|
# client.domains.email_forwards(1010, "example.com", sort: "from:asc")
|
17
17
|
#
|
18
|
-
# @param [
|
18
|
+
# @param [Integer] account_id the account ID
|
19
19
|
# @param [#to_s] domain_id The domain ID or domain name
|
20
20
|
# @param [Hash] options the filtering and sorting options
|
21
21
|
# @option options [Integer] :page current page (pagination)
|
@@ -42,7 +42,7 @@ module Dnsimple
|
|
42
42
|
# @see https://developer.dnsimple.com/v2/domains/email-forwards/#list
|
43
43
|
# @see #email_forwards
|
44
44
|
#
|
45
|
-
# @param [
|
45
|
+
# @param [Integer] account_id the account ID
|
46
46
|
# @param [#to_s] domain_id The domain ID or domain name
|
47
47
|
# @param [Hash] options the filtering and sorting option
|
48
48
|
# @option options [Integer] :page current page (pagination)
|
@@ -59,7 +59,7 @@ module Dnsimple
|
|
59
59
|
#
|
60
60
|
# @see https://developer.dnsimple.com/v2/domains/email-forwards/#create
|
61
61
|
#
|
62
|
-
# @param [
|
62
|
+
# @param [Integer] account_id the account ID
|
63
63
|
# @param [#to_s] domain_id The domain ID or domain name
|
64
64
|
# @param [Hash] attributes
|
65
65
|
# @param [Hash] options
|
@@ -77,7 +77,7 @@ module Dnsimple
|
|
77
77
|
#
|
78
78
|
# @see https://developer.dnsimple.com/v2/domains/email-forwards/#get
|
79
79
|
#
|
80
|
-
# @param [
|
80
|
+
# @param [Integer] account_id the account ID
|
81
81
|
# @param [#to_s] domain_id The domain ID or domain name
|
82
82
|
# @param [#to_s] email_forward_id The email forward ID
|
83
83
|
# @param [Hash] options
|
@@ -97,7 +97,7 @@ module Dnsimple
|
|
97
97
|
#
|
98
98
|
# @see https://developer.dnsimple.com/v2/domains/email-forwards/#delete
|
99
99
|
#
|
100
|
-
# @param [
|
100
|
+
# @param [Integer] account_id the account ID
|
101
101
|
# @param [#to_s] domain_id The domain ID or domain name
|
102
102
|
# @param [#to_s] email_forward_id The email forward ID
|
103
103
|
# @param [Hash] options
|
@@ -9,7 +9,7 @@ module Dnsimple
|
|
9
9
|
# @example Initiate a domain pushe for example.com:
|
10
10
|
# client.domains.initiate_push(1010, "example.com", new_account_email: "admin@target-account.test")
|
11
11
|
#
|
12
|
-
# @param [
|
12
|
+
# @param [Integer] account_id the account ID
|
13
13
|
# @param [#to_s] domain_id The domain ID or domain name
|
14
14
|
# @param [Hash] attributes
|
15
15
|
# @option attributes [String] :new_account_email the target account email (mandatory)
|
@@ -34,7 +34,7 @@ module Dnsimple
|
|
34
34
|
# @example List domain pushes, provide a specific page
|
35
35
|
# client.domains.pushes(2020, page: 2)
|
36
36
|
#
|
37
|
-
# @param [
|
37
|
+
# @param [Integer] account_id the account ID
|
38
38
|
# @param [Hash] options
|
39
39
|
# @option options [Integer] :page current page (pagination)
|
40
40
|
# @option options [Integer] :per_page number of entries to return (pagination)
|
@@ -55,8 +55,8 @@ module Dnsimple
|
|
55
55
|
# @example Accept a domain push in the target account:
|
56
56
|
# client.domains.accept_push(2020, 1, contact_id: 2)
|
57
57
|
#
|
58
|
-
# @param [
|
59
|
-
# @param [
|
58
|
+
# @param [Integer] account_id the target account ID
|
59
|
+
# @param [Integer] push_id the domain push ID
|
60
60
|
# @param [Hash] options
|
61
61
|
# @param [Hash] attributes
|
62
62
|
# @option attributes [Integer] :contact_id the contact ID (mandatory)
|
@@ -78,8 +78,8 @@ module Dnsimple
|
|
78
78
|
# @example Reject a domain push in the target account:
|
79
79
|
# client.domains.reject_push(2020, 1, contact_id: 2)
|
80
80
|
#
|
81
|
-
# @param [
|
82
|
-
# @param [
|
81
|
+
# @param [Integer] account_id the target account ID
|
82
|
+
# @param [Integer] push_id the domain push ID
|
83
83
|
# @param [Hash] options
|
84
84
|
# @return [Dnsimple::Response<nil>]
|
85
85
|
#
|
@@ -9,7 +9,7 @@ module Dnsimple
|
|
9
9
|
# @example Check whether example.com is available:
|
10
10
|
# client.registrar.check(1010, "example.com")
|
11
11
|
#
|
12
|
-
# @param [
|
12
|
+
# @param [Integer] account_id the account ID
|
13
13
|
# @param [#to_s] domain_name the domain name to check
|
14
14
|
# @param [Hash] options
|
15
15
|
# @return [Struct::DomainCheck]
|
@@ -22,6 +22,32 @@ module Dnsimple
|
|
22
22
|
Dnsimple::Response.new(response, Struct::DomainCheck.new(response["data"]))
|
23
23
|
end
|
24
24
|
|
25
|
+
# Checks the premium price for a domain
|
26
|
+
#
|
27
|
+
# @see https://developer.dnsimple.com/v2/registrar/#premium-price
|
28
|
+
#
|
29
|
+
# @example Check the ruby.codes premium price:
|
30
|
+
# client.registrar.domain_premium_price(1010, "ruby.codes")
|
31
|
+
#
|
32
|
+
# @example Check the ruby.codes premium price for transfer:
|
33
|
+
# client.registrar.domain_premium_price(1010, "ruby.codes", action: "transfer")
|
34
|
+
#
|
35
|
+
# @param [Integer] account_id the account ID
|
36
|
+
# @param [#to_s] domain_name the domain name to check
|
37
|
+
# @param [Hash] options
|
38
|
+
# @option options [String] :action Optional action between "registration",
|
39
|
+
# "renewal", and "transfer". If omitted, it defaults to "registration".
|
40
|
+
# @return [Struct::DomainPremiumPrice]
|
41
|
+
#
|
42
|
+
# @raise [RequestError] When the request fails.
|
43
|
+
def domain_premium_price(account_id, domain_name, options = {})
|
44
|
+
endpoint = Client.versioned("/%s/registrar/domains/%s/premium_price" % [account_id, domain_name])
|
45
|
+
options[:query] = { action: options.delete(:action) } if options.key?(:action)
|
46
|
+
response = client.get(endpoint, options)
|
47
|
+
|
48
|
+
Dnsimple::Response.new(response, Struct::DomainPremiumPrice.new(response["data"]))
|
49
|
+
end
|
50
|
+
|
25
51
|
# Registers a domain.
|
26
52
|
#
|
27
53
|
# @see https://developer.dnsimple.com/v2/registrar/#register
|
@@ -30,11 +56,11 @@ module Dnsimple
|
|
30
56
|
# including WHOIS privacy for the domain and enabling auto renewal:
|
31
57
|
# client.registrar.register(1010, "example.com", registrant_id: 1234, private_whois: true, auto_renew: true)
|
32
58
|
#
|
33
|
-
# @param [
|
59
|
+
# @param [Integer] account_id the account ID
|
34
60
|
# @param [#to_s] domain_name the domain name to register
|
35
61
|
# @param [Hash] attributes
|
36
62
|
# @param [Hash] options
|
37
|
-
# @return [Struct::
|
63
|
+
# @return [Struct::DomainRegistration]
|
38
64
|
#
|
39
65
|
# @raise [RequestError] When the request fails.
|
40
66
|
def register_domain(account_id, domain_name, attributes, options = {})
|
@@ -42,7 +68,7 @@ module Dnsimple
|
|
42
68
|
endpoint = Client.versioned("/%s/registrar/domains/%s/registration" % [account_id, domain_name])
|
43
69
|
response = client.post(endpoint, attributes, options)
|
44
70
|
|
45
|
-
Dnsimple::Response.new(response, Struct::
|
71
|
+
Dnsimple::Response.new(response, Struct::DomainRegistration.new(response["data"]))
|
46
72
|
end
|
47
73
|
|
48
74
|
# Renews a domain.
|
@@ -52,18 +78,18 @@ module Dnsimple
|
|
52
78
|
# @example Renew example.com for 3 years:
|
53
79
|
# client.registrar.renew(1010, "example.com", period: 3)
|
54
80
|
#
|
55
|
-
# @param [
|
81
|
+
# @param [Integer] account_id the account ID
|
56
82
|
# @param [#to_s] domain_name the domain name to renew
|
57
83
|
# @param [Hash] attributes
|
58
84
|
# @param [Hash] options
|
59
|
-
# @return [Struct::
|
85
|
+
# @return [Struct::DomainRenewal]
|
60
86
|
#
|
61
87
|
# @raise [RequestError] When the request fails.
|
62
88
|
def renew_domain(account_id, domain_name, attributes = nil, options = {})
|
63
89
|
endpoint = Client.versioned("/%s/registrar/domains/%s/renewal" % [account_id, domain_name])
|
64
90
|
response = client.post(endpoint, attributes, options)
|
65
91
|
|
66
|
-
Dnsimple::Response.new(response, Struct::
|
92
|
+
Dnsimple::Response.new(response, Struct::DomainRenewal.new(response["data"]))
|
67
93
|
end
|
68
94
|
|
69
95
|
# Starts the transfer of a domain to DNSimple.
|
@@ -73,11 +99,11 @@ module Dnsimple
|
|
73
99
|
# @example Initiate the transfer for example.com using the contact 1234 as registrant:
|
74
100
|
# client.registrar.transfer(1010, "example.com", registrant_id: 1234, auth_code: "x1y2z3")
|
75
101
|
#
|
76
|
-
# @param [
|
102
|
+
# @param [Integer] account_id the account ID
|
77
103
|
# @param [#to_s] domain_name the domain name to transfer
|
78
104
|
# @param [Hash] attributes
|
79
105
|
# @param [Hash] options
|
80
|
-
# @return [Struct::
|
106
|
+
# @return [Struct::DomainTransfer]
|
81
107
|
#
|
82
108
|
# @raise [RequestError] When the request fails.
|
83
109
|
def transfer_domain(account_id, domain_name, attributes, options = {})
|
@@ -85,7 +111,7 @@ module Dnsimple
|
|
85
111
|
endpoint = Client.versioned("/%s/registrar/domains/%s/transfer" % [account_id, domain_name])
|
86
112
|
response = client.post(endpoint, attributes, options)
|
87
113
|
|
88
|
-
Dnsimple::Response.new(response, Struct::
|
114
|
+
Dnsimple::Response.new(response, Struct::DomainTransfer.new(response["data"]))
|
89
115
|
end
|
90
116
|
|
91
117
|
# Requests the transfer of a domain out of DNSimple.
|
@@ -95,7 +121,7 @@ module Dnsimple
|
|
95
121
|
# @example Request to transfer of example.com out of DNSimple:
|
96
122
|
# client.registrar.transfer_out(1010, "example.com")
|
97
123
|
#
|
98
|
-
# @param [
|
124
|
+
# @param [Integer] account_id the account ID
|
99
125
|
# @param [#to_s] domain_name the domain name to transfer out
|
100
126
|
# @param [Hash] options
|
101
127
|
# @return [Dnsimple::Response<nil>]
|
@@ -6,7 +6,7 @@ module Dnsimple
|
|
6
6
|
#
|
7
7
|
# @see https://developer.dnsimple.com/v2/registrar/auto-renewal/
|
8
8
|
#
|
9
|
-
# @param [
|
9
|
+
# @param [Integer] account_id the account ID
|
10
10
|
# @param [#to_s] domain_name the domain name
|
11
11
|
# @param [Hash] options
|
12
12
|
# @return [Dnsimple::Response<nil>]
|
@@ -23,7 +23,7 @@ module Dnsimple
|
|
23
23
|
#
|
24
24
|
# @see https://developer.dnsimple.com/v2/registrar/auto-renewal/
|
25
25
|
#
|
26
|
-
# @param [
|
26
|
+
# @param [Integer] account_id the account ID
|
27
27
|
# @param [#to_s] domain_name the domain name
|
28
28
|
# @param [Hash] options
|
29
29
|
# @return [Dnsimple::Response<nil>]
|
@@ -9,7 +9,7 @@ module Dnsimple
|
|
9
9
|
# @example List the name servers example.com is delegating to:
|
10
10
|
# client.registrar.domain_delegation(1010, "example.com")
|
11
11
|
#
|
12
|
-
# @param [
|
12
|
+
# @param [Integer] account_id the account ID
|
13
13
|
# @param [#to_s] domain_name the domain name to check
|
14
14
|
# @param [Hash] options
|
15
15
|
# @return [Dnsimple::Response<Array>]
|
@@ -30,7 +30,7 @@ module Dnsimple
|
|
30
30
|
# client.registrar.change_domain_delegation(1010, "example.com",
|
31
31
|
# ["ns1.dnsimple.com", "ns2.dnsimple.com", "ns3.dnsimple.com", "ns4.dnsimple.com"])
|
32
32
|
#
|
33
|
-
# @param [
|
33
|
+
# @param [Integer] account_id the account ID
|
34
34
|
# @param [#to_s] domain_name the domain name to check
|
35
35
|
# @param [Array] attributes
|
36
36
|
# @param [Hash] options
|
@@ -52,7 +52,7 @@ module Dnsimple
|
|
52
52
|
# client.registrar.change_domain_delegation_to_vanity(1010, "example.com",
|
53
53
|
# ["ns1.example.com", "ns2.example.com", "ns3.example.com", "ns4.example.com"])
|
54
54
|
#
|
55
|
-
# @param [
|
55
|
+
# @param [Integer] account_id the account ID
|
56
56
|
# @param [#to_s] domain_name the domain name to check
|
57
57
|
# @param [Array] attributes
|
58
58
|
# @param [Hash] options
|
@@ -73,7 +73,7 @@ module Dnsimple
|
|
73
73
|
# @example Disable vanity name servers for example.com:
|
74
74
|
# client.registrar.change_domain_delegation_from_vanity(1010, "example.com")
|
75
75
|
#
|
76
|
-
# @param [
|
76
|
+
# @param [Integer] account_id the account ID
|
77
77
|
# @param [#to_s] domain_name the domain name to check
|
78
78
|
# @param [Hash] options
|
79
79
|
# @return [Dnsimple::Response<nil>]
|