Class: TerraformEnterprise::API::Organizations

Inherits:
ResourceRequest show all
Defined in:
lib/terraform_enterprise/api/resource_requests/organizations.rb

Overview

Organization resource request

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



15
16
17
18
19
20
21
22
# File 'lib/terraform_enterprise/api/resource_requests/organizations.rb', line 15

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

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

#delete(params = {}) ⇒ Object



24
25
26
# File 'lib/terraform_enterprise/api/resource_requests/organizations.rb', line 24

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

#get(params = {}) ⇒ Object



11
12
13
# File 'lib/terraform_enterprise/api/resource_requests/organizations.rb', line 11

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

#listObject



7
8
9
# File 'lib/terraform_enterprise/api/resource_requests/organizations.rb', line 7

def list
  @request.get(:organizations)
end