openapi: 3.0.0 info: title: ABC Telecom Postpaid Billing API description: API documentation for the ABC Telecom Postpaid Billing System. version: 1.0.0 servers: - url: http://localhost:8080/api paths: /auth/login: post: summary: User login requestBody: required: true content: application/json: schema: type: object properties: username: type: string password: type: string responses: '200': description: Successful login content: application/json: schema: type: object properties: token: type: string '401': description: Unauthorized /customers: get: summary: Get all customers responses: '200': description: A list of customers content: application/json: schema: type: array items: $ref: '#/components/schemas/CustomerDto' post: summary: Create a new customer requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CustomerDto' responses: '201': description: Customer created content: application/json: schema: $ref: '#/components/schemas/CustomerDto' /customers/{id}: get: summary: Get a customer by ID parameters: - name: id in: path required: true schema: type: string responses: '200': description: Customer details content: application/json: schema: $ref: '#/components/schemas/CustomerDto' '404': description: Customer not found put: summary: Update a customer parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CustomerDto' responses: '200': description: Customer updated content: application/json: schema: $ref: '#/components/schemas/CustomerDto' '404': description: Customer not found delete: summary: Delete a customer parameters: - name: id in: path required: true schema: type: string responses: '204': description: Customer deleted '404': description: Customer not found components: schemas: CustomerDto: type: object properties: id: type: string name: type: string email: type: string phone: type: string address: type: string BillDto: type: object properties: id: type: string accountId: type: string amount: type: number dueDate: type: string format: date PaymentDto: type: object properties: id: type: string billId: type: string amount: type: number paymentDate: type: string format: date TariffDto: type: object properties: id: type: string name: type: string price: type: number description: type: string AccountDto: type: object properties: id: type: string customerId: type: string balance: type: number status: type: string enum: [ACTIVE, SUSPENDED, CLOSED]