diff --git a/app/Http/Controllers/CompanyGatewayController.php b/app/Http/Controllers/CompanyGatewayController.php index 08b0b9ce215b..b8d5da74fd46 100644 --- a/app/Http/Controllers/CompanyGatewayController.php +++ b/app/Http/Controllers/CompanyGatewayController.php @@ -58,6 +58,42 @@ class CompanyGatewayController extends BaseController * Display a listing of the resource. * * @return \Illuminate\Http\Response + * + * + * + * @OA\Get( + * path="/api/v1/company_gateways", + * operationId="getCompanyGateways", + * tags={"company_gateways"}, + * summary="Gets a list of company_gateways", + * description="Lists company_gateways, search and filters allow fine grained lists to be generated. + + Query parameters can be added to performed more fine grained filtering of the company_gateways, these are handled by the CompanyGatewayFilters class which defines the methods available", + * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), + * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), + * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), + * @OA\Parameter(ref="#/components/parameters/include"), + * @OA\Response( + * response=200, + * description="A list of company_gateways", + * @OA\Header(header="X-API-TOKEN", ref="#/components/headers/X-API-TOKEN"), + * @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"), + * @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"), + * @OA\JsonContent(ref="#/components/schemas/CompanyGateway"), + * ), + * @OA\Response( + * response=422, + * description="Validation error", + * @OA\JsonContent(ref="#/components/schemas/ValidationError"), + + * ), + * @OA\Response( + * response="default", + * description="Unexpected Error", + * @OA\JsonContent(ref="#/components/schemas/Error"), + * ), + * ) + * */ public function index() { @@ -71,6 +107,40 @@ class CompanyGatewayController extends BaseController * Show the form for creating a new resource. * * @return \Illuminate\Http\Response + * + * + * + * @OA\Get( + * path="/api/v1/company_gateways/create", + * operationId="getCompanyGatewaysCreate", + * tags={"company_gateways"}, + * summary="Gets a new blank CompanyGateway object", + * description="Returns a blank object with default values", + * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), + * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), + * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), + * @OA\Parameter(ref="#/components/parameters/include"), + * @OA\Response( + * response=200, + * description="A blank CompanyGateway object", + * @OA\Header(header="X-API-TOKEN", ref="#/components/headers/X-API-TOKEN"), + * @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"), + * @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"), + * @OA\JsonContent(ref="#/components/schemas/CompanyGateway"), + * ), + * @OA\Response( + * response=422, + * description="Validation error", + * @OA\JsonContent(ref="#/components/schemas/ValidationError"), + * + * ), + * @OA\Response( + * response="default", + * description="Unexpected Error", + * @OA\JsonContent(ref="#/components/schemas/Error"), + * ), + * ) + * */ public function create(CreateCompanyGatewayRequest $request) { @@ -85,6 +155,40 @@ class CompanyGatewayController extends BaseController * * @param \App\Http\Requests\SignupRequest $request * @return \Illuminate\Http\Response + * + * + * + * @OA\Post( + * path="/api/v1/company_gateways", + * operationId="storeCompanyGateway", + * tags={"company_gateways"}, + * summary="Adds a CompanyGateway", + * description="Adds an CompanyGateway to the system", + * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), + * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), + * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), + * @OA\Parameter(ref="#/components/parameters/include"), + * @OA\Response( + * response=200, + * description="Returns the saved CompanyGateway object", + * @OA\Header(header="X-API-TOKEN", ref="#/components/headers/X-API-TOKEN"), + * @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"), + * @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"), + * @OA\JsonContent(ref="#/components/schemas/CompanyGateway"), + * ), + * @OA\Response( + * response=422, + * description="Validation error", + * @OA\JsonContent(ref="#/components/schemas/ValidationError"), + * + * ), + * @OA\Response( + * response="default", + * description="Unexpected Error", + * @OA\JsonContent(ref="#/components/schemas/Error"), + * ), + * ) + * */ public function store(StoreCompanyGatewayRequest $request) { @@ -102,7 +206,51 @@ class CompanyGatewayController extends BaseController * * @param int $id * @return \Illuminate\Http\Response - */ + * + * + * @OA\Get( + * path="/api/v1/company_gateways/{id}", + * operationId="showCompanyGateway", + * tags={"company_gateways"}, + * summary="Shows an CompanyGateway", + * description="Displays an CompanyGateway by id", + * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), + * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), + * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), + * @OA\Parameter(ref="#/components/parameters/include"), + * @OA\Parameter( + * name="id", + * in="path", + * description="The CompanyGateway Hashed ID", + * example="D2J234DFA", + * required=true, + * @OA\Schema( + * type="string", + * format="string", + * ), + * ), + * @OA\Response( + * response=200, + * description="Returns the CompanyGateway object", + * @OA\Header(header="X-API-TOKEN", ref="#/components/headers/X-API-TOKEN"), + * @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"), + * @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"), + * @OA\JsonContent(ref="#/components/schemas/CompanyGateway"), + * ), + * @OA\Response( + * response=422, + * description="Validation error", + * @OA\JsonContent(ref="#/components/schemas/ValidationError"), + * + * ), + * @OA\Response( + * response="default", + * description="Unexpected Error", + * @OA\JsonContent(ref="#/components/schemas/Error"), + * ), + * ) + * + */ public function show(ShowCompanyGatewayRequest $request, CompanyGateway $company_gateway) { @@ -115,6 +263,50 @@ class CompanyGatewayController extends BaseController * * @param int $id * @return \Illuminate\Http\Response + * + * + * @OA\Get( + * path="/api/v1/company_gateways/{id}/edit", + * operationId="editCompanyGateway", + * tags={"company_gateways"}, + * summary="Shows an CompanyGateway for editting", + * description="Displays an CompanyGateway by id", + * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), + * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), + * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), + * @OA\Parameter(ref="#/components/parameters/include"), + * @OA\Parameter( + * name="id", + * in="path", + * description="The CompanyGateway Hashed ID", + * example="D2J234DFA", + * required=true, + * @OA\Schema( + * type="string", + * format="string", + * ), + * ), + * @OA\Response( + * response=200, + * description="Returns the CompanyGateway object", + * @OA\Header(header="X-API-TOKEN", ref="#/components/headers/X-API-TOKEN"), + * @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"), + * @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"), + * @OA\JsonContent(ref="#/components/schemas/CompanyGateway"), + * ), + * @OA\Response( + * response=422, + * description="Validation error", + * @OA\JsonContent(ref="#/components/schemas/ValidationError"), + * + * ), + * @OA\Response( + * response="default", + * description="Unexpected Error", + * @OA\JsonContent(ref="#/components/schemas/Error"), + * ), + * ) + * */ public function edit(EditCompanyGatewayRequest $request, CompanyGateway $company_gateway) { @@ -129,7 +321,51 @@ class CompanyGatewayController extends BaseController * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response - */ + * + * + * @OA\Put( + * path="/api/v1/company_gateways/{id}", + * operationId="updateCompanyGateway", + * tags={"company_gateways"}, + * summary="Updates an CompanyGateway", + * description="Handles the updating of an CompanyGateway by id", + * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), + * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), + * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), + * @OA\Parameter(ref="#/components/parameters/include"), + * @OA\Parameter( + * name="id", + * in="path", + * description="The CompanyGateway Hashed ID", + * example="D2J234DFA", + * required=true, + * @OA\Schema( + * type="string", + * format="string", + * ), + * ), + * @OA\Response( + * response=200, + * description="Returns the CompanyGateway object", + * @OA\Header(header="X-API-TOKEN", ref="#/components/headers/X-API-TOKEN"), + * @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"), + * @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"), + * @OA\JsonContent(ref="#/components/schemas/CompanyGateway"), + * ), + * @OA\Response( + * response=422, + * description="Validation error", + * @OA\JsonContent(ref="#/components/schemas/ValidationError"), + * + * ), + * @OA\Response( + * response="default", + * description="Unexpected Error", + * @OA\JsonContent(ref="#/components/schemas/Error"), + * ), + * ) + * + */ public function update(UpdateCompanyGatewayRequest $request, CompanyGateway $company_gateway) { @@ -144,6 +380,49 @@ class CompanyGatewayController extends BaseController * * @param int $id * @return \Illuminate\Http\Response + * + * + * @OA\Delete( + * path="/api/v1/company_gateways/{id}", + * operationId="deleteCompanyGateway", + * tags={"company_gateways"}, + * summary="Deletes a CompanyGateway", + * description="Handles the deletion of an CompanyGateway by id", + * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), + * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), + * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), + * @OA\Parameter(ref="#/components/parameters/include"), + * @OA\Parameter( + * name="id", + * in="path", + * description="The CompanyGateway Hashed ID", + * example="D2J234DFA", + * required=true, + * @OA\Schema( + * type="string", + * format="string", + * ), + * ), + * @OA\Response( + * response=200, + * description="Returns a HTTP status", + * @OA\Header(header="X-API-TOKEN", ref="#/components/headers/X-API-TOKEN"), + * @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"), + * @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"), + * ), + * @OA\Response( + * response=422, + * description="Validation error", + * @OA\JsonContent(ref="#/components/schemas/ValidationError"), + * + * ), + * @OA\Response( + * response="default", + * description="Unexpected Error", + * @OA\JsonContent(ref="#/components/schemas/Error"), + * ), + * ) + * */ public function destroy(DestroyCompanyGatewayRequest $request, CompanyGateway $company_gateway) {