- get_all - Get organizations for a user
- create - Create an organization
- get - Get organization
- create_free_trial - Create a free trial for an organization
- get_usage - Get billing usage summary for a particular organization
Returns a list of organizations a user has access too
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.organizations.get_all()
if ! res.organizations.nil?
# handle response
end
T.nilable(::OpenApiSDK::Operations::GetOrganizationsResponse)
Creates an organization
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
req = ::OpenApiSDK::Shared::Organization.new(
id: "<id>",
name: "<value>",
slug: "<value>",
account_type: ::OpenApiSDK::Shared::AccountType::SCALE_UP,
telemetry_disabled: false,
created_at: DateTime.iso8601('2023-12-01T17:06:07.804Z'),
updated_at: DateTime.iso8601('2023-04-03T12:48:32.253Z'),
)
res = s.organizations.create(req)
if ! res.organization.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
request |
::OpenApiSDK::Shared::Organization | ✔️ | The request object to use for the request. |
T.nilable(::OpenApiSDK::Operations::CreateOrganizationResponse)
Get information about a particular organization.
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.organizations.get(organization_id="<id>")
if ! res.organization.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
organization_id |
::String | ✔️ | Unique identifier of the organization. |
T.nilable(::OpenApiSDK::Operations::GetOrganizationResponse)
Creates a free trial for an organization
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.organizations.create_free_trial()
if res.status_code == 200
# handle response
end
T.nilable(::OpenApiSDK::Operations::CreateFreeTrialResponse)
Returns a billing usage summary by target languages for a particular organization
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.organizations.get_usage()
if ! res.organization_usage_response.nil?
# handle response
end
T.nilable(::OpenApiSDK::Operations::GetOrganizationUsageResponse)