def _create_line_item_text_from_draft( self, text_line_item_draft: types.TextLineItemDraft ) -> types.TextLineItem: return types.TextLineItem( id=str(uuid.uuid4()), added_at=datetime.datetime.now(datetime.timezone.utc), custom=utils.create_from_draft(text_line_item_draft.custom), description=text_line_item_draft.description, name=text_line_item_draft.name, quantity=text_line_item_draft.quantity, )
def post_load(self, data, **kwargs): return types.TextLineItem(**data)