Class: Openlayer::Resources::Workspaces
- Inherits:
-
Object
- Object
- Openlayer::Resources::Workspaces
- Defined in:
- lib/openlayer/resources/workspaces.rb,
lib/openlayer/resources/workspaces/invites.rb,
lib/openlayer/resources/workspaces/api_keys.rb
Defined Under Namespace
Instance Attribute Summary collapse
- #api_keys ⇒ Openlayer::Resources::Workspaces::APIKeys readonly
- #invites ⇒ Openlayer::Resources::Workspaces::Invites readonly
Instance Method Summary collapse
-
#initialize(client:) ⇒ Workspaces
constructor
private
A new instance of Workspaces.
-
#retrieve(workspace_id, request_options: {}) ⇒ Openlayer::Models::WorkspaceRetrieveResponse
Retrieve a workspace by its ID.
-
#update(workspace_id, invite_code: nil, name: nil, slug: nil, request_options: {}) ⇒ Openlayer::Models::WorkspaceUpdateResponse
Update a workspace.
Constructor Details
#initialize(client:) ⇒ Workspaces
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 Workspaces.
63 64 65 66 67 |
# File 'lib/openlayer/resources/workspaces.rb', line 63 def initialize(client:) @client = client @invites = Openlayer::Resources::Workspaces::Invites.new(client: client) @api_keys = Openlayer::Resources::Workspaces::APIKeys.new(client: client) end |
Instance Attribute Details
#api_keys ⇒ Openlayer::Resources::Workspaces::APIKeys (readonly)
10 11 12 |
# File 'lib/openlayer/resources/workspaces.rb', line 10 def api_keys @api_keys end |
#invites ⇒ Openlayer::Resources::Workspaces::Invites (readonly)
7 8 9 |
# File 'lib/openlayer/resources/workspaces.rb', line 7 def invites @invites end |
Instance Method Details
#retrieve(workspace_id, request_options: {}) ⇒ Openlayer::Models::WorkspaceRetrieveResponse
Retrieve a workspace by its ID.
23 24 25 26 27 28 29 30 |
# File 'lib/openlayer/resources/workspaces.rb', line 23 def retrieve(workspace_id, params = {}) @client.request( method: :get, path: ["workspaces/%1$s", workspace_id], model: Openlayer::Models::WorkspaceRetrieveResponse, options: params[:request_options] ) end |
#update(workspace_id, invite_code: nil, name: nil, slug: nil, request_options: {}) ⇒ Openlayer::Models::WorkspaceUpdateResponse
Update a workspace.
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/openlayer/resources/workspaces.rb', line 49 def update(workspace_id, params = {}) parsed, = Openlayer::WorkspaceUpdateParams.dump_request(params) @client.request( method: :put, path: ["workspaces/%1$s", workspace_id], body: parsed, model: Openlayer::Models::WorkspaceUpdateResponse, options: ) end |