Class: MOCO::TaskTemplate
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- MOCO::TaskTemplate
- Defined in:
- lib/moco/entities/task_template.rb
Overview
Represents a MOCO task template (Standardleistungen) Pre-defined task types for projects
Required attributes for create:
name - String, task name (e.g., "Development", "Design")
Optional attributes:
description - String, task description
revenue_category_id - Integer, revenue category for invoicing
billable - Boolean, whether tasks are billable by default
project_default - Boolean, auto-add to new projects
index - Integer, display order (e.g., 10, 20, 30)
Read-only attributes:
id, revenue_category (Hash), created_at, updated_at
Example:
moco.task_templates.create(
name: "Backend Development",
description: "Server-side programming",
billable: true,
project_default: true,
index: 10
)
Instance Attribute Summary
Attributes inherited from BaseEntity
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from BaseEntity
#==, #association, #destroy, #eql?, #has_many, #hash, #id, #initialize, #inspect, #reload, #save, #to_h, #to_json, #update
Constructor Details
This class inherits a constructor from MOCO::BaseEntity
Class Method Details
.entity_path ⇒ Object
30 31 32 |
# File 'lib/moco/entities/task_template.rb', line 30 def self.entity_path "account/task_templates" end |
Instance Method Details
#to_s ⇒ Object
34 35 36 |
# File 'lib/moco/entities/task_template.rb', line 34 def to_s name.to_s end |