Class: Infrawrench::OrgsNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs

Overview

client.orgs

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ OrgsNamespace

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of OrgsNamespace.

Parameters:



1893
1894
1895
# File 'lib/infrawrench/client.rb', line 1893

def initialize(transport)
  @transport = transport
end

Instance Method Details

#create(body:, request_options: nil) ⇒ Hash

Create a new organization

The caller becomes the owner of the new organization.

POST /api/orgs

Raises on 400: Bad request

Raises on 401: Unauthenticated

Parameters:

  • body (Hash)

    Request body, shaped as CreateOrgRequest.

  • request_options (Hash, nil) (defaults to: nil)

    Per-call :headers, :timeout and :open_timeout.

  • body: (create_org_request)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

    Parsed JSON, shaped as Organization — see sig/infrawrench/sdk.rbs.

Raises:



1911
1912
1913
1914
1915
1916
1917
1918
# File 'lib/infrawrench/client.rb', line 1911

def create(body:, request_options: nil)
  @transport.request(
    http_method: "POST",
    path: "/api/orgs",
    body: body,
    request_options: request_options
  )
end