Sha256: 7494aab5712ac132ccf0147987221147ef483273acc32c76c963a3c6b1b2fa8b

Contents?: true

Size: 1.11 KB

Versions: 7

Compression:

Stored size: 1.11 KB

Contents

module Fog
  module DNSimple
    class DNS
      class Real

        # Update the given record for the given domain.
        #
        # ==== Parameters
        # * domain<~String>
        # * record_id<~String>
        # * options<~Hash> - optional
        #   * type<~String>
        #   * content<~String>
        #   * priority<~Integer>
        #   * ttl<~Integer>
        # ==== Returns
        # * response<~Excon::Response>:
        #   * record<~Hash>
        #     * name<~String>
        #     * ttl<~Integer>
        #     * created_at<~String>
        #     * special_type<~String>
        #     * updated_at<~String>
        #     * domain_id<~Integer>
        #     * id<~Integer>
        #     * content<~String>
        #     * record_type<~String>
        #     * prio<~Integer>
        def update_record(domain, record_id, options)

          body = { "record" => options }

          request( :body     => body.to_json,
                   :expects  => 200,
                   :method   => "PUT",
                   :path     => "/domains/#{domain}/records/#{record_id}" )
        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/update_record.rb
fog-0.8.1 lib/fog/dns/requests/dnsimple/update_record.rb
fog-0.8.0 lib/fog/dns/requests/dnsimple/update_record.rb
fog-0.7.2 lib/fog/dns/requests/dnsimple/update_record.rb
fog-0.7.1 lib/fog/dns/requests/dnsimple/update_record.rb
fog-0.7.0 lib/fog/dns/requests/dnsimple/update_record.rb
fog-0.6.0 lib/fog/dns/requests/dnsimple/update_record.rb