Commit 26724264 authored by Jo Sama's avatar Jo Sama 😱
Browse files

Add support to fetch partial arbeidsordre

parent b0d1ce2d
Pipeline #48749 failed with stage
in 2 minutes and 5 seconds
......@@ -533,6 +533,29 @@ class UBWClient:
r = self.get(url, headers=headers)
return [models.Arbeidsordre.from_dict(x) for x in r]
def get_partial_arbeidsordrer(self, company_id: str) -> typing.List[models.PartialArbeidsordre]:
url = self.urls.get_arbeidsordre(company_id)
headers =
r = self.get(url,
'select': ','.join(
return [models.PartialArbeidsordre.from_dict(x) for x in r]
def get_perioder(
company_id: str,
......@@ -631,6 +631,26 @@ class CustomerInformation(BaseModel):
allow_population_by_field_name = True
class PartialArbeidsordre(BaseModel):
company_id: str
work_order_id: str
date_from: str
date_to: str
period_from: str
period_to: str
status: str
project_id: str
work_order_name: str
cost_centre: str
project_manager_id: str
category1: str
last_updated: UpdatedInfo
class Config:
alias_generator = to_lower_camel
allow_population_by_field_name = True
class Arbeidsordre(BaseModel):
company_id: str
work_order_id: str
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment