├── .github ├── CODEOWNERS ├── dependabot.yml └── workflows │ ├── ci.yml │ └── release.yml ├── .gitignore ├── .markdownlint.yaml ├── .rspec ├── .rubocop.yml ├── .rubocop_dnsimple.yml ├── .rubocop_todo.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Gemfile ├── LICENSE.txt ├── README.md ├── Rakefile ├── UPGRADING.md ├── dnsimple.gemspec ├── lib ├── dnsimple.rb └── dnsimple │ ├── client.rb │ ├── client │ ├── accounts.rb │ ├── billing.rb │ ├── certificates.rb │ ├── clients.rb │ ├── contacts.rb │ ├── dns_analytics.rb │ ├── domains.rb │ ├── domains_collaborators.rb │ ├── domains_delegation_signer_records.rb │ ├── domains_dnssec.rb │ ├── domains_email_forwards.rb │ ├── domains_pushes.rb │ ├── identity.rb │ ├── oauth.rb │ ├── registrar.rb │ ├── registrar_auto_renewal.rb │ ├── registrar_delegation.rb │ ├── registrar_registrant_changes.rb │ ├── registrar_transfer_lock.rb │ ├── registrar_whois_privacy.rb │ ├── services.rb │ ├── services_domains.rb │ ├── templates.rb │ ├── templates_domains.rb │ ├── templates_records.rb │ ├── tlds.rb │ ├── vanity_name_servers.rb │ ├── webhooks.rb │ ├── zones.rb │ ├── zones_distributions.rb │ └── zones_records.rb │ ├── default.rb │ ├── error.rb │ ├── extra.rb │ ├── options.rb │ ├── response.rb │ ├── struct.rb │ ├── struct │ ├── account.rb │ ├── certificate.rb │ ├── certificate_bundle.rb │ ├── certificate_purchase.rb │ ├── certificate_renewal.rb │ ├── charge.rb │ ├── collaborator.rb │ ├── contact.rb │ ├── delegation_signer_record.rb │ ├── dns_analytics.rb │ ├── dnssec.rb │ ├── domain.rb │ ├── domain_check.rb │ ├── domain_premium_price.rb │ ├── domain_price.rb │ ├── domain_push.rb │ ├── domain_registration.rb │ ├── domain_renewal.rb │ ├── domain_restore.rb │ ├── domain_transfer.rb │ ├── email_forward.rb │ ├── extended_attribute.rb │ ├── oauth_token.rb │ ├── registrant_change.rb │ ├── registrant_change_check.rb │ ├── service.rb │ ├── template.rb │ ├── template_record.rb │ ├── tld.rb │ ├── transfer_lock.rb │ ├── user.rb │ ├── vanity_name_server.rb │ ├── webhook.rb │ ├── whoami.rb │ ├── whois_privacy.rb │ ├── whois_privacy_renewal.rb │ ├── zone.rb │ ├── zone_distribution.rb │ ├── zone_file.rb │ └── zone_record.rb │ └── version.rb └── spec ├── dnsimple ├── client │ ├── accounts_spec.rb │ ├── billing_spec.rb │ ├── certificates_spec.rb │ ├── client_service_spec.rb │ ├── contacts_spec.rb │ ├── dns_analytics_spec.rb │ ├── domains_collaborators_spec.rb │ ├── domains_delegation_signer_records_spec.rb │ ├── domains_dnssec_spec.rb │ ├── domains_email_forwards_spec.rb │ ├── domains_pushes_spec.rb │ ├── domains_spec.rb │ ├── identity_spec.rb │ ├── oauth_spec.rb │ ├── registrar_auto_renewal_spec.rb │ ├── registrar_delegation_spec.rb │ ├── registrar_spec.rb │ ├── registrar_transfer_lock_spec.rb │ ├── registrar_whois_privacy_spec.rb │ ├── services_domains_spec.rb │ ├── services_spec.rb │ ├── templates_domains_spec.rb │ ├── templates_records_spec.rb │ ├── templates_spec.rb │ ├── tlds_spec.rb │ ├── vanity_name_servers_spec.rb │ ├── webhooks_spec.rb │ ├── zones_distributions_spec.rb │ ├── zones_records_spec.rb │ └── zones_spec.rb ├── client_spec.rb ├── extra_spec.rb └── options │ ├── base_spec.rb │ └── list_options_spec.rb ├── fixtures.http ├── acceptPush │ └── success.http ├── accounts │ ├── success-account.http │ └── success-user.http ├── activateZoneService │ └── success.http ├── addCollaborator │ ├── invite-success.http │ └── success.http ├── appliedServices │ └── success.http ├── applyService │ └── success.http ├── applyTemplate │ └── success.http ├── authorizeDomainTransferOut │ └── success.http ├── badgateway.http ├── cancelDomainTransfer │ └── success.http ├── changeDomainDelegation │ └── success.http ├── changeDomainDelegationFromVanity │ └── success.http ├── changeDomainDelegationToVanity │ └── success.http ├── checkDomain │ └── success.http ├── checkDomainPremiumPrice │ ├── error_400_not_a_premium_domain.http │ ├── error_400_tld_not_supported.http │ └── success.http ├── checkRegistrantChange │ ├── error-contactnotfound.http │ ├── error-domainnotfound.http │ └── success.http ├── checkZoneDistribution │ ├── error.http │ ├── failure.http │ └── success.http ├── checkZoneRecordDistribution │ ├── error.http │ ├── failure.http │ └── success.http ├── createContact │ └── created.http ├── createDelegationSignerRecord │ ├── created.http │ └── validation-error.http ├── createDomain │ └── created.http ├── createEmailForward │ └── created.http ├── createPrimaryServer │ └── created.http ├── createRegistrantChange │ └── success.http ├── createSecondaryZone │ └── created.http ├── createTemplate │ └── created.http ├── createTemplateRecord │ └── created.http ├── createWebhook │ └── created.http ├── createZoneRecord │ ├── created-apex.http │ └── created.http ├── deactivateZoneService │ └── success.http ├── deleteContact │ ├── error-contact-in-use.http │ └── success.http ├── deleteDelegationSignerRecord │ └── success.http ├── deleteDomain │ └── success.http ├── deleteEmailForward │ └── success.http ├── deleteRegistrantChange │ └── success.http ├── deleteTemplate │ └── success.http ├── deleteTemplateRecord │ └── success.http ├── deleteWebhook │ └── success.http ├── deleteZoneRecord │ └── success.http ├── disableDnssec │ ├── not-enabled.http │ └── success.http ├── disableDomainAutoRenewal │ └── success.http ├── disableDomainTransferLock │ └── success.http ├── disableVanityNameServers │ └── success.http ├── disableWhoisPrivacy │ └── success.http ├── dnsAnalytics │ └── success.http ├── downloadCertificate │ └── success.http ├── enableDnssec │ └── success.http ├── enableDomainAutoRenewal │ └── success.http ├── enableDomainTransferLock │ └── success.http ├── enableVanityNameServers │ └── success.http ├── enableWhoisPrivacy │ ├── created.http │ └── success.http ├── getCertificate │ └── success.http ├── getCertificatePrivateKey │ └── success.http ├── getContact │ └── success.http ├── getDelegationSignerRecord │ └── success.http ├── getDnssec │ └── success.http ├── getDomain │ └── success.http ├── getDomainDelegation │ ├── success-empty.http │ └── success.http ├── getDomainPremiumPrice │ ├── failure.http │ └── success.http ├── getDomainPrices │ ├── failure.http │ └── success.http ├── getDomainRegistration │ └── success.http ├── getDomainRenewal │ └── success.http ├── getDomainRestore │ └── success.http ├── getDomainTransfer │ └── success.http ├── getDomainTransferLock │ └── success.http ├── getEmailForward │ └── success.http ├── getPrimaryServer │ └── success.http ├── getRegistrantChange │ └── success.http ├── getService │ └── success.http ├── getTemplate │ └── success.http ├── getTemplateRecord │ └── success.http ├── getTld │ └── success.http ├── getTldExtendedAttributes │ ├── success-attributes.http │ ├── success-noattributes.http │ └── success.http ├── getWebhook │ └── success.http ├── getWhoisPrivacy │ └── success.http ├── getZone │ └── success.http ├── getZoneFile │ └── success.http ├── getZoneRecord │ └── success.http ├── initiatePush │ └── success.http ├── issueLetsencryptCertificate │ └── success.http ├── issueRenewalLetsencryptCertificate │ └── success.http ├── linkPrimaryServer │ └── success.http ├── listAccounts │ ├── success-account.http │ └── success-user.http ├── listCertificates │ └── success.http ├── listCharges │ ├── fail-400-bad-filter.http │ ├── fail-403.http │ └── success.http ├── listCollaborators │ └── success.http ├── listContacts │ └── success.http ├── listDelegationSignerRecords │ └── success.http ├── listDomains │ └── success.http ├── listEmailForwards │ └── success.http ├── listPrimaryServers │ └── success.http ├── listPushes │ └── success.http ├── listRegistrantChanges │ └── success.http ├── listServices │ └── success.http ├── listTemplateRecords │ └── success.http ├── listTemplates │ └── success.http ├── listTlds │ └── success.http ├── listWebhooks │ └── success.http ├── listZoneRecords │ └── success.http ├── listZones │ └── success.http ├── method-not-allowed.http ├── notfound-certificate.http ├── notfound-collaborator.http ├── notfound-contact.http ├── notfound-delegationsignerrecord.http ├── notfound-domain.http ├── notfound-domainpush.http ├── notfound-emailforward.http ├── notfound-record.http ├── notfound-template.http ├── notfound-webhook.http ├── notfound-whoisprivacy.http ├── notfound-zone.http ├── oauthAccessToken │ ├── error-invalid-request.http │ └── success.http ├── pages-1of3.http ├── pages-2of3.http ├── pages-3of3.http ├── purchaseLetsencryptCertificate │ └── success.http ├── purchaseRenewalLetsencryptCertificate │ └── success.http ├── registerDomain │ └── success.http ├── rejectPush │ └── success.http ├── removeCollaborator │ └── success.http ├── renewDomain │ ├── error-tooearly.http │ └── success.http ├── renewWhoisPrivacy │ ├── success.http │ ├── whois-privacy-duplicated-order.http │ └── whois-privacy-not-found.http ├── response.http ├── restoreDomain │ └── success.http ├── success-with-malformed-json.http ├── transferDomain │ ├── error-indnsimple.http │ ├── error-missing-authcode.http │ └── success.http ├── unapplyService │ └── success.http ├── unlinkPrimaryServer │ └── success.http ├── updateContact │ └── success.http ├── updateTemplate │ └── success.http ├── updateZoneRecord │ └── success.http ├── validation-error.http └── whoami │ ├── success-account.http │ ├── success-user.http │ └── success.http ├── spec_helper.rb └── support ├── helpers.rb └── webmock.rb /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @dnsimple/external-integrations 2 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 2 3 | updates: 4 | - package-ecosystem: bundler 5 | directory: / 6 | schedule: 7 | interval: weekly 8 | open-pull-requests-limit: 10 9 | labels: 10 | - task 11 | - dependencies 12 | 13 | - package-ecosystem: github-actions 14 | directory: / 15 | schedule: 16 | interval: weekly 17 | labels: 18 | - task 19 | - dependencies 20 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | workflow_dispatch: 8 | 9 | concurrency: 10 | group: ${{ github.workflow }}-${{ github.ref }} 11 | cancel-in-progress: true 12 | 13 | jobs: 14 | markdownlint-cli: 15 | name: Lint markdown 16 | runs-on: ubuntu-latest 17 | steps: 18 | - name: Checkout Code 19 | uses: actions/checkout@v4 20 | - name: Run markdownlint-cli 21 | uses: nosborn/github-action-markdown-cli@v3.4.0 22 | with: 23 | files: . 24 | config_file: ".markdownlint.yaml" 25 | 26 | test: 27 | needs: [markdownlint-cli] 28 | runs-on: ubuntu-latest 29 | name: Ruby ${{ matrix.ruby-version }} 30 | strategy: 31 | matrix: 32 | ruby-version: 33 | - '3.2' 34 | - '3.3' 35 | - '3.4' 36 | - 'ruby-head' 37 | - 'truffleruby-head' 38 | steps: 39 | - uses: actions/checkout@v4 40 | - name: Set up Ruby 41 | uses: ruby/setup-ruby@v1 42 | with: 43 | ruby-version: ${{ matrix.ruby-version }} 44 | bundler-cache: true 45 | - run: bundle exec rake 46 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | tags: 6 | - v*.*.* 7 | jobs: 8 | publish: 9 | name: Release to RubyGems 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Wait for tests to succeed 14 | uses: lewagon/wait-on-check-action@v1.3.4 15 | with: 16 | ref: 'refs/heads/main' 17 | running-workflow-name: 'Release to RubyGems' 18 | repo-token: ${{ secrets.GITHUB_TOKEN }} 19 | wait-interval: 10 20 | allowed-conclusions: success 21 | 22 | - uses: actions/checkout@v4 23 | 24 | - name: Release Gem 25 | uses: simplyqio/publish-rubygems-action@2.0.0 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} 29 | RELEASE_COMMAND: "rake build && gem push pkg/*.gem" 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # ASDF 2 | .tool-versions 3 | 4 | # Bundler 5 | .bundle 6 | pkg/* 7 | Gemfile.lock 8 | 9 | # YARD 10 | .yardoc 11 | yardoc/ 12 | doc/ 13 | -------------------------------------------------------------------------------- /.markdownlint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | default: true 3 | line-length: false 4 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --colour -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | --- 2 | inherit_from: 3 | - .rubocop_todo.yml 4 | - .rubocop_dnsimple.yml 5 | 6 | require: 7 | - rubocop-performance 8 | - rubocop-rake 9 | - rubocop-rspec 10 | 11 | AllCops: 12 | TargetRubyVersion: 3.0 13 | Exclude: 14 | - '*.gemspec' 15 | - 'Rakefile' 16 | - 'vendor/**/*' 17 | -------------------------------------------------------------------------------- /.rubocop_todo.yml: -------------------------------------------------------------------------------- 1 | # This configuration was generated by 2 | # `rubocop --auto-gen-config` 3 | # on 2023-01-26 12:48:02 UTC using RuboCop version 1.44.1. 4 | # The point is for the user to remove these configuration records 5 | # one by one as the offenses are removed from the code base. 6 | # Note that changes in the inspected code, or installation of new 7 | # versions of RuboCop, may require this file to be generated again. 8 | 9 | # Offense count: 74 10 | # Configuration parameters: CountAsOne. 11 | RSpec/ExampleLength: 12 | Max: 17 13 | 14 | # Offense count: 1 15 | RSpec/LeakyConstantDeclaration: 16 | Exclude: 17 | - 'spec/dnsimple/client/client_service_spec.rb' 18 | 19 | # Offense count: 12 20 | # Configuration parameters: . 21 | # SupportedStyles: have_received, receive 22 | RSpec/MessageSpies: 23 | EnforcedStyle: receive 24 | 25 | # Offense count: 115 26 | RSpec/MultipleExpectations: 27 | Max: 15 28 | 29 | # Offense count: 372 30 | # Configuration parameters: EnforcedStyle, IgnoreSharedExamples. 31 | # SupportedStyles: always, named_only 32 | RSpec/NamedSubject: 33 | Enabled: false 34 | 35 | # Offense count: 16 36 | RSpec/SubjectStub: 37 | Exclude: 38 | - 'spec/dnsimple/client/certificates_spec.rb' 39 | - 'spec/dnsimple/client/contacts_spec.rb' 40 | - 'spec/dnsimple/client/domains_delegation_signer_records_spec.rb' 41 | - 'spec/dnsimple/client/domains_email_forwards_spec.rb' 42 | - 'spec/dnsimple/client/domains_spec.rb' 43 | - 'spec/dnsimple/client/services_spec.rb' 44 | - 'spec/dnsimple/client/templates_records_spec.rb' 45 | - 'spec/dnsimple/client/templates_spec.rb' 46 | - 'spec/dnsimple/client/tlds_spec.rb' 47 | - 'spec/dnsimple/client/zones_records_spec.rb' 48 | - 'spec/dnsimple/client/zones_spec.rb' 49 | - 'spec/dnsimple/client_spec.rb' 50 | 51 | # Offense count: 69 52 | # Configuration parameters: AllowedConstants. 53 | Style/Documentation: 54 | Enabled: false 55 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to DNSimple/Ruby 2 | 3 | ## Getting started 4 | 5 | ### 1. Clone the repository 6 | 7 | Clone the repository and move into it: 8 | 9 | ```shell 10 | git clone git@github.com:dnsimple/dnsimple-ruby.git 11 | cd dnsimple-ruby 12 | ``` 13 | 14 | ### 2. Install the dependencies 15 | 16 | Install the dependencies using [Bundler](http://bundler.io/): 17 | 18 | ```shell 19 | bundle 20 | ``` 21 | 22 | ### 3. Build and test 23 | 24 | [Run the test suite](#testing) to check everything works as expected. 25 | 26 | ## Releasing 27 | 28 | The following instructions uses `$VERSION` as a placeholder, where `$VERSION` is a `MAJOR.MINOR.BUGFIX` release such as `1.2.0`. 29 | 30 | 1. Set the version in `version.rb`: 31 | 32 | ```ruby 33 | VERSION = "$VERSION" 34 | ``` 35 | 36 | 1. Run the test suite and ensure all the tests pass. 37 | 38 | 1. Finalize the `## main` section in `CHANGELOG.md` assigning the version. 39 | 40 | 1. Commit and push the changes 41 | 42 | ```shell 43 | git commit -a -m "Release $VERSION" 44 | git push origin main 45 | ``` 46 | 47 | 1. Wait for CI to complete. 48 | 49 | 1. Create a signed tag. 50 | 51 | ```shell 52 | git tag -a v$VERSION -s -m "Release $VERSION" 53 | git push origin --tags 54 | ``` 55 | 56 | ## Testing 57 | 58 | To run the test suite: 59 | 60 | ```shell 61 | rake 62 | ``` 63 | 64 | ## Tests 65 | 66 | Submit unit tests for your changes. You can test your changes on your machine by [running the test suite](#testing). 67 | 68 | When you submit a PR, tests will also be run on the [continuous integration environment via GitHub Actions](https://github.com/dnsimple/dnsimple-ruby/actions). 69 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | source 'https://rubygems.org' 4 | 5 | gemspec 6 | 7 | gem "coveralls", "~> 0.8", require: false 8 | gem "rubocop", "~> 1.75", require: false 9 | gem "rubocop-performance", "~> 1.25", require: false 10 | gem "rubocop-rake", "~> 0.7", require: false 11 | gem "rubocop-rspec", "~> 3.6", require: false 12 | gem "base64", "~> 0.2.0" 13 | gem "bigdecimal", "~> 3.1" 14 | gem "csv", "~> 3.2" 15 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2010-2025 DNSimple Corporation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require 'bundler/gem_tasks' 2 | 3 | # By default, run tests and linter. 4 | task default: [:spec, :rubocop] 5 | 6 | 7 | require 'rspec/core/rake_task' 8 | 9 | RSpec::Core::RakeTask.new do |t| 10 | t.verbose = !ENV["VERBOSE"].nil? 11 | end 12 | 13 | 14 | require 'rubocop/rake_task' 15 | 16 | RuboCop::RakeTask.new 17 | 18 | 19 | require 'yard' 20 | 21 | YARD::Rake::YardocTask.new(:yardoc) do |y| 22 | y.options = ["--output-dir", "yardoc"] 23 | end 24 | 25 | namespace :yardoc do 26 | task :clobber do 27 | rm_r "yardoc" rescue nil 28 | end 29 | end 30 | 31 | task :clobber => "yardoc:clobber" 32 | 33 | 34 | desc "Open an irb session preloaded with this library" 35 | task :console do 36 | sh "irb -r rubygems -I lib -r dnsimple.rb" 37 | end 38 | -------------------------------------------------------------------------------- /dnsimple.gemspec: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | $:.push File.expand_path('../lib', __FILE__) 3 | require 'dnsimple/version' 4 | 5 | Gem::Specification.new do |s| 6 | s.name = 'dnsimple' 7 | s.version = Dnsimple::VERSION 8 | s.authors = ['DNSimple'] 9 | s.email = ['support@dnsimple.com'] 10 | s.homepage = 'https://github.com/dnsimple/dnsimple-ruby' 11 | s.summary = 'The DNSimple API client for Ruby' 12 | s.description = 'The DNSimple API client for Ruby.' 13 | 14 | s.required_ruby_version = ">= 2.7" 15 | 16 | s.require_paths = ['lib'] 17 | s.files = `git ls-files`.split("\n") 18 | s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") 19 | s.extra_rdoc_files = %w( LICENSE.txt ) 20 | 21 | s.add_dependency 'httparty' 22 | 23 | s.add_development_dependency 'rake' 24 | s.add_development_dependency 'rspec' 25 | s.add_development_dependency 'yard' 26 | s.add_development_dependency 'webmock' 27 | end 28 | -------------------------------------------------------------------------------- /lib/dnsimple.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | 5 | # Echoes a deprecation warning message. 6 | # 7 | # @param [String] message The message to display. 8 | # @return [void] 9 | # 10 | # @api internal 11 | # @private 12 | def self.deprecate(message = nil) 13 | message ||= "You are using deprecated behavior which will be removed from the next major or minor release." 14 | warn("DEPRECATION WARNING: #{message}") 15 | end 16 | 17 | end 18 | 19 | require 'dnsimple/version' 20 | require 'dnsimple/default' 21 | require 'dnsimple/client' 22 | require 'dnsimple/error' 23 | require 'dnsimple/options' 24 | -------------------------------------------------------------------------------- /lib/dnsimple/client/accounts.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | class Client 5 | module Accounts 6 | 7 | # Lists the accounts the authenticated entity has access to. 8 | # 9 | # @see https://developer.dnsimple.com/v2/accounts 10 | # 11 | # @example List the accounts: 12 | # client.accounts.list 13 | # 14 | # @param [Hash] options 15 | # @return [Dnsimple::Response] 16 | # 17 | # @raise [Dnsimple::RequestError] 18 | def accounts(options = {}) 19 | response = client.get(Client.versioned("/accounts"), options) 20 | 21 | Dnsimple::Response.new(response, response["data"].map { |r| Struct::Account.new(r) }) 22 | end 23 | alias list_accounts accounts 24 | 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/dnsimple/client/billing.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | class Client 5 | module Billing 6 | 7 | # List the billing charges for the account. 8 | # 9 | # @see https://developer.dnsimple.com/v2/billing/#listCharges 10 | # 11 | # @example List charges in the first page 12 | # client.charges.list(1010) 13 | # 14 | # @example List charges, provide a filter start date 15 | # client.charges.list(1010, filter: { start_date: "2023-01-01" }) 16 | # 17 | # @example List charges, provide a sorting policy 18 | # client.charges.list(1010, sort: "invoiced:asc") 19 | # 20 | # @param [Integer] account_id the account ID 21 | # @param [Hash] options the filtering and sorting options 22 | # @option options [Integer] :page current page (pagination) 23 | # @option options [Integer] :per_page number of entries to return (pagination) 24 | # @option options [String] :sort sorting policy 25 | # @return [Dnsimple::PaginatedResponse] 26 | # 27 | # @raise [Dnsimple::RequestError] 28 | def charges(account_id, options = {}) 29 | response = client.get(Client.versioned("/%s/billing/charges" % [account_id]), Options::ListOptions.new(options)) 30 | 31 | Dnsimple::PaginatedResponse.new(response, response["data"].map { |r| Struct::Charge.new(r) }) 32 | end 33 | alias list_charges charges 34 | 35 | end 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /lib/dnsimple/client/dns_analytics.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | class Client 5 | module DnsAnalytics 6 | 7 | # Queries DNS Analytics data for the provided account 8 | # 9 | # @see https://developer.dnsimple.com/v2/dns-analytics#queryDnsAnalytics 10 | # 11 | # @param [Integer] account_id the account ID 12 | # @param [Hash] options the filtering, sorting, and grouping options 13 | # @option options [Integer] :page current page (pagination) 14 | # @option options [Integer] :per_page number of entries to return (pagination) 15 | # @option options [String] :sort sorting policy 16 | # @option options [Hash] :filter filtering policy 17 | # @option options [String] :groupings groupings policy 18 | # @return [Dnsimple::PaginatedResponseWithQuery] 19 | # 20 | # @raise [Dnsimple::RequestError] 21 | def query(account_id, options = {}) 22 | list_options = Options::ListOptions.new(options) 23 | response = client.get(Client.versioned("/%s/dns_analytics" % [account_id]), list_options) 24 | 25 | Dnsimple::PaginatedResponseWithQuery.new(response, response["data"]["rows"].map { |row| Struct::DnsAnalytics.new(response["data"]["headers"].zip(row)) }) 26 | end 27 | 28 | end 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /lib/dnsimple/client/identity.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | class Client 5 | module Identity 6 | 7 | # Gets the information about the current authenticated context. 8 | # 9 | # @see https://developer.dnsimple.com/v2/identity/#whoami 10 | # 11 | # @param [Hash] options 12 | # @return [Dnsimple::Response] 13 | # @raise [Dnsimple::RequestError] 14 | def whoami(options = {}) 15 | response = client.get(Client.versioned("/whoami"), options) 16 | 17 | Dnsimple::Response.new(response, Struct::Whoami.new(response["data"])) 18 | end 19 | 20 | 21 | module StaticHelpers 22 | 23 | # Calls {Identity#whoami} and directly returns the response data. 24 | # 25 | # @see https://developer.dnsimple.com/v2/identity/#whoami 26 | # 27 | # @param [Dnsimple::Client] client the DNSimple client instance to use 28 | # @param [Array] args the args for the {Identity#whoami} call 29 | # @return [Hash] 30 | # @raise [Dnsimple::RequestError] 31 | def whoami(client, *args) 32 | client.identity.whoami(*args).data 33 | end 34 | 35 | end 36 | 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /lib/dnsimple/client/registrar_auto_renewal.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | class Client 5 | module RegistrarAutoRenewal 6 | 7 | # Enable auto renewal for the domain in the account. 8 | # 9 | # @see https://developer.dnsimple.com/v2/registrar/auto-renewal/ 10 | # 11 | # @param [Integer] account_id the account ID 12 | # @param [#to_s] domain_name the domain name 13 | # @param [Hash] options 14 | # @return [Dnsimple::Response] 15 | # 16 | # @raise [Dnsimple::NotFoundError] 17 | # @raise [Dnsimple::RequestError] 18 | def enable_auto_renewal(account_id, domain_name, options = {}) 19 | response = client.put(Client.versioned("/%s/registrar/domains/%s/auto_renewal" % [account_id, domain_name]), nil, options) 20 | 21 | Dnsimple::Response.new(response, nil) 22 | end 23 | 24 | # Disable auto renewal for the domain in the account. 25 | # 26 | # @see https://developer.dnsimple.com/v2/registrar/auto-renewal/ 27 | # 28 | # @param [Integer] account_id the account ID 29 | # @param [#to_s] domain_name the domain name 30 | # @param [Hash] options 31 | # @return [Dnsimple::Response] 32 | # 33 | # @raise [Dnsimple::NotFoundError] 34 | # @raise [Dnsimple::RequestError] 35 | def disable_auto_renewal(account_id, domain_name, options = {}) 36 | response = client.delete(Client.versioned("/%s/registrar/domains/%s/auto_renewal" % [account_id, domain_name]), nil, options) 37 | 38 | Dnsimple::Response.new(response, nil) 39 | end 40 | 41 | end 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /lib/dnsimple/client/templates_domains.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | class Client 5 | module TemplatesDomains 6 | 7 | # Applies a template to the domain. 8 | # 9 | # @see https://developer.dnsimple.com/v2/templates/domains/#apply 10 | # 11 | # @example Apply template 5401 for example.com in account 1010: 12 | # client.templates.apply_template(1010, 5401, "example.com") 13 | # 14 | # @param [Integer] account_id The account ID 15 | # @param [#to_s] template_id The template ID 16 | # @param [#to_s] domain_id The Domain ID or name 17 | # @param [Hash] options 18 | # @return [Dnsimple::Response] 19 | # 20 | # @raise [Dnsimple::NotFoundError] 21 | # @raise [Dnsimple::RequestError] 22 | def apply_template(account_id, template_id, domain_id, options = {}) 23 | endpoint = Client.versioned("/%s/domains/%s/templates/%s" % [account_id, domain_id, template_id]) 24 | response = client.post(endpoint, options) 25 | 26 | Dnsimple::Response.new(response, nil) 27 | end 28 | 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /lib/dnsimple/client/vanity_name_servers.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | class Client 5 | module VanityNameServers 6 | 7 | # Enable vanity name servers for the domain. 8 | # 9 | # @see https://developer.dnsimple.com/v2/vanity/#enableVanityNameServers 10 | # 11 | # @example Enable vanity name servers for example.com: 12 | # client.vanity_name_servers.enable_vanity_name_servers(1010, "example.com") 13 | # 14 | # @param account_id [Integer] the account ID 15 | # @param domain_name [#to_s] the domain name 16 | # @param options [Hash] 17 | # @return [Dnsimple::Response] 18 | # 19 | # @raise [RequestError] When the request fails. 20 | def enable_vanity_name_servers(account_id, domain_name, options = {}) 21 | endpoint = Client.versioned("/%s/vanity/%s" % [account_id, domain_name]) 22 | response = client.put(endpoint, options) 23 | 24 | Dnsimple::Response.new(response, response["data"]) 25 | end 26 | 27 | # Disable vanity name servers for the domain. 28 | # 29 | # @see https://developer.dnsimple.com/v2/vanity/#disableVanityNameServers 30 | # 31 | # @example Disable vanity name servers for example.com: 32 | # client.vanity_name_servers.disable_vanity_name_servers(1010, "example.com") 33 | # 34 | # @param account_id [Integer] the account ID 35 | # @param domain_name [#to_s] the domain name 36 | # @param options [Hash] 37 | # @return [Dnsimple::Response] 38 | # 39 | # @raise [RequestError] When the request fails. 40 | def disable_vanity_name_servers(account_id, domain_name, options = {}) 41 | endpoint = Client.versioned("/%s/vanity/%s" % [account_id, domain_name]) 42 | response = client.delete(endpoint, options) 43 | 44 | Dnsimple::Response.new(response, response["data"]) 45 | end 46 | 47 | end 48 | end 49 | end 50 | -------------------------------------------------------------------------------- /lib/dnsimple/client/zones_distributions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | class Client 5 | module ZonesDistributions 6 | 7 | # Checks if a zone change is fully distributed to all DNSimple name 8 | # servers across the globe. 9 | # 10 | # @see https://developer.dnsimple.com/v2/zones/#checkZoneDistribution 11 | # 12 | # @param account_id [Integer] the account ID 13 | # @param zone_id [#to_s] the zone name 14 | # @param options [Hash] 15 | # @return [Dnsimple::Response] 16 | # 17 | # @raise [Dnsimple::NotFoundError] 18 | # @raise [Dnsimple::RequestError] 19 | def zone_distribution(account_id, zone_id, options = {}) 20 | response = client.get(Client.versioned("/%s/zones/%s/distribution" % [account_id, zone_id]), options) 21 | 22 | Dnsimple::Response.new(response, Struct::ZoneDistribution.new(response["data"])) 23 | end 24 | 25 | # Checks if a zone record is fully distributed to all DNSimple name 26 | # servers across the globe. 27 | # 28 | # @see https://developer.dnsimple.com/v2/zones/records/#checkZoneRecordDistribution 29 | # 30 | # @example Get record 123 in zone "example.com" 31 | # client.zones.zone_record_distribution(1010, "example.com", 123) 32 | # 33 | # @param [Integer] account_id the account ID 34 | # @param [String] zone_id the zone name 35 | # @param [Integer] record_id the record ID 36 | # @param [Hash] options 37 | # @return [Dnsimple::Response] 38 | # 39 | # @raise [Dnsimple::NotFoundError] 40 | # @raise [Dnsimple::RequestError] 41 | def zone_record_distribution(account_id, zone_id, record_id, options = {}) 42 | response = client.get(Client.versioned("/%s/zones/%s/records/%s/distribution" % [account_id, zone_id, record_id]), options) 43 | 44 | Dnsimple::Response.new(response, Struct::ZoneDistribution.new(response["data"])) 45 | end 46 | 47 | end 48 | end 49 | end 50 | -------------------------------------------------------------------------------- /lib/dnsimple/error.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | 5 | class Error < StandardError 6 | end 7 | 8 | # RequestError is raised when an API request fails for an client, a server error or invalid request information. 9 | class RequestError < Error 10 | 11 | attr_reader :http_response 12 | attr_reader :attribute_errors 13 | 14 | def initialize(http_response) 15 | @http_response = http_response 16 | @attribute_errors = attribute_errors_from(http_response) 17 | super(message_from(http_response)) 18 | end 19 | 20 | private 21 | 22 | def attribute_errors_from(http_response) 23 | return unless is_json_response?(http_response) 24 | 25 | http_response.parsed_response["errors"] 26 | end 27 | 28 | def message_from(http_response) 29 | if is_json_response?(http_response) 30 | http_response.parsed_response["message"] 31 | else 32 | net_http_response = http_response.response 33 | "#{net_http_response.code} #{net_http_response.message}" 34 | end 35 | end 36 | 37 | def is_json_response?(http_response) 38 | content_type = http_response.headers["Content-Type"] 39 | content_type&.start_with?("application/json") 40 | end 41 | 42 | end 43 | 44 | class NotFoundError < RequestError 45 | end 46 | 47 | class AuthenticationError < Error 48 | end 49 | 50 | class AuthenticationFailed < AuthenticationError 51 | end 52 | 53 | class OAuthInvalidRequestError < Error 54 | 55 | attr_reader :http_response 56 | attr_reader :error 57 | attr_reader :error_description 58 | 59 | def initialize(http_response) 60 | @http_response = http_response 61 | @error = http_response.parsed_response["error"] 62 | @error_description = http_response.parsed_response["error_description"] 63 | super(message) 64 | end 65 | 66 | private 67 | 68 | def message 69 | "#{error}: #{error_description}" 70 | end 71 | 72 | end 73 | 74 | end 75 | -------------------------------------------------------------------------------- /lib/dnsimple/extra.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Extra 5 | 6 | # Joins two pieces of URI with a /. 7 | # 8 | # @return [String] The joined string. 9 | def self.join_uri(*parts) 10 | parts.map { |part| part.chomp("/") }.join("/") 11 | end 12 | 13 | # Returns a new hash with +self+ and +other+ merged recursively. 14 | # 15 | # h1 = { a: true, b: { c: [1, 2, 3] } } 16 | # h2 = { a: false, b: { x: [3, 4, 5] } } 17 | # 18 | # Extra.deep_merge(h1, h2) #=> { a: false, b: { c: [1, 2, 3], x: [3, 4, 5] } } 19 | # 20 | # Like with Hash#merge in the standard library, a block can be provided 21 | # to merge values: 22 | # 23 | # h1 = { a: 100, b: 200, c: { c1: 100 } } 24 | # h2 = { b: 250, c: { c1: 200 } } 25 | # Extra.deep_merge(h1, h2) { |key, this_val, other_val| this_val + other_val } 26 | # # => { a: 100, b: 450, c: { c1: 300 } } 27 | def self.deep_merge(this, other, &block) 28 | deep_merge!(this.dup, other, &block) 29 | end 30 | 31 | # Same as +deep_merge+, but modifies +this+ instead of returning a new hash. 32 | def self.deep_merge!(this, other, &block) 33 | other.each_pair do |current_key, other_value| 34 | this_value = this[current_key] 35 | 36 | this[current_key] = if this_value.is_a?(Hash) && other_value.is_a?(Hash) 37 | deep_merge(this_value, other_value, &block) 38 | else 39 | if block && key?(current_key) 40 | yield(current_key, this_value, other_value) 41 | else 42 | other_value 43 | end 44 | end 45 | end 46 | 47 | this 48 | end 49 | 50 | # Validates the presence of mandatory attributes. 51 | # 52 | # @param [Hash] attributes 53 | # @param [Array] required 54 | # @return [void] 55 | # @raise [ArgumentError] 56 | def self.validate_mandatory_attributes(attributes, required) 57 | required.each do |name| 58 | attributes&.key?(name) or raise(ArgumentError, ":#{name} is required") 59 | end 60 | end 61 | 62 | end 63 | end 64 | -------------------------------------------------------------------------------- /lib/dnsimple/options.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Options 5 | 6 | class Base 7 | 8 | def initialize(options) 9 | @options = (options || {}).dup 10 | end 11 | 12 | def to_h 13 | @options 14 | end 15 | 16 | end 17 | 18 | class ListOptions < Base 19 | 20 | def initialize(options) 21 | super 22 | _prepare_query 23 | _prepare_pagination 24 | _prepare_sort 25 | _prepare_filter 26 | _prepare_groupings 27 | end 28 | 29 | private 30 | 31 | def _prepare_query 32 | @options[:query] ||= {} if @options.any? 33 | end 34 | 35 | def _prepare_pagination 36 | @page = @options.delete(:page) 37 | _merge(page: @page) unless @page.nil? 38 | 39 | @per_page = @options.delete(:per_page) 40 | _merge(per_page: @per_page) unless @per_page.nil? 41 | end 42 | 43 | def _prepare_sort 44 | @sort = @options.delete(:sort) 45 | _merge(sort: @sort) unless @sort.nil? 46 | end 47 | 48 | def _prepare_filter 49 | @filter = @options.delete(:filter) 50 | _merge(@filter) unless @filter.nil? 51 | end 52 | 53 | def _prepare_groupings 54 | groupings = @options.delete(:groupings) 55 | _merge({ groupings: groupings }) unless groupings.nil? 56 | end 57 | 58 | def _merge(hash) 59 | @options[:query].merge!(hash) 60 | end 61 | 62 | end 63 | 64 | end 65 | end 66 | -------------------------------------------------------------------------------- /lib/dnsimple/struct.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class Base 6 | 7 | def initialize(attributes = {}) 8 | attributes.each do |key, value| 9 | m = :"#{key}=" 10 | send(m, value) if respond_to?(m) 11 | end 12 | end 13 | 14 | end 15 | end 16 | end 17 | 18 | require_relative 'struct/account' 19 | require_relative 'struct/collaborator' 20 | require_relative 'struct/contact' 21 | require_relative 'struct/certificate' 22 | require_relative 'struct/certificate_bundle' 23 | require_relative 'struct/certificate_purchase' 24 | require_relative 'struct/certificate_renewal' 25 | require_relative 'struct/charge' 26 | require_relative 'struct/delegation_signer_record' 27 | require_relative 'struct/dnssec' 28 | require_relative 'struct/domain' 29 | require_relative 'struct/domain_check' 30 | require_relative 'struct/domain_premium_price' 31 | require_relative 'struct/domain_price' 32 | require_relative 'struct/domain_push' 33 | require_relative 'struct/domain_registration' 34 | require_relative 'struct/domain_restore' 35 | require_relative 'struct/domain_transfer' 36 | require_relative 'struct/domain_renewal' 37 | require_relative 'struct/dns_analytics' 38 | require_relative 'struct/email_forward' 39 | require_relative 'struct/extended_attribute' 40 | require_relative 'struct/oauth_token' 41 | require_relative 'struct/registrant_change_check' 42 | require_relative 'struct/registrant_change' 43 | require_relative 'struct/transfer_lock' 44 | require_relative 'struct/zone_record' 45 | require_relative 'struct/service' 46 | require_relative 'struct/template' 47 | require_relative 'struct/template_record' 48 | require_relative 'struct/tld' 49 | require_relative 'struct/user' 50 | require_relative 'struct/vanity_name_server' 51 | require_relative 'struct/whois_privacy' 52 | require_relative 'struct/whois_privacy_renewal' 53 | require_relative 'struct/zone' 54 | require_relative 'struct/zone_file' 55 | require_relative 'struct/zone_distribution' 56 | require_relative 'struct/webhook' 57 | require_relative 'struct/whoami' 58 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/account.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class Account < Base 6 | 7 | # @return [Integer] The account ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [String] The account email. 11 | attr_accessor :email 12 | 13 | # @return [String] The identifier of the plan the account is subscribed to. 14 | attr_accessor :plan_identifier 15 | 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/certificate.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class Certificate < Base 6 | 7 | # @return [Integer] The certificate ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [Integer] The associated domain ID. 11 | attr_accessor :domain_id 12 | 13 | # @return [Integer] The associated contact ID. 14 | attr_accessor :contact_id 15 | 16 | # @return [String] The certificate common name. 17 | attr_accessor :common_name 18 | 19 | # @return [Array] The certificate alternate names. 20 | attr_accessor :alternate_names 21 | 22 | # @return [Integer] The years the certificate will last. 23 | attr_accessor :years 24 | 25 | # @return [String] The certificate CSR. 26 | attr_accessor :csr 27 | 28 | # @return [String] The certificate state. 29 | attr_accessor :state 30 | 31 | # @return [String] The Certificate Authority (CA) that issued the certificate. 32 | attr_accessor :authority_identifier 33 | 34 | # @return [Boolean] True if the certificate is set to auto-renew on expiration. 35 | attr_accessor :auto_renew 36 | 37 | # @return [String] When the certificate was created in DNSimple. 38 | attr_accessor :created_at 39 | 40 | # @return [String] When the certificate was last updated in DNSimple. 41 | attr_accessor :updated_at 42 | 43 | # @return [String] The timestamp when the certificate will expire. 44 | attr_accessor :expires_at 45 | 46 | end 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/certificate_bundle.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class CertificateBundle < Base 6 | 7 | # @return [String] The certificate private key 8 | attr_accessor :private_key 9 | 10 | # @return [String] The server certificate 11 | attr_accessor :server 12 | 13 | alias server_certificate server 14 | 15 | # @return [String] The root certificate 16 | attr_accessor :root 17 | 18 | alias root_certificate root 19 | 20 | # @return [Array] Intermediate certificates 21 | attr_accessor :chain 22 | 23 | alias intermediate_certificates chain 24 | 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/certificate_purchase.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class CertificatePurchase < Base 6 | 7 | # @return [Integer] The certificate purchase ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [Integer] The certificate ID. 11 | attr_accessor :certificate_id 12 | 13 | # @return [String] The certificate renewal state. 14 | attr_accessor :state 15 | 16 | # @return [Boolean] True if the certificate is requested to auto-renew 17 | attr_accessor :auto_renew 18 | 19 | # @return [String] When the certificate renewal was created in DNSimple. 20 | attr_accessor :created_at 21 | 22 | # @return [String] When the certificate renewal was last updated in DNSimple. 23 | attr_accessor :updated_at 24 | 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/certificate_renewal.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class CertificateRenewal < Base 6 | 7 | # @return [Integer] The certificate renewal ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [Integer] The old certificate ID. 11 | attr_accessor :old_certificate_id 12 | 13 | # @return [Integer] The new certificate ID. 14 | attr_accessor :new_certificate_id 15 | 16 | # @return [String] The certificate renewal state. 17 | attr_accessor :state 18 | 19 | # @return [Boolean] True if the certificate is requested to auto-renew 20 | attr_accessor :auto_renew 21 | 22 | # @return [String] When the certificate renewal was created in DNSimple. 23 | attr_accessor :created_at 24 | 25 | # @return [String] When the certificate renewal was last updated in DNSimple. 26 | attr_accessor :updated_at 27 | 28 | end 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/collaborator.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class Collaborator < Base 6 | 7 | # @return [Integer] The collaborator ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [Integer] The associated domain ID. 11 | attr_accessor :domain_id 12 | 13 | # @return [String] The associated domain name. 14 | attr_accessor :domain_name 15 | 16 | # @return [Integer, NilClass] The user ID, if the collaborator accepted the invitation. 17 | attr_accessor :user_id 18 | 19 | # @return [String] The user email. 20 | attr_accessor :user_email 21 | 22 | # @return [TrueClass,FalseClass] Invitation 23 | attr_accessor :invitation 24 | 25 | # @return [String] When the collaborator was created in DNSimple. 26 | attr_accessor :created_at 27 | 28 | # @return [String] When the collaborator was last updated in DNSimple. 29 | attr_accessor :updated_at 30 | 31 | # @return [String,NilClass] When the collaborator has accepted the invitation. 32 | attr_accessor :accepted_at 33 | 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/contact.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class Contact < Base 6 | 7 | # @return [Integer] The contact ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [Integer] The associated account ID. 11 | attr_accessor :account_id 12 | 13 | # @return [String] The label to represent the contact. 14 | attr_accessor :label 15 | 16 | # @return [String] The contact first name. 17 | attr_accessor :first_name 18 | 19 | # @return [String] The contact last name. 20 | attr_accessor :last_name 21 | 22 | # @return [String] The contact's job title. 23 | attr_accessor :job_title 24 | 25 | # @return [String] The name of the organization in which the contact works. 26 | attr_accessor :organization_name 27 | 28 | # @return [String] The contact street address. 29 | attr_accessor :address1 30 | 31 | # @return [String] Apartment or suite number. 32 | attr_accessor :address2 33 | 34 | # @return [String] The city name. 35 | attr_accessor :city 36 | 37 | # @return [String] The state or province name. 38 | attr_accessor :state_province 39 | 40 | # @return [String] The contact postal code. 41 | attr_accessor :postal_code 42 | 43 | # @return [String] The contact country (as a 2-character country code). 44 | attr_accessor :country 45 | 46 | # @return [String] The contact phone number. 47 | attr_accessor :phone 48 | 49 | # @return [String] The contact fax number (may be omitted). 50 | attr_accessor :fax 51 | 52 | # @return [String] The contact email address. 53 | attr_accessor :email 54 | 55 | # @return [String] When the contact was created in DNSimple. 56 | attr_accessor :created_at 57 | 58 | # @return [String] When the contact was last updated in DNSimple. 59 | attr_accessor :updated_at 60 | 61 | end 62 | end 63 | end 64 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/delegation_signer_record.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class DelegationSignerRecord < Base 6 | 7 | # @return [Integer] The ID of the delegation signer record in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [Integer] The associated domain ID. 11 | attr_accessor :domain_id 12 | 13 | # @return [String] The signing algorithm used. 14 | attr_accessor :algorithm 15 | 16 | # @return [String] The digest value. 17 | attr_accessor :digest 18 | 19 | # @return [String] The digest type used. 20 | attr_accessor :digest_type 21 | 22 | # @return [String] The keytag for the associated DNSKEY. 23 | attr_accessor :keytag 24 | 25 | # @return [String] The public key that references the corresponding DNSKEY record. 26 | attr_accessor :public_key 27 | 28 | # @return [String] When the delegation signing record was created in DNSimple. 29 | attr_accessor :created_at 30 | 31 | # @return [String] When the delegation signing record was last updated in DNSimple. 32 | attr_accessor :updated_at 33 | 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/dns_analytics.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class DnsAnalytics < Base 6 | 7 | # @return [Integer] The recorded volume 8 | attr_accessor :volume 9 | 10 | # @return [Date] The date 11 | attr_accessor :date 12 | 13 | # @return [String] The zone name 14 | attr_accessor :zone_name 15 | 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/dnssec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class Dnssec < Base 6 | 7 | # @return [Boolean] True if DNSSEC is enabled on the domain, otherwise false 8 | attr_accessor :enabled 9 | 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/domain.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class Domain < Base 6 | 7 | # @return [Integer] The domain ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [Integer] The associated account ID. 11 | attr_accessor :account_id 12 | 13 | # @return [Integer] The associated registrant (contact) ID. 14 | attr_accessor :registrant_id 15 | 16 | # @return [String] The domain name. 17 | attr_accessor :name 18 | 19 | # @return [String] The domain API token used for domain authentication. 20 | attr_accessor :token 21 | 22 | # @return [String] The domain state. 23 | attr_accessor :state 24 | 25 | # @return [Bool] True if the domain is set to auto-renew, false otherwise. 26 | attr_accessor :auto_renew 27 | 28 | # @return [Bool] True if the domain WHOIS privacy is enabled, false otherwise. 29 | attr_accessor :private_whois 30 | 31 | # @return [String] The timestamp when domain will expire. 32 | attr_accessor :expires_at 33 | 34 | # @return [String] When the domain was created in DNSimple. 35 | attr_accessor :created_at 36 | 37 | # @return [String] When the domain was last updated in DNSimple. 38 | attr_accessor :updated_at 39 | 40 | end 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/domain_check.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class DomainCheck < Base 6 | 7 | # @return [String] The domain name that was checked. 8 | attr_accessor :domain 9 | 10 | # @return [Boolean] Whether the domain name is available. 11 | attr_accessor :available 12 | 13 | # @return [Boolean] Whether the domain name is premium. 14 | attr_accessor :premium 15 | 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/domain_premium_price.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class DomainPremiumPrice < Base 6 | 7 | # @return [String] The domain premium price 8 | attr_accessor :premium_price 9 | 10 | # @return [String] The action: registration/transfer/renewal 11 | attr_accessor :action 12 | 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/domain_price.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class DomainPrice < Base 6 | 7 | # @return [String] The domain name 8 | attr_accessor :domain 9 | 10 | # @return [Boolean] Whether the domain is premium. 11 | attr_accessor :premium 12 | 13 | # @return [Float] The price for registration 14 | attr_accessor :registration_price 15 | 16 | # @return [Float] The price for renewal 17 | attr_accessor :renewal_price 18 | 19 | # @return [Float] The price for transfer 20 | attr_accessor :transfer_price 21 | 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/domain_push.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class DomainPush < Base 6 | 7 | # @return [Integer] The domain push ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [Integer] The associated domain ID. 11 | attr_accessor :domain_id 12 | 13 | # @return [Integer] The associated contact ID. 14 | attr_accessor :contact_id 15 | 16 | # @return [Integer] The associated account ID. 17 | attr_accessor :account_id 18 | 19 | # @return [String] When the domain push was created in DNSimple. 20 | attr_accessor :created_at 21 | 22 | # @return [String] When the domain push was last updated in DNSimple. 23 | attr_accessor :updated_at 24 | 25 | # @return [String] When the domain push was accepted in DNSimple. 26 | attr_accessor :accepted_at 27 | 28 | end 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/domain_registration.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class DomainRegistration < Base 6 | 7 | # @return [Integer] The domain registration ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [Integer] The associated domain ID. 11 | attr_accessor :domain_id 12 | 13 | # @return [Integer] The associated registrant (contact) ID. 14 | attr_accessor :registrant_id 15 | 16 | # @return [Integer] The number of years the domain was registered for. 17 | attr_accessor :period 18 | 19 | # @return [String] The state of the renewal. 20 | attr_accessor :state 21 | 22 | # @return [Bool] True if the domain auto-renew was requested. 23 | attr_accessor :auto_renew 24 | 25 | # @return [Bool] True if the domain WHOIS privacy was requested. 26 | attr_accessor :whois_privacy 27 | 28 | # @return [String] When the domain renewal was created in DNSimple. 29 | attr_accessor :created_at 30 | 31 | # @return [String] When the domain renewal was last updated in DNSimple. 32 | attr_accessor :updated_at 33 | 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/domain_renewal.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class DomainRenewal < Base 6 | 7 | # @return [Integer] The domain renewal ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [Integer] The associated domain ID. 11 | attr_accessor :domain_id 12 | 13 | # @return [Integer] The number of years the domain was renewed for. 14 | attr_accessor :period 15 | 16 | # @return [String] The state of the renewal. 17 | attr_accessor :state 18 | 19 | # @return [String] When the domain renewal was created in DNSimple. 20 | attr_accessor :created_at 21 | 22 | # @return [String] When the domain renewal was last updated in DNSimple. 23 | attr_accessor :updated_at 24 | 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/domain_restore.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class DomainRestore < Base 6 | 7 | # @return [Integer] The domain restore ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [Integer] The associated domain ID. 11 | attr_accessor :domain_id 12 | 13 | # @return [String] The state of the restore. 14 | attr_accessor :state 15 | 16 | # @return [String] When the domain restore was created in DNSimple. 17 | attr_accessor :created_at 18 | 19 | # @return [String] When the domain restore was last updated in DNSimple. 20 | attr_accessor :updated_at 21 | 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/domain_transfer.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class DomainTransfer < Base 6 | 7 | # @return [Integer] The domain registration ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [Integer] The associated domain ID. 11 | attr_accessor :domain_id 12 | 13 | # @return [Integer] The associated registrant (contact) ID. 14 | attr_accessor :registrant_id 15 | 16 | # @return [String] The state of the renewal. 17 | attr_accessor :state 18 | 19 | # @return [Bool] True if the domain auto-renew was requested. 20 | attr_accessor :auto_renew 21 | 22 | # @return [Bool] True if the domain WHOIS privacy was requested. 23 | attr_accessor :whois_privacy 24 | 25 | # @return [String,nil] The reason if transfer failed. 26 | attr_accessor :status_description 27 | 28 | # @return [String] When the domain renewal was created in DNSimple. 29 | attr_accessor :created_at 30 | 31 | # @return [String] When the domain renewal was last updated in DNSimple. 32 | attr_accessor :updated_at 33 | 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/email_forward.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class EmailForward < Base 6 | 7 | # @return [Integer] The email forward ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [Integer] The associated domain ID. 11 | attr_accessor :domain_id 12 | 13 | # @return [String] The "local part" of the originating email address. Anything to the left of the @ symbol. 14 | # @deprecated use {#alias_email} instead 15 | attr_accessor :from 16 | 17 | # @return [String] The full email address to forward to. 18 | # @deprecated use {#destination_email} instead 19 | attr_accessor :to 20 | 21 | # @return [String] The receiving email recipient. 22 | attr_accessor :alias_email 23 | 24 | # @return [String] The email recipient the messages are delivered to. 25 | attr_accessor :destination_email 26 | 27 | # @return [Boolean] True if the email forward is active, false otherwise. 28 | attr_accessor :active 29 | 30 | # @return [String] When the email forward was created in DNSimple. 31 | attr_accessor :created_at 32 | 33 | # @return [String] When the email forward was last updated in DNSimple. 34 | attr_accessor :updated_at 35 | 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/extended_attribute.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class ExtendedAttribute < Base 6 | 7 | class Option < Base 8 | 9 | # The option name 10 | attr_accessor :title 11 | 12 | # The option value 13 | attr_accessor :value 14 | 15 | # A long description of the option 16 | attr_accessor :description 17 | 18 | end 19 | 20 | # The extended attribute name 21 | attr_accessor :name 22 | 23 | # A description of the extended attribute 24 | attr_accessor :description 25 | 26 | # Boolean indicating if the extended attribute is required 27 | attr_accessor :required 28 | 29 | # @return [Array] The array of options with possible values for the extended attribute 30 | attr_reader :options 31 | 32 | def initialize(*) 33 | super 34 | @options ||= [] 35 | end 36 | 37 | def options=(opts) 38 | @options = opts.map do |opt| 39 | ExtendedAttribute::Option.new(opt) 40 | end 41 | end 42 | 43 | end 44 | end 45 | end 46 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/oauth_token.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class OauthToken < Base 6 | 7 | # @return [String] The token you can use to authenticate. 8 | attr_accessor :access_token 9 | 10 | # @return [String] The token type. 11 | attr_accessor :token_type 12 | 13 | # @return [String] The token scope (not used for now). 14 | attr_accessor :scope 15 | 16 | # @return [Integer] The account ID in DNSimple this token belongs to. 17 | attr_accessor :account_id 18 | 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/registrant_change.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class RegistrantChange < Base 6 | 7 | # @return [Integer] The registrant change ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [Integer] The associated account ID. 11 | attr_accessor :account_id 12 | 13 | # @return [Integer] The associated contact ID. 14 | attr_accessor :contact_id 15 | 16 | # @return [Integer] The associated domain ID. 17 | attr_accessor :domain_id 18 | 19 | # @return [String] The registrant change state. 20 | attr_accessor :state 21 | 22 | # @return [Hash] The extended attributes. 23 | attr_accessor :extended_attributes 24 | 25 | # @return [Boolean] True if the registrant change is a registry owner change. 26 | attr_accessor :registry_owner_change 27 | 28 | # @return [String] When the Inter-Registrar Transfer lock (60 days) is going to be lifted. 29 | attr_accessor :irt_lock_lifted_by 30 | 31 | # @return [String] When the registrant change was created in DNSimple. 32 | attr_accessor :created_at 33 | 34 | # @return [String] When the registrant change was last updated in DNSimple. 35 | attr_accessor :updated_at 36 | 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/registrant_change_check.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class RegistrantChangeCheck < Base 6 | 7 | # @return [Integer] The associated contact ID. 8 | attr_accessor :contact_id 9 | 10 | # @return [Integer] The associated domain ID. 11 | attr_accessor :domain_id 12 | 13 | # @return [Array] The extended attributes. 14 | attr_accessor :extended_attributes 15 | 16 | # # @return [Boolean] True if the registrant change is a registry owner change. 17 | attr_accessor :registry_owner_change 18 | 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/service.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class Service < Base 6 | 7 | class Setting < Base 8 | 9 | # @return [String] The setting name. 10 | attr_accessor :name 11 | 12 | # @return [String] The setting label. 13 | attr_accessor :label 14 | 15 | # @return [String] A suffix to be appended to the setting value. 16 | attr_accessor :append 17 | 18 | # @return [String] The setting description. 19 | attr_accessor :description 20 | 21 | # @return [String] An example of the setting value. 22 | attr_accessor :example 23 | 24 | # @return [Boolean] Whether the setting requires a password. 25 | attr_accessor :password 26 | 27 | end 28 | 29 | # @return [Integer] The service ID in DNSimple. 30 | attr_accessor :id 31 | 32 | # @return [String] The service name. 33 | attr_accessor :name 34 | 35 | # @return [String] A string ID for the service. 36 | attr_accessor :sid 37 | 38 | # @return [String] The service description. 39 | attr_accessor :description 40 | 41 | # @return [String] The service setup description. 42 | attr_accessor :setup_description 43 | 44 | # @return [Boolean] Whether the service requires extra setup. 45 | attr_accessor :requires_setup 46 | 47 | # @return [String] The default subdomain where the service will be applied. 48 | attr_accessor :default_subdomain 49 | 50 | # @return [Array] The array of settings to setup this service, if setup is required. 51 | attr_reader :settings 52 | 53 | def initialize(*) 54 | super 55 | @settings ||= [] 56 | end 57 | 58 | def settings=(settings) 59 | @settings = settings.map do |setting| 60 | Setting.new(setting) 61 | end 62 | end 63 | 64 | end 65 | end 66 | end 67 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/template.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class Template < Base 6 | 7 | # @return [Integer] The template ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [Integer] The associated account ID. 11 | attr_accessor :account_id 12 | 13 | # @return [String] The template name. 14 | attr_accessor :name 15 | 16 | # @return [String] The string ID for the template. 17 | attr_accessor :sid 18 | 19 | # @return [String] The template description. 20 | attr_accessor :description 21 | 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/template_record.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class TemplateRecord < Base 6 | 7 | # @return [Integer] The template record ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [Integer] The template ID in DNSimple. 11 | attr_accessor :template_id 12 | 13 | # @return [String] The type of template record, in uppercase. 14 | attr_accessor :type 15 | 16 | # @return [String] The template record name (without the domain name). 17 | attr_accessor :name 18 | 19 | # @return [String] The plain-text template record content. 20 | attr_accessor :content 21 | 22 | # @return [Integer] The template record TTL value. 23 | attr_accessor :ttl 24 | 25 | # @return [Integer] The priority value, if the type of template record accepts a priority. 26 | attr_accessor :priority 27 | 28 | # @return [String] When the template record was created in DNSimple. 29 | attr_accessor :created_at 30 | 31 | # @return [String] When the template record was last updated in DNSimple. 32 | attr_accessor :updated_at 33 | 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/tld.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class Tld < Base 6 | 7 | # @return [String] The TLD in DNSimple. 8 | attr_accessor :tld 9 | 10 | # @return [Integer] The TLD type. 11 | attr_accessor :tld_type 12 | 13 | # @return [Boolean] True if Whois Privacy Protection is available. 14 | attr_accessor :whois_privacy 15 | 16 | # @return [Boolean] True if TLD requires use of auto-renewal for renewals. 17 | attr_accessor :auto_renew_only 18 | 19 | # @return [Boolean] True if IDN is available. 20 | attr_accessor :idn 21 | 22 | # @return [Integer] The minimum registration period, in years. 23 | attr_accessor :minimum_registration 24 | 25 | # @return [Boolean] True if DNSimple supports registrations for this TLD. 26 | attr_accessor :registration_enabled 27 | 28 | # @return [Boolean] True if DNSimple supports renewals for this TLD. 29 | attr_accessor :renewal_enabled 30 | 31 | # @return [Boolean] True if DNSimple supports inbound transfers for this TLD. 32 | attr_accessor :transfer_enabled 33 | 34 | # @return [String, nil] Type of data interface required for DNSSEC for this TLD. 35 | attr_accessor :dnssec_interface_type 36 | 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/transfer_lock.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class TransferLock < Base 6 | 7 | # @return [Boolean] True if Transfer Lock is enabled on the domain, otherwise false 8 | attr_accessor :enabled 9 | 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/user.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class User < Base 6 | 7 | # @return [Integer] The user ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [String] The user email. 11 | attr_accessor :email 12 | 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/vanity_name_server.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class VanityNameServer < Base 6 | 7 | # @return [Integer] The vanity name server ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [String] The vanity name server name. 11 | attr_accessor :name 12 | 13 | # @return [String] The vanity name server IPv4. 14 | attr_accessor :ipv4 15 | 16 | # @return [String] The vanity name server IPv6. 17 | attr_accessor :ipv6 18 | 19 | # @return [String] When the vanity name server was created in DNSimple. 20 | attr_accessor :created_at 21 | 22 | # @return [String] When the vanity name server was last updated in DNSimple. 23 | attr_accessor :updated_at 24 | 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/webhook.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class Webhook < Base 6 | 7 | # @return [Integer] The contact ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [String] The callback URL. 11 | attr_accessor :url 12 | 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/whoami.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class Whoami < Base 6 | 7 | # @return [Account] The account, if present. 8 | attr_reader :account 9 | 10 | # @return [String] The user, if present. 11 | attr_reader :user 12 | 13 | 14 | # Converts account to a Struct::Account and sets it. 15 | # 16 | # @param [Hash, nil] account 17 | # @return [void] 18 | def account=(account) 19 | @account = account ? Struct::Account.new(account) : account 20 | end 21 | 22 | # Converts user to a Struct::User and sets it. 23 | # 24 | # @param [Hash, nil] user 25 | # @return [void] 26 | def user=(user) 27 | @user = user ? Struct::User.new(user) : user 28 | end 29 | 30 | end 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/whois_privacy.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class WhoisPrivacy < Base 6 | 7 | # @return [Integer] The associated domain ID. 8 | attr_accessor :domain_id 9 | 10 | # @return [Boolean] Whether the whois privacy is enabled for the domain. 11 | attr_accessor :enabled 12 | 13 | # @return [String] The date the whois privacy will expire on. 14 | attr_accessor :expires_on 15 | 16 | # @return [String] When the whois privacy was created in DNSimple. 17 | attr_accessor :created_at 18 | 19 | # @return [String] When the whois privacy was last updated in DNSimple. 20 | attr_accessor :updated_at 21 | 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/whois_privacy_renewal.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class WhoisPrivacyRenewal < Base 6 | 7 | # @return [Integer] The associated domain ID. 8 | attr_accessor :domain_id 9 | 10 | # @return [Integer] The associated WHOIS Privacy ID. 11 | attr_accessor :whois_privacy_id 12 | 13 | # @return [String] The WHOIS Privacy order state. 14 | attr_accessor :state 15 | 16 | # @return [Boolean] Whether the WHOIS Privacy is enabled for the domain. 17 | attr_accessor :enabled 18 | 19 | # @return [String] The date the WHOIS Privacy will expire on. 20 | attr_accessor :expires_on 21 | 22 | # @return [String] When the WHOIS Privacy was created in DNSimple. 23 | attr_accessor :created_at 24 | 25 | # @return [String] When the WHOIS Privacy was last updated in DNSimple. 26 | attr_accessor :updated_at 27 | 28 | end 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/zone.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class Zone < Base 6 | 7 | # @return [Integer] The zone ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [Integer] The associated account ID. 11 | attr_accessor :account_id 12 | 13 | # @return [String] The zone name. 14 | attr_accessor :name 15 | 16 | # @return [Boolean] True if the zone is a reverse zone. 17 | attr_accessor :reverse 18 | 19 | # @return [Boolean] True if the zone is a secondary zone. 20 | attr_accessor :secondary 21 | 22 | # @return [String] When the zone was last transferred from another provider. 23 | attr_accessor :last_transferred_at 24 | 25 | # @return [Boolean] True if DNS services are active for the zone. False when DNS services are disabled and DNS records will not be resolved 26 | attr_accessor :active 27 | 28 | # @return [String] When the zone was created in DNSimple. 29 | attr_accessor :created_at 30 | 31 | # @return [String] When the zone was last updated in DNSimple. 32 | attr_accessor :updated_at 33 | 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/zone_distribution.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class ZoneDistribution < Base 6 | 7 | # @return [Boolean] true if the zone is properly distributed across 8 | # all DNSimple name servers. 9 | attr_accessor :distributed 10 | 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/zone_file.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class ZoneFile < Base 6 | 7 | # @return [String] The zone file contents. 8 | attr_accessor :zone 9 | 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/dnsimple/struct/zone_record.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | module Struct 5 | class ZoneRecord < Base 6 | 7 | # @return [Integer] The record ID in DNSimple. 8 | attr_accessor :id 9 | 10 | # @return [String] The associated zone ID. 11 | attr_accessor :zone_id 12 | 13 | # @return [Integer] The ID of the parent record, if this record is dependent on another record. 14 | attr_accessor :parent_id 15 | 16 | # @return [String] The type of record, in uppercase. 17 | attr_accessor :type 18 | 19 | # @return [String] The record name (without the domain name). 20 | attr_accessor :name 21 | 22 | # @return [String] The plain-text record content. 23 | attr_accessor :content 24 | 25 | # @return [Integer] The TTL value. 26 | attr_accessor :ttl 27 | 28 | # @return [Integer] The priority value, if the type of record accepts a priority. 29 | attr_accessor :priority 30 | 31 | # @return [Bool] True if this is a system record created by DNSimple. System records are read-only. 32 | attr_accessor :system_record 33 | 34 | # @return [Array] The regions where the record is propagated. This is optional. 35 | attr_accessor :regions 36 | 37 | # @return [String] When the record was created in DNSimple. 38 | attr_accessor :created_at 39 | 40 | # @return [String] When the record was last updated in DNSimple. 41 | attr_accessor :updated_at 42 | 43 | end 44 | end 45 | end 46 | -------------------------------------------------------------------------------- /lib/dnsimple/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Dnsimple 4 | 5 | VERSION = "10.0.0" 6 | 7 | end 8 | -------------------------------------------------------------------------------- /spec/dnsimple/client/accounts_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe Dnsimple::Client, ".accounts" do 6 | 7 | subject { described_class.new(base_url: "https://api.dnsimple.test", access_token: "a1b2c3").accounts } 8 | 9 | 10 | describe "#accounts" do 11 | before do 12 | stub_request(:get, %r{/v2/accounts$}) 13 | .to_return(read_http_fixture("listAccounts/success-user.http")) 14 | end 15 | 16 | it "builds the correct request" do 17 | subject.accounts 18 | 19 | expect(WebMock).to have_requested(:get, "https://api.dnsimple.test/v2/accounts") 20 | .with(headers: { 'Accept' => 'application/json' }) 21 | end 22 | 23 | it "returns the accounts" do 24 | response = subject.accounts 25 | expect(response).to be_a(Dnsimple::Response) 26 | 27 | result = response.data 28 | expect(result.first).to be_a(Dnsimple::Struct::Account) 29 | expect(result.last).to be_a(Dnsimple::Struct::Account) 30 | end 31 | end 32 | 33 | end 34 | -------------------------------------------------------------------------------- /spec/dnsimple/client/client_service_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe Dnsimple::Client::ClientService do 6 | 7 | describe "#paginate" do 8 | service_class = Class.new(Dnsimple::Client::ClientService) do 9 | Item = Class.new(Dnsimple::Struct::Base) do # rubocop:disable Lint/ConstantDefinitionInBlock 10 | attr_accessor :id 11 | end 12 | 13 | def list(account_id, options = {}) 14 | response = client.get(Dnsimple::Client.versioned("/%s/list" % [account_id]), options) 15 | Dnsimple::PaginatedResponse.new(response, response["data"].map { |r| Item.new(r) }) 16 | end 17 | end 18 | 19 | subject { service_class.new(Dnsimple::Client.new(base_url: "https://api.example.com/", access_token: "a1b2c3")) } 20 | 21 | let(:account_id) { 1010 } 22 | 23 | before do 24 | stub_request(:get, %r{/v2/#{account_id}/list\?page=1&per_page=100}) 25 | .to_return(read_http_fixture("pages-1of3.http")) 26 | stub_request(:get, %r{/v2/#{account_id}/list\?page=2&per_page=100}) 27 | .to_return(read_http_fixture("pages-2of3.http")) 28 | stub_request(:get, %r{/v2/#{account_id}/list\?page=3&per_page=100}) 29 | .to_return(read_http_fixture("pages-3of3.http")) 30 | end 31 | 32 | it "loops all the pages" do 33 | results = subject.paginate(:list, account_id, {}) 34 | expect(results.data.size).to eq(5) 35 | expect(results.data.map(&:id)).to eq([1, 2, 3, 4, 5]) 36 | end 37 | end 38 | 39 | end 40 | -------------------------------------------------------------------------------- /spec/dnsimple/client/identity_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe Dnsimple::Client, ".identity" do 6 | 7 | subject { described_class.new(base_url: "https://api.dnsimple.test", access_token: "a1b2c3").identity } 8 | 9 | 10 | describe "#whoami" do 11 | before do 12 | stub_request(:get, %r{/v2/whoami$}) 13 | .to_return(read_http_fixture("whoami/success.http")) 14 | end 15 | 16 | it "builds the correct request" do 17 | subject.whoami 18 | 19 | expect(WebMock).to have_requested(:get, "https://api.dnsimple.test/v2/whoami") 20 | .with(headers: { 'Accept' => 'application/json' }) 21 | end 22 | 23 | it "returns the whoami" do 24 | response = subject.whoami 25 | expect(response).to be_a(Dnsimple::Response) 26 | 27 | result = response.data 28 | expect(result).to be_a(Dnsimple::Struct::Whoami) 29 | end 30 | 31 | context "when authenticated as account" do 32 | before do 33 | stub_request(:get, %r{/v2/whoami$}) 34 | .to_return(read_http_fixture("whoami/success-account.http")) 35 | end 36 | 37 | it "sets the account" do 38 | result = subject.whoami.data 39 | expect(result.account).to be_a(Dnsimple::Struct::Account) 40 | expect(result.user).to be_nil 41 | end 42 | end 43 | 44 | context "when authenticated as user" do 45 | before do 46 | stub_request(:get, %r{/v2/whoami$}) 47 | .to_return(read_http_fixture("whoami/success-user.http")) 48 | end 49 | 50 | it "sets the user" do 51 | result = subject.whoami.data 52 | expect(result.account).to be_nil 53 | expect(result.user).to be_a(Dnsimple::Struct::User) 54 | end 55 | end 56 | end 57 | 58 | end 59 | -------------------------------------------------------------------------------- /spec/dnsimple/client/templates_domains_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe Dnsimple::Client, ".templates" do 6 | 7 | subject { described_class.new(base_url: "https://api.dnsimple.test", access_token: "a1b2c3").templates } 8 | 9 | 10 | describe "#apply_template" do 11 | let(:account_id) { 1010 } 12 | let(:template_id) { 5410 } 13 | let(:domain_id) { 'example.com' } 14 | 15 | before do 16 | stub_request(:post, %r{/v2/#{account_id}/domains/#{domain_id}/templates/#{template_id}$}) 17 | .to_return(read_http_fixture("applyTemplate/success.http")) 18 | end 19 | 20 | it "builds the correct request" do 21 | subject.apply_template(account_id, template_id, domain_id) 22 | 23 | expect(WebMock).to have_requested(:post, "https://api.dnsimple.test/v2/#{account_id}/domains/#{domain_id}/templates/#{template_id}") 24 | .with(headers: { "Accept" => "application/json" }) 25 | end 26 | 27 | it "returns nil" do 28 | response = subject.apply_template(account_id, template_id, domain_id) 29 | expect(response).to be_a(Dnsimple::Response) 30 | expect(response.data).to be_nil 31 | end 32 | end 33 | 34 | end 35 | -------------------------------------------------------------------------------- /spec/dnsimple/extra_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe Dnsimple::Extra do 6 | 7 | describe ".join_uri" do 8 | it "joins two or more strings" do 9 | expect(described_class.join_uri("foo")).to eq("foo") 10 | expect(described_class.join_uri("foo", "bar")).to eq("foo/bar") 11 | expect(described_class.join_uri("foo", "bar", "baz")).to eq("foo/bar/baz") 12 | end 13 | 14 | it "removes multiple trailing /" do 15 | expect(described_class.join_uri("foo", "bar")).to eq("foo/bar") 16 | expect(described_class.join_uri("foo", "bar/")).to eq("foo/bar") 17 | expect(described_class.join_uri("foo/", "bar")).to eq("foo/bar") 18 | expect(described_class.join_uri("foo/", "bar/")).to eq("foo/bar") 19 | end 20 | 21 | it "does not strip protocols" do 22 | expect(described_class.join_uri("https://dnsimple.com", "path")).to eq("https://dnsimple.com/path") 23 | end 24 | end 25 | 26 | describe ".validate_mandatory_attributes" do 27 | let(:mandatory_attributes) { %i[name email] } 28 | 29 | it "raises an error if a mandatory attribute is not present" do 30 | expect { 31 | described_class.validate_mandatory_attributes({ name: "foo" }, mandatory_attributes) 32 | }.to raise_error(ArgumentError, ":email is required") 33 | end 34 | 35 | it "does not raise an error if all attributes are present" do 36 | expect { 37 | described_class.validate_mandatory_attributes({ name: "foo", email: "bar" }, mandatory_attributes) 38 | }.not_to raise_error 39 | end 40 | 41 | it "handles nil as attributes value" do 42 | expect { 43 | described_class.validate_mandatory_attributes(nil, mandatory_attributes) 44 | }.to raise_error(ArgumentError, ":name is required") 45 | end 46 | end 47 | 48 | end 49 | -------------------------------------------------------------------------------- /spec/dnsimple/options/base_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | RSpec.describe Dnsimple::Options::Base do 6 | describe '#initialize' do 7 | it 'accepts a hash' do 8 | hash = { a: 1 } 9 | expect(described_class.new(hash).to_h).to eq(hash) 10 | end 11 | 12 | it 'accepts nil' do 13 | expect(described_class.new(nil).to_h).to eq({}) 14 | end 15 | 16 | it 'duplicates given hash' do 17 | hash = { a: [1] } 18 | base = described_class.new(hash) 19 | base.to_h[:a] << 2 20 | 21 | expect(base.to_h).to eq(hash) 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /spec/fixtures.http/acceptPush/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Thu, 11 Aug 2016 10:23:46 GMT 4 | Connection: keep-alive 5 | X-RateLimit-Limit: 2400 6 | X-RateLimit-Remaining: 2392 7 | X-RateLimit-Reset: 1470913058 8 | Cache-Control: no-cache 9 | X-Request-Id: 5867ab50-6237-4cf8-b220-51f5ef57debd 10 | X-Runtime: 0.582482 11 | X-Content-Type-Options: nosniff 12 | X-Download-Options: noopen 13 | X-Frame-Options: DENY 14 | X-Permitted-Cross-Domain-Policies: none 15 | X-XSS-Protection: 1; mode=block 16 | Strict-Transport-Security: max-age=31536000 17 | 18 | -------------------------------------------------------------------------------- /spec/fixtures.http/accounts/success-account.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Tue, 14 Jun 2016 12:02:58 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2391 8 | X-RateLimit-Reset: 1465908577 9 | ETag: W/"9ef3b4bf1f441a9b1cd6d7041bc181aa" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: f705b65b-3589-43ad-97ca-3b2821d49d81 12 | X-Runtime: 0.012661 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":[{"id":123,"email":"john@example.com","plan_identifier":"dnsimple-personal","created_at":"2011-09-11T17:15:58Z","updated_at":"2016-06-03T15:02:26Z"}]} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/accounts/success-user.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Tue, 14 Jun 2016 12:05:38 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2390 8 | X-RateLimit-Reset: 1465908577 9 | ETag: W/"b8dc5b6e94652da599d15d4668b723b5" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 745455ba-3871-440d-b703-1448b9708c14 12 | X-Runtime: 0.014727 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":[{"id":123,"email":"john@example.com","plan_identifier":"dnsimple-personal","created_at":"2011-09-11T17:15:58Z","updated_at":"2016-06-03T15:02:26Z"},{"id":456,"email":"ops@company.com","plan_identifier":"dnsimple-professional","created_at":"2012-03-16T16:02:54Z","updated_at":"2016-06-14T11:23:16Z"}]} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/activateZoneService/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Tue, 08 Aug 2023 04:19:23 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2399 8 | X-RateLimit-Reset: 1691471963 9 | X-WORK-WITH-US: Love automation? So do we! https://dnsimple.com/jobs 10 | ETag: W/"fe6afd982459be33146933235343d51d" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 8e8ac535-9f46-4304-8440-8c68c30427c3 13 | X-Runtime: 0.176579 14 | Strict-Transport-Security: max-age=63072000 15 | 16 | {"data":{"id":1,"account_id":1010,"name":"example.com","reverse":false,"secondary":false,"last_transferred_at":null,"active":true,"created_at":"2022-09-28T04:45:24Z","updated_at":"2023-07-06T11:19:48Z"}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/addCollaborator/invite-success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Fri, 07 Oct 2016 08:51:12 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2398 8 | X-RateLimit-Reset: 1475833772 9 | ETag: W/"3e59e2eafbf1d4b626413a5703309b57" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 9f27e164-2448-4d23-ad67-4ecedaec063e 12 | X-Runtime: 0.387144 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":101,"domain_id":1,"domain_name":"example.com","user_id":null,"user_email":"invited-user@example.com","invitation":true,"created_at":"2016-10-07T08:51:12Z","updated_at":"2016-10-07T08:51:12Z","accepted_at":null}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/addCollaborator/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Fri, 07 Oct 2016 08:53:41 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2397 8 | X-RateLimit-Reset: 1475833772 9 | ETag: W/"d35fa3da40b4f6586503174563d71bfc" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 42de3144-37c7-4329-88c4-fdc103cb150f 12 | X-Runtime: 0.156436 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":100,"domain_id":1,"domain_name":"example.com","user_id":999,"user_email":"existing-user@example.com","invitation":false,"created_at":"2016-10-07T08:53:41Z","updated_at":"2016-10-07T08:53:41Z","accepted_at":"2016-10-07T08:53:41Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/appliedServices/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Wed, 15 Jun 2016 11:09:44 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2398 8 | X-RateLimit-Reset: 1465992405 9 | ETag: W/"f3fb525524e0a0eab452025850afb062" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 03bcc2ff-d1f1-4fc2-bb3f-9218a21c04b7 12 | X-Runtime: 0.065526 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":[{"id":1,"name":"WordPress","sid":"wordpress","description":"Share with the world, your community, or your closest friends.","setup_description":null,"requires_setup":true,"default_subdomain":"blog","created_at":"2013-11-05T18:06:50Z","updated_at":"2016-03-04T09:23:27Z","settings":[{"name":"site","label":"Site","append":null,"description":"Your Wordpress.com subdomain","example":null,"password":false}]}],"pagination":{"current_page":1,"per_page":30,"total_entries":1,"total_pages":1}} -------------------------------------------------------------------------------- /spec/fixtures.http/applyService/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Sat, 09 Jul 2016 11:12:42 GMT 4 | Connection: keep-alive 5 | X-RateLimit-Limit: 2400 6 | X-RateLimit-Remaining: 2398 7 | X-RateLimit-Reset: 1468066326 8 | Cache-Control: no-cache 9 | X-Request-Id: 30a3a44b-5792-4114-a355-a866603311ce 10 | X-Runtime: 0.087254 11 | X-Content-Type-Options: nosniff 12 | X-Download-Options: noopen 13 | X-Frame-Options: DENY 14 | X-Permitted-Cross-Domain-Policies: none 15 | X-XSS-Protection: 1; mode=block 16 | Strict-Transport-Security: max-age=31536000 17 | 18 | -------------------------------------------------------------------------------- /spec/fixtures.http/applyTemplate/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Thu, 24 Mar 2016 11:05:38 GMT 4 | Connection: keep-alive 5 | Status: 204 No Content 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2397 8 | X-RateLimit-Reset: 1458821049 9 | Cache-Control: no-cache 10 | X-Request-Id: 967713d5-a203-40ee-875c-1df07868b7eb 11 | X-Runtime: 0.147576 12 | Strict-Transport-Security: max-age=31536000 13 | 14 | -------------------------------------------------------------------------------- /spec/fixtures.http/authorizeDomainTransferOut/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Sun, 21 Feb 2016 13:40:35 GMT 4 | Connection: keep-alive 5 | Status: 204 No Content 6 | X-RateLimit-Limit: 4000 7 | X-RateLimit-Remaining: 3990 8 | X-RateLimit-Reset: 1456063540 9 | Cache-Control: no-cache 10 | X-Request-Id: 9af6ab78-7ea8-4675-89f0-14d124fc7ca2 11 | X-Runtime: 3.038699 12 | Strict-Transport-Security: max-age=31536000 13 | 14 | -------------------------------------------------------------------------------- /spec/fixtures.http/badgateway.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 502 Bad Gateway 2 | Server: nginx 3 | Date: Mon, 22 Dec 2014 14:16:12 GMT 4 | Content-Type: text/html 5 | Content-Length: 166 6 | Connection: close 7 | 8 | 9 | 502 Bad Gateway 10 | 11 |

