Skip to content

Commit

Permalink
Use only ZoneDistribution
Browse files Browse the repository at this point in the history
  • Loading branch information
jodosha committed Jul 19, 2018
1 parent f53541d commit b1ee738
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
4 changes: 2 additions & 2 deletions lib/dnsimple/client/zones_distributions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ def zone_distribution(account_id, zone_id, options = {})
# @param [String] zone_id the zone name
# @param [Integer] record_id the record ID
# @param [Hash] options
# @return [Dnsimple::Response<Dnsimple::Struct::ZoneRecordDistribution>]
# @return [Dnsimple::Response<Dnsimple::Struct::ZoneDistribution>]
#
# @raise [Dnsimple::NotFoundError]
# @raise [Dnsimple::RequestError]
def zone_record_distribution(account_id, zone_id, record_id, options = {})
response = client.get(Client.versioned("/%s/zones/%s/records/%s/distribution" % [account_id, zone_id, record_id]), options)

Dnsimple::Response.new(response, Struct::ZoneRecordDistribution.new(response["data"]))
Dnsimple::Response.new(response, Struct::ZoneDistribution.new(response["data"]))
end

end
Expand Down
1 change: 0 additions & 1 deletion lib/dnsimple/struct.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,5 @@ def initialize(attributes = {})
require_relative 'struct/zone'
require_relative 'struct/zone_file'
require_relative 'struct/zone_distribution'
require_relative 'struct/zone_record_distribution'
require_relative 'struct/webhook'
require_relative 'struct/whoami'
11 changes: 0 additions & 11 deletions lib/dnsimple/struct/zone_record_distribution.rb

This file was deleted.

4 changes: 2 additions & 2 deletions spec/dnsimple/client/zones_distributions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
expect(response).to be_a(Dnsimple::Response)

result = response.data
expect(result).to be_a(Dnsimple::Struct::ZoneRecordDistribution)
expect(result).to be_a(Dnsimple::Struct::ZoneDistribution)
expect(result.distributed).to be(true)
end

Expand All @@ -96,7 +96,7 @@
expect(response).to be_a(Dnsimple::Response)

result = response.data
expect(result).to be_a(Dnsimple::Struct::ZoneRecordDistribution)
expect(result).to be_a(Dnsimple::Struct::ZoneDistribution)
expect(result.distributed).to be(false)
end

Expand Down

0 comments on commit b1ee738

Please sign in to comment.