def update_by_id( self, id: str, version: int, actions: List[types.TaxCategoryUpdateAction] ) -> types.TaxCategory: update_action = types.TaxCategoryUpdate(version=version, actions=actions) return self._client._post( f"tax-categories/{id}", {}, update_action, schemas.TaxCategoryUpdateSchema, schemas.TaxCategorySchema, )
def update_by_id( self, id: str, version: int, actions: List[types.TaxCategoryUpdateAction], *, force_update: bool = False, ) -> types.TaxCategory: update_action = types.TaxCategoryUpdate(version=version, actions=actions) return self._client._post( endpoint=f"tax-categories/{id}", params={}, data_object=update_action, request_schema_cls=schemas.TaxCategoryUpdateSchema, response_schema_cls=schemas.TaxCategorySchema, force_update=force_update, )
def post_load(self, data, **kwargs): return types.TaxCategoryUpdate(**data)