Class: TerraformEnterprise::API::Organizations

Inherits:
ResourceRequest show all
Defined in:
lib/terraform-enterprise/resource_requests/organizations.rb

Instance Method Summary collapse

Methods inherited from ResourceRequest

#initialize

Constructor Details

This class inherits a constructor from TerraformEnterprise::API::ResourceRequest

Instance Method Details

#create(params = {}) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/terraform-enterprise/resource_requests/organizations.rb', line 14

def create(params={})
  data = {
    attributes: params,
    type: 'organizations'
  }

  @request.post(:organizations, data: data)
end

#delete(params = {}) ⇒ Object



23
24
25
# File 'lib/terraform-enterprise/resource_requests/organizations.rb', line 23

def delete(params={})
  @request.delete(:organizations, params[:name])
end

#get(params = {}) ⇒ Object



10
11
12
# File 'lib/terraform-enterprise/resource_requests/organizations.rb', line 10

def get(params={})
  @request.get(:organizations, params[:name])
end

#list(params = {}) ⇒ Object



6
7
8
# File 'lib/terraform-enterprise/resource_requests/organizations.rb', line 6

def list(params={})
  @request.get(:organizations)
end