SudoSOS Back-end API / seller-payouts / SellerPayoutController
Class: SellerPayoutController ​
The BaseController class is responsible for:
- Storing route definitions.
- Generating router objects based on the policy.
Extends ​
Constructors ​
Constructor ​
new SellerPayoutController(options): SellerPayoutController;Parameters ​
| Parameter | Type |
|---|---|
options | BaseControllerOptions |
Returns ​
SellerPayoutController
Overrides ​
Properties ​
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
roleManager | protected | RoleManager | A reference to the role manager passed in the base controller options. | BaseController.roleManager |
specification | public | SwaggerSpecification | A reference to the swagger specification passed in the base controller options. | BaseController.specification |
Methods ​
createSellerPayout() ​
createSellerPayout(req, res): Promise<void>;POST /seller-payouts
Parameters ​
| Parameter | Type |
|---|---|
req | RequestWithToken |
res | Response |
Returns ​
Promise<void>
200 - The created seller payout
Operation Id ​
createSellerPayout
Tags ​
sellerPayouts - Operations of the seller payout controller
Security ​
JWT
deleteSellerPayout() ​
deleteSellerPayout(req, res): Promise<void>;DELETE /seller-payouts/
Parameters ​
| Parameter | Type |
|---|---|
req | RequestWithToken |
res | Response |
Returns ​
Promise<void>
204 - Success
Operation Id ​
deleteSellerPayout
Tags ​
sellerPayouts - Operations of the seller payout controller
Security ​
JWT
getPolicy() ​
getPolicy(): Policy;Gets the policy defined by child classes. This policy includes all routes that the controller accepts, the authorization middleware, and the final handler function for every route.
Returns ​
The policy of this controller.
Overrides ​
getRouter() ​
getRouter(): Router;Returns ​
Router
the router used by this controller.
Inherited from ​
getSellerPayoutReport() ​
getSellerPayoutReport(req, res): Promise<void>;GET /seller-payouts/{id}/report
Parameters ​
| Parameter | Type |
|---|---|
req | RequestWithToken |
res | Response |
Returns ​
Promise<void>
200 - The sales report that belongs to the given seller payout
Operation Id ​
getSellerPayoutReport
Tags ​
sellerPayouts - Operations of the seller payout controller
Security ​
JWT
getSellerPayoutReportPdf() ​
getSellerPayoutReportPdf(req, res): Promise<void>;GET /seller-payouts/{id}/report/pdf
Parameters ​
| Parameter | Type |
|---|---|
req | RequestWithToken |
res | Response |
Returns ​
Promise<void>
200 - The requested report
Operation Id ​
getSellerPayoutReportPdf
Tags ​
sellerPayouts - Operations of the seller payout controller
Security ​
JWT
returnAllSellerPayouts() ​
returnAllSellerPayouts(req, res): Promise<void>;GET /seller-payouts
Parameters ​
| Parameter | Type |
|---|---|
req | RequestWithToken |
res | Response |
Returns ​
Promise<void>
200 - Requested seller payouts
Operation Id ​
getAllSellerPayouts
Tags ​
sellerPayouts - Operations of the seller payout controller
Security ​
JWT
returnSingleSellerPayout() ​
returnSingleSellerPayout(req, res): Promise<void>;GET /seller-payouts/
Parameters ​
| Parameter | Type |
|---|---|
req | RequestWithToken |
res | Response |
Returns ​
Promise<void>
200 - Single seller payout with given ID
Operation Id ​
getSingleSellerPayout
Tags ​
sellerPayouts - Operations of the seller payout controller
Security ​
JWT
updateSellerPayout() ​
updateSellerPayout(req, res): Promise<void>;PATCH /seller-payouts/
Parameters ​
| Parameter | Type |
|---|---|
req | RequestWithToken |
res | Response |
Returns ​
Promise<void>
200 - The updated seller payout
Operation Id ​
updateSellerPayout
Tags ​
sellerPayouts - Operations of the seller payout controller
Security ​
JWT