mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
API Doc Blocks for Bank Transaction Rules
This commit is contained in:
parent
b2c314d7c3
commit
93ecb8790b
@ -83,7 +83,7 @@ class BankTransactionRuleController extends BaseController
|
||||
* @OA\Header(header="X-MINIMUM-CLIENT-VERSION", ref="#/components/headers/X-MINIMUM-CLIENT-VERSION"),
|
||||
* @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/BankTransaction"),
|
||||
* @OA\JsonContent(ref="#/components/schemas/BankTransactionRule"),
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response=422,
|
||||
@ -143,7 +143,7 @@ class BankTransactionRuleController extends BaseController
|
||||
* @OA\Header(header="X-MINIMUM-CLIENT-VERSION", ref="#/components/headers/X-MINIMUM-CLIENT-VERSION"),
|
||||
* @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/BankTransaction"),
|
||||
* @OA\JsonContent(ref="#/components/schemas/BankTransactionRule"),
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response=422,
|
||||
@ -199,7 +199,7 @@ class BankTransactionRuleController extends BaseController
|
||||
* @OA\Header(header="X-MINIMUM-CLIENT-VERSION", ref="#/components/headers/X-MINIMUM-CLIENT-VERSION"),
|
||||
* @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/BankTransaction"),
|
||||
* @OA\JsonContent(ref="#/components/schemas/BankTransactionRule"),
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response=422,
|
||||
@ -255,7 +255,7 @@ class BankTransactionRuleController extends BaseController
|
||||
* @OA\Header(header="X-MINIMUM-CLIENT-VERSION", ref="#/components/headers/X-MINIMUM-CLIENT-VERSION"),
|
||||
* @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/BankTransaction"),
|
||||
* @OA\JsonContent(ref="#/components/schemas/BankTransactionRule"),
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response=422,
|
||||
@ -303,7 +303,7 @@ class BankTransactionRuleController extends BaseController
|
||||
* @OA\Header(header="X-MINIMUM-CLIENT-VERSION", ref="#/components/headers/X-MINIMUM-CLIENT-VERSION"),
|
||||
* @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/BankTransaction"),
|
||||
* @OA\JsonContent(ref="#/components/schemas/BankTransactionRule"),
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response=422,
|
||||
@ -349,7 +349,7 @@ class BankTransactionRuleController extends BaseController
|
||||
* @OA\Header(header="X-MINIMUM-CLIENT-VERSION", ref="#/components/headers/X-MINIMUM-CLIENT-VERSION"),
|
||||
* @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/BankTransaction"),
|
||||
* @OA\JsonContent(ref="#/components/schemas/BankTransactionRule"),
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response=422,
|
||||
|
10
app/Http/Controllers/OpenAPI/BTRulesSchema.php
Normal file
10
app/Http/Controllers/OpenAPI/BTRulesSchema.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
/**
|
||||
* @OA\Schema(
|
||||
* schema="BTRules",
|
||||
* type="object",
|
||||
* @OA\Property(property="data_key", type="string", example="description,amount", description="The key to search"),
|
||||
* @OA\Property(property="operator", type="string", example=">", description="The operator flag of the search"),
|
||||
* @OA\Property(property="value", type="string" ,example="bob", description="The value to search for"),
|
||||
* )
|
||||
*/
|
@ -6,7 +6,7 @@
|
||||
* @OA\Property(property="id", type="string", example="AS3df3A", description="The bank integration hashed id"),
|
||||
* @OA\Property(property="company_id", type="string", example="AS3df3A", description="The company hashed id"),
|
||||
* @OA\Property(property="user_id", type="string", example="AS3df3A", description="The user hashed id"),
|
||||
* @OA\Property(property="transaction_id", type="integer", example=343434, description="The id of the transaction"),
|
||||
* @OA\Property(property="transaction_id", type="integer", example=343434, description="The id of the transaction rule"),
|
||||
* @OA\Property(property="amount", type="number", example=10.00, description="The transaction amount"),
|
||||
* @OA\Property(property="currency_id", type="string", example="1", description="The currency ID of the currency"),
|
||||
* @OA\Property(property="account_type", type="string", example="creditCard", description="The account type"),
|
||||
|
25
app/Http/Controllers/OpenAPI/BankTransactionRule.php
Normal file
25
app/Http/Controllers/OpenAPI/BankTransactionRule.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* @OA\Schema(
|
||||
* schema="BankTransactionRule",
|
||||
* type="object",
|
||||
* @OA\Property(property="id", type="string", example="AS3df3A", description="The bank transaction rules hashed id"),
|
||||
* @OA\Property(property="company_id", type="string", example="AS3df3A", description="The company hashed id"),
|
||||
* @OA\Property(property="user_id", type="string", example="AS3df3A", description="The user hashed id"),
|
||||
* @OA\Property(property="name", type="string", example="Rule 1", description="The name of the transaction"),
|
||||
* @OA\Property(
|
||||
* property="rules",
|
||||
* type="array",
|
||||
* description="A mapped collection of the sub rules for the BankTransactionRule",
|
||||
* @OA\Items(
|
||||
* ref="#/components/schemas/BTRules",
|
||||
* ),
|
||||
* ),
|
||||
* @OA\Property(property="auto_convert", type="boolean", example=true, description="Flags whether the rule converts the transaction automatically"),
|
||||
* @OA\Property(property="matches_on_all", type="boolean", example=true, description="Flags whether all subrules are required for the match"),
|
||||
* @OA\Property(property="applies_to", type="boolean", example="CREDIT", description="Flags whether the rule applies to a CREDIT or DEBIT"),
|
||||
* @OA\Property(property="client_id", type="string", example="AS3df3A", description="The client hashed id"),
|
||||
* @OA\Property(property="vendor_id", type="string", example="AS3df3A", description="The vendor hashed id"),
|
||||
* @OA\Property(property="category_id", type="string", example="AS3df3A", description="The category hashed id"),
|
||||
* )
|
||||
*/
|
Loading…
x
Reference in New Issue
Block a user