502 Bad Gateway

12 |
nginx
13 | 14 | 15 | -------------------------------------------------------------------------------- /spec/fixtures.http/cancelDomainTransfer/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 202 Accepted 2 | Server: nginx 3 | Date: Fri, 05 Jun 2020 18:09:42 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2394 8 | X-RateLimit-Reset: 1591384034 9 | Cache-Control: no-cache 10 | X-Request-Id: 3cf6dcfa-0bb5-439e-863a-af2ef08bc830 11 | X-Runtime: 0.912731 12 | X-Frame-Options: DENY 13 | X-Content-Type-Options: nosniff 14 | X-XSS-Protection: 1; mode=block 15 | X-Download-Options: noopen 16 | X-Permitted-Cross-Domain-Policies: none 17 | 18 | {"data":{"id":361,"domain_id":182245,"registrant_id":2715,"state":"transferring","auto_renew":false,"whois_privacy":false,"status_description":null,"created_at":"2020-06-05T18:08:00Z","updated_at":"2020-06-05T18:08:04Z"}} 19 | -------------------------------------------------------------------------------- /spec/fixtures.http/changeDomainDelegation/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Thu, 24 Mar 2016 11:17:01 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 2400 8 | X-RateLimit-Remaining: 2392 9 | X-RateLimit-Reset: 1458821049 10 | ETag: W/"cb540984f806b12ac437cc1f76092f90" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 0ea7bdd2-63ca-4eef-9c41-4a83d2fe0067 13 | X-Runtime: 2.845860 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":["ns1.dnsimple.com","ns2.dnsimple.com","ns3.dnsimple.com","ns4.dnsimple.com"]} -------------------------------------------------------------------------------- /spec/fixtures.http/changeDomainDelegationFromVanity/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Mon, 11 Jul 2016 09:55:23 GMT 4 | Connection: keep-alive 5 | X-RateLimit-Limit: 2400 6 | X-RateLimit-Remaining: 2398 7 | X-RateLimit-Reset: 1468233619 8 | Cache-Control: no-cache 9 | X-Request-Id: 334a5c9c-8205-414c-bca2-db0469ed0b4a 10 | X-Runtime: 0.385941 11 | X-Content-Type-Options: nosniff 12 | X-Download-Options: noopen 13 | X-Frame-Options: DENY 14 | X-Permitted-Cross-Domain-Policies: none 15 | X-XSS-Protection: 1; mode=block 16 | Strict-Transport-Security: max-age=31536000 17 | 18 | -------------------------------------------------------------------------------- /spec/fixtures.http/changeDomainDelegationToVanity/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Mon, 11 Jul 2016 09:40:19 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2399 8 | X-RateLimit-Reset: 1468233619 9 | ETag: W/"ca1610ec571d766d1c1eda330b4fe9d6" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 931e4d9b-88ea-4723-b1b4-4b29c49b88b5 12 | X-Runtime: 0.270340 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":[{"id":1,"name":"ns1.example.com","ipv4":"127.0.0.1","ipv6":"::1","created_at":"2016-07-11T09:40:19Z","updated_at":"2016-07-11T09:40:19Z"},{"id":2,"name":"ns2.example.com","ipv4":"127.0.0.1","ipv6":"::1","created_at":"2016-07-11T09:40:19Z","updated_at":"2016-07-11T09:40:19Z"}]} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/checkDomain/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Fri, 26 Feb 2016 16:04:05 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3999 9 | X-RateLimit-Reset: 1456506245 10 | ETag: W/"f3cf8499e935e48401aae26842f712c4" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: e3c6fac1-a36d-42c3-8a04-d68f127add18 13 | X-Runtime: 0.605907 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"domain":"ruby.codes","available":true,"premium":true}} -------------------------------------------------------------------------------- /spec/fixtures.http/checkDomainPremiumPrice/error_400_not_a_premium_domain.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 400 Bad Request 2 | Server: nginx 3 | Date: Mon, 27 Jul 2020 13:43:02 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 4800 7 | X-RateLimit-Remaining: 4786 8 | X-RateLimit-Reset: 1595859922 9 | Cache-Control: no-cache 10 | X-Request-Id: 382b409c-0f90-4758-af3b-0bccd31a9d0d 11 | X-Runtime: 1.346405 12 | X-Frame-Options: DENY 13 | X-Content-Type-Options: nosniff 14 | X-XSS-Protection: 1; mode=block 15 | X-Download-Options: noopen 16 | X-Permitted-Cross-Domain-Policies: none 17 | 18 | {"message":"`cocotero.love` is not a premium domain for registration"} 19 | -------------------------------------------------------------------------------- /spec/fixtures.http/checkDomainPremiumPrice/error_400_tld_not_supported.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 400 Bad Request 2 | Server: nginx 3 | Date: Mon, 27 Jul 2020 13:41:23 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2398 8 | X-RateLimit-Reset: 1595860823 9 | Cache-Control: no-cache 10 | X-Request-Id: 6986cca3-4f57-4814-9e81-1c484d61c7ea 11 | X-Runtime: 0.007339 12 | X-Frame-Options: DENY 13 | X-Content-Type-Options: nosniff 14 | X-XSS-Protection: 1; mode=block 15 | X-Download-Options: noopen 16 | X-Permitted-Cross-Domain-Policies: none 17 | 18 | {"message":"TLD .LOVE is not supported"} 19 | -------------------------------------------------------------------------------- /spec/fixtures.http/checkDomainPremiumPrice/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Mon, 27 Jul 2020 13:58:50 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 4800 7 | X-RateLimit-Remaining: 4769 8 | X-RateLimit-Reset: 1595859923 9 | ETag: W/"54b4776b898065f2f551fc33465d0936" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 75c5090e-8000-4e95-a516-ffd09383f641 12 | X-Runtime: 2.380524 13 | X-Frame-Options: DENY 14 | X-Content-Type-Options: nosniff 15 | X-XSS-Protection: 1; mode=block 16 | X-Download-Options: noopen 17 | X-Permitted-Cross-Domain-Policies: none 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"premium_price":"2640.00","action":"registration"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/checkRegistrantChange/error-contactnotfound.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 2 | server: nginx 3 | date: Tue, 22 Aug 2023 13:59:02 GMT 4 | content-type: application/json; charset=utf-8 5 | x-ratelimit-limit: 2400 6 | x-ratelimit-remaining: 2398 7 | x-ratelimit-reset: 1692716201 8 | x-work-with-us: Love automation? So do we! https://dnsimple.com/jobs 9 | cache-control: no-cache 10 | x-request-id: b1dd3f42-ebb9-42fd-a121-d595de96f667 11 | x-runtime: 0.019122 12 | strict-transport-security: max-age=63072000 13 | 14 | {"message":"Contact `21` not found"} -------------------------------------------------------------------------------- /spec/fixtures.http/checkRegistrantChange/error-domainnotfound.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 2 | server: nginx 3 | date: Tue, 22 Aug 2023 11:09:40 GMT 4 | content-type: application/json; charset=utf-8 5 | x-ratelimit-limit: 2400 6 | x-ratelimit-remaining: 2395 7 | x-ratelimit-reset: 1692705338 8 | x-work-with-us: Love automation? So do we! https://dnsimple.com/jobs 9 | etag: W/"cef1e7d85d0b9bfd25e81b812891d34f" 10 | cache-control: max-age=0, private, must-revalidate 11 | x-request-id: 5b0d8bfb-7b6a-40b5-a079-b640fd817e34 12 | x-runtime: 3.066249 13 | strict-transport-security: max-age=63072000 14 | 15 | {"message":"Domain `example.com` not found"} -------------------------------------------------------------------------------- /spec/fixtures.http/checkRegistrantChange/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 2 | server: nginx 3 | date: Tue, 22 Aug 2023 11:09:40 GMT 4 | content-type: application/json; charset=utf-8 5 | x-ratelimit-limit: 2400 6 | x-ratelimit-remaining: 2395 7 | x-ratelimit-reset: 1692705338 8 | x-work-with-us: Love automation? So do we! https://dnsimple.com/jobs 9 | etag: W/"cef1e7d85d0b9bfd25e81b812891d34f" 10 | cache-control: max-age=0, private, must-revalidate 11 | x-request-id: 5b0d8bfb-7b6a-40b5-a079-b640fd817e34 12 | x-runtime: 3.066249 13 | strict-transport-security: max-age=63072000 14 | 15 | {"data":{"domain_id":101,"contact_id":101,"extended_attributes":[],"registry_owner_change":true}} -------------------------------------------------------------------------------- /spec/fixtures.http/checkZoneDistribution/error.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 504 Gateway Timeout 2 | Server: nginx 3 | Date: Mon, 30 Oct 2017 09:09:41 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2399 8 | X-RateLimit-Reset: 1509358181 9 | ETag: W/"10fc650d019e6bffa876f08bce8f3380" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 91f124fc-671d-40fa-877b-0b222692f623 12 | X-Runtime: 0.471005 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"message":"Could not query zone, connection timed out"} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/checkZoneDistribution/failure.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Mon, 30 Oct 2017 09:09:41 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2399 8 | X-RateLimit-Reset: 1509358181 9 | ETag: W/"10fc650d019e6bffa876f08bce8f3380" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 91f124fc-671d-40fa-877b-0b222692f623 12 | X-Runtime: 0.471005 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"distributed":false}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/checkZoneDistribution/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Mon, 30 Oct 2017 09:09:41 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2399 8 | X-RateLimit-Reset: 1509358181 9 | ETag: W/"10fc650d019e6bffa876f08bce8f3380" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 91f124fc-671d-40fa-877b-0b222692f623 12 | X-Runtime: 0.471005 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"distributed":true}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/checkZoneRecordDistribution/error.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 504 Gateway Timeout 2 | Server: nginx 3 | Date: Mon, 18 Dec 2017 10:54:48 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2397 8 | X-RateLimit-Reset: 1513597686 9 | ETag: W/"10fc650d019e6bffa876f08bce8f3380" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 74059b13-9262-4e2d-b8ff-a833376dce19 12 | X-Runtime: 0.408180 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"message":"Could not query zone, connection timed out"} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/checkZoneRecordDistribution/failure.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Mon, 18 Dec 2017 10:54:13 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2398 8 | X-RateLimit-Reset: 1513597686 9 | ETag: W/"10fc650d019e6bffa876f08bce8f3380" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: f5a86610-0e22-4047-a27c-350769eaa6d5 12 | X-Runtime: 0.425440 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"distributed":false}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/checkZoneRecordDistribution/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Mon, 18 Dec 2017 10:48:06 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2399 8 | X-RateLimit-Reset: 1513597686 9 | ETag: W/"10fc650d019e6bffa876f08bce8f3380" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 34c69751-ffee-4856-ac28-ead4f3a66e18 12 | X-Runtime: 0.438473 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"distributed":true}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/createContact/created.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Tue, 19 Jan 2016 20:50:26 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 201 Created 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3997 9 | X-RateLimit-Reset: 1453239045 10 | ETag: W/"165299b0ea3e5c1c80f1ae622146626f" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 9f577b9e-5bc4-4a8f-adfb-09dbb1992b0e 13 | X-Runtime: 0.061482 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"id":1,"account_id":1010,"label":"Default","first_name":"First","last_name":"User","job_title":"CEO","organization_name":"Awesome Company","email":"first@example.com","phone":"+18001234567","fax":"+18011234567","address1":"Italian Street, 10","address2":"","city":"Roma","state_province":"RM","postal_code":"00100","country":"IT","created_at":"2016-01-19T20:50:26Z","updated_at":"2016-01-19T20:50:26Z"}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/createDelegationSignerRecord/created.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Fri, 03 Mar 2017 15:24:00 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2399 8 | X-RateLimit-Reset: 1488558240 9 | ETag: W/"6443c4a27424c31a2a08e941be6319a4" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 44b1448f-c7da-4988-ba5a-5b7f9892b1d2 12 | X-Runtime: 0.351659 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":2,"domain_id":1010,"algorithm":"13","digest":"684a1f049d7d082b7f98691657da5a65764913df7f065f6f8c36edf62d66ca03","digest_type":"2","keytag":"2371","public_key":null,"created_at":"2017-03-03T15:24:00Z","updated_at":"2017-03-03T15:24:00Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/createDelegationSignerRecord/validation-error.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 400 Bad Request 2 | Server: nginx 3 | Date: Fri, 03 Mar 2017 15:20:28 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2395 8 | X-RateLimit-Reset: 1488554574 9 | Cache-Control: no-cache 10 | X-Request-Id: bf652af9-54cd-42c7-8fd3-2f52e2baea4b 11 | X-Runtime: 0.350846 12 | X-Content-Type-Options: nosniff 13 | X-Download-Options: noopen 14 | X-Frame-Options: DENY 15 | X-Permitted-Cross-Domain-Policies: none 16 | X-XSS-Protection: 1; mode=block 17 | 18 | {"message":"Validation failed","errors":{"algorithm":["can't be blank"],"digest":["can't be blank"],"digest_type":["can't be blank"],"keytag":["can't be blank"]}} 19 | -------------------------------------------------------------------------------- /spec/fixtures.http/createDomain/created.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Thu, 04 Jun 2020 19:47:05 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2378 8 | X-RateLimit-Reset: 1591300248 9 | ETag: W/"399e70627412fa31dba332feca5e8ec1" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: ee897eee-36cc-4b7f-be15-f4627f344bf9 12 | X-Runtime: 0.194561 13 | X-Frame-Options: DENY 14 | X-Content-Type-Options: nosniff 15 | X-XSS-Protection: 1; mode=block 16 | X-Download-Options: noopen 17 | X-Permitted-Cross-Domain-Policies: none 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":181985,"account_id":1385,"registrant_id":null,"name":"example-beta.com","unicode_name":"example-beta.com","state":"hosted","auto_renew":false,"private_whois":false,"expires_on":null,"expires_at":null,"created_at":"2020-06-04T19:47:05Z","updated_at":"2020-06-04T19:47:05Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/createEmailForward/created.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Mon, 25 Jan 2021 13:54:40 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Transfer-Encoding: identity 6 | Connection: keep-alive 7 | X-RateLimit-Limit: 4800 8 | X-RateLimit-Remaining: 4772 9 | X-RateLimit-Reset: 1611583415 10 | ETag: W/"80ad3ad1e115a8123193447fa003f68a" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 1086590f-0e65-4010-8636-031400a662bf 13 | X-Runtime: 0.880228 14 | X-Frame-Options: DENY 15 | X-Content-Type-Options: nosniff 16 | X-XSS-Protection: 1; mode=block 17 | X-Download-Options: noopen 18 | X-Permitted-Cross-Domain-Policies: none 19 | Content-Security-Policy: frame-ancestors 'none' 20 | Strict-Transport-Security: max-age=31536000 21 | 22 | {"data":{"id":41872,"domain_id":235146,"alias_email":"example@dnsimple.xyz","destination_email":"example@example.com","created_at":"2021-01-25T13:54:40Z","updated_at":"2021-01-25T13:54:40Z","from":"example@dnsimple.xyz","to":"example@example.com"}} 23 | -------------------------------------------------------------------------------- /spec/fixtures.http/createPrimaryServer/created.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Wed, 17 Mar 2021 23:08:42 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2388 8 | X-RateLimit-Reset: 1616024599 9 | ETag: W/"ceda02163217bdb9e6850e2c36cbf163" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 24ed1594-6701-475b-b66b-f85f9fe69736 12 | X-Runtime: 0.162800 13 | X-Frame-Options: DENY 14 | X-Content-Type-Options: nosniff 15 | X-XSS-Protection: 1; mode=block 16 | X-Download-Options: noopen 17 | X-Permitted-Cross-Domain-Policies: none 18 | Content-Security-Policy: frame-ancestors 'none' 19 | Strict-Transport-Security: max-age=31536000 20 | 21 | {"data":{"id":4,"account_id":531,"name":"PrimaryProduction","ip":"1.2.3.4","port":53,"linked_secondary_zones":[],"created_at":"2021-03-17T23:08:42Z","updated_at":"2021-03-17T23:08:42Z"}} -------------------------------------------------------------------------------- /spec/fixtures.http/createRegistrantChange/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 202 2 | server: nginx 3 | date: Tue, 22 Aug 2023 11:11:00 GMT 4 | content-type: application/json; charset=utf-8 5 | x-ratelimit-limit: 2400 6 | x-ratelimit-remaining: 2394 7 | x-ratelimit-reset: 1692705339 8 | x-work-with-us: Love automation? So do we! https://dnsimple.com/jobs 9 | cache-control: no-cache 10 | x-request-id: 26bf7ff9-2075-42b0-9431-1778c825b6b0 11 | x-runtime: 3.408950 12 | strict-transport-security: max-age=63072000 13 | 14 | {"data":{"id":101,"account_id":101,"domain_id":101,"contact_id":101,"state":"new","extended_attributes":{},"registry_owner_change":true,"irt_lock_lifted_by":null,"created_at":"2017-02-03T17:43:22Z","updated_at":"2017-02-03T17:43:22Z"}} -------------------------------------------------------------------------------- /spec/fixtures.http/createSecondaryZone/created.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Wed, 17 Mar 2021 23:44:27 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2398 8 | X-RateLimit-Reset: 1616028241 9 | ETag: W/"9726e9abb694bb7a61777076d14158fd" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 967ead79-85e7-4950-aa70-52da90f9abcc 12 | X-Runtime: 0.294142 13 | X-Frame-Options: DENY 14 | X-Content-Type-Options: nosniff 15 | X-XSS-Protection: 1; mode=block 16 | X-Download-Options: noopen 17 | X-Permitted-Cross-Domain-Policies: none 18 | Content-Security-Policy: frame-ancestors 'none' 19 | Strict-Transport-Security: max-age=31536000 20 | 21 | {"data":{"id":734,"account_id":531,"name":"secondaryexample.com","reverse":false,"secondary":true,"last_transferred_at":null,"created_at":"2021-03-17T23:44:27Z","updated_at":"2021-03-17T23:44:27Z"}} -------------------------------------------------------------------------------- /spec/fixtures.http/createTemplate/created.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Thu, 24 Mar 2016 11:09:16 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 201 Created 7 | X-RateLimit-Limit: 2400 8 | X-RateLimit-Remaining: 2396 9 | X-RateLimit-Reset: 1458821049 10 | ETag: W/"c0be8a0056ccd8e0ee31a60c51256848" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: c4ab6dd9-87d4-4244-8ec8-9187a511b89c 13 | X-Runtime: 0.115316 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"id":1,"account_id":1010,"name":"Beta","sid":"beta","description":"A beta template.","created_at":"2016-03-24T11:09:16Z","updated_at":"2016-03-24T11:09:16Z"}} -------------------------------------------------------------------------------- /spec/fixtures.http/createTemplateRecord/created.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Tue, 03 May 2016 07:51:33 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 201 Created 7 | X-RateLimit-Limit: 2400 8 | X-RateLimit-Remaining: 2398 9 | X-RateLimit-Reset: 1462265481 10 | ETag: W/"a8518ecf2fd31e6c22b0acccb5cef797" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: b2d51e79-b3d2-4abe-9184-155fb5546617 13 | X-Runtime: 0.190813 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"id":300,"template_id":268,"name":"","content":"mx.example.com","ttl":600,"priority":10,"type":"MX","created_at":"2016-05-03T07:51:33Z","updated_at":"2016-05-03T07:51:33Z"}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/createWebhook/created.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Mon, 15 Feb 2016 17:04:38 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 201 Created 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3996 9 | X-RateLimit-Reset: 1455559348 10 | ETag: W/"a4b43ee926d18d0839f1eae08e78c66b" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: dca89281-416a-4766-9428-d0295f58586e 13 | X-Runtime: 0.175179 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"id":1,"url":"https://webhook.test"}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/createZoneRecord/created-apex.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Thu, 07 Jan 2016 17:45:13 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 201 Created 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3990 9 | X-RateLimit-Reset: 1452188712 10 | ETag: W/"a7ddff4ee5dc28bbebf3d416e8bd0f04" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: f96f5034-bf0c-4201-9564-493c162e3cb4 13 | X-Runtime: 0.099095 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"id":1,"zone_id":"example.com","parent_id":null,"name":"","content":"127.0.0.1","ttl":600,"priority":null,"type":"A","system_record":false,"regions":["global"],"created_at":"2016-01-07T17:45:13Z","updated_at":"2016-01-07T17:45:13Z"}} -------------------------------------------------------------------------------- /spec/fixtures.http/createZoneRecord/created.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Thu, 07 Jan 2016 17:45:13 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 201 Created 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3990 9 | X-RateLimit-Reset: 1452188712 10 | ETag: W/"a7ddff4ee5dc28bbebf3d416e8bd0f04" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: f96f5034-bf0c-4201-9564-493c162e3cb4 13 | X-Runtime: 0.099095 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"id":1,"zone_id":"example.com","parent_id":null,"name":"www","content":"127.0.0.1","ttl":600,"priority":null,"type":"A","system_record":false,"regions":["global"],"created_at":"2016-01-07T17:45:13Z","updated_at":"2016-01-07T17:45:13Z"}} -------------------------------------------------------------------------------- /spec/fixtures.http/deactivateZoneService/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Tue, 08 Aug 2023 04:19:52 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2398 8 | X-RateLimit-Reset: 1691471962 9 | X-WORK-WITH-US: Love automation? So do we! https://dnsimple.com/jobs 10 | ETag: W/"5f30a37d01b99bb9e620ef1bbce9a014" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: d2f7bba4-4c81-4818-81d2-c9bbe95f104e 13 | X-Runtime: 0.133278 14 | Strict-Transport-Security: max-age=63072000 15 | 16 | {"data":{"id":1,"account_id":1010,"name":"example.com","reverse":false,"secondary":false,"last_transferred_at":null,"active":false,"created_at":"2022-09-28T04:45:24Z","updated_at":"2023-08-08T04:19:52Z"}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/deleteContact/error-contact-in-use.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 400 Bad Request 2 | Server: nginx 3 | Date: Wed, 11 Apr 2018 10:50:21 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2397 8 | X-RateLimit-Reset: 1523447401 9 | Cache-Control: no-cache 10 | X-Request-Id: 8d9f3de7-6e42-4a16-82eb-e2434dd58008 11 | X-Runtime: 0.271090 12 | X-Content-Type-Options: nosniff 13 | X-Download-Options: noopen 14 | X-Frame-Options: DENY 15 | X-Permitted-Cross-Domain-Policies: none 16 | X-XSS-Protection: 1; mode=block 17 | 18 | {"message":"The contact cannot be deleted because it's currently in use"} 19 | -------------------------------------------------------------------------------- /spec/fixtures.http/deleteContact/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Tue, 19 Jan 2016 21:49:42 GMT 4 | Connection: keep-alive 5 | Status: 204 No Content 6 | X-RateLimit-Limit: 4000 7 | X-RateLimit-Remaining: 3999 8 | X-RateLimit-Reset: 1453243782 9 | Cache-Control: no-cache 10 | X-Request-Id: 10c8528b-569b-4152-a89c-fc9c5f94afe9 11 | X-Runtime: 0.029858 12 | Strict-Transport-Security: max-age=31536000 13 | 14 | -------------------------------------------------------------------------------- /spec/fixtures.http/deleteDelegationSignerRecord/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Fri, 03 Mar 2017 15:25:00 GMT 4 | Connection: keep-alive 5 | X-RateLimit-Limit: 2400 6 | X-RateLimit-Remaining: 2398 7 | X-RateLimit-Reset: 1488558240 8 | Cache-Control: no-cache 9 | X-Request-Id: 50271e09-f056-4413-9eea-87e097d43e8b 10 | X-Runtime: 0.306806 11 | X-Content-Type-Options: nosniff 12 | X-Download-Options: noopen 13 | X-Frame-Options: DENY 14 | X-Permitted-Cross-Domain-Policies: none 15 | X-XSS-Protection: 1; mode=block 16 | Strict-Transport-Security: max-age=31536000 17 | 18 | -------------------------------------------------------------------------------- /spec/fixtures.http/deleteDomain/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Fri, 18 Dec 2015 16:13:54 GMT 4 | Connection: keep-alive 5 | Strict-Transport-Security: max-age=31536000 6 | X-RateLimit-Limit: 4000 7 | X-RateLimit-Remaining: 3990 8 | X-RateLimit-Reset: 1450455233 9 | Cache-Control: no-cache 10 | X-Request-Id: a2924814-4aff-42cf-9785-9327ce097d0a 11 | X-Runtime: 0.241247 12 | Strict-Transport-Security: max-age=31536000 13 | 14 | -------------------------------------------------------------------------------- /spec/fixtures.http/deleteEmailForward/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Mon, 25 Jan 2021 13:56:43 GMT 4 | Connection: keep-alive 5 | X-RateLimit-Limit: 4800 6 | X-RateLimit-Remaining: 4765 7 | X-RateLimit-Reset: 1611583416 8 | Cache-Control: no-cache 9 | X-Request-Id: bfaceb73-4fd3-4490-8528-472ec1df3526 10 | X-Runtime: 0.506670 11 | X-Frame-Options: DENY 12 | X-Content-Type-Options: nosniff 13 | X-XSS-Protection: 1; mode=block 14 | X-Download-Options: noopen 15 | X-Permitted-Cross-Domain-Policies: none 16 | Content-Security-Policy: frame-ancestors 'none' 17 | Strict-Transport-Security: max-age=31536000 18 | 19 | -------------------------------------------------------------------------------- /spec/fixtures.http/deleteRegistrantChange/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 2 | server: nginx 3 | date: Tue, 22 Aug 2023 11:14:44 GMT 4 | content-type: application/json; charset=utf-8 5 | x-ratelimit-limit: 2400 6 | x-ratelimit-remaining: 2391 7 | x-ratelimit-reset: 1692705338 8 | x-work-with-us: Love automation? So do we! https://dnsimple.com/jobs 9 | cache-control: no-cache 10 | x-request-id: b123e1f0-aa70-4abb-95cf-34f377c83ef4 11 | x-runtime: 0.114839 12 | strict-transport-security: max-age=63072000 13 | 14 | -------------------------------------------------------------------------------- /spec/fixtures.http/deleteTemplate/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Thu, 24 Mar 2016 11:05:38 GMT 4 | Connection: keep-alive 5 | Status: 204 No Content 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2397 8 | X-RateLimit-Reset: 1458821049 9 | Cache-Control: no-cache 10 | X-Request-Id: 967713d5-a203-40ee-875c-1df07868b7eb 11 | X-Runtime: 0.147576 12 | Strict-Transport-Security: max-age=31536000 13 | 14 | -------------------------------------------------------------------------------- /spec/fixtures.http/deleteTemplateRecord/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Tue, 03 May 2016 08:00:35 GMT 4 | Connection: keep-alive 5 | Status: 204 No Content 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2397 8 | X-RateLimit-Reset: 1462265481 9 | Cache-Control: no-cache 10 | X-Request-Id: f0a48944-1c61-41f4-b379-04f8644d883b 11 | X-Runtime: 0.122787 12 | Strict-Transport-Security: max-age=31536000 13 | 14 | -------------------------------------------------------------------------------- /spec/fixtures.http/deleteWebhook/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Mon, 15 Feb 2016 17:05:39 GMT 4 | Connection: keep-alive 5 | Status: 204 No Content 6 | X-RateLimit-Limit: 4000 7 | X-RateLimit-Remaining: 3993 8 | X-RateLimit-Reset: 1455559348 9 | Cache-Control: no-cache 10 | X-Request-Id: d681e116-4a27-45a6-b571-3f74bfafb1f4 11 | X-Runtime: 0.520613 12 | Strict-Transport-Security: max-age=31536000 13 | 14 | -------------------------------------------------------------------------------- /spec/fixtures.http/deleteZoneRecord/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Thu, 07 Jan 2016 18:06:28 GMT 4 | Connection: keep-alive 5 | Status: 204 No Content 6 | X-RateLimit-Limit: 4000 7 | X-RateLimit-Remaining: 3987 8 | X-RateLimit-Reset: 1452189987 9 | Cache-Control: no-cache 10 | X-Request-Id: 776cea0f-98ae-4550-9a2e-81f8ab27f82b 11 | X-Runtime: 0.099235 12 | Strict-Transport-Security: max-age=31536000 13 | 14 | -------------------------------------------------------------------------------- /spec/fixtures.http/disableDnssec/not-enabled.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 428 Precondition Required 2 | Server: nginx 3 | Date: Fri, 03 Mar 2017 10:00:36 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2396 8 | X-RateLimit-Reset: 1488538622 9 | Cache-Control: no-cache 10 | X-Request-Id: 8e6cfeba-61f3-4449-9d95-dceaa1be30b0 11 | X-Runtime: 0.033649 12 | X-Content-Type-Options: nosniff 13 | X-Download-Options: noopen 14 | X-Frame-Options: DENY 15 | X-Permitted-Cross-Domain-Policies: none 16 | X-XSS-Protection: 1; mode=block 17 | 18 | {"message":"DNSSEC cannot be disabled because it is not enabled"} 19 | -------------------------------------------------------------------------------- /spec/fixtures.http/disableDnssec/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Fri, 03 Mar 2017 09:59:48 GMT 4 | Connection: keep-alive 5 | X-RateLimit-Limit: 2400 6 | X-RateLimit-Remaining: 2397 7 | X-RateLimit-Reset: 1488538622 8 | Cache-Control: no-cache 9 | X-Request-Id: d4904f31-9f5a-4616-a398-65915a2ade0f 10 | X-Runtime: 0.150273 11 | X-Content-Type-Options: nosniff 12 | X-Download-Options: noopen 13 | X-Frame-Options: DENY 14 | X-Permitted-Cross-Domain-Policies: none 15 | X-XSS-Protection: 1; mode=block 16 | Strict-Transport-Security: max-age=31536000 17 | 18 | -------------------------------------------------------------------------------- /spec/fixtures.http/disableDomainAutoRenewal/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Fri, 12 Feb 2016 11:15:46 GMT 4 | Connection: keep-alive 5 | Status: 204 No Content 6 | X-RateLimit-Limit: 4000 7 | X-RateLimit-Remaining: 3996 8 | X-RateLimit-Reset: 1455279163 9 | Cache-Control: no-cache 10 | X-Request-Id: 6a8e83f1-f80c-4dc0-a462-d63c932a59bb 11 | X-Runtime: 0.509466 12 | Strict-Transport-Security: max-age=31536000 13 | 14 | -------------------------------------------------------------------------------- /spec/fixtures.http/disableDomainTransferLock/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Tue, 15 Aug 2023 09:58:37 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2398 8 | X-RateLimit-Reset: 1488538623 9 | ETag: W/"fc2368a31a1b6a3afcca33bb37ff6b9d" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 8b0fe49a-c810-4552-84ab-a1cd9b4a7786 12 | X-Runtime: 0.024780 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"enabled":false}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/disableVanityNameServers/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Tue, 12 Jul 2016 08:56:00 GMT 4 | Connection: keep-alive 5 | X-RateLimit-Limit: 2400 6 | X-RateLimit-Remaining: 2398 7 | X-RateLimit-Reset: 1468314483 8 | Cache-Control: no-cache 9 | X-Request-Id: 99c3fef2-d875-40fd-961c-194bffd694f1 10 | X-Runtime: 5.983300 11 | X-Content-Type-Options: nosniff 12 | X-Download-Options: noopen 13 | X-Frame-Options: DENY 14 | X-Permitted-Cross-Domain-Policies: none 15 | X-XSS-Protection: 1; mode=block 16 | Strict-Transport-Security: max-age=31536000 17 | 18 | -------------------------------------------------------------------------------- /spec/fixtures.http/disableWhoisPrivacy/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Sat, 13 Feb 2016 14:36:38 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3995 9 | X-RateLimit-Reset: 1455377134 10 | ETag: W/"56e3e7f76ba9c84dcab9aef72347edf2" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 4831c4d9-e62e-4710-a999-4ab32a900cea 13 | X-Runtime: 0.988453 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"id":1,"domain_id":2,"expires_on":"2017-02-13","enabled":false,"created_at":"2016-02-13T14:34:50Z","updated_at":"2016-02-13T14:36:38Z"}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/dnsAnalytics/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Tue, 14 Jun 2016 12:02:58 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2391 8 | X-RateLimit-Reset: 1465908577 9 | ETag: W/"9ef3b4bf1f441a9b1cd6d7041bc181aa" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: f705b65b-3589-43ad-97ca-3b2821d49d81 12 | X-Runtime: 0.012661 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data": {"headers": ["zone_name", "date", "volume"], "rows": [["bar.com", "2023-12-08", 1200], ["bar.com", "2023-12-09", 1200], ["bar.com", "2024-01-07", 1200], ["bar.com", "2024-01-08", 1200], ["example.com", "2023-12-08", 1200], ["example.com", "2023-12-09", 1200], ["example.com", "2024-01-07", 1200], ["example.com", "2024-01-08", 1200], ["foo.com", "2023-12-08", 1200], ["foo.com", "2023-12-09", 1200], ["foo.com", "2024-01-07", 1200], ["foo.com", "2024-01-08", 1200]]}, "query": {"account_id": "1", "start_date": "2023-12-08", "end_date": "2024-01-08", "sort": "zone_name:asc,date:asc", "page": 0, "per_page": 100, "groupings": "zone_name,date"}, "pagination": {"current_page": 0, "per_page": 100, "total_entries": 93, "total_pages": 1}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/enableDnssec/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Fri, 03 Mar 2017 13:49:58 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2398 8 | X-RateLimit-Reset: 1488552566 9 | ETag: W/"80f207d402f1a1a4845455aa064c3735" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 49ea1585-3871-4829-90f4-ea2aad994256 12 | X-Runtime: 0.700056 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"enabled":true,"created_at":"2017-03-03T13:49:58Z","updated_at":"2017-03-03T13:49:58Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/enableDomainAutoRenewal/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Fri, 12 Feb 2016 11:13:38 GMT 4 | Connection: keep-alive 5 | Status: 204 No Content 6 | X-RateLimit-Limit: 4000 7 | X-RateLimit-Remaining: 3997 8 | X-RateLimit-Reset: 1455279163 9 | Cache-Control: no-cache 10 | X-Request-Id: 46e77cb2-157e-4740-8cd3-f20d4d653c95 11 | X-Runtime: 7.702967 12 | Strict-Transport-Security: max-age=31536000 13 | 14 | -------------------------------------------------------------------------------- /spec/fixtures.http/enableDomainTransferLock/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Tue, 15 Aug 2023 09:58:37 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2398 8 | X-RateLimit-Reset: 1488538623 9 | ETag: W/"fc2368a31a1b6a3afcca33bb37ff6b9d" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 8b0fe49a-c810-4552-84ab-a1cd9b4a7786 12 | X-Runtime: 0.024780 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"enabled":true}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/enableVanityNameServers/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Thu, 14 Jul 2016 13:22:17 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2399 8 | X-RateLimit-Reset: 1468506137 9 | ETag: W/"ddc2c4431fb922cefbf5706b6d32796e" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 3fd2135a-aeb4-4297-8826-a10705740fbb 12 | X-Runtime: 0.438926 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":[{"id":1,"name":"ns1.example.com","ipv4":"127.0.0.1","ipv6":"::1","created_at":"2016-07-14T13:22:17Z","updated_at":"2016-07-14T13:22:17Z"},{"id":2,"name":"ns2.example.com","ipv4":"127.0.0.1","ipv6":"::1","created_at":"2016-07-14T13:22:17Z","updated_at":"2016-07-14T13:22:17Z"},{"id":3,"name":"ns3.example.com","ipv4":"127.0.0.1","ipv6":"::1","created_at":"2016-07-14T13:22:17Z","updated_at":"2016-07-14T13:22:17Z"},{"id":4,"name":"ns4.example.com","ipv4":"127.0.0.1","ipv6":"::1","created_at":"2016-07-14T13:22:17Z","updated_at":"2016-07-14T13:22:17Z"}]} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/enableWhoisPrivacy/created.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Sat, 13 Feb 2016 14:34:52 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 201 Created 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3997 9 | X-RateLimit-Reset: 1455377135 10 | ETag: W/"c955cdcda56f131395952576e6ded0b6" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 779eff1a-429c-432a-ad17-617502d62e69 13 | X-Runtime: 2.563855 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"id":1,"domain_id":2,"expires_on":null,"enabled":null,"created_at":"2016-02-13T14:34:50Z","updated_at":"2016-02-13T14:34:50Z"}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/enableWhoisPrivacy/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Sat, 13 Feb 2016 14:36:49 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3994 9 | X-RateLimit-Reset: 1455377135 10 | ETag: W/"1063ebb3e281ca6e1941874002696cd7" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 34453d13-76ba-4f64-ad94-2d536c61826c 13 | X-Runtime: 1.408974 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"id":1,"domain_id":2,"expires_on":"2017-02-13","enabled":true,"created_at":"2016-02-13T14:34:50Z","updated_at":"2016-02-13T14:36:48Z"}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/getCertificate/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Thu, 18 Jun 2020 19:16:29 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 4800 7 | X-RateLimit-Remaining: 4797 8 | X-RateLimit-Reset: 1592510057 9 | ETag: W/"9ace4f536d7b618fd4b38efd3cea9d1f" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 83905116-1333-4b07-ace4-d0db9e90c4fa 12 | X-Runtime: 0.012798 13 | X-Frame-Options: DENY 14 | X-Content-Type-Options: nosniff 15 | X-XSS-Protection: 1; mode=block 16 | X-Download-Options: noopen 17 | X-Permitted-Cross-Domain-Policies: none 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":101967,"domain_id":289333,"contact_id":2511,"name":"www","common_name":"www.bingo.pizza","years":1,"csr":"-----BEGIN CERTIFICATE REQUEST-----\nMIICmTCCAYECAQAwGjEYMBYGA1UEAwwPd3d3LmJpbmdvLnBpenphMIIBIjANBgkq\nhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAw4+KoZ9IDCK2o5qAQpi+Icu5kksmjQzx\n5o5g4B6XhRxhsfHlK/i3iU5hc8CONjyVv8j82835RNsiKrflnxGa9SH68vbQfcn4\nIpbMz9c+Eqv5h0Euqlc3A4DBzp0unEu5QAUhR6Xu1TZIWDPjhrBOGiszRlLQcp4F\nzy6fD6j5/d/ylpzTp5v54j+Ey31Bz86IaBPtSpHI+Qk87Hs8DVoWxZk/6RlAkyur\nXDGWnPu9n3RMfs9ag5anFhggLIhCNtVN4+0vpgPQ59pqwYo8TfdYzK7WSKeL7geu\nCqVE3bHAqU6dLtgHOZfTkLwGycUh4p9aawuc6fsXHHYDpIL8s3vAvwIDAQABoDow\nOAYJKoZIhvcNAQkOMSswKTAnBgNVHREEIDAeggtiaW5nby5waXp6YYIPd3d3LmJp\nbmdvLnBpenphMA0GCSqGSIb3DQEBCwUAA4IBAQBwOLKv+PO5hSJkgqS6wL/wRqLh\nQ1zbcHRHAjRjnpRz06cDvN3X3aPI+lpKSNFCI0A1oKJG7JNtgxX3Est66cuO8ESQ\nPIb6WWN7/xlVlBCe7ZkjAFgN6JurFdclwCp/NI5wBCwj1yb3Ar5QQMFIZOezIgTI\nAWkQSfCmgkB96d6QlDWgidYDDjcsXugQveOQRPlHr0TsElu47GakxZdJCFZU+WPM\nodQQf5SaqiIK2YaH1dWO//4KpTS9QoTy1+mmAa27apHcmz6X6+G5dvpHZ1qH14V0\nJoMWIK+39HRPq6mDo1UMVet/xFUUrG/H7/tFlYIDVbSpVlpVAFITd/eQkaW/\n-----END CERTIFICATE REQUEST-----\n","state":"issued","auto_renew":false,"alternate_names":[],"authority_identifier":"letsencrypt","created_at":"2020-06-18T18:54:17Z","updated_at":"2020-06-18T19:10:14Z","expires_at":"2020-09-16T18:10:13Z","expires_on":"2020-09-16"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/getContact/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Tue, 19 Jan 2016 20:57:38 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3996 9 | X-RateLimit-Reset: 1453239045 10 | ETag: W/"165299b0ea3e5c1c80f1ae622146626f" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 4c0679ed-5c79-41bf-84cb-0dc2250a07ce 13 | X-Runtime: 0.127802 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"id":1,"account_id":1010,"label":"Default","first_name":"First","last_name":"User","job_title":"CEO","organization_name":"Awesome Company","email":"first@example.com","phone":"+18001234567","fax":"+18011234567","address1":"Italian Street, 10","address2":"","city":"Roma","state_province":"RM","postal_code":"00100","country":"IT","created_at":"2016-01-19T20:50:26Z","updated_at":"2016-01-19T20:50:26Z"}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/getDelegationSignerRecord/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Fri, 03 Mar 2017 13:53:06 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2396 8 | X-RateLimit-Reset: 1488552566 9 | ETag: W/"0aa4c6cec5adfa60dcf78ed2c3c661dd" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: ccf90c89-d463-43c6-ac25-3839169e1afd 12 | X-Runtime: 0.024246 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":24,"domain_id":1010,"algorithm":"8","digest":"C1F6E04A5A61FBF65BF9DC8294C363CF11C89E802D926BDAB79C55D27BEFA94F","digest_type":"2","keytag":"44620","public_key":null,"created_at":"2017-03-03T13:49:58Z","updated_at":"2017-03-03T13:49:58Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/getDnssec/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Fri, 03 Mar 2017 09:58:37 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2398 8 | X-RateLimit-Reset: 1488538623 9 | ETag: W/"fc2368a31a1b6a3afcca33bb37ff6b9d" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 8b0fe49a-c810-4552-84ab-a1cd9b4a7786 12 | X-Runtime: 0.024780 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"enabled":true,"created_at":"2017-02-03T17:43:22Z","updated_at":"2017-02-03T17:43:22Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/getDomain/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Thu, 04 Jun 2020 19:37:22 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2379 8 | X-RateLimit-Reset: 1591300247 9 | ETag: W/"ff4a8463ecca39d4869695d66de60043" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 2e8259ab-c933-487e-8f85-d23f1cdf62fa 12 | X-Runtime: 0.019482 13 | X-Frame-Options: DENY 14 | X-Content-Type-Options: nosniff 15 | X-XSS-Protection: 1; mode=block 16 | X-Download-Options: noopen 17 | X-Permitted-Cross-Domain-Policies: none 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":181984,"account_id":1385,"registrant_id":2715,"name":"example-alpha.com","unicode_name":"example-alpha.com","state":"registered","auto_renew":false,"private_whois":false,"expires_on":"2021-06-05","expires_at":"2021-06-05T02:15:00Z","created_at":"2020-06-04T19:15:14Z","updated_at":"2020-06-04T19:15:21Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/getDomainDelegation/success-empty.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Thu, 24 Mar 2016 11:13:41 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 2400 8 | X-RateLimit-Remaining: 2393 9 | X-RateLimit-Reset: 1458821048 10 | ETag: W/"e0234245cb00aa260ccfa99a9a0b235e" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: c88385f9-c8f7-435a-9060-0b1a27488b2b 13 | X-Runtime: 0.206440 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":[]} -------------------------------------------------------------------------------- /spec/fixtures.http/getDomainDelegation/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Thu, 24 Mar 2016 11:17:18 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 2400 8 | X-RateLimit-Remaining: 2391 9 | X-RateLimit-Reset: 1458821048 10 | ETag: W/"cb540984f806b12ac437cc1f76092f90" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: e53ac7b5-0d26-45bc-9226-09c2d34be293 13 | X-Runtime: 0.192986 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":["ns1.dnsimple.com","ns2.dnsimple.com","ns3.dnsimple.com","ns4.dnsimple.com"]} -------------------------------------------------------------------------------- /spec/fixtures.http/getDomainPremiumPrice/failure.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 400 Bad Request 2 | Server: nginx 3 | Date: Tue, 22 Nov 2016 10:48:27 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Cache-Control: no-cache 7 | X-Request-Id: 1304138f-0fc7-4845-b9ed-e3803409cb5a 8 | X-Runtime: 1.421413 9 | X-Content-Type-Options: nosniff 10 | X-Download-Options: noopen 11 | X-Frame-Options: DENY 12 | X-Permitted-Cross-Domain-Policies: none 13 | X-XSS-Protection: 1; mode=block 14 | 15 | {"message":"`example.com` is not a premium domain for registration"} 16 | -------------------------------------------------------------------------------- /spec/fixtures.http/getDomainPremiumPrice/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Tue, 22 Nov 2016 10:46:17 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2399 8 | X-RateLimit-Reset: 1479815177 9 | ETag: W/"7ed6ab997deeafd985a5782df2d86b04" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 54731b91-cd76-4d08-9481-c0f55f47996d 12 | X-Runtime: 1.013083 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"premium_price":"109.00","action":"registration"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/getDomainPrices/failure.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 400 Bad Request 2 | Server: nginx 3 | Date: Mon, 08 Mar 2021 14:35:58 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2396 8 | X-RateLimit-Reset: 1615217645 9 | Cache-Control: no-cache 10 | X-Request-Id: e414a674-63bb-4e54-b714-db5b516bb190 11 | X-Runtime: 0.009579 12 | X-Frame-Options: DENY 13 | X-Content-Type-Options: nosniff 14 | X-XSS-Protection: 1; mode=block 15 | X-Download-Options: noopen 16 | X-Permitted-Cross-Domain-Policies: none 17 | Content-Security-Policy: frame-ancestors 'none' 18 | 19 | {"message":"TLD .PINEAPPLE is not supported"} -------------------------------------------------------------------------------- /spec/fixtures.http/getDomainPrices/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Mon, 08 Mar 2021 14:35:26 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2397 8 | X-RateLimit-Reset: 1615217645 9 | ETag: W/"2104f27f2877f429295359cfc409f9f7" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: b0d9e000-58a6-4254-af43-8735d26e12d9 12 | X-Runtime: 9.129301 13 | X-Frame-Options: DENY 14 | X-Content-Type-Options: nosniff 15 | X-XSS-Protection: 1; mode=block 16 | X-Download-Options: noopen 17 | X-Permitted-Cross-Domain-Policies: none 18 | Content-Security-Policy: frame-ancestors 'none' 19 | Strict-Transport-Security: max-age=31536000 20 | 21 | {"data":{"domain":"bingo.pizza","premium":true,"registration_price":20.0,"renewal_price":20.0,"transfer_price":20.0}} 22 | -------------------------------------------------------------------------------- /spec/fixtures.http/getDomainRegistration/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Fri, 05 Jun 2020 18:23:53 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2392 8 | X-RateLimit-Reset: 1591384034 9 | ETag: W/"80c5827934c13b1ca87a587d96e7d1e8" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 9f4959ee-06a9-488c-906e-27a570cafbbf 12 | X-Runtime: 0.078429 13 | X-Frame-Options: DENY 14 | X-Content-Type-Options: nosniff 15 | X-XSS-Protection: 1; mode=block 16 | X-Download-Options: noopen 17 | X-Permitted-Cross-Domain-Policies: none 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":361,"domain_id":104040,"registrant_id":2715,"period":1,"state":"registering","auto_renew":false,"whois_privacy":false,"created_at":"2023-01-27T17:44:32Z","updated_at":"2023-01-27T17:44:40Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/getDomainRenewal/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Fri, 09 Dec 2016 19:46:57 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2394 8 | X-RateLimit-Reset: 1481315245 9 | ETag: W/"179d85ea8a26a3d5dc76e42de2d7918e" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: ba6f2707-5df0-4ffa-b91b-51d4460bab8e 12 | X-Runtime: 13.571302 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":1,"domain_id":999,"period":1,"state":"renewed","created_at":"2016-12-09T19:46:45Z","updated_at":"2016-12-12T19:46:45Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/getDomainRestore/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Fri, 09 Dec 2016 19:46:57 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2394 8 | X-RateLimit-Reset: 1481315245 9 | ETag: W/"179d85ea8a26a3d5dc76e42de2d7918e" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: ba6f2707-5df0-4ffa-b91b-51d4460bab8e 12 | X-Runtime: 13.571302 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":1,"domain_id":999,"state":"restored","created_at":"2016-12-09T19:46:45Z","updated_at":"2016-12-12T19:46:45Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/getDomainTransfer/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Fri, 05 Jun 2020 18:23:53 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2392 8 | X-RateLimit-Reset: 1591384034 9 | ETag: W/"80c5827934c13b1ca87a587d96e7d1e8" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 9f4959ee-06a9-488c-906e-27a570cafbbf 12 | X-Runtime: 0.078429 13 | X-Frame-Options: DENY 14 | X-Content-Type-Options: nosniff 15 | X-XSS-Protection: 1; mode=block 16 | X-Download-Options: noopen 17 | X-Permitted-Cross-Domain-Policies: none 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":361,"domain_id":182245,"registrant_id":2715,"state":"cancelled","auto_renew":false,"whois_privacy":false,"status_description":"Canceled by customer","created_at":"2020-06-05T18:08:00Z","updated_at":"2020-06-05T18:10:01Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/getDomainTransferLock/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Tue, 15 Aug 2023 09:58:37 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2398 8 | X-RateLimit-Reset: 1488538623 9 | ETag: W/"fc2368a31a1b6a3afcca33bb37ff6b9d" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 8b0fe49a-c810-4552-84ab-a1cd9b4a7786 12 | X-Runtime: 0.024780 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"enabled":true}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/getEmailForward/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Mon, 25 Jan 2021 13:56:24 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Transfer-Encoding: identity 6 | Connection: keep-alive 7 | X-RateLimit-Limit: 4800 8 | X-RateLimit-Remaining: 4766 9 | X-RateLimit-Reset: 1611583416 10 | ETag: W/"80ad3ad1e115a8123193447fa003f68a" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 8f3a9517-f623-4d14-be2b-3f332a4d7873 13 | X-Runtime: 0.010653 14 | X-Frame-Options: DENY 15 | X-Content-Type-Options: nosniff 16 | X-XSS-Protection: 1; mode=block 17 | X-Download-Options: noopen 18 | X-Permitted-Cross-Domain-Policies: none 19 | Content-Security-Policy: frame-ancestors 'none' 20 | Strict-Transport-Security: max-age=31536000 21 | 22 | {"data":{"id":41872,"domain_id":235146,"alias_email":"example@dnsimple.xyz","destination_email":"example@example.com","created_at":"2021-01-25T13:54:40Z","updated_at":"2021-01-25T13:54:40Z","from":"example@dnsimple.xyz","to":"example@example.com"}} 23 | -------------------------------------------------------------------------------- /spec/fixtures.http/getPrimaryServer/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Wed, 17 Mar 2021 23:18:40 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2386 8 | X-RateLimit-Reset: 1616024599 9 | ETag: W/"ceda02163217bdb9e6850e2c36cbf163" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 259fc436-7146-4e6b-98fa-3c43f541482b 12 | X-Runtime: 0.033067 13 | X-Frame-Options: DENY 14 | X-Content-Type-Options: nosniff 15 | X-XSS-Protection: 1; mode=block 16 | X-Download-Options: noopen 17 | X-Permitted-Cross-Domain-Policies: none 18 | Content-Security-Policy: frame-ancestors 'none' 19 | Strict-Transport-Security: max-age=31536000 20 | 21 | {"data":{"id":4,"account_id":531,"name":"PrimaryProduction","ip":"1.2.3.4","port":53,"linked_secondary_zones":[],"created_at":"2021-03-17T23:08:42Z","updated_at":"2021-03-17T23:08:42Z"}} -------------------------------------------------------------------------------- /spec/fixtures.http/getRegistrantChange/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 2 | server: nginx 3 | date: Tue, 22 Aug 2023 11:13:58 GMT 4 | content-type: application/json; charset=utf-8 5 | x-ratelimit-limit: 2400 6 | x-ratelimit-remaining: 2392 7 | x-ratelimit-reset: 1692705338 8 | x-work-with-us: Love automation? So do we! https://dnsimple.com/jobs 9 | etag: W/"76c5d4c7579b754b94a42ac7fa37a901" 10 | cache-control: max-age=0, private, must-revalidate 11 | x-request-id: e910cd08-3f9c-4da4-9986-50dbe9c3bc55 12 | x-runtime: 0.022006 13 | strict-transport-security: max-age=63072000 14 | 15 | {"data":{"id":101,"account_id":101,"domain_id":101,"contact_id":101,"state":"new","extended_attributes":{},"registry_owner_change":true,"irt_lock_lifted_by":null,"created_at":"2017-02-03T17:43:22Z","updated_at":"2017-02-03T17:43:22Z"}} -------------------------------------------------------------------------------- /spec/fixtures.http/getService/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Fri, 15 Apr 2016 14:50:13 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 2400 8 | X-RateLimit-Remaining: 2394 9 | X-RateLimit-Reset: 1460735221 10 | ETag: W/"be453ad05df875577d40dbfbb479239a" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 741b849f-dba6-4d0b-a68c-f47fe1aa3a54 13 | X-Runtime: 0.140632 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"id":1,"name":"Service 1","sid":"service1","description":"First service example.","setup_description":null,"requires_setup":true,"default_subdomain":null,"created_at":"2014-02-14T19:15:19Z","updated_at":"2016-03-04T09:23:27Z","settings":[{"name":"username","label":"Service 1 Account Username","append":".service1.com","description":"Your Service 1 username is used to connect services to your account.","example":"username","password":false}]}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/getTemplate/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Tue, 22 Mar 2016 11:14:57 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 2400 8 | X-RateLimit-Remaining: 2394 9 | X-RateLimit-Reset: 1458648490 10 | ETag: W/"6a2c0c6789d853473765a5fc5662da2e" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 3401ffd6-730f-42c0-856c-3b270ca4b35f 13 | X-Runtime: 0.938420 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"id":1,"account_id":1010,"name":"Alpha","sid":"alpha","description":"An alpha template.","created_at":"2016-03-22T11:08:58Z","updated_at":"2016-03-22T11:08:58Z"}} -------------------------------------------------------------------------------- /spec/fixtures.http/getTemplateRecord/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Tue, 03 May 2016 08:04:20 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 2400 8 | X-RateLimit-Remaining: 2394 9 | X-RateLimit-Reset: 1462265481 10 | ETag: W/"743142eab9fecf3edb41e9b3f30a903f" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 6484e900-7255-4194-9ff8-ae5650ebd765 13 | X-Runtime: 0.138017 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"id":301,"template_id":268,"name":"","content":"mx.example.com","ttl":600,"priority":10,"type":"MX","created_at":"2016-05-03T08:03:26Z","updated_at":"2016-05-03T08:03:26Z"}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/getTld/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Fri, 23 Sep 2016 09:06:13 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2396 8 | X-RateLimit-Reset: 1474622397 9 | ETag: W/"8e3d87c11204e76362765aea4c0916e0" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 426d0884-2583-45d8-8ab6-0e36050ba6dc 12 | X-Runtime: 0.011580 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"tld":"com","tld_type":1,"whois_privacy":true,"auto_renew_only":false,"idn":true,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":true,"dnssec_interface_type":"ds"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/getTldExtendedAttributes/success-noattributes.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Sun, 28 Feb 2016 13:19:18 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3996 9 | X-RateLimit-Reset: 1456669058 10 | ETag: W/"e0234245cb00aa260ccfa99a9a0b235e" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 414e9bf2-4681-4769-a3e0-ed9b8905edcc 13 | X-Runtime: 0.459391 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":[]} -------------------------------------------------------------------------------- /spec/fixtures.http/getWebhook/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Mon, 15 Feb 2016 17:06:09 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3992 9 | X-RateLimit-Reset: 1455559348 10 | ETag: W/"cbb707ff6fc185d71f5a8df3110f1379" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 0109ea48-b7f0-4f78-a970-6866653b83eb 13 | X-Runtime: 0.087618 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"id":1,"url":"https://webhook.test"}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/getWhoisPrivacy/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Sat, 13 Feb 2016 14:35:37 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3996 9 | X-RateLimit-Reset: 1455377135 10 | ETag: W/"10be37d45cd224b2178b8a2f86c466ea" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 78afe010-0f54-4d39-9ed3-08c67d545a35 13 | X-Runtime: 0.031770 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"id":1,"domain_id":2,"expires_on":"2017-02-13","enabled":true,"created_at":"2016-02-13T14:34:50Z","updated_at":"2016-02-13T14:34:52Z"}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/getZone/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Fri, 22 Jan 2016 16:54:14 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3995 9 | X-RateLimit-Reset: 1453484046 10 | ETag: W/"2161245abd349a34cba32a970e6424ba" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 93182033-a215-484e-a107-5235fa48001c 13 | X-Runtime: 0.177942 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"id":1,"account_id":1010,"name":"example-alpha.com","reverse":false,"secondary":false,"last_transferred_at":null,"active":true,"created_at":"2015-04-23T07:40:03Z","updated_at":"2015-04-23T07:40:03Z"}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/getZoneFile/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Wed, 20 Jul 2016 09:04:24 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2398 8 | X-RateLimit-Reset: 1469008918 9 | ETag: W/"85eb7f1ef577371eadf7d5b05203a60e" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: eb3c7bc0-882d-4bb4-873d-aa4d4a3ddc81 12 | X-Runtime: 0.021226 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"zone":"$ORIGIN example.com.\n$TTL 1h\nexample.com. 3600 IN SOA ns1.dnsimple.com. admin.dnsimple.com. 1453132552 86400 7200 604800 300\nexample.com. 3600 IN NS ns1.dnsimple.com.\nexample.com. 3600 IN NS ns2.dnsimple.com.\nexample.com. 3600 IN NS ns3.dnsimple.com.\nexample.com. 3600 IN NS ns4.dnsimple.com.\n"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/getZoneRecord/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Wed, 05 Oct 2016 09:53:54 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2394 8 | X-RateLimit-Reset: 1475662530 9 | ETag: W/"d4d22097268cd23fab63ef3e9982b5c1" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 8a07b24d-6f59-4012-9f53-6cae893f0372 12 | X-Runtime: 0.051822 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":5,"zone_id":"example.com","parent_id":null,"name":"","content":"mxa.example.com","ttl":600,"priority":10,"type":"MX","regions":["SV1", "IAD"],"system_record":false,"created_at":"2016-10-05T09:51:35Z","updated_at":"2016-10-05T09:51:35Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/initiatePush/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Thu, 11 Aug 2016 10:16:03 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2395 8 | X-RateLimit-Reset: 1470913058 9 | ETag: W/"fbbdec6f757e014f6f0b2159090aed80" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 3c3f4bee-3e06-4998-8946-02d4fae26fa4 12 | X-Runtime: 0.601397 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":1,"domain_id":100,"contact_id":null,"account_id":2020,"created_at":"2016-08-11T10:16:03Z","updated_at":"2016-08-11T10:16:03Z","accepted_at":null}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/issueLetsencryptCertificate/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 202 Accepted 2 | Server: nginx 3 | Date: Thu, 18 Jun 2020 18:56:21 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 4800 7 | X-RateLimit-Remaining: 4798 8 | X-RateLimit-Reset: 1592510057 9 | Cache-Control: no-cache 10 | X-Request-Id: 1d6bdd7c-a88e-4ac2-9d12-36699a32b006 11 | X-Runtime: 0.884870 12 | X-Frame-Options: DENY 13 | X-Content-Type-Options: nosniff 14 | X-XSS-Protection: 1; mode=block 15 | X-Download-Options: noopen 16 | X-Permitted-Cross-Domain-Policies: none 17 | 18 | {"data":{"id":101967,"domain_id":289333,"contact_id":2511,"name":"www","common_name":"www.bingo.pizza","years":1,"csr":null,"state":"requesting","auto_renew":false,"alternate_names":[],"authority_identifier":"letsencrypt","created_at":"2020-06-18T18:54:17Z","updated_at":"2020-06-18T18:56:20Z","expires_at":null,"expires_on":null}} 19 | -------------------------------------------------------------------------------- /spec/fixtures.http/issueRenewalLetsencryptCertificate/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 202 Accepted 2 | Server: nginx 3 | Date: Thu, 18 Jun 2020 20:05:26 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 4800 7 | X-RateLimit-Remaining: 4798 8 | X-RateLimit-Reset: 1592513780 9 | Cache-Control: no-cache 10 | X-Request-Id: a7194bb4-aea4-42c6-846f-cd96f5f3cf5c 11 | X-Runtime: 0.897152 12 | X-Frame-Options: DENY 13 | X-Content-Type-Options: nosniff 14 | X-XSS-Protection: 1; mode=block 15 | X-Download-Options: noopen 16 | X-Permitted-Cross-Domain-Policies: none 17 | 18 | {"data":{"id":101972,"domain_id":289333,"contact_id":2511,"name":"www","common_name":"www.bingo.pizza","years":1,"csr":null,"state":"requesting","auto_renew":false,"alternate_names":[],"authority_identifier":"letsencrypt","created_at":"2020-06-18T19:56:20Z","updated_at":"2020-06-18T20:05:26Z","expires_at":null,"expires_on":null}} 19 | -------------------------------------------------------------------------------- /spec/fixtures.http/linkPrimaryServer/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Wed, 17 Mar 2021 23:29:51 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2384 8 | X-RateLimit-Reset: 1616024598 9 | ETag: W/"911f7a8bf729e066d3d0aedce7eaab4e" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 104a8bbe-a4a7-41b1-9d51-499596f5b228 12 | X-Runtime: 0.249251 13 | X-Frame-Options: DENY 14 | X-Content-Type-Options: nosniff 15 | X-XSS-Protection: 1; mode=block 16 | X-Download-Options: noopen 17 | X-Permitted-Cross-Domain-Policies: none 18 | Content-Security-Policy: frame-ancestors 'none' 19 | Strict-Transport-Security: max-age=31536000 20 | 21 | {"data":{"id":4,"account_id":531,"name":"PrimaryProduction","ip":"1.2.3.4","port":53,"linked_secondary_zones":["secondaryzone.com"],"created_at":"2021-03-17T23:08:42Z","updated_at":"2021-03-17T23:08:42Z"}} -------------------------------------------------------------------------------- /spec/fixtures.http/listAccounts/success-account.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Tue, 14 Jun 2016 12:02:58 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2391 8 | X-RateLimit-Reset: 1465908577 9 | ETag: W/"9ef3b4bf1f441a9b1cd6d7041bc181aa" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: f705b65b-3589-43ad-97ca-3b2821d49d81 12 | X-Runtime: 0.012661 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":[{"id":123,"email":"john@example.com","plan_identifier":"dnsimple-personal","created_at":"2011-09-11T17:15:58Z","updated_at":"2016-06-03T15:02:26Z"}]} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/listAccounts/success-user.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Tue, 14 Jun 2016 12:05:38 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2390 8 | X-RateLimit-Reset: 1465908577 9 | ETag: W/"b8dc5b6e94652da599d15d4668b723b5" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 745455ba-3871-440d-b703-1448b9708c14 12 | X-Runtime: 0.014727 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":[{"id":123,"email":"john@example.com","plan_identifier":"dnsimple-personal","created_at":"2011-09-11T17:15:58Z","updated_at":"2016-06-03T15:02:26Z"},{"id":456,"email":"ops@company.com","plan_identifier":"dnsimple-professional","created_at":"2012-03-16T16:02:54Z","updated_at":"2016-06-14T11:23:16Z"}]} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/listCharges/fail-400-bad-filter.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 400 Bad Request 2 | Date: Tue, 24 Oct 2023 08:13:01 GMT 3 | Connection: close 4 | X-RateLimit-Limit: 2400 5 | X-RateLimit-Remaining: 2392 6 | X-RateLimit-Reset: 1698136677 7 | Content-Type: application/json; charset=utf-8 8 | X-WORK-WITH-US: Love automation? So do we! https://dnsimple.com/jobs 9 | Cache-Control: no-cache 10 | X-Request-Id: bdfbf3a7-d9dc-4018-9732-61502be989a3 11 | X-Runtime: 0.455303 12 | Transfer-Encoding: chunked 13 | 14 | {"message":"Invalid date format must be ISO8601 (YYYY-MM-DD)"} 15 | -------------------------------------------------------------------------------- /spec/fixtures.http/listCharges/fail-403.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 403 Forbidden 2 | Date: Tue, 24 Oct 2023 09:49:29 GMT 3 | Connection: close 4 | X-RateLimit-Limit: 2400 5 | X-RateLimit-Remaining: 2398 6 | X-RateLimit-Reset: 1698143967 7 | Content-Type: application/json; charset=utf-8 8 | X-WORK-WITH-US: Love automation? So do we! https://dnsimple.com/jobs 9 | Cache-Control: no-cache 10 | X-Request-Id: 5554e2d3-2652-4ca7-8c5e-92b4c35f28d6 11 | X-Runtime: 0.035309 12 | Transfer-Encoding: chunked 13 | 14 | {"message":"Permission Denied. Required Scope: billing:*:read"} 15 | -------------------------------------------------------------------------------- /spec/fixtures.http/listCharges/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Date: Tue, 24 Oct 2023 09:52:55 GMT 3 | Connection: close 4 | X-RateLimit-Limit: 2400 5 | X-RateLimit-Remaining: 2397 6 | X-RateLimit-Reset: 1698143967 7 | Content-Type: application/json; charset=utf-8 8 | X-WORK-WITH-US: Love automation? So do we! https://dnsimple.com/jobs 9 | Cache-Control: no-store, must-revalidate, private, max-age=0 10 | X-Request-Id: a57a87c8-626a-4361-9fb8-b55ca9be8e5d 11 | X-Runtime: 0.060526 12 | Transfer-Encoding: chunked 13 | 14 | {"data":[{"invoiced_at":"2023-08-17T05:53:36Z","total_amount":"14.50","balance_amount":"0.00","reference":"1-2","state":"collected","items":[{"description":"Register bubble-registered.com","amount":"14.50","product_id":1,"product_type":"domain-registration","product_reference":"bubble-registered.com"}]},{"invoiced_at":"2023-08-17T05:57:53Z","total_amount":"14.50","balance_amount":"0.00","reference":"2-2","state":"refunded","items":[{"description":"Register example.com","amount":"14.50","product_id":2,"product_type":"domain-registration","product_reference":"example.com"}]},{"invoiced_at":"2023-10-24T07:49:05Z","total_amount":"1099999.99","balance_amount":"0.00","reference":"4-2","state":"collected","items":[{"description":"Test Line Item 1","amount":"99999.99","product_id":null,"product_type":"manual","product_reference":null},{"description":"Test Line Item 2","amount":"1000000.00","product_id":null,"product_type":"manual","product_reference":null}]}],"pagination":{"current_page":1,"per_page":30,"total_entries":3,"total_pages":1}} 15 | -------------------------------------------------------------------------------- /spec/fixtures.http/listCollaborators/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Fri, 07 Oct 2016 08:58:05 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2396 8 | X-RateLimit-Reset: 1475833772 9 | ETag: W/"6e597053b3cfbbfec6801fcdc2e98466" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: ccbbef00-d0a7-442f-9f40-80df8cea868d 12 | X-Runtime: 0.063426 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":[{"id":100,"domain_id":1,"domain_name":"example.com","user_id":999,"user_email":"existing-user@example.com","invitation":false,"created_at":"2016-10-07T08:53:41Z","updated_at":"2016-10-07T08:53:41Z","accepted_at":"2016-10-07T08:53:41Z"},{"id":101,"domain_id":1,"domain_name":"example.com","user_id":null,"user_email":"invited-user@example.com","invitation":true,"created_at":"2016-10-07T08:51:12Z","updated_at":"2016-10-07T08:51:12Z","accepted_at":null}],"pagination":{"current_page":1,"per_page":30,"total_entries":2,"total_pages":1}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/listContacts/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Tue, 19 Jan 2016 18:35:01 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3998 9 | X-RateLimit-Reset: 1453232080 10 | ETag: W/"42b9dd8efe7dec210d55855cdf2debae" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 7871da61-ecf1-4771-8560-efbcf7f4b961 13 | X-Runtime: 0.067822 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":[{"id":1,"account_id":1010,"label":"Default","first_name":"First","last_name":"User","job_title":"CEO","organization_name":"Awesome Company","email":"first@example.com","phone":"+18001234567","fax":"+18011234567","address1":"Italian Street, 10","address2":"","city":"Roma","state_province":"RM","postal_code":"00100","country":"IT","created_at":"2013-11-08T17:23:15Z","updated_at":"2015-01-08T21:30:50Z"},{"id":2,"account_id":1010,"label":"","first_name":"Second","last_name":"User","job_title":"","organization_name":"","email":"second@example.com","phone":"+18881234567","fax":"","address1":"French Street","address2":"c/o Someone","city":"Paris","state_province":"XY","postal_code":"00200","country":"FR","created_at":"2014-12-06T15:46:18Z","updated_at":"2014-12-06T15:46:18Z"}],"pagination":{"current_page":1,"per_page":30,"total_entries":2,"total_pages":1}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/listDelegationSignerRecords/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Fri, 03 Mar 2017 13:50:42 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2397 8 | X-RateLimit-Reset: 1488552565 9 | ETag: W/"33c8bbfc699dba2c259b8ec2596ae40d" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: ef8f1fe9-d342-41c4-a7bc-402434c53458 12 | X-Runtime: 0.019866 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":[{"id":24,"domain_id":1010,"algorithm":"8","digest":"C1F6E04A5A61FBF65BF9DC8294C363CF11C89E802D926BDAB79C55D27BEFA94F","digest_type":"2","keytag":"44620","public_key":null,"created_at":"2017-03-03T13:49:58Z","updated_at":"2017-03-03T13:49:58Z"}],"pagination":{"current_page":1,"per_page":30,"total_entries":1,"total_pages":1}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/listDomains/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Thu, 04 Jun 2020 19:54:16 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2399 8 | X-RateLimit-Reset: 1591304056 9 | ETag: W/"732eac2d85c19810f4e84dbc0eaafb9d" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 458d7b96-bb1a-469a-817e-4fd65c0f1db3 12 | X-Runtime: 0.125593 13 | X-Frame-Options: DENY 14 | X-Content-Type-Options: nosniff 15 | X-XSS-Protection: 1; mode=block 16 | X-Download-Options: noopen 17 | X-Permitted-Cross-Domain-Policies: none 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":[{"id":181984,"account_id":1385,"registrant_id":2715,"name":"example-alpha.com","unicode_name":"example-alpha.com","state":"registered","auto_renew":false,"private_whois":false,"expires_on":"2021-06-05","expires_at":"2021-06-05T02:15:00Z","created_at":"2020-06-04T19:15:14Z","updated_at":"2020-06-04T19:15:21Z"},{"id":181985,"account_id":1385,"registrant_id":null,"name":"example-beta.com","unicode_name":"example-beta.com","state":"hosted","auto_renew":false,"private_whois":false,"expires_on":null,"expires_at":null,"created_at":"2020-06-04T19:47:05Z","updated_at":"2020-06-04T19:47:05Z"}],"pagination":{"current_page":1,"per_page":30,"total_entries":2,"total_pages":1}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/listEmailForwards/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Fri, 17 May 2024 09:07:28 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 4800 7 | X-RateLimit-Remaining: 4748 8 | X-RateLimit-Reset: 1715936948 9 | X-WORK-WITH-US: Love automation? So do we! https://dnsimple.com/jobs 10 | ETag: W/"a5eed9a071f03e10fc67001ccc647a94" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: e42df983-a8a5-4123-8c74-fb89ab934aba 13 | X-Runtime: 0.025456 14 | Strict-Transport-Security: max-age=63072000 15 | 16 | {"data":[{"id":24809,"domain_id":235146,"alias_email":"foo@a-domain.com","destination_email":"jane.smith@example.com","active":true,"created_at":"2017-05-25T19:23:16Z","updated_at":"2017-05-25T19:23:16Z","from":"foo@a-domain.com","to":"jane.smith@example.com"},{"id":24810,"domain_id":235146,"alias_email":"bar@a-domain.com","destination_email":"john.doe@example.com","active":false,"created_at":"2017-05-25T19:23:16Z","updated_at":"2017-05-25T19:23:16Z","from":"bar@a-domain.com","to":"john.doe@example.com"}],"pagination":{"current_page":1,"per_page":30,"total_entries":1,"total_pages":1}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/listPrimaryServers/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Wed, 17 Mar 2021 22:45:37 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2394 8 | X-RateLimit-Reset: 1616024598 9 | ETag: W/"1a8276fb3483d6954afe139480753c5b" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 411f7b7c-3ebb-4b6a-a986-5ffd8dcd4144 12 | X-Runtime: 0.159587 13 | X-Frame-Options: DENY 14 | X-Content-Type-Options: nosniff 15 | X-XSS-Protection: 1; mode=block 16 | X-Download-Options: noopen 17 | X-Permitted-Cross-Domain-Policies: none 18 | Content-Security-Policy: frame-ancestors 'none' 19 | Strict-Transport-Security: max-age=31536000 20 | 21 | {"data":[{"id":1,"account_id":531,"name":"Primary","ip":"1.1.1.1","port":4567,"linked_secondary_zones":[],"created_at":"2021-03-05T18:02:23Z","updated_at":"2021-03-05T18:02:23Z"},{"id":2,"account_id":531,"name":"Primary Production","ip":"1.1.1.1","port":4567,"linked_secondary_zones":["secondaryzone.com"],"created_at":"2021-03-16T20:33:34Z","updated_at":"2021-03-16T20:33:34Z"}],"pagination":{"current_page":1,"per_page":30,"total_entries":2,"total_pages":1}} -------------------------------------------------------------------------------- /spec/fixtures.http/listPushes/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Thu, 11 Aug 2016 10:19:54 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2393 8 | X-RateLimit-Reset: 1470913058 9 | ETag: W/"fd29a0a43fb53ae2e5186232361fa4b9" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 12611d3b-aee5-49e3-a8bf-bd7899b1e797 12 | X-Runtime: 0.045678 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":[{"id":1,"domain_id":100,"contact_id":null,"account_id":2020,"created_at":"2016-08-11T10:16:03Z","updated_at":"2016-08-11T10:16:03Z","accepted_at":null},{"id":2,"domain_id":101,"contact_id":null,"account_id":2020,"created_at":"2016-08-11T10:18:48Z","updated_at":"2016-08-11T10:18:48Z","accepted_at":null}],"pagination":{"current_page":1,"per_page":30,"total_entries":2,"total_pages":1}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/listRegistrantChanges/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 2 | server: nginx 3 | date: Tue, 22 Aug 2023 11:12:49 GMT 4 | content-type: application/json; charset=utf-8 5 | x-ratelimit-limit: 2400 6 | x-ratelimit-remaining: 2393 7 | x-ratelimit-reset: 1692705338 8 | x-work-with-us: Love automation? So do we! https://dnsimple.com/jobs 9 | etag: W/"0049703ea058b06346df4c0e169eac29" 10 | cache-control: max-age=0, private, must-revalidate 11 | x-request-id: fd0334ce-414a-4872-8889-e548e0b1410c 12 | x-runtime: 0.030759 13 | strict-transport-security: max-age=63072000 14 | 15 | {"data":[{"id":101,"account_id":101,"domain_id":101,"contact_id":101,"state":"new","extended_attributes":{},"registry_owner_change":true,"irt_lock_lifted_by":null,"created_at":"2017-02-03T17:43:22Z","updated_at":"2017-02-03T17:43:22Z"}],"pagination":{"current_page":1,"per_page":30,"total_entries":1,"total_pages":1}} -------------------------------------------------------------------------------- /spec/fixtures.http/listServices/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Sat, 10 Dec 2016 22:37:13 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2399 8 | X-RateLimit-Reset: 1481413033 9 | ETag: W/"65425ab4559f111f28bc952f3b672d48" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 9a5dadcb-8e90-4fe9-ad60-be13ba3d3970 12 | X-Runtime: 0.263229 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":[{"id":1,"name":"Service 1","sid":"service1","description":"First service example.","setup_description":null,"requires_setup":false,"default_subdomain":null,"created_at":"2014-02-14T19:15:19Z","updated_at":"2016-03-04T09:23:27Z","settings":[]},{"id":2,"name":"Service 2","sid":"service2","description":"Second service example.","setup_description":null,"requires_setup":true,"default_subdomain":null,"created_at":"2014-02-14T19:15:19Z","updated_at":"2016-03-04T09:23:27Z","settings":[{"name":"username","label":"Service 2 Account Username","append":".service2.com","description":"Your Service2 username is used to connect services to your account.","example":"username","password":false}]}],"pagination":{"current_page":1,"per_page":30,"total_entries":2,"total_pages":1}} -------------------------------------------------------------------------------- /spec/fixtures.http/listTemplateRecords/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Tue, 03 May 2016 08:07:17 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 2400 8 | X-RateLimit-Remaining: 2391 9 | X-RateLimit-Reset: 1462265481 10 | ETag: W/"3e53584bcf1ce7c7ee4c0bdf734224fa" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 79c25a93-0660-4479-a71f-201c26309e00 13 | X-Runtime: 0.252889 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":[{"id":296,"template_id":268,"name":"","content":"192.168.1.1","ttl":3600,"priority":null,"type":"A","created_at":"2016-04-26T08:23:54Z","updated_at":"2016-04-26T08:23:54Z"},{"id":298,"template_id":268,"name":"www","content":"{{domain}}","ttl":3600,"priority":null,"type":"CNAME","created_at":"2016-04-26T08:25:11Z","updated_at":"2016-04-26T08:25:11Z"}],"pagination":{"current_page":1,"per_page":30,"total_entries":2,"total_pages":1}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/listTemplates/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Tue, 22 Mar 2016 11:11:50 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 2400 8 | X-RateLimit-Remaining: 2396 9 | X-RateLimit-Reset: 1458648490 10 | ETag: W/"2d1c99cff82eace0e995d901b465bbde" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 774e871f-8bda-40d7-bed9-bd907e872987 13 | X-Runtime: 0.193956 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":[{"id":1,"account_id":1010,"name":"Alpha","sid":"alpha","description":"An alpha template.","created_at":"2016-03-22T11:08:58Z","updated_at":"2016-03-22T11:08:58Z"},{"id":2,"account_id":1010,"name":"Beta","sid":"beta","description":"A beta template.","created_at":"2016-03-22T11:11:26Z","updated_at":"2016-03-22T11:11:26Z"}],"pagination":{"current_page":1,"per_page":30,"total_entries":2,"total_pages":1}} -------------------------------------------------------------------------------- /spec/fixtures.http/listTlds/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Fri, 23 Sep 2016 08:22:50 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2397 8 | X-RateLimit-Reset: 1474622397 9 | ETag: W/"06436132982cdf558bc1472b1e15a786" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: c78c1f6c-2143-4646-9049-313ccd9e24bd 12 | X-Runtime: 0.012861 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":[{"tld":"ac","tld_type":2,"whois_privacy":false,"auto_renew_only":true,"idn":false,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":false,"dnssec_interface_type":"ds"},{"tld":"academy","tld_type":3,"whois_privacy":true,"auto_renew_only":false,"idn":true,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":true,"dnssec_interface_type":"key"}],"pagination":{"current_page":1,"per_page":2,"total_entries":195,"total_pages":98}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/listWebhooks/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Mon, 15 Feb 2016 17:06:21 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3991 9 | X-RateLimit-Reset: 1455559348 10 | ETag: W/"01f1ea26e8e06d8d969bf06678bf7d12" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: bc611cd0-d1a9-48d0-b450-c9c86f0d0dcf 13 | X-Runtime: 0.104174 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":[{"id":1,"url":"https://webhook.test"},{"id":2,"url":"https://another.test"}]} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/listZoneRecords/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Wed, 05 Oct 2016 09:27:02 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2397 8 | X-RateLimit-Reset: 1475662531 9 | ETag: W/"4a6291c6424d22726fb7087cfdf99ab9" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 8a2279ac-709e-42ac-8964-95a5534acfb9 12 | X-Runtime: 0.271719 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":[{"id":1,"zone_id":"example.com","parent_id":null,"name":"","content":"ns1.dnsimple.com admin.dnsimple.com 1458642070 86400 7200 604800 300","ttl":3600,"priority":null,"type":"SOA","regions":["global"],"system_record":true,"created_at":"2016-03-22T10:20:53Z","updated_at":"2016-10-05T09:26:38Z"},{"id":69061,"zone_id":"example.com","parent_id":null,"name":"","content":"ns1.dnsimple.com","ttl":3600,"priority":null,"type":"NS","regions":["global"],"system_record":true,"created_at":"2016-03-22T10:20:53Z","updated_at":"2016-03-22T10:20:53Z"},{"id":2,"zone_id":"example.com","parent_id":null,"name":"","content":"ns2.dnsimple.com","ttl":3600,"priority":null,"type":"NS","regions":["global"],"system_record":true,"created_at":"2016-03-22T10:20:53Z","updated_at":"2016-03-22T10:20:53Z"},{"id":3,"zone_id":"example.com","parent_id":null,"name":"","content":"ns3.dnsimple.com","ttl":3600,"priority":null,"type":"NS","regions":["global"],"system_record":true,"created_at":"2016-03-22T10:20:53Z","updated_at":"2016-03-22T10:20:53Z"},{"id":4,"zone_id":"example.com","parent_id":null,"name":"","content":"ns4.dnsimple.com","ttl":3600,"priority":null,"type":"NS","regions":["global"],"system_record":true,"created_at":"2016-03-22T10:20:53Z","updated_at":"2016-03-22T10:20:53Z"}],"pagination":{"current_page":1,"per_page":30,"total_entries":5,"total_pages":1}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/listZones/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Fri, 22 Jan 2016 16:54:24 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3994 9 | X-RateLimit-Reset: 1453484045 10 | ETag: W/"485e03204e1853519bd637be743f2b25" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 01be9fa5-3a00-4d51-a927-f17587cb67ec 13 | X-Runtime: 0.037083 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":[{"id":1,"account_id":1010,"name":"example-alpha.com","reverse":false,"secondary":false,"last_transferred_at":null,"active":true,"created_at":"2015-04-23T07:40:03Z","updated_at":"2015-04-23T07:40:03Z"},{"id":2,"account_id":1010,"name":"example-beta.com","reverse":false,"secondary":false,"last_transferred_at":null,"active":true,"created_at":"2015-04-23T07:40:03Z","updated_at":"2015-04-23T07:40:03Z"}],"pagination":{"current_page":1,"per_page":30,"total_entries":2,"total_pages":1}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/method-not-allowed.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 405 Method Not Allowed 2 | Server: nginx 3 | Date: Fri, 15 Apr 2016 14:15:04 GMT 4 | Connection: keep-alive 5 | Status: 405 Method Not Allowed 6 | Allow: DELETE, GET, HEAD, PATCH, POST 7 | Cache-Control: no-cache 8 | X-Request-Id: 64c0a5e1-4cbb-4287-98a7-93085a77ac55 9 | X-Runtime: 0.050104 10 | 11 | -------------------------------------------------------------------------------- /spec/fixtures.http/notfound-certificate.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Server: nginx 3 | Date: Tue, 19 Jul 2016 08:56:34 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Cache-Control: no-cache 7 | X-Request-Id: 9a51fa7e-cc9b-498b-bf8d-ee3b2819c0c6 8 | X-Runtime: 0.040469 9 | X-Content-Type-Options: nosniff 10 | X-Download-Options: noopen 11 | X-Frame-Options: DENY 12 | X-Permitted-Cross-Domain-Policies: none 13 | X-XSS-Protection: 1; mode=block 14 | 15 | {"message":"Certificate `0` not found"} 16 | -------------------------------------------------------------------------------- /spec/fixtures.http/notfound-collaborator.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Server: nginx 3 | Date: Mon, 21 Nov 2016 09:32:48 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Cache-Control: no-cache 7 | X-Request-Id: 3e76b10b-412c-42ef-87d1-f8ff327df997 8 | X-Runtime: 0.030250 9 | X-Content-Type-Options: nosniff 10 | X-Download-Options: noopen 11 | X-Frame-Options: DENY 12 | X-Permitted-Cross-Domain-Policies: none 13 | X-XSS-Protection: 1; mode=block 14 | 15 | {"message":"Membership `0` not found"} 16 | -------------------------------------------------------------------------------- /spec/fixtures.http/notfound-contact.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Server: nginx 3 | Date: Tue, 19 Jan 2016 21:04:48 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 404 Not Found 7 | Cache-Control: no-cache 8 | X-Request-Id: a57d4e23-3155-477e-8469-e897b27c03e5 9 | X-Runtime: 0.014159 10 | 11 | {"message":"Contact `0` not found"} -------------------------------------------------------------------------------- /spec/fixtures.http/notfound-delegationsignerrecord.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Server: nginx 3 | Date: Thu, 04 Feb 2016 14:44:56 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 404 Not Found 7 | Cache-Control: no-cache 8 | X-Request-Id: 50eea494-cc14-4db0-bc11-306aa525bbfd 9 | X-Runtime: 0.028036 10 | 11 | {"message":"Delegation signer record `0` not found"} 12 | -------------------------------------------------------------------------------- /spec/fixtures.http/notfound-domain.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Server: nginx 3 | Date: Wed, 16 Dec 2015 22:07:20 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Strict-Transport-Security: max-age=31536000 7 | Cache-Control: no-cache 8 | X-Request-Id: bc587ea7-bcd5-4c10-a940-a9b4c8339824 9 | X-Runtime: 0.059966 10 | 11 | {"message":"Domain `0` not found"} -------------------------------------------------------------------------------- /spec/fixtures.http/notfound-domainpush.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Server: nginx 3 | Date: Thu, 04 Feb 2016 14:44:56 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 404 Not Found 7 | Cache-Control: no-cache 8 | X-Request-Id: 50eea494-cc14-4db0-bc11-306aa525bbfd 9 | X-Runtime: 0.028036 10 | 11 | {"message":"Domain push `0` not found"} 12 | -------------------------------------------------------------------------------- /spec/fixtures.http/notfound-emailforward.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Server: nginx 3 | Date: Thu, 04 Feb 2016 14:44:56 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 404 Not Found 7 | Cache-Control: no-cache 8 | X-Request-Id: 50eea494-cc14-4db0-bc11-306aa525bbfd 9 | X-Runtime: 0.028036 10 | 11 | {"message":"Email forward `0` not found"} 12 | -------------------------------------------------------------------------------- /spec/fixtures.http/notfound-record.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Server: nginx 3 | Date: Fri, 22 Jan 2016 16:46:07 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 404 Not Found 7 | Cache-Control: no-cache 8 | X-Request-Id: 35af0fd2-d020-4f70-861e-b6a42a190bf6 9 | X-Runtime: 0.018847 10 | 11 | {"message":"Record `0` not found"} -------------------------------------------------------------------------------- /spec/fixtures.http/notfound-template.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Server: nginx 3 | Date: Wed, 04 May 2016 09:35:45 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 404 Not Found 7 | Cache-Control: no-cache 8 | X-Request-Id: 8d380d93-b974-4d51-82a3-5b10bce4167a 9 | X-Runtime: 0.071884 10 | 11 | {"message":"Template `beta` not found"} -------------------------------------------------------------------------------- /spec/fixtures.http/notfound-webhook.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Server: nginx 3 | Date: Thu, 03 Mar 2016 11:55:29 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 404 Not Found 7 | Cache-Control: no-cache 8 | X-Request-Id: 4f154fa2-3ce9-4bdd-88a3-42ccc8dbc087 9 | X-Runtime: 0.012159 10 | 11 | {"message":"Webhook `0` not found"} 12 | -------------------------------------------------------------------------------- /spec/fixtures.http/notfound-whoisprivacy.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Server: nginx 3 | Date: Sat, 13 Feb 2016 14:34:32 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 404 Not Found 7 | Cache-Control: no-cache 8 | X-Request-Id: d5ce788e-bd8d-4edb-bcd6-50a1deacd595 9 | X-Runtime: 0.031090 10 | 11 | {"message":"Whois privacy for example-1455121347.com not found"} -------------------------------------------------------------------------------- /spec/fixtures.http/notfound-zone.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Server: nginx 3 | Date: Fri, 22 Jan 2016 16:46:02 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 404 Not Found 7 | Cache-Control: no-cache 8 | X-Request-Id: 9c19bef5-6902-421c-9f91-dec3bae26102 9 | X-Runtime: 0.014705 10 | 11 | {"message":"Zone `0` not found"} -------------------------------------------------------------------------------- /spec/fixtures.http/oauthAccessToken/error-invalid-request.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 400 Bad Request 2 | Server: nginx 3 | Date: Mon, 08 Feb 2016 21:24:19 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 30 7 | X-RateLimit-Remaining: 29 8 | X-RateLimit-Reset: 1454970259 9 | ETag: W/"def417b4ade951f8148bb6a4fa3fcf5a" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: e8c544cf-fcc3-4762-a200-60c0320a2575 12 | X-Runtime: 0.105600 13 | Strict-Transport-Security: max-age=31536000 14 | 15 | {"error":"invalid_request","error_description":"Invalid \"state\": value doesn't match the \"state\" in the authorization request"} 16 | -------------------------------------------------------------------------------- /spec/fixtures.http/oauthAccessToken/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Mon, 08 Feb 2016 21:24:19 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 30 8 | X-RateLimit-Remaining: 29 9 | X-RateLimit-Reset: 1454970259 10 | ETag: W/"def417b4ade951f8148bb6a4fa3fcf5a" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: e8c544cf-fcc3-4762-a200-60c0320a2575 13 | X-Runtime: 0.105600 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"access_token":"zKQ7OLqF5N1gylcJweA9WodA000BUNJD","token_type":"Bearer","scope":null,"account_id":1} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/pages-1of3.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Wed, 16 Dec 2015 13:36:11 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 4000 7 | X-RateLimit-Remaining: 3997 8 | X-RateLimit-Reset: 1450272970 9 | ETag: W/"2679531e6cce6cd326f255255d7a0005" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: a87f1b44-150a-4ed0-b7da-9301fa1465b0 12 | X-Runtime: 0.093714 13 | Strict-Transport-Security: max-age=31536000 14 | 15 | {"data":[{"id":1},{"id":2}],"pagination":{"current_page":1,"per_page":2,"total_entries":5,"total_pages":3}} -------------------------------------------------------------------------------- /spec/fixtures.http/pages-2of3.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Wed, 16 Dec 2015 13:36:11 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 4000 7 | X-RateLimit-Remaining: 3997 8 | X-RateLimit-Reset: 1450272970 9 | ETag: W/"2679531e6cce6cd326f255255d7a0005" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: a87f1b44-150a-4ed0-b7da-9301fa1465b0 12 | X-Runtime: 0.093714 13 | Strict-Transport-Security: max-age=31536000 14 | 15 | {"data":[{"id":3},{"id":4}],"pagination":{"current_page":2,"per_page":2,"total_entries":5,"total_pages":3}} -------------------------------------------------------------------------------- /spec/fixtures.http/pages-3of3.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Wed, 16 Dec 2015 13:36:11 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 4000 7 | X-RateLimit-Remaining: 3997 8 | X-RateLimit-Reset: 1450272970 9 | ETag: W/"2679531e6cce6cd326f255255d7a0005" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: a87f1b44-150a-4ed0-b7da-9301fa1465b0 12 | X-Runtime: 0.093714 13 | Strict-Transport-Security: max-age=31536000 14 | 15 | {"data":[{"id":5}],"pagination":{"current_page":3,"per_page":2,"total_entries":5,"total_pages":3}} -------------------------------------------------------------------------------- /spec/fixtures.http/purchaseLetsencryptCertificate/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Thu, 18 Jun 2020 18:54:17 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 4800 7 | X-RateLimit-Remaining: 4799 8 | X-RateLimit-Reset: 1592510057 9 | ETag: W/"36ffdd6505ed488a3aeeaace031c5869" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 4e99c95d-6d19-48ea-8d63-e68432631c90 12 | X-Runtime: 0.098745 13 | X-Frame-Options: DENY 14 | X-Content-Type-Options: nosniff 15 | X-XSS-Protection: 1; mode=block 16 | X-Download-Options: noopen 17 | X-Permitted-Cross-Domain-Policies: none 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":101967,"certificate_id":101967,"state":"new","auto_renew":false,"created_at":"2020-06-18T18:54:17Z","updated_at":"2020-06-18T18:54:17Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/purchaseRenewalLetsencryptCertificate/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Thu, 18 Jun 2020 19:56:20 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 4800 7 | X-RateLimit-Remaining: 4799 8 | X-RateLimit-Reset: 1592513780 9 | ETag: W/"84dd908f85153590082766bd8d1f1056" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: f43f4d80-a7eb-43d3-b1ec-95eba413894e 12 | X-Runtime: 0.091216 13 | X-Frame-Options: DENY 14 | X-Content-Type-Options: nosniff 15 | X-XSS-Protection: 1; mode=block 16 | X-Download-Options: noopen 17 | X-Permitted-Cross-Domain-Policies: none 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":65082,"old_certificate_id":101967,"new_certificate_id":101972,"state":"new","auto_renew":false,"created_at":"2020-06-18T19:56:20Z","updated_at":"2020-06-18T19:56:20Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/registerDomain/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Fri, 09 Dec 2016 19:35:38 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2396 8 | X-RateLimit-Reset: 1481315246 9 | ETag: W/"440b25022ab55cd8e84be64356bfd7d9" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: aac22ee4-31d7-4d71-ad3d-d0004f5cf370 12 | X-Runtime: 11.906207 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":1,"domain_id":999,"registrant_id":2,"period":1,"state":"new","auto_renew":false,"whois_privacy":false,"created_at":"2016-12-09T19:35:31Z","updated_at":"2016-12-09T19:35:31Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/rejectPush/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Thu, 11 Aug 2016 10:24:54 GMT 4 | Connection: keep-alive 5 | X-RateLimit-Limit: 2400 6 | X-RateLimit-Remaining: 2391 7 | X-RateLimit-Reset: 1470913059 8 | Cache-Control: no-cache 9 | X-Request-Id: c0258478-1392-49b2-9b94-67b173acae12 10 | X-Runtime: 0.174739 11 | X-Content-Type-Options: nosniff 12 | X-Download-Options: noopen 13 | X-Frame-Options: DENY 14 | X-Permitted-Cross-Domain-Policies: none 15 | X-XSS-Protection: 1; mode=block 16 | Strict-Transport-Security: max-age=31536000 17 | 18 | -------------------------------------------------------------------------------- /spec/fixtures.http/removeCollaborator/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Fri, 07 Oct 2016 09:08:51 GMT 4 | Connection: keep-alive 5 | X-RateLimit-Limit: 2400 6 | X-RateLimit-Remaining: 2395 7 | X-RateLimit-Reset: 1475833773 8 | Cache-Control: no-cache 9 | X-Request-Id: 732cdd0a-9ae5-4853-93ef-3511652b687a 10 | X-Runtime: 0.098437 11 | X-Content-Type-Options: nosniff 12 | X-Download-Options: noopen 13 | X-Frame-Options: DENY 14 | X-Permitted-Cross-Domain-Policies: none 15 | X-XSS-Protection: 1; mode=block 16 | Strict-Transport-Security: max-age=31536000 17 | 18 | -------------------------------------------------------------------------------- /spec/fixtures.http/renewDomain/error-tooearly.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 400 Bad Request 2 | Server: nginx 3 | Date: Mon, 15 Feb 2016 15:06:35 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 400 Bad Request 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3998 9 | X-RateLimit-Reset: 1455552316 10 | Cache-Control: no-cache 11 | X-Request-Id: 0c1507d3-4c03-4ba3-b2bd-b0cabf021ed8 12 | X-Runtime: 0.256476 13 | 14 | {"message":"example.com may not be renewed at this time","errors":{}} 15 | -------------------------------------------------------------------------------- /spec/fixtures.http/renewDomain/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Fri, 09 Dec 2016 19:46:57 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2394 8 | X-RateLimit-Reset: 1481315245 9 | ETag: W/"179d85ea8a26a3d5dc76e42de2d7918e" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: ba6f2707-5df0-4ffa-b91b-51d4460bab8e 12 | X-Runtime: 13.571302 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":1,"domain_id":999,"period":1,"state":"new","created_at":"2016-12-09T19:46:45Z","updated_at":"2016-12-09T19:46:45Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/renewWhoisPrivacy/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Thu, 10 Jan 2019 12:12:50 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2398 8 | X-RateLimit-Reset: 1547125899 9 | ETag: W/"e5bf5d90a6c95e5f1443dcbaf2cc27c6" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 6e80e830-21ae-46ea-9191-98811884808a 12 | X-Runtime: 1.459325 13 | X-Frame-Options: DENY 14 | X-Content-Type-Options: nosniff 15 | X-XSS-Protection: 1; mode=block 16 | X-Download-Options: noopen 17 | X-Permitted-Cross-Domain-Policies: none 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":1,"domain_id":100,"whois_privacy_id":999,"state":"new","expires_on":"2020-01-10","enabled":true,"created_at":"2019-01-10T12:12:48Z","updated_at":"2019-01-10T12:12:48Z"}} -------------------------------------------------------------------------------- /spec/fixtures.http/renewWhoisPrivacy/whois-privacy-duplicated-order.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 400 Bad Request 2 | Server: nginx 3 | Date: Thu, 10 Jan 2019 12:13:21 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2397 8 | X-RateLimit-Reset: 1547125899 9 | Cache-Control: no-cache 10 | X-Request-Id: 16cc92bb-fe38-434b-b483-602d77ac77d3 11 | X-Runtime: 0.122201 12 | X-Frame-Options: DENY 13 | X-Content-Type-Options: nosniff 14 | X-XSS-Protection: 1; mode=block 15 | X-Download-Options: noopen 16 | X-Permitted-Cross-Domain-Policies: none 17 | 18 | {"message":"The whois privacy for example.com has just been renewed, a new renewal cannot be started at this time"} -------------------------------------------------------------------------------- /spec/fixtures.http/renewWhoisPrivacy/whois-privacy-not-found.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 400 Bad Request 2 | Server: nginx 3 | Date: Thu, 10 Jan 2019 12:11:39 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2399 8 | X-RateLimit-Reset: 1547125899 9 | Cache-Control: no-cache 10 | X-Request-Id: 2727b7c4-97af-4e22-9c7f-bd84e20f2dc1 11 | X-Runtime: 0.139925 12 | X-Frame-Options: DENY 13 | X-Content-Type-Options: nosniff 14 | X-XSS-Protection: 1; mode=block 15 | X-Download-Options: noopen 16 | X-Permitted-Cross-Domain-Policies: none 17 | 18 | {"message":"WHOIS privacy not found for example.com"} -------------------------------------------------------------------------------- /spec/fixtures.http/response.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Fri, 18 Dec 2015 15:19:37 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 4000 7 | X-RateLimit-Remaining: 3991 8 | X-RateLimit-Reset: 1450451976 9 | ETag: W/"5ea6326bc1a8e83e5c156c564f2559f0" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 15a7f3a5-7ee5-4e36-ac5a-8c21c2e1fffd 12 | X-Runtime: 0.141588 13 | Strict-Transport-Security: max-age=31536000 14 | 15 | {"data":{"user":null,"account":null}} -------------------------------------------------------------------------------- /spec/fixtures.http/restoreDomain/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Fri, 09 Dec 2016 19:46:57 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2394 8 | X-RateLimit-Reset: 1481315245 9 | ETag: W/"179d85ea8a26a3d5dc76e42de2d7918e" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: ba6f2707-5df0-4ffa-b91b-51d4460bab8e 12 | X-Runtime: 13.571302 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":1,"domain_id":999,"state":"new","created_at":"2016-12-09T19:46:45Z","updated_at":"2016-12-09T19:46:45Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/success-with-malformed-json.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Mon, 22 Dec 2014 14:16:12 GMT 4 | Content-Type: text/html 5 | Connection: close 6 | 7 | 8 | 200 OK 9 | 10 |

