From 882c61b23168bc5fdc0d3579d8b5ba00b195f958 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Mon, 10 Aug 2026 11:50:11 -0400 Subject: [PATCH] test(billing): add Slumber API spec and localhost env config --- localhost_3000.env | 2 ++ slumber.yml | 52 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 localhost_3000.env create mode 100644 slumber.yml diff --git a/localhost_3000.env b/localhost_3000.env new file mode 100644 index 0000000..3156943 --- /dev/null +++ b/localhost_3000.env @@ -0,0 +1,2 @@ +# Server URL: +BASE_URL=http://localhost:3000 diff --git a/slumber.yml b/slumber.yml new file mode 100644 index 0000000..41d82fd --- /dev/null +++ b/slumber.yml @@ -0,0 +1,52 @@ +name: monk-code-screen billing API +profiles: + http://localhost:3000: + name: http://localhost:3000 + data: + host: http://localhost:3000 +requests: + listCustomers: + name: List customers + method: GET + url: '{{ host }}/customers' + listCustomerInvoices: + name: List a customer's invoices + method: GET + url: '{{ host }}/customers/{{ id }}/invoices' + getHealth: + name: Liveness check + method: GET + url: '{{ host }}/health' + ingestCsv: + name: Ingest invoices from CSV + method: POST + url: '{{ host }}/ingest' + body: '"invoice_number,customer_name,customer_email,invoice_date,due_date,description,quantity,unit_price,amount,currency\nINV-1001,Acme Corp,billing@acme.com,2026-01-05,2026-02-04,Consulting services,10,150,1500,USD\n"' + getInvoice: + name: Get an invoice with its payments + method: GET + url: '{{ host }}/invoice/{id}' + updateInvoice: + name: Update an invoice + method: PUT + url: '{{ host }}/invoice/{id}' + body: + type: json + data: + amount: 0 + currency: USD + description: '' + due_on: 2026-03-01 + quantity: 1 + status: open + unit_price: 0 + createPayment: + name: Pay an invoice + method: POST + url: '{{ host }}/payment/{{ invoice_id }}' + body: + type: json + data: + amount: 1 + currency: '' + idempotency_key: ''