Sha256: 729ef8e018984bb6d27d0febc05cab64fcc68dd92785c953a096864cdab3b8cb

Contents?: true

Size: 672 Bytes

Versions: 7

Compression:

Stored size: 672 Bytes

Contents

module Fog
  module DNSimple
    class DNS
      class Real

        # Create a single domain in DNSimple in your account.
        # ==== Parameters
        # * name<~String> - domain name to host (ie example.com)
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'name'<~String>
        def create_domain(name)
          body = { "domain" => { "name" => name } }
          request(
                  :body     => body.to_json,
                  :expects  => 201,
                  :method   => 'POST',
                  :path     => '/domains'
                  )
        end

      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fog-0.8.2 lib/fog/dns/requests/dnsimple/create_domain.rb
fog-0.8.1 lib/fog/dns/requests/dnsimple/create_domain.rb
fog-0.8.0 lib/fog/dns/requests/dnsimple/create_domain.rb
fog-0.7.2 lib/fog/dns/requests/dnsimple/create_domain.rb
fog-0.7.1 lib/fog/dns/requests/dnsimple/create_domain.rb
fog-0.7.0 lib/fog/dns/requests/dnsimple/create_domain.rb
fog-0.6.0 lib/fog/dns/requests/dnsimple/create_domain.rb