Sha256: 6c5954a5b6320e948a0d802b4854044780c2d552a13094d3cab5aa25defff5c2

Contents?: true

Size: 1.29 KB

Versions: 2

Compression:

Stored size: 1.29 KB

Contents

# frozen_string_literal: true

module Seam
  module Clients
    class Workspaces < BaseClient
      def create(connect_partner_name:, name:, is_sandbox: nil, webview_logo_shape: nil, webview_primary_button_color: nil)
        request_seam_object(
          :post,
          "/workspaces/create",
          Seam::Workspace,
          "workspace",
          body: {connect_partner_name: connect_partner_name, name: name, is_sandbox: is_sandbox, webview_logo_shape: webview_logo_shape, webview_primary_button_color: webview_primary_button_color}.compact
        )
      end

      def get
        request_seam_object(
          :post,
          "/workspaces/get",
          Seam::Workspace,
          "workspace",
          body: {}.compact
        )
      end

      def list
        request_seam_object(
          :post,
          "/workspaces/list",
          Seam::Workspace,
          "workspaces",
          body: {}.compact
        )
      end

      def reset_sandbox(wait_for_action_attempt: nil)
        action_attempt = request_seam_object(
          :post,
          "/workspaces/reset_sandbox",
          Seam::ActionAttempt,
          "action_attempt",
          body: {}.compact
        )

        action_attempt.decide_and_wait(wait_for_action_attempt)
        action_attempt
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
seam-2.0.0a2 lib/seam/clients/workspaces.rb
seam-2.0.0.prerelease.1 lib/seam/clients/workspaces.rb