dnsimple 11.0.0 → 12.0.0
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.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +10 -5
- data/.github/workflows/release.yml +44 -13
- data/.github/workflows/sync-test-fixtures.yml +1 -1
- data/.rubocop.yml +4 -1
- data/.rubocop_dnsimple.yml +14 -42
- data/.rubocop_todo.yml +4 -9
- data/CHANGELOG.md +287 -181
- data/CONTRIBUTING.md +6 -40
- data/Gemfile +1 -1
- data/LICENSE.txt +1 -1
- data/README.md +49 -40
- data/RELEASING.md +67 -0
- data/dnsimple.gemspec +1 -1
- data/lib/dnsimple/client/accounts.rb +1 -3
- data/lib/dnsimple/client/billing.rb +2 -4
- data/lib/dnsimple/client/certificates.rb +0 -2
- data/lib/dnsimple/client/clients.rb +2 -40
- data/lib/dnsimple/client/contacts.rb +17 -19
- data/lib/dnsimple/client/dns_analytics.rb +2 -4
- data/lib/dnsimple/client/domains.rb +13 -15
- data/lib/dnsimple/client/domains_delegation_signer_records.rb +18 -20
- data/lib/dnsimple/client/domains_dnssec.rb +9 -11
- data/lib/dnsimple/client/domains_email_forwards.rb +18 -20
- data/lib/dnsimple/client/domains_pushes.rb +13 -15
- data/lib/dnsimple/client/identity.rb +4 -9
- data/lib/dnsimple/client/oauth.rb +1 -3
- data/lib/dnsimple/client/registrar.rb +45 -47
- data/lib/dnsimple/client/registrar_auto_renewal.rb +6 -8
- data/lib/dnsimple/client/registrar_delegation.rb +14 -16
- data/lib/dnsimple/client/registrar_registrant_changes.rb +14 -16
- data/lib/dnsimple/client/registrar_transfer_lock.rb +9 -11
- data/lib/dnsimple/client/registrar_whois_privacy.rb +6 -48
- data/lib/dnsimple/client/services.rb +4 -6
- data/lib/dnsimple/client/services_domains.rb +12 -14
- data/lib/dnsimple/client/templates.rb +17 -19
- data/lib/dnsimple/client/templates_domains.rb +4 -6
- data/lib/dnsimple/client/templates_records.rb +18 -20
- data/lib/dnsimple/client/tlds.rb +6 -8
- data/lib/dnsimple/client/vanity_name_servers.rb +0 -2
- data/lib/dnsimple/client/webhooks.rb +11 -13
- data/lib/dnsimple/client/zones.rb +16 -18
- data/lib/dnsimple/client/zones_distributions.rb +4 -6
- data/lib/dnsimple/client/zones_records.rb +57 -26
- data/lib/dnsimple/client.rb +22 -24
- data/lib/dnsimple/default.rb +0 -4
- data/lib/dnsimple/error.rb +0 -6
- data/lib/dnsimple/extra.rb +4 -6
- data/lib/dnsimple/options.rb +1 -7
- data/lib/dnsimple/response.rb +4 -13
- data/lib/dnsimple/struct/account.rb +0 -2
- data/lib/dnsimple/struct/certificate.rb +0 -2
- data/lib/dnsimple/struct/certificate_bundle.rb +0 -2
- data/lib/dnsimple/struct/certificate_purchase.rb +0 -2
- data/lib/dnsimple/struct/certificate_renewal.rb +0 -2
- data/lib/dnsimple/struct/charge.rb +4 -8
- data/lib/dnsimple/struct/collaborator.rb +0 -2
- data/lib/dnsimple/struct/contact.rb +0 -2
- data/lib/dnsimple/struct/delegation_signer_record.rb +0 -2
- data/lib/dnsimple/struct/dns_analytics.rb +0 -2
- data/lib/dnsimple/struct/dnssec.rb +0 -2
- data/lib/dnsimple/struct/domain.rb +0 -2
- data/lib/dnsimple/struct/domain_check.rb +0 -2
- data/lib/dnsimple/struct/domain_premium_price.rb +0 -2
- data/lib/dnsimple/struct/domain_price.rb +0 -2
- data/lib/dnsimple/struct/domain_push.rb +0 -2
- data/lib/dnsimple/struct/domain_registration.rb +0 -2
- data/lib/dnsimple/struct/domain_renewal.rb +0 -2
- data/lib/dnsimple/struct/domain_restore.rb +0 -2
- data/lib/dnsimple/struct/domain_transfer.rb +0 -2
- data/lib/dnsimple/struct/email_forward.rb +0 -2
- data/lib/dnsimple/struct/extended_attribute.rb +0 -4
- data/lib/dnsimple/struct/oauth_token.rb +0 -2
- data/lib/dnsimple/struct/registrant_change.rb +0 -2
- data/lib/dnsimple/struct/registrant_change_check.rb +0 -2
- data/lib/dnsimple/struct/service.rb +0 -4
- data/lib/dnsimple/struct/template.rb +0 -2
- data/lib/dnsimple/struct/template_record.rb +0 -2
- data/lib/dnsimple/struct/tld.rb +0 -2
- data/lib/dnsimple/struct/transfer_lock.rb +0 -2
- data/lib/dnsimple/struct/user.rb +0 -2
- data/lib/dnsimple/struct/vanity_name_server.rb +0 -2
- data/lib/dnsimple/struct/webhook.rb +0 -2
- data/lib/dnsimple/struct/whoami.rb +2 -4
- data/lib/dnsimple/struct/whois_privacy.rb +0 -2
- data/lib/dnsimple/struct/zone.rb +0 -2
- data/lib/dnsimple/struct/zone_distribution.rb +0 -2
- data/lib/dnsimple/struct/zone_file.rb +0 -2
- data/lib/dnsimple/struct/zone_record.rb +0 -2
- data/lib/dnsimple/struct/zone_record_id.rb +10 -0
- data/lib/dnsimple/struct/zone_records_batch_change.rb +16 -0
- data/lib/dnsimple/struct.rb +2 -3
- data/lib/dnsimple/version.rb +1 -3
- data/lib/dnsimple.rb +1 -3
- data/spec/dnsimple/client/client_service_spec.rb +12 -10
- data/spec/dnsimple/client/domains_delegation_signer_records_spec.rb +2 -2
- data/spec/dnsimple/client/oauth_spec.rb +6 -6
- data/spec/dnsimple/client/registrar_whois_privacy_spec.rb +0 -82
- data/spec/dnsimple/client/zones_records_spec.rb +95 -0
- data/spec/fixtures.http/acceptPush/success.http +15 -15
- data/spec/fixtures.http/accounts/success-account.http +20 -20
- data/spec/fixtures.http/accounts/success-user.http +21 -21
- data/spec/fixtures.http/activateZoneService/success.http +16 -16
- data/spec/fixtures.http/appliedServices/success.http +19 -19
- data/spec/fixtures.http/applyService/success.http +15 -15
- data/spec/fixtures.http/applyTemplate/success.http +13 -13
- data/spec/fixtures.http/authorizeDomainTransferOut/success.http +13 -13
- data/spec/fixtures.http/badgateway.http +5 -5
- data/spec/fixtures.http/batchChangeZoneRecords/error_400_create_validation_failed.http +16 -0
- data/spec/fixtures.http/batchChangeZoneRecords/error_400_delete_validation_failed.http +15 -0
- data/spec/fixtures.http/batchChangeZoneRecords/error_400_update_validation_failed.http +15 -0
- data/spec/fixtures.http/batchChangeZoneRecords/success.http +16 -0
- data/spec/fixtures.http/cancelDomainTransfer/success.http +17 -17
- data/spec/fixtures.http/changeDomainDelegation/success.http +15 -15
- data/spec/fixtures.http/changeDomainDelegationFromVanity/success.http +15 -15
- data/spec/fixtures.http/changeDomainDelegationToVanity/success.http +17 -17
- data/spec/fixtures.http/checkDomain/success.http +15 -15
- data/spec/fixtures.http/checkRegistrantChange/error-contactnotfound.http +3 -3
- data/spec/fixtures.http/checkRegistrantChange/error-domainnotfound.http +3 -3
- data/spec/fixtures.http/checkRegistrantChange/success.http +15 -15
- data/spec/fixtures.http/checkZoneDistribution/error.http +17 -17
- data/spec/fixtures.http/checkZoneDistribution/failure.http +17 -17
- data/spec/fixtures.http/checkZoneDistribution/success.http +17 -17
- data/spec/fixtures.http/checkZoneRecordDistribution/error.http +17 -17
- data/spec/fixtures.http/checkZoneRecordDistribution/failure.http +17 -17
- data/spec/fixtures.http/checkZoneRecordDistribution/success.http +17 -17
- data/spec/fixtures.http/createContact/created.http +16 -16
- data/spec/fixtures.http/createContact/error-validation-errors.http +15 -15
- data/spec/fixtures.http/createDelegationSignerRecord/created.http +17 -17
- data/spec/fixtures.http/createDelegationSignerRecord/validation-error.http +15 -15
- data/spec/fixtures.http/createDomain/created.http +19 -19
- data/spec/fixtures.http/createEmailForward/created.http +21 -21
- data/spec/fixtures.http/createPrimaryServer/created.http +20 -20
- data/spec/fixtures.http/createRegistrantChange/success.http +14 -14
- data/spec/fixtures.http/createSecondaryZone/created.http +20 -20
- data/spec/fixtures.http/createTemplate/created.http +15 -15
- data/spec/fixtures.http/createTemplateRecord/created.http +16 -16
- data/spec/fixtures.http/createWebhook/created.http +13 -13
- data/spec/fixtures.http/createZoneRecord/created-apex.http +13 -13
- data/spec/fixtures.http/createZoneRecord/created.http +13 -13
- data/spec/fixtures.http/deactivateZoneService/success.http +16 -16
- data/spec/fixtures.http/deleteContact/error-contact-in-use.http +15 -15
- data/spec/fixtures.http/deleteContact/success.http +13 -13
- data/spec/fixtures.http/deleteDelegationSignerRecord/success.http +15 -15
- data/spec/fixtures.http/deleteDomain/success.http +11 -11
- data/spec/fixtures.http/deleteEmailForward/success.http +18 -18
- data/spec/fixtures.http/deleteRegistrantChange/success.http +13 -13
- data/spec/fixtures.http/deleteRegistrantChange/success_async.http +3 -3
- data/spec/fixtures.http/deleteTemplate/success.http +13 -13
- data/spec/fixtures.http/deleteTemplateRecord/success.http +13 -13
- data/spec/fixtures.http/deleteWebhook/success.http +13 -13
- data/spec/fixtures.http/deleteZoneRecord/success.http +11 -11
- data/spec/fixtures.http/disableDnssec/not-enabled.http +15 -15
- data/spec/fixtures.http/disableDnssec/success.http +15 -15
- data/spec/fixtures.http/disableDomainAutoRenewal/success.http +13 -13
- data/spec/fixtures.http/disableDomainTransferLock/success.http +17 -17
- data/spec/fixtures.http/disableVanityNameServers/success.http +15 -15
- data/spec/fixtures.http/disableWhoisPrivacy/success.http +16 -16
- data/spec/fixtures.http/dnsAnalytics/success.http +17 -17
- data/spec/fixtures.http/downloadCertificate/success.http +19 -19
- data/spec/fixtures.http/enableDnssec/success.http +17 -17
- data/spec/fixtures.http/enableDomainAutoRenewal/success.http +13 -13
- data/spec/fixtures.http/enableDomainTransferLock/success.http +17 -17
- data/spec/fixtures.http/enableVanityNameServers/success.http +17 -17
- data/spec/fixtures.http/enableWhoisPrivacy/created.http +16 -16
- data/spec/fixtures.http/enableWhoisPrivacy/success.http +16 -16
- data/spec/fixtures.http/getCertificate/success.http +19 -19
- data/spec/fixtures.http/getCertificatePrivateKey/success.http +20 -20
- data/spec/fixtures.http/getContact/success.http +16 -16
- data/spec/fixtures.http/getDelegationSignerRecord/success.http +17 -17
- data/spec/fixtures.http/getDnssec/success.http +17 -17
- data/spec/fixtures.http/getDomain/success.http +19 -19
- data/spec/fixtures.http/getDomainDelegation/success-empty.http +15 -15
- data/spec/fixtures.http/getDomainDelegation/success.http +15 -15
- data/spec/fixtures.http/getDomainPrices/failure.http +18 -18
- data/spec/fixtures.http/getDomainPrices/success.http +21 -21
- data/spec/fixtures.http/getDomainRegistration/success.http +20 -20
- data/spec/fixtures.http/getDomainRenewal/success.http +20 -20
- data/spec/fixtures.http/getDomainRestore/success.http +22 -19
- data/spec/fixtures.http/getDomainTransfer/success.http +19 -19
- data/spec/fixtures.http/getDomainTransferLock/success.http +17 -17
- data/spec/fixtures.http/getEmailForward/success.http +21 -21
- data/spec/fixtures.http/getPrimaryServer/success.http +20 -20
- data/spec/fixtures.http/getRegistrantChange/success.http +15 -15
- data/spec/fixtures.http/getService/success.http +16 -16
- data/spec/fixtures.http/getTemplate/success.http +15 -15
- data/spec/fixtures.http/getTemplateRecord/success.http +16 -16
- data/spec/fixtures.http/getTld/success.http +20 -20
- data/spec/fixtures.http/getTldExtendedAttributes/success-attributes.http +15 -15
- data/spec/fixtures.http/getTldExtendedAttributes/success-noattributes.http +15 -15
- data/spec/fixtures.http/getTldExtendedAttributes/success.http +15 -15
- data/spec/fixtures.http/getWebhook/success.http +13 -13
- data/spec/fixtures.http/getZone/success.http +16 -16
- data/spec/fixtures.http/getZoneFile/success.http +17 -17
- data/spec/fixtures.http/getZoneRecord/success.http +17 -17
- data/spec/fixtures.http/initiatePush/success.http +17 -17
- data/spec/fixtures.http/issueLetsencryptCertificate/success.http +17 -17
- data/spec/fixtures.http/issueRenewalLetsencryptCertificate/success.http +17 -17
- data/spec/fixtures.http/linkPrimaryServer/success.http +20 -20
- data/spec/fixtures.http/listAccounts/success-account.http +20 -20
- data/spec/fixtures.http/listAccounts/success-user.http +20 -20
- data/spec/fixtures.http/listCertificates/success.http +19 -19
- data/spec/fixtures.http/listCharges/fail-400-bad-filter.http +9 -9
- data/spec/fixtures.http/listCharges/fail-403.http +9 -9
- data/spec/fixtures.http/listCharges/success.http +9 -9
- data/spec/fixtures.http/listContacts/success.http +16 -16
- data/spec/fixtures.http/listDelegationSignerRecords/success.http +17 -17
- data/spec/fixtures.http/listDomains/success.http +19 -19
- data/spec/fixtures.http/listEmailForwards/success.http +13 -13
- data/spec/fixtures.http/listPrimaryServers/success.http +20 -20
- data/spec/fixtures.http/listPushes/success.http +17 -17
- data/spec/fixtures.http/listRegistrantChanges/success.http +15 -15
- data/spec/fixtures.http/listServices/success.http +17 -17
- data/spec/fixtures.http/listTemplateRecords/success.http +16 -16
- data/spec/fixtures.http/listTemplates/success.http +15 -15
- data/spec/fixtures.http/listTlds/success.http +20 -20
- data/spec/fixtures.http/listWebhooks/success.http +13 -13
- data/spec/fixtures.http/listZoneRecords/success.http +17 -17
- data/spec/fixtures.http/listZones/success.http +16 -16
- data/spec/fixtures.http/method-not-allowed.http +8 -8
- data/spec/fixtures.http/notfound-certificate.http +12 -12
- data/spec/fixtures.http/notfound-contact.http +10 -10
- data/spec/fixtures.http/notfound-delegationSignerRecord.http +11 -0
- data/spec/fixtures.http/notfound-domain.http +8 -8
- data/spec/fixtures.http/notfound-domainpush.http +8 -8
- data/spec/fixtures.http/notfound-emailforward.http +8 -8
- data/spec/fixtures.http/notfound-record.http +10 -10
- data/spec/fixtures.http/notfound-template.http +10 -10
- data/spec/fixtures.http/notfound-webhook.http +8 -8
- data/spec/fixtures.http/notfound-whoisprivacy.http +10 -10
- data/spec/fixtures.http/notfound-zone.http +10 -10
- data/spec/fixtures.http/oauthAccessToken/error-invalid-request.http +12 -12
- data/spec/fixtures.http/oauthAccessToken/success.http +16 -16
- data/spec/fixtures.http/pages-1of3.http +12 -12
- data/spec/fixtures.http/pages-2of3.http +12 -12
- data/spec/fixtures.http/pages-3of3.http +12 -12
- data/spec/fixtures.http/purchaseLetsencryptCertificate/success.http +19 -19
- data/spec/fixtures.http/purchaseRenewalLetsencryptCertificate/success.http +19 -19
- data/spec/fixtures.http/registerDomain/error-extended-attributes.http +15 -15
- data/spec/fixtures.http/registerDomain/success.http +20 -20
- data/spec/fixtures.http/rejectPush/success.http +15 -15
- data/spec/fixtures.http/renewDomain/error-tooearly.http +14 -14
- data/spec/fixtures.http/renewDomain/success.http +20 -20
- data/spec/fixtures.http/response.http +12 -12
- data/spec/fixtures.http/restoreDomain/success.http +22 -19
- data/spec/fixtures.http/success-with-malformed-json.http +4 -4
- data/spec/fixtures.http/transferDomain/error-indnsimple.http +13 -13
- data/spec/fixtures.http/transferDomain/error-missing-authcode.http +13 -13
- data/spec/fixtures.http/transferDomain/success.http +20 -20
- data/spec/fixtures.http/unapplyService/success.http +15 -15
- data/spec/fixtures.http/unlinkPrimaryServer/success.http +20 -20
- data/spec/fixtures.http/updateContact/success.http +16 -16
- data/spec/fixtures.http/updateTemplate/success.http +15 -15
- data/spec/fixtures.http/updateZoneNsRecords/success.http +16 -16
- data/spec/fixtures.http/updateZoneRecord/success.http +17 -17
- data/spec/fixtures.http/validation-error.http +15 -15
- data/spec/fixtures.http/whoami/success-account.http +15 -15
- data/spec/fixtures.http/whoami/success-user.http +15 -15
- data/spec/fixtures.http/whoami/success.http +15 -15
- data/spec/support/helpers.rb +0 -2
- metadata +14 -14
- data/lib/dnsimple/struct/whois_privacy_renewal.rb +0 -30
- data/spec/fixtures.http/checkDomainPremiumPrice/error_400_not_a_premium_domain.http +0 -18
- data/spec/fixtures.http/checkDomainPremiumPrice/error_400_tld_not_supported.http +0 -18
- data/spec/fixtures.http/checkDomainPremiumPrice/success.http +0 -20
- data/spec/fixtures.http/getDomainPremiumPrice/failure.http +0 -15
- data/spec/fixtures.http/getDomainPremiumPrice/success.http +0 -20
- data/spec/fixtures.http/getWhoisPrivacy/success.http +0 -16
- data/spec/fixtures.http/notfound-delegationsignerrecord.http +0 -11
- data/spec/fixtures.http/renewWhoisPrivacy/success.http +0 -20
- data/spec/fixtures.http/renewWhoisPrivacy/whois-privacy-duplicated-order.http +0 -18
- data/spec/fixtures.http/renewWhoisPrivacy/whois-privacy-not-found.http +0 -18
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
module Dnsimple
|
|
4
4
|
class Client
|
|
5
5
|
module RegistrarDelegation
|
|
6
|
-
|
|
7
6
|
# Lists name servers the domain is delegating to.
|
|
8
7
|
#
|
|
9
8
|
# @see https://developer.dnsimple.com/v2/registrar/delegation/#list
|
|
@@ -11,9 +10,9 @@ module Dnsimple
|
|
|
11
10
|
# @example List the name servers example.com is delegating to:
|
|
12
11
|
# client.registrar.domain_delegation(1010, "example.com")
|
|
13
12
|
#
|
|
14
|
-
# @param [Integer]
|
|
15
|
-
# @param [#to_s]
|
|
16
|
-
# @param [Hash]
|
|
13
|
+
# @param account_id [Integer] the account ID
|
|
14
|
+
# @param domain_name [#to_s] the domain name to check
|
|
15
|
+
# @param options [Hash]
|
|
17
16
|
# @return [Dnsimple::Response<Array>]
|
|
18
17
|
#
|
|
19
18
|
# @raise [RequestError] When the request fails.
|
|
@@ -32,10 +31,10 @@ module Dnsimple
|
|
|
32
31
|
# client.registrar.change_domain_delegation(1010, "example.com",
|
|
33
32
|
# ["ns1.dnsimple.com", "ns2.dnsimple.com", "ns3.dnsimple.com", "ns4.dnsimple.com"])
|
|
34
33
|
#
|
|
35
|
-
# @param [Integer]
|
|
36
|
-
# @param [#to_s]
|
|
37
|
-
# @param [Array]
|
|
38
|
-
# @param [Hash]
|
|
34
|
+
# @param account_id [Integer] the account ID
|
|
35
|
+
# @param domain_name [#to_s] the domain name to check
|
|
36
|
+
# @param attributes [Array]
|
|
37
|
+
# @param options [Hash]
|
|
39
38
|
# @return [Dnsimple::Response<Array>]
|
|
40
39
|
#
|
|
41
40
|
# @raise [RequestError] When the request fails.
|
|
@@ -54,10 +53,10 @@ module Dnsimple
|
|
|
54
53
|
# client.registrar.change_domain_delegation_to_vanity(1010, "example.com",
|
|
55
54
|
# ["ns1.example.com", "ns2.example.com", "ns3.example.com", "ns4.example.com"])
|
|
56
55
|
#
|
|
57
|
-
# @param [Integer]
|
|
58
|
-
# @param [#to_s]
|
|
59
|
-
# @param [Array]
|
|
60
|
-
# @param [Hash]
|
|
56
|
+
# @param account_id [Integer] the account ID
|
|
57
|
+
# @param domain_name [#to_s] the domain name to check
|
|
58
|
+
# @param attributes [Array]
|
|
59
|
+
# @param options [Hash]
|
|
61
60
|
# @return [Dnsimple::Response<Array<Dnsimple::Struct::VanityNameServer>>]
|
|
62
61
|
#
|
|
63
62
|
# @raise [RequestError] When the request fails.
|
|
@@ -75,9 +74,9 @@ module Dnsimple
|
|
|
75
74
|
# @example Disable vanity name servers for example.com:
|
|
76
75
|
# client.registrar.change_domain_delegation_from_vanity(1010, "example.com")
|
|
77
76
|
#
|
|
78
|
-
# @param [Integer]
|
|
79
|
-
# @param [#to_s]
|
|
80
|
-
# @param [Hash]
|
|
77
|
+
# @param account_id [Integer] the account ID
|
|
78
|
+
# @param domain_name [#to_s] the domain name to check
|
|
79
|
+
# @param options [Hash]
|
|
81
80
|
# @return [Dnsimple::Response<nil>]
|
|
82
81
|
#
|
|
83
82
|
# @raise [RequestError] When the request fails.
|
|
@@ -87,7 +86,6 @@ module Dnsimple
|
|
|
87
86
|
|
|
88
87
|
Dnsimple::Response.new(response, nil)
|
|
89
88
|
end
|
|
90
|
-
|
|
91
89
|
end
|
|
92
90
|
end
|
|
93
91
|
end
|
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
module Dnsimple
|
|
4
4
|
class Client
|
|
5
5
|
module RegistrarRegistrantChanges
|
|
6
|
-
|
|
7
6
|
# Retrieves the requirements of a registrant change
|
|
8
7
|
#
|
|
9
8
|
# @example Check the requirements to change the contact for example.com to contact 1234:
|
|
10
9
|
# client.registrar.check_registrant_change(1010, { domain_id: "example.com", contact_id: 1234 })
|
|
11
10
|
#
|
|
12
|
-
# @param [Integer]
|
|
13
|
-
# @param [Hash]
|
|
11
|
+
# @param account_id [Integer] the account ID
|
|
12
|
+
# @param attributes [Hash] the attributes to check the registrant change
|
|
14
13
|
# @option attributes [String, Integer] :domain_id the domain ID to check
|
|
15
14
|
# @option attributes [Integer] :contact_id the contact ID to check against
|
|
16
|
-
# @param [Hash]
|
|
15
|
+
# @param options [Hash]
|
|
17
16
|
# @return [Struct::RegistrantChangeCheck]
|
|
18
17
|
#
|
|
19
18
|
# @raise [RequestError] When the request fails.
|
|
@@ -30,9 +29,9 @@ module Dnsimple
|
|
|
30
29
|
# @example Retrieve the registrant change 42:
|
|
31
30
|
# client.registrar.get_registrant_change(1010, 42)
|
|
32
31
|
#
|
|
33
|
-
# @param [Integer]
|
|
34
|
-
# @param [#to_s]
|
|
35
|
-
# @param [Hash]
|
|
32
|
+
# @param account_id [Integer] the Account id
|
|
33
|
+
# @param registrant_change_id [#to_s] the registrant change id
|
|
34
|
+
# @param options [Hash]
|
|
36
35
|
#
|
|
37
36
|
# @return [Struct::RegistrantChange]
|
|
38
37
|
#
|
|
@@ -51,12 +50,12 @@ module Dnsimple
|
|
|
51
50
|
# including WHOIS privacy for the domain and enabling auto renewal:
|
|
52
51
|
# client.registrar.create_registrant_change(1010, { domain_id: "example.com", contact_id: 1234, extended_attributes: { "x-fi-registrant-idnumber" => "1234" } })
|
|
53
52
|
#
|
|
54
|
-
# @param [Integer]
|
|
55
|
-
# @param [Hash]
|
|
53
|
+
# @param account_id [Integer] the account ID
|
|
54
|
+
# @param attributes [Hash] the attributes to start a registrant change
|
|
56
55
|
# @option attributes [String, Integer] :domain_id the domain ID
|
|
57
56
|
# @option attributes [Integer] :contact_id the contact ID to change to
|
|
58
57
|
# @option attributes [Array<Hash>, nil] :extended_attributes the extended attributes to pass to the registry
|
|
59
|
-
# @param [Hash]
|
|
58
|
+
# @param options [Hash]
|
|
60
59
|
# @return [Struct::RegistrantChange]
|
|
61
60
|
#
|
|
62
61
|
# @raise [RequestError] When the request fails.
|
|
@@ -73,8 +72,8 @@ module Dnsimple
|
|
|
73
72
|
# @example List registrant changes for the account:
|
|
74
73
|
# client.registrar.list_registrant_changes(1010)
|
|
75
74
|
#
|
|
76
|
-
# @param [Integer]
|
|
77
|
-
# @param [Hash]
|
|
75
|
+
# @param account_id [Integer] the account ID
|
|
76
|
+
# @param options [Hash]
|
|
78
77
|
# @return [Dnsimple::PaginatedResponse<Struct::DomainRegistration>]
|
|
79
78
|
#
|
|
80
79
|
# @raise [NotFoundError] When record is not found.
|
|
@@ -91,9 +90,9 @@ module Dnsimple
|
|
|
91
90
|
# @example Cancel a registrant change 42:
|
|
92
91
|
# client.registrar.delete_registrant_change(1010, 42)
|
|
93
92
|
#
|
|
94
|
-
# @param [Integer]
|
|
95
|
-
# @param [#to_s]
|
|
96
|
-
# @param [Hash]
|
|
93
|
+
# @param account_id [Integer] the account ID
|
|
94
|
+
# @param registrant_change_id [#to_s] the registrant change ID
|
|
95
|
+
# @param options [Hash]
|
|
97
96
|
# @return [Dnsimple::Response<nil>]
|
|
98
97
|
#
|
|
99
98
|
# @raise [NotFoundError] When record is not found.
|
|
@@ -104,7 +103,6 @@ module Dnsimple
|
|
|
104
103
|
|
|
105
104
|
Dnsimple::Response.new(response, nil)
|
|
106
105
|
end
|
|
107
|
-
|
|
108
106
|
end
|
|
109
107
|
end
|
|
110
108
|
end
|
|
@@ -3,15 +3,14 @@
|
|
|
3
3
|
module Dnsimple
|
|
4
4
|
class Client
|
|
5
5
|
module RegistrarTransferLock
|
|
6
|
-
|
|
7
6
|
# Gets the transfer lock for the domain.
|
|
8
7
|
#
|
|
9
8
|
# @example Get the transfer lock for "example.com":
|
|
10
9
|
# client.registrar.get_domain_transfer_lock(1010, "example.com")
|
|
11
10
|
#
|
|
12
|
-
# @param [#to_s]
|
|
13
|
-
# @param [#to_s]
|
|
14
|
-
# @param [Hash]
|
|
11
|
+
# @param account_id [#to_s] the account ID
|
|
12
|
+
# @param domain_name [#to_s] the domain name
|
|
13
|
+
# @param options [Hash]
|
|
15
14
|
# @return [Struct::TransferLock]
|
|
16
15
|
#
|
|
17
16
|
# @raise [Dnsimple::NotFoundError]
|
|
@@ -26,9 +25,9 @@ module Dnsimple
|
|
|
26
25
|
#
|
|
27
26
|
# @see https://developer.dnsimple.com/v2/registrar/#enableDomainTransferLock
|
|
28
27
|
#
|
|
29
|
-
# @param [Integer]
|
|
30
|
-
# @param [#to_s]
|
|
31
|
-
# @param [Hash]
|
|
28
|
+
# @param account_id [Integer] the account ID
|
|
29
|
+
# @param domain_name [#to_s] the domain name
|
|
30
|
+
# @param options [Hash]
|
|
32
31
|
# @return [Struct::TransferLock]
|
|
33
32
|
#
|
|
34
33
|
# @raise [Dnsimple::NotFoundError]
|
|
@@ -43,9 +42,9 @@ module Dnsimple
|
|
|
43
42
|
#
|
|
44
43
|
# @see https://developer.dnsimple.com/v2/registrar/#disableDomainTransferLock
|
|
45
44
|
#
|
|
46
|
-
# @param [Integer]
|
|
47
|
-
# @param [#to_s]
|
|
48
|
-
# @param [Hash]
|
|
45
|
+
# @param account_id [Integer] the account ID
|
|
46
|
+
# @param domain_name [#to_s] the domain name
|
|
47
|
+
# @param options [Hash]
|
|
49
48
|
# @return [Struct::TransferLock]
|
|
50
49
|
#
|
|
51
50
|
# @raise [Dnsimple::NotFoundError]
|
|
@@ -55,7 +54,6 @@ module Dnsimple
|
|
|
55
54
|
|
|
56
55
|
Dnsimple::Response.new(response, Struct::TransferLock.new(response["data"]))
|
|
57
56
|
end
|
|
58
|
-
|
|
59
57
|
end
|
|
60
58
|
end
|
|
61
59
|
end
|
|
@@ -3,27 +3,6 @@
|
|
|
3
3
|
module Dnsimple
|
|
4
4
|
class Client
|
|
5
5
|
module RegistrarWhoisPrivacy
|
|
6
|
-
|
|
7
|
-
# Gets the whois privacy for the domain.
|
|
8
|
-
#
|
|
9
|
-
# @see https://developer.dnsimple.com/v2/registrar/whois-privacy/#get
|
|
10
|
-
#
|
|
11
|
-
# @example Get the whois privacy for "example.com":
|
|
12
|
-
# client.registrar.whois_privacy(1010, "example.com")
|
|
13
|
-
#
|
|
14
|
-
# @param [Integer] account_id the account ID
|
|
15
|
-
# @param [#to_s] domain_name the domain name
|
|
16
|
-
# @param [Hash] options
|
|
17
|
-
# @return [Struct::WhoisPrivacy]
|
|
18
|
-
#
|
|
19
|
-
# @raise [RequestError] When the request fails.
|
|
20
|
-
def whois_privacy(account_id, domain_name, options = {})
|
|
21
|
-
endpoint = whois_privacy_endpoint(account_id, domain_name)
|
|
22
|
-
response = client.get(endpoint, options)
|
|
23
|
-
|
|
24
|
-
Dnsimple::Response.new(response, Struct::WhoisPrivacy.new(response["data"]))
|
|
25
|
-
end
|
|
26
|
-
|
|
27
6
|
# Enables whois privacy for the domain.
|
|
28
7
|
#
|
|
29
8
|
# @see https://developer.dnsimple.com/v2/registrar/whois-privacy/#enable
|
|
@@ -31,9 +10,9 @@ module Dnsimple
|
|
|
31
10
|
# @example Enable whois privacy for "example.com":
|
|
32
11
|
# client.registrar.enable_whois_privacy(1010, "example.com")
|
|
33
12
|
#
|
|
34
|
-
# @param [Integer]
|
|
35
|
-
# @param [#to_s]
|
|
36
|
-
# @param [Hash]
|
|
13
|
+
# @param account_id [Integer] the account ID
|
|
14
|
+
# @param domain_name [#to_s] the domain name
|
|
15
|
+
# @param options [Hash]
|
|
37
16
|
# @return [Struct::WhoisPrivacy]
|
|
38
17
|
#
|
|
39
18
|
# @raise [RequestError] When the request fails.
|
|
@@ -51,9 +30,9 @@ module Dnsimple
|
|
|
51
30
|
# @example Disable whois privacy for "example.com":
|
|
52
31
|
# client.registrar.disable_whois_privacy(1010, "example.com")
|
|
53
32
|
#
|
|
54
|
-
# @param [Integer]
|
|
55
|
-
# @param [#to_s]
|
|
56
|
-
# @param [Hash]
|
|
33
|
+
# @param account_id [Integer] the account ID
|
|
34
|
+
# @param domain_name [#to_s] The domain name
|
|
35
|
+
# @param options [Hash]
|
|
57
36
|
# @return [Struct::WhoisPrivacy]
|
|
58
37
|
#
|
|
59
38
|
# @raise [RequestError] When the request fails.
|
|
@@ -64,33 +43,12 @@ module Dnsimple
|
|
|
64
43
|
Dnsimple::Response.new(response, Struct::WhoisPrivacy.new(response["data"]))
|
|
65
44
|
end
|
|
66
45
|
|
|
67
|
-
# Renews whois privacy for the domain.
|
|
68
|
-
#
|
|
69
|
-
# @see https://developer.dnsimple.com/v2/registrar/whois-privacy/#renew
|
|
70
|
-
#
|
|
71
|
-
# @example Renew whois privacy for "example.com":
|
|
72
|
-
# client.registrar.renew_whois_privacy(1010, "example.com")
|
|
73
|
-
#
|
|
74
|
-
# @param account_id [Integer] the account ID
|
|
75
|
-
# @param domain_name [#to_s] The domain name
|
|
76
|
-
# @param options [Hash]
|
|
77
|
-
# @return [Struct::WhoisPrivacy]
|
|
78
|
-
#
|
|
79
|
-
# @raise [RequestError] When the request fails.
|
|
80
|
-
def renew_whois_privacy(account_id, domain_name, options = {})
|
|
81
|
-
endpoint = "#{whois_privacy_endpoint(account_id, domain_name)}/renewals"
|
|
82
|
-
response = client.post(endpoint, nil, options)
|
|
83
|
-
|
|
84
|
-
Dnsimple::Response.new(response, Struct::WhoisPrivacyRenewal.new(response["data"]))
|
|
85
|
-
end
|
|
86
|
-
|
|
87
46
|
|
|
88
47
|
private
|
|
89
48
|
|
|
90
49
|
def whois_privacy_endpoint(account_id, domain_name)
|
|
91
50
|
Client.versioned("/%s/registrar/domains/%s/whois_privacy" % [account_id, domain_name])
|
|
92
51
|
end
|
|
93
|
-
|
|
94
52
|
end
|
|
95
53
|
end
|
|
96
54
|
end
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
module Dnsimple
|
|
4
4
|
class Client
|
|
5
5
|
module Services
|
|
6
|
-
|
|
7
6
|
# Lists the available one-click services.
|
|
8
7
|
#
|
|
9
8
|
# @see https://developer.dnsimple.com/v2/services/#list
|
|
@@ -17,7 +16,7 @@ module Dnsimple
|
|
|
17
16
|
# @example List one-click services, provide a sorting policy:
|
|
18
17
|
# client.services.list_services(sort: "short_name:asc")
|
|
19
18
|
#
|
|
20
|
-
# @param [Hash]
|
|
19
|
+
# @param options [Hash] the filtering and sorting options
|
|
21
20
|
# @option options [Integer] :page current page (pagination)
|
|
22
21
|
# @option options [Integer] :per_page number of entries to return (pagination)
|
|
23
22
|
# @option options [String] :sort sorting policy
|
|
@@ -46,7 +45,7 @@ module Dnsimple
|
|
|
46
45
|
# @see https://developer.dnsimple.com/v2/services/#list
|
|
47
46
|
# @see #services
|
|
48
47
|
#
|
|
49
|
-
# @param [Hash]
|
|
48
|
+
# @param options [Hash] the filtering and sorting options
|
|
50
49
|
# @option options [Integer] :page current page (pagination)
|
|
51
50
|
# @option options [Integer] :per_page number of entries to return (pagination)
|
|
52
51
|
# @option options [String] :sort sorting policy
|
|
@@ -64,8 +63,8 @@ module Dnsimple
|
|
|
64
63
|
# @example Get service 43:
|
|
65
64
|
# client.services.service(43)
|
|
66
65
|
#
|
|
67
|
-
# @param [#to_s]
|
|
68
|
-
# @param [Hash]
|
|
66
|
+
# @param service_id [#to_s] The service ID
|
|
67
|
+
# @param options [Hash]
|
|
69
68
|
# @return [Dnsimple::Response<Dnsimple::Struct::Service>]
|
|
70
69
|
#
|
|
71
70
|
# @raise [RequestError] When the request fails.
|
|
@@ -75,7 +74,6 @@ module Dnsimple
|
|
|
75
74
|
|
|
76
75
|
Dnsimple::Response.new(response, Struct::Service.new(response["data"]))
|
|
77
76
|
end
|
|
78
|
-
|
|
79
77
|
end
|
|
80
78
|
end
|
|
81
79
|
end
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
module Dnsimple
|
|
4
4
|
class Client
|
|
5
5
|
module ServicesDomains
|
|
6
|
-
|
|
7
6
|
# Lists the one-click services applied to the domain.
|
|
8
7
|
#
|
|
9
8
|
# @see https://developer.dnsimple.com/v2/services/domains/#applied
|
|
@@ -17,9 +16,9 @@ module Dnsimple
|
|
|
17
16
|
# @example List applied one-click services for example.com, provide a sorting policy:
|
|
18
17
|
# client.services.applied_services(1010, "example.com", sort: "short_name:asc")
|
|
19
18
|
#
|
|
20
|
-
# @param [Integer]
|
|
21
|
-
# @param [#to_s]
|
|
22
|
-
# @param [Hash]
|
|
19
|
+
# @param account_id [Integer] the account ID
|
|
20
|
+
# @param domain_id [#to_s] the domain name
|
|
21
|
+
# @param options [Hash] the filtering and sorting options
|
|
23
22
|
# @option options [Integer] :page current page (pagination)
|
|
24
23
|
# @option options [Integer] :per_page number of entries to return (pagination)
|
|
25
24
|
# @option options [String] :sort sorting policy
|
|
@@ -43,11 +42,11 @@ module Dnsimple
|
|
|
43
42
|
# @example Apply one-click service service1 to example.com, provide optional settings:
|
|
44
43
|
# client.domain_services.applied_services(1010, "example.com", "service1", app: "foo")
|
|
45
44
|
#
|
|
46
|
-
# @param [Integer]
|
|
47
|
-
# @param [#to_s]
|
|
48
|
-
# @param [#to_s]
|
|
49
|
-
# @param [Hash]
|
|
50
|
-
# @param [Hash]
|
|
45
|
+
# @param account_id [Integer] the account ID
|
|
46
|
+
# @param service_id [#to_s] the service name (or ID)
|
|
47
|
+
# @param domain_id [#to_s] the domain name
|
|
48
|
+
# @param settings [Hash] optional settings to apply the one-click service
|
|
49
|
+
# @param options [Hash]
|
|
51
50
|
# @return [Dnsimple::Response<nil>]
|
|
52
51
|
#
|
|
53
52
|
# @raise [RequestError] When the request fails.
|
|
@@ -65,10 +64,10 @@ module Dnsimple
|
|
|
65
64
|
# @example Unapply one-click service service1 from example.com:
|
|
66
65
|
# client.domain_services.applied_services(1010, "example.com", "service1")
|
|
67
66
|
#
|
|
68
|
-
# @param [Integer]
|
|
69
|
-
# @param [#to_s]
|
|
70
|
-
# @param [#to_s]
|
|
71
|
-
# @param [Hash]
|
|
67
|
+
# @param account_id [Integer] the account ID
|
|
68
|
+
# @param service_id [#to_s] the service name (or ID)
|
|
69
|
+
# @param domain_id [#to_s] the domain name
|
|
70
|
+
# @param options [Hash]
|
|
72
71
|
# @return [Dnsimple::Response<nil>]
|
|
73
72
|
#
|
|
74
73
|
# @raise [RequestError] When the request fails.
|
|
@@ -78,7 +77,6 @@ module Dnsimple
|
|
|
78
77
|
|
|
79
78
|
Dnsimple::Response.new(response, nil)
|
|
80
79
|
end
|
|
81
|
-
|
|
82
80
|
end
|
|
83
81
|
end
|
|
84
82
|
end
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
module Dnsimple
|
|
4
4
|
class Client
|
|
5
5
|
module Templates
|
|
6
|
-
|
|
7
6
|
# Lists the templates in the account.
|
|
8
7
|
#
|
|
9
8
|
# @see https://developer.dnsimple.com/v2/templates/#list
|
|
@@ -17,8 +16,8 @@ module Dnsimple
|
|
|
17
16
|
# @example List the templates for account 1010, provide sorting policy:
|
|
18
17
|
# client.templates.list_templates(1010, sort: "short_name:asc")
|
|
19
18
|
#
|
|
20
|
-
# @param [Integer]
|
|
21
|
-
# @param [Hash]
|
|
19
|
+
# @param account_id [Integer] the account ID
|
|
20
|
+
# @param options [Hash] the filtering and sorting options
|
|
22
21
|
# @option options [Integer] :page current page (pagination)
|
|
23
22
|
# @option options [Integer] :per_page number of entries to return (pagination)
|
|
24
23
|
# @option options [String] :sort sorting policy
|
|
@@ -47,8 +46,8 @@ module Dnsimple
|
|
|
47
46
|
# @see https://developer.dnsimple.com/v2/templates/#list
|
|
48
47
|
# @see #templates
|
|
49
48
|
#
|
|
50
|
-
# @param [Integer]
|
|
51
|
-
# @param [Hash]
|
|
49
|
+
# @param account_id [Integer] the account ID
|
|
50
|
+
# @param options [Hash] the filtering and sorting options
|
|
52
51
|
# @option options [Integer] :page current page (pagination)
|
|
53
52
|
# @option options [Integer] :per_page number of entries to return (pagination)
|
|
54
53
|
# @option options [String] :sort sorting policy
|
|
@@ -66,9 +65,9 @@ module Dnsimple
|
|
|
66
65
|
# @example Creating a template:
|
|
67
66
|
# client.templates.create_template(1010, name: "Pi", short_name: "pi", description: "Pi template")
|
|
68
67
|
#
|
|
69
|
-
# @param [Integer]
|
|
70
|
-
# @param [Hash]
|
|
71
|
-
# @param [Hash]
|
|
68
|
+
# @param account_id [Integer] the account ID
|
|
69
|
+
# @param attributes [Hash]
|
|
70
|
+
# @param options [Hash]
|
|
72
71
|
# @return [Dnsimple::Response<Dnsimple::Struct::Template>]
|
|
73
72
|
#
|
|
74
73
|
# @raise [Dnsimple::RequestError]
|
|
@@ -86,9 +85,9 @@ module Dnsimple
|
|
|
86
85
|
# @example Get template 5401 in account 1010:
|
|
87
86
|
# client.templates.template(1010, 5401)
|
|
88
87
|
#
|
|
89
|
-
# @param [Integer]
|
|
90
|
-
# @param [#to_s]
|
|
91
|
-
# @param [Hash]
|
|
88
|
+
# @param account_id [Integer] the account ID
|
|
89
|
+
# @param template_id [#to_s] The template ID
|
|
90
|
+
# @param options [Hash]
|
|
92
91
|
# @return [Dnsimple::Response<Dnsimple::Struct::Template>]
|
|
93
92
|
#
|
|
94
93
|
# @raise [RequestError] When the request fails.
|
|
@@ -106,10 +105,10 @@ module Dnsimple
|
|
|
106
105
|
# @example Change the name of template 1 in account 1010:
|
|
107
106
|
# client.templates.update_template(1010, 1, name: "New name")
|
|
108
107
|
#
|
|
109
|
-
# @param [Integer]
|
|
110
|
-
# @param [#to_s]
|
|
111
|
-
# @param [Hash]
|
|
112
|
-
# @param [Hash]
|
|
108
|
+
# @param account_id [Integer] the account ID
|
|
109
|
+
# @param template_id [#to_s] The template ID
|
|
110
|
+
# @param attributes [Hash]
|
|
111
|
+
# @param options [Hash]
|
|
113
112
|
# @return [Dnsimple::Response<Dnsimple::Struct::Template>]
|
|
114
113
|
#
|
|
115
114
|
# @raise [RequestError] When the request fails.
|
|
@@ -129,9 +128,9 @@ module Dnsimple
|
|
|
129
128
|
# @example Delete template 5401 in account 1010:
|
|
130
129
|
# client.templates.delete_template(1010, 5401)
|
|
131
130
|
#
|
|
132
|
-
# @param [Integer]
|
|
133
|
-
# @param [#to_s]
|
|
134
|
-
# @param [Hash]
|
|
131
|
+
# @param account_id [Integer] The account ID
|
|
132
|
+
# @param template_id [#to_s] The template ID
|
|
133
|
+
# @param options [Hash]
|
|
135
134
|
# @return [Dnsimple::Response<nil>]
|
|
136
135
|
#
|
|
137
136
|
# @raise [Dnsimple::NotFoundError]
|
|
@@ -142,7 +141,6 @@ module Dnsimple
|
|
|
142
141
|
|
|
143
142
|
Dnsimple::Response.new(response, nil)
|
|
144
143
|
end
|
|
145
|
-
|
|
146
144
|
end
|
|
147
145
|
end
|
|
148
146
|
end
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
module Dnsimple
|
|
4
4
|
class Client
|
|
5
5
|
module TemplatesDomains
|
|
6
|
-
|
|
7
6
|
# Applies a template to the domain.
|
|
8
7
|
#
|
|
9
8
|
# @see https://developer.dnsimple.com/v2/templates/domains/#apply
|
|
@@ -11,10 +10,10 @@ module Dnsimple
|
|
|
11
10
|
# @example Apply template 5401 for example.com in account 1010:
|
|
12
11
|
# client.templates.apply_template(1010, 5401, "example.com")
|
|
13
12
|
#
|
|
14
|
-
# @param [Integer]
|
|
15
|
-
# @param [#to_s]
|
|
16
|
-
# @param [#to_s]
|
|
17
|
-
# @param [Hash]
|
|
13
|
+
# @param account_id [Integer] The account ID
|
|
14
|
+
# @param template_id [#to_s] The template ID
|
|
15
|
+
# @param domain_id [#to_s] The Domain ID or name
|
|
16
|
+
# @param options [Hash]
|
|
18
17
|
# @return [Dnsimple::Response<nil>]
|
|
19
18
|
#
|
|
20
19
|
# @raise [Dnsimple::NotFoundError]
|
|
@@ -25,7 +24,6 @@ module Dnsimple
|
|
|
25
24
|
|
|
26
25
|
Dnsimple::Response.new(response, nil)
|
|
27
26
|
end
|
|
28
|
-
|
|
29
27
|
end
|
|
30
28
|
end
|
|
31
29
|
end
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
module Dnsimple
|
|
4
4
|
class Client
|
|
5
5
|
module TemplatesRecords
|
|
6
|
-
|
|
7
6
|
# Lists the records in the template.
|
|
8
7
|
#
|
|
9
8
|
# @see https://developer.dnsimple.com/v2/templates/records/#list
|
|
@@ -18,9 +17,9 @@ module Dnsimple
|
|
|
18
17
|
# @example List records for the template "alpha", providing sorting policy
|
|
19
18
|
# client.templates.records(1010, "alpha", sort: "type:asc")
|
|
20
19
|
#
|
|
21
|
-
# @param [Integer]
|
|
22
|
-
# @param [String]
|
|
23
|
-
# @param [Hash]
|
|
20
|
+
# @param account_id [Integer] the account ID
|
|
21
|
+
# @param template_id [String] the template name
|
|
22
|
+
# @param options [Hash] the filtering and sorting options
|
|
24
23
|
# @option options [Integer] :page current page (pagination)
|
|
25
24
|
# @option options [Integer] :per_page number of entries to return (pagination)
|
|
26
25
|
# @option options [String] :sort sorting policy
|
|
@@ -50,9 +49,9 @@ module Dnsimple
|
|
|
50
49
|
# @example List all the records for "alpha template
|
|
51
50
|
# client.templates.all_records(1010, "alpha")
|
|
52
51
|
#
|
|
53
|
-
# @param [Integer]
|
|
54
|
-
# @param [String]
|
|
55
|
-
# @param [Hash]
|
|
52
|
+
# @param account_id [Integer] the account ID
|
|
53
|
+
# @param template_id [String] the template name
|
|
54
|
+
# @param options [Hash] the filtering and sorting options
|
|
56
55
|
# @option options [Integer] :page current page (pagination)
|
|
57
56
|
# @option options [Integer] :per_page number of entries to return (pagination)
|
|
58
57
|
# @option options [String] :sort sorting policy
|
|
@@ -71,10 +70,10 @@ module Dnsimple
|
|
|
71
70
|
# @example Create an A record for "alpha" template
|
|
72
71
|
# client.templates.create_record(1010, "alpha", name: "", type: "A", content: "192.168.1.1", ttl: 600)
|
|
73
72
|
#
|
|
74
|
-
# @param [Integer]
|
|
75
|
-
# @param [String]
|
|
76
|
-
# @param [Hash]
|
|
77
|
-
# @param [Hash]
|
|
73
|
+
# @param account_id [Integer] the account ID
|
|
74
|
+
# @param template_id [String] the template name
|
|
75
|
+
# @param attributes [Hash]
|
|
76
|
+
# @param options [Hash]
|
|
78
77
|
# @return [Dnsimple::Response<Dnsimple::Struct::TemplateRecord>]
|
|
79
78
|
#
|
|
80
79
|
# @raise [Dnsimple::NotFoundError]
|
|
@@ -94,10 +93,10 @@ module Dnsimple
|
|
|
94
93
|
# @example Get record 123 in "alpha template
|
|
95
94
|
# client.templates.record(1010, "alpha", 123)
|
|
96
95
|
#
|
|
97
|
-
# @param [Integer]
|
|
98
|
-
# @param [String]
|
|
99
|
-
# @param [Integer]
|
|
100
|
-
# @param [Hash]
|
|
96
|
+
# @param account_id [Integer] the account ID
|
|
97
|
+
# @param template_id [String] the template name
|
|
98
|
+
# @param record_id [Integer] the record ID
|
|
99
|
+
# @param options [Hash]
|
|
101
100
|
# @return [Dnsimple::Response<Dnsimple::Struct::TemplateRecord>]
|
|
102
101
|
#
|
|
103
102
|
# @raise [Dnsimple::NotFoundError]
|
|
@@ -118,10 +117,10 @@ module Dnsimple
|
|
|
118
117
|
# @example Delete record 123 in "alpha template
|
|
119
118
|
# client.templates.delete_record(1010, "alpha", 123)
|
|
120
119
|
#
|
|
121
|
-
# @param [Integer]
|
|
122
|
-
# @param [String]
|
|
123
|
-
# @param [Integer]
|
|
124
|
-
# @param [Hash]
|
|
120
|
+
# @param account_id [Integer] the account ID
|
|
121
|
+
# @param template_id [String] the template name
|
|
122
|
+
# @param record_id [Integer] the record ID
|
|
123
|
+
# @param options [Hash]
|
|
125
124
|
# @return [Dnsimple::Response<nil>]
|
|
126
125
|
#
|
|
127
126
|
# @raise [Dnsimple::NotFoundError]
|
|
@@ -132,7 +131,6 @@ module Dnsimple
|
|
|
132
131
|
|
|
133
132
|
Dnsimple::Response.new(response, nil)
|
|
134
133
|
end
|
|
135
|
-
|
|
136
134
|
end
|
|
137
135
|
end
|
|
138
136
|
end
|
data/lib/dnsimple/client/tlds.rb
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
module Dnsimple
|
|
4
4
|
class Client
|
|
5
5
|
module Tlds
|
|
6
|
-
|
|
7
6
|
# Lists the TLDs available for registration
|
|
8
7
|
#
|
|
9
8
|
# @see https://developer.dnsimple.com/v2/tlds/#listTlds
|
|
@@ -17,7 +16,7 @@ module Dnsimple
|
|
|
17
16
|
# @example List TLDs, providing sorting policy
|
|
18
17
|
# client.tlds.list_tlds(sort: "tld:asc")
|
|
19
18
|
#
|
|
20
|
-
# @param [Hash]
|
|
19
|
+
# @param options [Hash] the filtering and sorting options
|
|
21
20
|
# @option options [Integer] :page current page (pagination)
|
|
22
21
|
# @option options [Integer] :per_page number of entries to return (pagination)
|
|
23
22
|
# @option options [String] :sort sorting policy
|
|
@@ -44,7 +43,7 @@ module Dnsimple
|
|
|
44
43
|
# @example List all TLDs in DNSimple
|
|
45
44
|
# client.tlds.all
|
|
46
45
|
#
|
|
47
|
-
# @param [Hash]
|
|
46
|
+
# @param options [Hash] the filtering and sorting options
|
|
48
47
|
# @option options [Integer] :page current page (pagination)
|
|
49
48
|
# @option options [Integer] :per_page number of entries to return (pagination)
|
|
50
49
|
# @option options [String] :sort sorting policy
|
|
@@ -62,8 +61,8 @@ module Dnsimple
|
|
|
62
61
|
# @example Get information on a specific TLD
|
|
63
62
|
# client.tlds.tld('com')
|
|
64
63
|
#
|
|
65
|
-
# @param [#to_s]
|
|
66
|
-
# @param [Hash]
|
|
64
|
+
# @param tld [#to_s] The TLD name.
|
|
65
|
+
# @param options [Hash]
|
|
67
66
|
# @return [Dnsimple::Response<Dnsimple::Struct::Tld>]
|
|
68
67
|
#
|
|
69
68
|
# @raise [Dnsimple::NotFoundError]
|
|
@@ -81,8 +80,8 @@ module Dnsimple
|
|
|
81
80
|
# @example Get extended attributes for a specific TLD
|
|
82
81
|
# client.tlds.tld_extended_attributes('uk')
|
|
83
82
|
#
|
|
84
|
-
# @param [#to_s]
|
|
85
|
-
# @param [Hash]
|
|
83
|
+
# @param tld [#to_s] The TLD name.
|
|
84
|
+
# @param options [Hash]
|
|
86
85
|
# @return [Dnsimple::CollectionResponse<Dnsimple::Struct::ExtendedAttribute>]
|
|
87
86
|
#
|
|
88
87
|
# @raise [Dnsimple::NotFoundError]
|
|
@@ -92,7 +91,6 @@ module Dnsimple
|
|
|
92
91
|
|
|
93
92
|
Dnsimple::CollectionResponse.new(response, response["data"].map { |r| Struct::ExtendedAttribute.new(r) })
|
|
94
93
|
end
|
|
95
|
-
|
|
96
94
|
end
|
|
97
95
|
end
|
|
98
96
|
end
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
module Dnsimple
|
|
4
4
|
class Client
|
|
5
5
|
module VanityNameServers
|
|
6
|
-
|
|
7
6
|
# Enable vanity name servers for the domain.
|
|
8
7
|
#
|
|
9
8
|
# @see https://developer.dnsimple.com/v2/vanity/#enableVanityNameServers
|
|
@@ -43,7 +42,6 @@ module Dnsimple
|
|
|
43
42
|
|
|
44
43
|
Dnsimple::Response.new(response, response["data"])
|
|
45
44
|
end
|
|
46
|
-
|
|
47
45
|
end
|
|
48
46
|
end
|
|
49
47
|
end
|