Class: Basecamp::Services::GoogleDocumentsService
- Inherits:
-
BaseService
- Object
- BaseService
- Basecamp::Services::GoogleDocumentsService
- Defined in:
- lib/basecamp/generated/services/google_documents_service.rb
Overview
Service for GoogleDocuments operations
Instance Method Summary collapse
-
#create_google_document(bucket_id:, vault_id:, url:, document_type:, title: nil, description: nil, status: nil, subscriptions: nil, visible_to_clients: nil) ⇒ Hash
Create a new Google document in a vault.
-
#get_google_document(google_document_id:) ⇒ Hash
Get a single Google document by id.
-
#update_google_document(google_document_id:, url:, document_type:, title: nil, description: nil, status: nil, subscriptions: nil) ⇒ Hash
Replace a Google document with a new complete representation.
Constructor Details
This class inherits a constructor from Basecamp::Services::BaseService
Instance Method Details
#create_google_document(bucket_id:, vault_id:, url:, document_type:, title: nil, description: nil, status: nil, subscriptions: nil, visible_to_clients: nil) ⇒ Hash
Create a new Google document in a vault.
27 28 29 30 31 |
# File 'lib/basecamp/generated/services/google_documents_service.rb', line 27 def create_google_document(bucket_id:, vault_id:, url:, document_type:, title: nil, description: nil, status: nil, subscriptions: nil, visible_to_clients: nil) with_operation(service: "googledocuments", operation: "create_google_document", is_mutation: true, project_id: bucket_id, resource_id: vault_id) do http_post("/buckets/#{bucket_id}/vaults/#{vault_id}/google_documents.json", body: compact_params(url: url, document_type: document_type, title: title, description: description, status: status, subscriptions: subscriptions, visible_to_clients: visible_to_clients)).json end end |
#get_google_document(google_document_id:) ⇒ Hash
Get a single Google document by id
36 37 38 39 40 |
# File 'lib/basecamp/generated/services/google_documents_service.rb', line 36 def get_google_document(google_document_id:) with_operation(service: "googledocuments", operation: "get_google_document", is_mutation: false, resource_id: google_document_id) do http_get("/google_documents/#{google_document_id}", operation: "GetGoogleDocument").json end end |
#update_google_document(google_document_id:, url:, document_type:, title: nil, description: nil, status: nil, subscriptions: nil) ⇒ Hash
Replace a Google document with a new complete representation.
54 55 56 57 58 |
# File 'lib/basecamp/generated/services/google_documents_service.rb', line 54 def update_google_document(google_document_id:, url:, document_type:, title: nil, description: nil, status: nil, subscriptions: nil) with_operation(service: "googledocuments", operation: "update_google_document", is_mutation: true, resource_id: google_document_id) do http_put("/google_documents/#{google_document_id}", body: compact_params(url: url, document_type: document_type, title: title, description: description, status: status, subscriptions: subscriptions)).json end end |