Conditions | 1 |
Total Lines | 14 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | """ |
||
39 | def _build_order_invoice_created_log_entry( |
||
40 | invoice: Invoice, initiator: User |
||
41 | ) -> OrderLogEntry: |
||
42 | data = { |
||
43 | 'initiator_id': str(initiator.id), |
||
44 | 'invoice_number': invoice.number, |
||
45 | } |
||
46 | |||
47 | return OrderLogEntry( |
||
48 | id=generate_uuid7(), |
||
49 | occurred_at=datetime.utcnow(), |
||
50 | event_type='order-invoice-created', |
||
51 | order_id=invoice.order_id, |
||
52 | data=data, |
||
53 | ) |
||
54 |