Class: MOCO::HourlyRate
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- MOCO::HourlyRate
- Defined in:
- lib/moco/entities/hourly_rate.rb
Overview
Represents MOCO hourly rates (Stundensätze) Read-only access to billing rates by task and user
Read-only structure:
defaults_rates - Array of default rates per currency
tasks - Array of tasks with their rates per currency
users - Array of users with their rates per currency
Rate format:
{ currency: "EUR", hourly_rate: 150.0 }
Filtering:
moco.hourly_rates.where(company_id: 123) # customer-specific rates
moco.hourly_rates.where(include_archived_users: true)
Note:
Hourly rates are configured in MOCO's admin interface.
This endpoint provides read-only access.
Without company_id, returns global default rates.
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
25 26 27 |
# File 'lib/moco/entities/hourly_rate.rb', line 25 def self.entity_path "account/hourly_rates" end |
Instance Method Details
#to_s ⇒ Object
29 30 31 |
# File 'lib/moco/entities/hourly_rate.rb', line 29 def to_s "#{name} - #{rate}" end |