Account Internal Hourly Rate

class moco_wrapper.models.AccountInternalHourlyRate(moco)

Model for working with the internal rates of the account

static endpoints() → List[moco_wrapper.util.endpoint.endpoint.Endpoint]

Returns all endpoints associated with the model

Returns:List of Endpoint objects
Return type:moco_wrapper.util.endpoint.Endpoint
get(years: Union[int, List[int]] = None, unit_id: int = None)

Retrieve internal hourly rates

Parameters:
  • years (int, list) – Single year or list of years
  • unit_id (int) – Id of the unit
Returns:

List of internal rates

Return type:

moco_wrapper.util.response.ListResponse

update(year: int, rates: List[dict])

Update internal rates

Parameters:
  • year (int) – Year to update the internal rates for
  • rates (list) – List of rate objects (each object containing user_id and a rate)
Returns:

Status message on success (can be ignored)

Return type:

moco_wrapper.util.response.ObjectResponse

Note

For generating items see moco_wrapper.util.generator.AccountInternalRateItemGenerator

Note

On success the dictionary { “status”: “ok” } will be returned. The response can safely be ignored.