Skip to content

Commit

Permalink
add docs for checkout cod
Browse files Browse the repository at this point in the history
  • Loading branch information
xxl4 committed Jan 23, 2025
1 parent 0141ddd commit 02ad387
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Config/CheckoutCod.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
*
* The version of the package
*/
'version' => '1.1.3',
'version' => '1.1.4',
/**
*
* The version number of the package
*/
'versionNum' => '113',
'versionNum' => '114',

/**
*
Expand Down
2 changes: 1 addition & 1 deletion src/Docs/V1/CheckoutCod/Controller/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

/**
* @OA\Info(
* version="1.1.0",
* version="1.1.4",
* title="NexaMerchant CheckoutCod Rest API Documentation",
* description="NexaMerchant CheckoutCod Rest API Documentation",
*
Expand Down
27 changes: 27 additions & 0 deletions src/Docs/V1/CheckoutCod/Controller/Orders/OrdersController.php
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(){}
}
47 changes: 47 additions & 0 deletions src/Docs/V1/CheckoutCod/Models/Order.php
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;
}

0 comments on commit 02ad387

Please sign in to comment.