200 OK

11 |
nginx
12 | 13 | 14 | -------------------------------------------------------------------------------- /spec/fixtures.http/transferDomain/error-indnsimple.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 400 Bad Request 2 | Server: nginx 3 | Date: Sun, 21 Feb 2016 13:11:54 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 400 Bad Request 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3996 9 | X-RateLimit-Reset: 1456063541 10 | Cache-Control: no-cache 11 | X-Request-Id: 15d2e302-e835-4dda-9652-03d8962280ae 12 | X-Runtime: 0.994068 13 | 14 | {"message":"The domain google.com is already in DNSimple and cannot be added"} -------------------------------------------------------------------------------- /spec/fixtures.http/transferDomain/error-missing-authcode.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 400 Bad Request 2 | Server: nginx 3 | Date: Sun, 21 Feb 2016 13:11:11 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 400 Bad Request 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3997 9 | X-RateLimit-Reset: 1456063540 10 | Cache-Control: no-cache 11 | X-Request-Id: d7a0eb63-77eb-4488-bc55-c129ed8fe192 12 | X-Runtime: 11.912567 13 | 14 | {"message":"Validation failed","errors":{"base":["You must provide an authorization code for the domain"]}} -------------------------------------------------------------------------------- /spec/fixtures.http/transferDomain/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Server: nginx 3 | Date: Fri, 09 Dec 2016 19:43:43 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2395 8 | X-RateLimit-Reset: 1481315246 9 | ETag: W/"e58e7ac3ad9e30162c5098f29f208066" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 0d00c622-9fc8-406a-93cb-d2c5d6ecd6b4 12 | X-Runtime: 6.483160 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":1,"domain_id":999,"registrant_id":2,"state":"transferring","auto_renew":false,"whois_privacy":false,"created_at":"2016-12-09T19:43:41Z","updated_at":"2016-12-09T19:43:43Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/unapplyService/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Server: nginx 3 | Date: Sat, 09 Jul 2016 11:13:48 GMT 4 | Connection: keep-alive 5 | X-RateLimit-Limit: 2400 6 | X-RateLimit-Remaining: 2397 7 | X-RateLimit-Reset: 1468066326 8 | Cache-Control: no-cache 9 | X-Request-Id: bb164b01-636a-4d02-acb5-a829afc5ea8c 10 | X-Runtime: 0.070508 11 | X-Content-Type-Options: nosniff 12 | X-Download-Options: noopen 13 | X-Frame-Options: DENY 14 | X-Permitted-Cross-Domain-Policies: none 15 | X-XSS-Protection: 1; mode=block 16 | Strict-Transport-Security: max-age=31536000 17 | 18 | -------------------------------------------------------------------------------- /spec/fixtures.http/unlinkPrimaryServer/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Wed, 17 Mar 2021 23:36:43 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2383 8 | X-RateLimit-Reset: 1616024599 9 | ETag: W/"ceda02163217bdb9e6850e2c36cbf163" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 789c6feb-63e1-40d6-b2b6-f569b23a507c 12 | X-Runtime: 0.270968 13 | X-Frame-Options: DENY 14 | X-Content-Type-Options: nosniff 15 | X-XSS-Protection: 1; mode=block 16 | X-Download-Options: noopen 17 | X-Permitted-Cross-Domain-Policies: none 18 | Content-Security-Policy: frame-ancestors 'none' 19 | Strict-Transport-Security: max-age=31536000 20 | 21 | {"data":{"id":4,"account_id":531,"name":"PrimaryProduction","ip":"1.2.3.4","port":53,"linked_secondary_zones":[],"created_at":"2021-03-17T23:08:42Z","updated_at":"2021-03-17T23:08:42Z"}} -------------------------------------------------------------------------------- /spec/fixtures.http/updateContact/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Tue, 19 Jan 2016 21:28:13 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 4000 8 | X-RateLimit-Remaining: 3995 9 | X-RateLimit-Reset: 1453239045 10 | ETag: W/"4a798ad8f083076b23d3eed622eefc2d" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: c0e1e24f-d22d-4832-a30e-2f4ffc40b029 13 | X-Runtime: 0.053262 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"id":1,"account_id":1010,"label":"Default","first_name":"First","last_name":"User","job_title":"CEO","organization_name":"Awesome Company","email":"first@example.com","phone":"+18001234567","fax":"+18011234567","address1":"Italian Street, 10","address2":"","city":"Roma","state_province":"RM","postal_code":"00100","country":"IT","created_at":"2016-01-19T20:50:26Z","updated_at":"2016-01-19T20:50:26Z"}} 17 | -------------------------------------------------------------------------------- /spec/fixtures.http/updateTemplate/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Thu, 24 Mar 2016 11:04:55 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | Status: 200 OK 7 | X-RateLimit-Limit: 2400 8 | X-RateLimit-Remaining: 2398 9 | X-RateLimit-Reset: 1458821048 10 | ETag: W/"6a2c0c6789d853473765a5fc5662da2e" 11 | Cache-Control: max-age=0, private, must-revalidate 12 | X-Request-Id: 3a7993e7-8b1e-47ce-a7a8-cc86b02904de 13 | X-Runtime: 0.324954 14 | Strict-Transport-Security: max-age=31536000 15 | 16 | {"data":{"id":1,"account_id":1010,"name":"Alpha","sid":"alpha","description":"An alpha template.","created_at":"2016-03-22T11:08:58Z","updated_at":"2016-03-22T11:08:58Z"}} -------------------------------------------------------------------------------- /spec/fixtures.http/updateZoneRecord/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Wed, 05 Oct 2016 09:59:48 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2393 8 | X-RateLimit-Reset: 1475662530 9 | ETag: W/"92c807156882e555af8f7a5b93350e44" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 3b630702-46a9-4449-a320-b7ac903d2127 12 | X-Runtime: 0.405810 13 | X-Content-Type-Options: nosniff 14 | X-Download-Options: noopen 15 | X-Frame-Options: DENY 16 | X-Permitted-Cross-Domain-Policies: none 17 | X-XSS-Protection: 1; mode=block 18 | Strict-Transport-Security: max-age=31536000 19 | 20 | {"data":{"id":5,"zone_id":"example.com","parent_id":null,"name":"","content":"mxb.example.com","ttl":3600,"priority":20,"type":"MX","regions":["global"],"system_record":false,"created_at":"2016-10-05T09:51:35Z","updated_at":"2016-10-05T09:51:35Z"}} 21 | -------------------------------------------------------------------------------- /spec/fixtures.http/validation-error.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 400 Bad Request 2 | Server: nginx 3 | Date: Wed, 23 Nov 2016 08:12:57 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 2400 7 | X-RateLimit-Remaining: 2396 8 | X-RateLimit-Reset: 1479892333 9 | Cache-Control: no-cache 10 | X-Request-Id: 91dcf81b-5df4-4d45-b37e-446f0c422a27 11 | X-Runtime: 0.062556 12 | X-Content-Type-Options: nosniff 13 | X-Download-Options: noopen 14 | X-Frame-Options: DENY 15 | X-Permitted-Cross-Domain-Policies: none 16 | X-XSS-Protection: 1; mode=block 17 | 18 | {"message":"Validation failed","errors":{"address1":["can't be blank"],"city":["can't be blank"],"country":["can't be blank"],"email":["can't be blank","is an invalid email address"],"first_name":["can't be blank"],"last_name":["can't be blank"],"phone":["can't be blank","is probably not a phone number"],"postal_code":["can't be blank"],"state_province":["can't be blank"]}} 19 | -------------------------------------------------------------------------------- /spec/fixtures.http/whoami/success-account.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Fri, 18 Dec 2015 15:19:37 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 4000 7 | X-RateLimit-Remaining: 3991 8 | X-RateLimit-Reset: 1450451976 9 | ETag: W/"5ea6326bc1a8e83e5c156c564f2559f0" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 15a7f3a5-7ee5-4e36-ac5a-8c21c2e1fffd 12 | X-Runtime: 0.141588 13 | Strict-Transport-Security: max-age=31536000 14 | 15 | {"data":{"user":null,"account":{"id":1,"email":"example-account@example.com","plan_identifier":"dnsimple-professional","created_at":"2015-09-18T23:04:37Z","updated_at":"2016-06-09T20:03:39Z"}}} 16 | -------------------------------------------------------------------------------- /spec/fixtures.http/whoami/success-user.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Fri, 18 Dec 2015 15:19:37 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 4000 7 | X-RateLimit-Remaining: 3991 8 | X-RateLimit-Reset: 1450451976 9 | ETag: W/"5ea6326bc1a8e83e5c156c564f2559f0" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 15a7f3a5-7ee5-4e36-ac5a-8c21c2e1fffd 12 | X-Runtime: 0.141588 13 | Strict-Transport-Security: max-age=31536000 14 | 15 | {"data":{"user":{"id":1,"email":"example-user@example.com","created_at":"2015-09-18T23:04:37Z","updated_at":"2016-06-09T20:03:39Z"},"account":null}} 16 | -------------------------------------------------------------------------------- /spec/fixtures.http/whoami/success.http: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Server: nginx 3 | Date: Fri, 18 Dec 2015 15:19:37 GMT 4 | Content-Type: application/json; charset=utf-8 5 | Connection: keep-alive 6 | X-RateLimit-Limit: 4000 7 | X-RateLimit-Remaining: 3991 8 | X-RateLimit-Reset: 1450451976 9 | ETag: W/"5ea6326bc1a8e83e5c156c564f2559f0" 10 | Cache-Control: max-age=0, private, must-revalidate 11 | X-Request-Id: 15a7f3a5-7ee5-4e36-ac5a-8c21c2e1fffd 12 | X-Runtime: 0.141588 13 | Strict-Transport-Security: max-age=31536000 14 | 15 | {"data":{"user":null,"account":{"id":1,"email":"example-account@example.com","plan_identifier":"dnsimple-professional","created_at":"2015-09-18T23:04:37Z","updated_at":"2016-06-09T20:03:39Z"}}} 16 | -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rspec' 4 | 5 | if ENV['COVERALL'] 6 | require 'coveralls' 7 | Coveralls.wear! 8 | end 9 | 10 | $:.unshift("#{File.dirname(__FILE__)}/lib") 11 | require 'dnsimple' 12 | 13 | unless defined?(SPEC_ROOT) 14 | SPEC_ROOT = File.expand_path(__dir__) 15 | end 16 | 17 | Dir[File.join(SPEC_ROOT, "support/**/*.rb")].each { |f| require f } 18 | -------------------------------------------------------------------------------- /spec/support/helpers.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module RSpecSupportHelpers 4 | 5 | def http_fixture(*names) 6 | File.join(SPEC_ROOT, "fixtures.http", *names) 7 | end 8 | 9 | def read_http_fixture(*names) 10 | File.read(http_fixture(*names)) 11 | end 12 | 13 | end 14 | 15 | RSpec.configure do |config| 16 | config.include RSpecSupportHelpers 17 | end 18 | -------------------------------------------------------------------------------- /spec/support/webmock.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'webmock/rspec' 4 | 5 | RSpec.configure do |config| 6 | config.before(:suite) do 7 | WebMock.disable_net_connect! 8 | end 9 | 10 | config.after(:suite) do 11 | WebMock.allow_net_connect! 12 | end 13 | end 14 | --------------------------------------------------------------------------------