class Seatsio::WorkspacesClient
def activate(key:)
def activate(key:) @http_client.post("workspaces/#{key}/actions/activate") end
def active(filter: nil)
def active(filter: nil) extended_cursor = Pagination::Cursor.new(Workspace, 'workspaces/active', @http_client) extended_cursor.set_query_param('filter', filter) extended_cursor end
def create(name:, is_test: nil)
def create(name:, is_test: nil) body = {} body['name'] = name body['isTest'] = is_test if is_test response = @http_client.post("workspaces", body) Workspace.new(response) end
def cursor()
def cursor() Pagination::Cursor.new(Workspace, 'workspaces', @http_client) end
def deactivate(key:)
def deactivate(key:) @http_client.post("workspaces/#{key}/actions/deactivate") end
def inactive(filter: nil)
def inactive(filter: nil) extended_cursor = Pagination::Cursor.new(Workspace, 'workspaces/inactive', @http_client) extended_cursor.set_query_param('filter', filter) extended_cursor end
def initialize(http_client)
def initialize(http_client) @http_client = http_client end
def list(filter: nil)
def list(filter: nil) extended_cursor = cursor extended_cursor.set_query_param('filter', filter) extended_cursor end
def regenerate_secret_key(key:)
def regenerate_secret_key(key:) response = @http_client.post("workspaces/#{key}/actions/regenerate-secret-key") response['secretKey'] end
def retrieve(key:)
def retrieve(key:) response = @http_client.get("/workspaces/#{key}") Workspace.new(response) end
def set_default(key:)
def set_default(key:) @http_client.post("workspaces/actions/set-default/#{key}") end
def update(key:, name:)
def update(key:, name:) body = {} body['name'] = name @http_client.post("workspaces/#{key}", body) end