u
This commit is contained in:
24
src/api/payment.js
Normal file
24
src/api/payment.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { http } from './http.js';
|
||||
|
||||
/**
|
||||
* Payments linked to orders (manifests).
|
||||
*/
|
||||
export const payment = {
|
||||
// #region GET /api/order/:id/payment — listByOrder
|
||||
listByOrder(orderId) {
|
||||
return http(`/api/order/${orderId}/payment`);
|
||||
},
|
||||
// #endregion
|
||||
|
||||
// #region POST /api/order/:id/payment — create
|
||||
create(orderId, body) {
|
||||
return http(`/api/order/${orderId}/payment`, { method: 'POST', body });
|
||||
},
|
||||
// #endregion
|
||||
|
||||
// #region DELETE /api/payment/:id — delete
|
||||
delete(id) {
|
||||
return http(`/api/payment/${id}`, { method: 'DELETE' });
|
||||
},
|
||||
// #endregion
|
||||
};
|
||||
Reference in New Issue
Block a user