Class: Basecamp::Services::WormholesService
- Inherits:
-
BaseService
- Object
- BaseService
- Basecamp::Services::WormholesService
- Defined in:
- lib/basecamp/generated/services/wormholes_service.rb
Overview
Service for Wormholes operations
Instance Method Summary collapse
-
#create(bucket_id:, card_table_id:, destination_recording_id:) ⇒ Hash
Create a wormhole linking this card table to a column on another card table.
-
#delete(bucket_id:, wormhole_id:) ⇒ void
Delete a wormhole.
-
#update(bucket_id:, wormhole_id:, destination_recording_id:) ⇒ Hash
Update a wormhole's destination column.
Constructor Details
This class inherits a constructor from Basecamp::Services::BaseService
Instance Method Details
#create(bucket_id:, card_table_id:, destination_recording_id:) ⇒ Hash
Create a wormhole linking this card table to a column on another card table.
37 38 39 40 41 |
# File 'lib/basecamp/generated/services/wormholes_service.rb', line 37 def create(bucket_id:, card_table_id:, destination_recording_id:) with_operation(service: "wormholes", operation: "create", is_mutation: true, project_id: bucket_id, resource_id: card_table_id) do http_post("/buckets/#{bucket_id}/card_tables/#{card_table_id}/wormholes.json", body: compact_params(destination_recording_id: destination_recording_id)).json end end |
#delete(bucket_id:, wormhole_id:) ⇒ void
This method returns an undefined value.
Delete a wormhole
25 26 27 28 29 30 |
# File 'lib/basecamp/generated/services/wormholes_service.rb', line 25 def delete(bucket_id:, wormhole_id:) with_operation(service: "wormholes", operation: "delete", is_mutation: true, project_id: bucket_id, resource_id: wormhole_id) do http_delete("/buckets/#{bucket_id}/card_tables/wormholes/#{wormhole_id}") nil end end |
#update(bucket_id:, wormhole_id:, destination_recording_id:) ⇒ Hash
Update a wormhole's destination column
15 16 17 18 19 |
# File 'lib/basecamp/generated/services/wormholes_service.rb', line 15 def update(bucket_id:, wormhole_id:, destination_recording_id:) with_operation(service: "wormholes", operation: "update", is_mutation: true, project_id: bucket_id, resource_id: wormhole_id) do http_put("/buckets/#{bucket_id}/card_tables/wormholes/#{wormhole_id}", body: compact_params(destination_recording_id: destination_recording_id)).json end end |