test(billing): add Slumber API spec and localhost env config
This commit is contained in:
+52
@@ -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: ''
|
||||
Reference in New Issue
Block a user