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 @api.cloud.delete @url end def purge_varnish @api.cloud.delete "#{@url}/cache" end end end end