require 'acquia/cloud/entity' module Acquia class Cloud class Domain < Entity include Operations::Delete 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 purge_varnish! @cloud.api.delete "#{@url}/cache" end end end end