require 'acquia/cloud/entity' module Acquia class Cloud class Domain < Entity def initialize(cloud, site, env, domain) @cloud = cloud @site = site @env = env @data = domain @url = "/sites/#{@site}/envs/#{env}/domains/#{@data['name']}" end def name data['name'] end def delete @cloud.api.delete @url end def purge_varnish @cloud.api.delete "#{@url}/cache" end end end end