Merge pull request #6514 from Mause/patch-2

(v5) Declare request body for POST /api/v1/invoices
This commit is contained in:
David Bomba 2021-10-18 15:24:42 +11:00 committed by GitHub
commit fa2fedcef8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 0 deletions

View File

@ -185,6 +185,10 @@ class InvoiceController extends BaseController
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\RequestBody(
* required=true,
* @OA\JsonContent(ref="#/components/schemas/FillableInvoice")
* ),
* @OA\Response(
* response=200,
* description="Returns the saved invoice object",

View File

@ -0,0 +1,37 @@
<?php
/**
* @OA\Schema(
* schema="FillableInvoice",
* type="object",
* @OA\Property(property="assigned_user_id", type="string", example="", description="__________"),
* @OA\Property(property="client_id", type="string", example="", description="________"),
* @OA\Property(property="number", type="string", example="INV_101", description="The invoice number - is a unique alpha numeric number per invoice per company"),
* @OA\Property(property="po_number", type="string", example="", description="________"),
* @OA\Property(property="terms", type="string", example="", description="________"),
* @OA\Property(property="public_notes", type="string", example="", description="________"),
* @OA\Property(property="private_notes", type="string", example="", description="________"),
* @OA\Property(property="footer", type="string", example="", description="________"),
* @OA\Property(property="custom_value1", type="string", example="", description="________"),
* @OA\Property(property="custom_value2", type="string", example="", description="________"),
* @OA\Property(property="custom_value3", type="string", example="", description="________"),
* @OA\Property(property="custom_value4", type="string", example="", description="________"),
* @OA\Property(property="tax_name1", type="string", example="", description="________"),
* @OA\Property(property="tax_name2", type="string", example="", description="________"),
* @OA\Property(property="tax_rate1", type="number", example="10.00", description="_________"),
* @OA\Property(property="tax_rate2", type="number", example="10.00", description="_________"),
* @OA\Property(property="tax_name3", type="string", example="", description="________"),
* @OA\Property(property="tax_rate3", type="number", example="10.00", description="_________"),
* @OA\Property(property="line_items", type="object", example="", description="_________"),
* @OA\Property(property="discount", type="number", example="10.00", description="_________"),
* @OA\Property(property="partial", type="number", example="10.00", description="_________"),
* @OA\Property(property="is_amount_discount", type="boolean", example="1", description="_________"),
* @OA\Property(property="uses_inclusive_taxes", type="boolean", example="1", description="Defines the type of taxes used as either inclusive or exclusive"),
* @OA\Property(property="date", type="string", example="1994-07-30", description="The Invoice Date"),
* @OA\Property(property="partial_due_date", type="string", example="1994-07-30", description="_________"),
* @OA\Property(property="due_date", type="string", example="1994-07-30", description="_________"),
* @OA\Property(property="custom_surcharge1", type="number", example="10.00", description="First Custom Surcharge"),
* @OA\Property(property="custom_surcharge2", type="number", example="10.00", description="Second Custom Surcharge"),
* @OA\Property(property="custom_surcharge3", type="number", example="10.00", description="Third Custom Surcharge"),
* @OA\Property(property="custom_surcharge4", type="number", example="10.00", description="Fourth Custom Surcharge")
* )
*/