-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
77 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/Docs/V1/CheckoutCod/Controller/Orders/OrdersController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
namespace NexaMerchant\CheckoutCod\Docs\V1\CheckoutCod\Controller\Orders; | ||
|
||
class OrdersController { | ||
/** | ||
* @OA\Post( | ||
* path="/orders/create", | ||
* summary="Create a new order", | ||
* tags={"Orders"}, | ||
* @OA\RequestBody( | ||
* required=true, | ||
* @OA\JsonContent(ref="#/components/schemas/Order") | ||
* ), | ||
* @OA\Response( | ||
* response=201, | ||
* description="Order created successfully", | ||
* @OA\JsonContent(ref="#/components/schemas/Order") | ||
* ), | ||
* @OA\Response( | ||
* response=400, | ||
* description="Invalid input", | ||
* @OA\JsonContent(ref="#/components/schemas/Error") | ||
* ) | ||
* ) | ||
*/ | ||
public function create(){} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
namespace NexaMerchant\CheckoutCod\Docs\V1\CheckoutCod\Models; | ||
|
||
/** | ||
* @OA\Schema( | ||
* title="Order", | ||
* description="Order model", | ||
* ) | ||
*/ | ||
class Order { | ||
|
||
/** | ||
* @OA\Property( | ||
* title="Cart ID", | ||
* description="Cart ID", | ||
* format="int64", | ||
* example=1 | ||
* ) | ||
* | ||
* @var int | ||
*/ | ||
private $cart_id; | ||
|
||
/** | ||
* @OA\Property( | ||
* title="Customer ID", | ||
* description="Customer ID", | ||
* format="int64", | ||
* example=1 | ||
* ) | ||
* | ||
* @var int | ||
*/ | ||
private $customer_id; | ||
|
||
/** | ||
* @OA\Property( | ||
* title="Return Insurance", | ||
* description="Return Insurance", | ||
* format="int64", | ||
* example=1 | ||
* ) | ||
* | ||
* @var int | ||
*/ | ||
private $return_insurance; | ||
} |