Sha256: 57585031c2146bee1290b75609d7b520defebe186738d0c4f5bde1e0585b5151

Contents?: true

Size: 772 Bytes

Versions: 30

Compression:

Stored size: 772 Bytes

Contents

module Fog
  module DNS
    class DNSimple
      class Real
        # Delete the record with the given ID for the given domain.
        #
        # ==== Parameters
        # * domain<~String> - domain name or numeric ID
        # * record_id<~String>
        def delete_record(domain, record_id)
          request(
            :expects  => 200,
            :method   => "DELETE",
            :path     => "/domains/#{domain}/records/#{record_id}"
          )
        end
      end

      class Mock
        def delete_record(domain, record_id)
          self.data[:records][domain].reject! { |record| record["record"]["id"] == record_id }

          response = Excon::Response.new
          response.status = 200
          response
        end
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 4 rubygems

Version Path
fog-1.38.0 lib/fog/dnsimple/requests/dns/delete_record.rb
fog-1.37.0 lib/fog/dnsimple/requests/dns/delete_record.rb
fog-1.36.0 lib/fog/dnsimple/requests/dns/delete_record.rb
fog-1.35.0 lib/fog/dnsimple/requests/dns/delete_record.rb
fog-2.0.0.pre.0 lib/fog/dnsimple/requests/dns/delete_record.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/dnsimple/requests/dns/delete_record.rb
fog-1.34.0 lib/fog/dnsimple/requests/dns/delete_record.rb
fog-1.33.0 lib/fog/dnsimple/requests/dns/delete_record.rb
fog-1.32.0 lib/fog/dnsimple/requests/dns/delete_record.rb
fog-1.31.0 lib/fog/dnsimple/requests/dns/delete_record.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/dnsimple/requests/dns/delete_record.rb
fog-1.30.0 lib/fog/dnsimple/requests/dns/delete_record.rb
fog-1.29.0 lib/fog/dnsimple/requests/dns/delete_record.rb
fog-1.28.0 lib/fog/dnsimple/requests/dns/delete_record.rb
fog-1.27.0 lib/fog/dnsimple/requests/dns/delete_record.rb
fog-1.26.0 lib/fog/dnsimple/requests/dns/delete_record.rb
fog-1.25.0 lib/fog/dnsimple/requests/dns/delete_record.rb
nsidc-fog-1.24.1 lib/fog/dnsimple/requests/dns/delete_record.rb
fog-1.24.0 lib/fog/dnsimple/requests/dns/delete_record.rb
ns-fog-1.22.11 lib/fog/dnsimple/requests/dns/delete_record.rb