[Invoices] - Implement CRUD Operations to Pass Tests #118

Closed
opened 2025-11-05 20:38:13 +00:00 by duarteneves5 · 0 comments
duarteneves5 commented 2025-11-05 20:38:13 +00:00 (Migrated from github.com)

Fill in the logic for the interface methods created in the first sub-issue until all tests written in the second sub-issue pass.

Tasks:

  • Implement create_invoice (using Vehicle(**data).save()).
  • Implement get_invoice_by_id (using Vehicle.get()).
  • Implement get_invoices_by_client_id (using Invoice.find(Invoice.client_id == ...).to_list()).
  • Implement get_invoices_by_workOrder_id (using Invoice.find(Invoice.workOrder_Id == ...).to_list()).
  • Implement update_invoice (finding the invoice, applying updates, and saving).
  • Implement delete_invoice (finding the invoice and calling delete()).
  • Run pytest and confirm all tests now pass.
Fill in the logic for the interface methods created in the first sub-issue until all tests written in the second sub-issue pass. **Tasks:** - [ ] Implement `create_invoice` (using `Vehicle(**data).save()`). - [ ] Implement `get_invoice_by_id` (using `Vehicle.get()`). - [ ] Implement `get_invoices_by_client_id` (using `Invoice.find(Invoice.client_id == ...).to_list()`). - [ ] Implement `get_invoices_by_workOrder_id` (using `Invoice.find(Invoice.workOrder_Id == ...).to_list()`). - [ ] Implement `update_invoice` (finding the invoice, applying updates, and saving). - [ ] Implement `delete_invoice` (finding the invoice and calling `delete()`). - [ ] Run `pytest` and confirm all tests now pass.
Sign in to join this conversation.
No description provided.