mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #8290 from turbo124/v5-develop
Fixes for client portal error page logo
This commit is contained in:
commit
87ddc97ceb
65
.env.cypress
Normal file
65
.env.cypress
Normal file
@ -0,0 +1,65 @@
|
||||
APP_NAME="Invoice Ninja"
|
||||
APP_ENV=local
|
||||
APP_KEY=base64:xV0ixUbXIGjeWImmcjCYL8/XespgcEk+dTTPlM17dNE=
|
||||
APP_DEBUG=true
|
||||
APP_DOMAIN=ninja.test:8000
|
||||
|
||||
APP_URL=http://ninja.test:8000/
|
||||
#APP_URL=https://ninja.test
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
MULTI_DB_ENABLED=false
|
||||
|
||||
DB_HOST1=127.0.0.1
|
||||
DB_DATABASE1=db-ninja-01
|
||||
DB_USERNAME1=ninja
|
||||
DB_PASSWORD1=ninja
|
||||
DB_PORT1=3306
|
||||
|
||||
DB_HOST2=127.0.0.1
|
||||
DB_DATABASE2=db-ninja-02
|
||||
DB_USERNAME2=ninja
|
||||
DB_PASSWORD2=ninja
|
||||
DB_PORT2=3306
|
||||
|
||||
DEMO_MODE=false
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
REQUIRE_HTTPS=false
|
||||
BROADCAST_DRIVER=pusher
|
||||
CACHE_DRIVER=redis
|
||||
QUEUE_CONNECTION=database
|
||||
SESSION_DRIVER=redis
|
||||
SESSION_DOMAIN=.ninja.test
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
PUSHER_APP_ID="ninja"
|
||||
PUSHER_APP_KEY="ninja"
|
||||
PUSHER_APP_SECRET="ninja"
|
||||
PUSHER_APP_CLUSTER="ninja1"
|
||||
|
||||
MAIL_MAILER=log
|
||||
MAIL_HOST=localhost
|
||||
MAIL_PORT=1025
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
|
||||
MAIL_FROM_ADDRESS=''
|
||||
MAIL_FROM_NAME=''
|
||||
|
||||
GOOGLE_MAPS_API_KEY=
|
||||
|
||||
NINJA_ENVIRONMENT=selfhost
|
||||
|
||||
HASH_SALT=
|
||||
|
||||
FILESYSTEM_DRIVER=public
|
||||
|
||||
PDF_GENERATOR=snappdf
|
||||
|
||||
MIX_ASSET_URL=false
|
@ -79,9 +79,28 @@ class OpenApiYaml extends Command
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/components.yaml'));
|
||||
|
||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/components/responses.yaml'));
|
||||
|
||||
$directory = new DirectoryIterator($path . '/components/responses/');
|
||||
|
||||
foreach ($directory as $file) {
|
||||
if ($file->isFile() && ! $file->isDot()) {
|
||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents("{$path}/components/responses/{$file->getFilename()}"));
|
||||
}
|
||||
}
|
||||
|
||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/components/parameters.yaml'));
|
||||
|
||||
$directory = new DirectoryIterator($path . '/components/parameters/');
|
||||
|
||||
foreach ($directory as $file) {
|
||||
if ($file->isFile() && ! $file->isDot()) {
|
||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents("{$path}/components/parameters/{$file->getFilename()}"));
|
||||
}
|
||||
}
|
||||
|
||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/components/schemas.yaml'));
|
||||
|
||||
//iterate schemas
|
||||
@ -94,6 +113,7 @@ class OpenApiYaml extends Command
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/components/schemas/account.yaml'));
|
||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/misc/misc.yaml'));
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ class Handler extends ExceptionHandler
|
||||
Symfony\Component\Process\Exception\RuntimeException::class,
|
||||
InvalidArgumentException::class,
|
||||
RuntimeException::class,
|
||||
Aws\Exception\CredentialsException::class,
|
||||
];
|
||||
|
||||
protected $hostedDontReport = [
|
||||
|
@ -44,7 +44,7 @@ class ContactHashLoginController extends Controller
|
||||
|
||||
public function errorPage()
|
||||
{
|
||||
return render('generic.error', ['title' => session()->get('title'), 'notification' => session()->get('notification')]);
|
||||
return render('generic.error', ['title' => session()->get('title'), 'notification' => session()->get('notification'), 'account' => auth()->guard('contact')?->user()?->user?->account, 'company' => auth()->guard('contact')?->user()?->user?->company]);
|
||||
}
|
||||
|
||||
private function setRedirectPath()
|
||||
|
@ -40,6 +40,9 @@ class StoreSchedulerRequest extends Request
|
||||
'template' => 'bail|required|string',
|
||||
'parameters' => 'bail|array',
|
||||
'parameters.clients' => ['bail','sometimes', 'array', new ValidClientIds()],
|
||||
'parameters.date_range' => 'bail|sometimes|string|in:last7_days,last30_days,last365_days,this_month,last_month,this_quarter,last_quarter,this_year,last_year,custom',
|
||||
'parameters.start_date' => ['bail', 'sometimes', 'date:Y-m-d', 'required_if:parameters.date_rate,custom'],
|
||||
'parameters.end_date' => ['bail', 'sometimes', 'date:Y-m-d', 'required_if:parameters.date_rate,custom', 'after_or_equal:parameters.start_date'],
|
||||
];
|
||||
|
||||
return $rules;
|
||||
|
@ -12,6 +12,7 @@ namespace App\Http\Requests\TaskScheduler;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
use Illuminate\Validation\Rule;
|
||||
use App\Http\ValidationRules\Scheduler\ValidClientIds;
|
||||
|
||||
class UpdateSchedulerRequest extends Request
|
||||
{
|
||||
@ -35,6 +36,10 @@ class UpdateSchedulerRequest extends Request
|
||||
'next_run_client' => 'bail|sometimes|date:Y-m-d',
|
||||
'template' => 'bail|required|string',
|
||||
'parameters' => 'bail|array',
|
||||
'parameters.clients' => ['bail','sometimes', 'array', new ValidClientIds()],
|
||||
'parameters.date_range' => 'bail|sometimes|string|in:last7_days,last30_days,last365_days,this_month,last_month,this_quarter,last_quarter,this_year,last_year,custom',
|
||||
'parameters.start_date' => ['bail', 'sometimes', 'date:Y-m-d', 'required_if:parameters.date_rate,custom'],
|
||||
'parameters.end_date' => ['bail', 'sometimes', 'date:Y-m-d', 'required_if:parameters.date_rate,custom', 'after_or_equal:parameters.start_date'],
|
||||
];
|
||||
|
||||
return $rules;
|
||||
|
@ -611,6 +611,9 @@ class NinjaMailerJob implements ShouldQueue
|
||||
|
||||
public function failed($exception = null)
|
||||
{
|
||||
if($exception)
|
||||
nlog($exception->getMessage());
|
||||
|
||||
config(['queue.failed.driver' => null]);
|
||||
}
|
||||
}
|
||||
|
@ -44,11 +44,6 @@ class CreditCreatedNotification implements ShouldQueue
|
||||
|
||||
$credit = $event->credit;
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntityCreatedObject($credit, 'credit'))->build());
|
||||
$nmo->company = $credit->company;
|
||||
$nmo->settings = $credit->company->settings;
|
||||
|
||||
/* We loop through each user and determine whether they need to be notified */
|
||||
foreach ($event->company->company_users as $company_user) {
|
||||
/* The User */
|
||||
@ -64,9 +59,15 @@ class CreditCreatedNotification implements ShouldQueue
|
||||
if (($key = array_search('mail', $methods)) !== false) {
|
||||
unset($methods[$key]);
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntityCreatedObject($credit, 'credit'))->build());
|
||||
$nmo->company = $credit->company;
|
||||
$nmo->settings = $credit->company->settings;
|
||||
$nmo->to_user = $user;
|
||||
|
||||
(new NinjaMailerJob($nmo))->handle();
|
||||
|
||||
$nmo = null;
|
||||
}
|
||||
|
||||
/* Override the methods in the Notification Class */
|
||||
|
@ -44,11 +44,6 @@ class CreditEmailedNotification implements ShouldQueue
|
||||
$credit->last_sent_date = now();
|
||||
$credit->saveQuietly();
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntitySentObject($event->invitation, 'credit', $event->template))->build());
|
||||
$nmo->company = $credit->company;
|
||||
$nmo->settings = $credit->company->settings;
|
||||
|
||||
foreach ($event->invitation->company->company_users as $company_user) {
|
||||
$user = $company_user->user;
|
||||
|
||||
@ -60,9 +55,15 @@ class CreditEmailedNotification implements ShouldQueue
|
||||
// if (($key = array_search('mail', $methods))) {
|
||||
unset($methods[$key]);
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntitySentObject($event->invitation, 'credit', $event->template))->build());
|
||||
$nmo->company = $credit->company;
|
||||
$nmo->settings = $credit->company->settings;
|
||||
$nmo->to_user = $user;
|
||||
|
||||
(new NinjaMailerJob($nmo))->handle();
|
||||
|
||||
$nmo = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -44,11 +44,6 @@ class InvoiceCreatedNotification implements ShouldQueue
|
||||
|
||||
$invoice = $event->invoice;
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntityCreatedObject($invoice, 'invoice'))->build());
|
||||
$nmo->company = $invoice->company;
|
||||
$nmo->settings = $invoice->company->settings;
|
||||
|
||||
/* We loop through each user and determine whether they need to be notified */
|
||||
foreach ($event->company->company_users as $company_user) {
|
||||
/* The User */
|
||||
@ -68,10 +63,16 @@ class InvoiceCreatedNotification implements ShouldQueue
|
||||
if (($key = array_search('mail', $methods)) !== false) {
|
||||
unset($methods[$key]);
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntityCreatedObject($invoice, 'invoice'))->build());
|
||||
$nmo->company = $invoice->company;
|
||||
$nmo->settings = $invoice->company->settings;
|
||||
$nmo->to_user = $user;
|
||||
|
||||
(new NinjaMailerJob($nmo))->handle();
|
||||
|
||||
$nmo = null;
|
||||
|
||||
/* This prevents more than one notification being sent */
|
||||
$first_notification_sent = false;
|
||||
}
|
||||
|
@ -46,10 +46,6 @@ class InvoiceEmailedNotification implements ShouldQueue
|
||||
$invoice->last_sent_date = now();
|
||||
$invoice->saveQuietly();
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntitySentObject($event->invitation, 'invoice', $event->template))->build());
|
||||
$nmo->company = $invoice->company;
|
||||
$nmo->settings = $invoice->company->settings;
|
||||
|
||||
/* We loop through each user and determine whether they need to be notified */
|
||||
foreach ($event->invitation->company->company_users as $company_user) {
|
||||
@ -66,10 +62,15 @@ class InvoiceEmailedNotification implements ShouldQueue
|
||||
if (($key = array_search('mail', $methods)) !== false) {
|
||||
unset($methods[$key]);
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntitySentObject($event->invitation, 'invoice', $event->template))->build());
|
||||
$nmo->company = $invoice->company;
|
||||
$nmo->settings = $invoice->company->settings;
|
||||
$nmo->to_user = $user;
|
||||
|
||||
(new NinjaMailerJob($nmo))->handle();
|
||||
|
||||
$nmo = null;
|
||||
/* This prevents more than one notification being sent */
|
||||
$first_notification_sent = false;
|
||||
}
|
||||
|
@ -45,12 +45,6 @@ class InvoiceFailedEmailNotification
|
||||
$first_notification_sent = true;
|
||||
|
||||
$invoice = $event->invitation->invoice;
|
||||
// $invoice->update(['last_sent_date' => now()]);
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntityFailedSendObject($event->invitation, 'invoice', $event->template, $event->message))->build());
|
||||
$nmo->company = $invoice->company;
|
||||
$nmo->settings = $invoice->company->settings;
|
||||
|
||||
foreach ($event->invitation->company->company_users as $company_user) {
|
||||
$user = $company_user->user;
|
||||
@ -60,10 +54,16 @@ class InvoiceFailedEmailNotification
|
||||
if (($key = array_search('mail', $methods)) !== false) {
|
||||
unset($methods[$key]);
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntityFailedSendObject($event->invitation, 'invoice', $event->template, $event->message))->build());
|
||||
$nmo->company = $invoice->company;
|
||||
$nmo->settings = $invoice->company->settings;
|
||||
$nmo->to_user = $user;
|
||||
|
||||
(new NinjaMailerJob($nmo))->handle();
|
||||
|
||||
$nmo = null;
|
||||
|
||||
$first_notification_sent = false;
|
||||
}
|
||||
}
|
||||
|
@ -58,11 +58,6 @@ class InvitationViewedListener implements ShouldQueue
|
||||
$entity_name = 'purchase_order';
|
||||
}
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntityViewedObject($invitation, $entity_name))->build());
|
||||
$nmo->company = $invitation->company;
|
||||
$nmo->settings = $invitation->company->settings;
|
||||
|
||||
foreach ($invitation->company->company_users as $company_user) {
|
||||
$entity_viewed = "{$entity_name}_viewed";
|
||||
$entity_viewed_all = "{$entity_name}_viewed_all";
|
||||
@ -73,8 +68,16 @@ class InvitationViewedListener implements ShouldQueue
|
||||
if (($key = array_search('mail', $methods)) !== false) {
|
||||
unset($methods[$key]);
|
||||
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntityViewedObject($invitation, $entity_name))->build());
|
||||
$nmo->company = $invitation->company;
|
||||
$nmo->settings = $invitation->company->settings;
|
||||
|
||||
$nmo->to_user = $company_user->user;
|
||||
(new NinjaMailerJob($nmo))->handle();
|
||||
|
||||
$nmo = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -51,11 +51,6 @@ class PaymentNotification implements ShouldQueue
|
||||
|
||||
$payment = $event->payment;
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntityPaidObject($payment))->build());
|
||||
$nmo->company = $event->company;
|
||||
$nmo->settings = $event->company->settings;
|
||||
|
||||
/*User notifications*/
|
||||
foreach ($payment->company->company_users as $company_user) {
|
||||
$user = $company_user->user;
|
||||
@ -73,9 +68,16 @@ class PaymentNotification implements ShouldQueue
|
||||
if (($key = array_search('mail', $methods)) !== false) {
|
||||
unset($methods[$key]);
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntityPaidObject($payment))->build());
|
||||
$nmo->company = $event->company;
|
||||
$nmo->settings = $event->company->settings;
|
||||
$nmo->to_user = $user;
|
||||
|
||||
(new NinjaMailerJob($nmo))->handle();
|
||||
|
||||
$nmo = null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,10 +41,6 @@ class PurchaseOrderAcceptedListener implements ShouldQueue
|
||||
|
||||
$purchase_order = $event->purchase_order;
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new PurchaseOrderAcceptedObject($purchase_order, $event->company))->build());
|
||||
$nmo->company = $event->company;
|
||||
$nmo->settings = $event->company->settings;
|
||||
|
||||
/* We loop through each user and determine whether they need to be notified */
|
||||
foreach ($event->company->company_users as $company_user) {
|
||||
@ -62,10 +58,16 @@ class PurchaseOrderAcceptedListener implements ShouldQueue
|
||||
if (($key = array_search('mail', $methods)) !== false) {
|
||||
unset($methods[$key]);
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new PurchaseOrderAcceptedObject($purchase_order, $event->company))->build());
|
||||
$nmo->company = $event->company;
|
||||
$nmo->settings = $event->company->settings;
|
||||
|
||||
$nmo->to_user = $user;
|
||||
|
||||
(new NinjaMailerJob($nmo))->handle();
|
||||
|
||||
$nmo = null;
|
||||
/* This prevents more than one notification being sent */
|
||||
$first_notification_sent = false;
|
||||
}
|
||||
|
@ -45,10 +45,6 @@ class PurchaseOrderCreatedListener implements ShouldQueue
|
||||
|
||||
$purchase_order = $event->purchase_order;
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntityCreatedObject($purchase_order, 'purchase_order'))->build());
|
||||
$nmo->company = $purchase_order->company;
|
||||
$nmo->settings = $purchase_order->company->settings;
|
||||
|
||||
/* We loop through each user and determine whether they need to be notified */
|
||||
foreach ($event->company->company_users as $company_user) {
|
||||
@ -69,10 +65,16 @@ class PurchaseOrderCreatedListener implements ShouldQueue
|
||||
if (($key = array_search('mail', $methods)) !== false) {
|
||||
unset($methods[$key]);
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntityCreatedObject($purchase_order, 'purchase_order'))->build());
|
||||
$nmo->company = $purchase_order->company;
|
||||
$nmo->settings = $purchase_order->company->settings;
|
||||
|
||||
$nmo->to_user = $user;
|
||||
|
||||
(new NinjaMailerJob($nmo))->handle();
|
||||
|
||||
$nmo = null;
|
||||
/* This prevents more than one notification being sent */
|
||||
$first_notification_sent = false;
|
||||
}
|
||||
|
@ -46,11 +46,6 @@ class PurchaseOrderEmailedNotification implements ShouldQueue
|
||||
$purchase_order->last_sent_date = now();
|
||||
$purchase_order->saveQuietly();
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntitySentObject($event->invitation, 'purchase_order', 'purchase_order'))->build());
|
||||
$nmo->company = $purchase_order->company;
|
||||
$nmo->settings = $purchase_order->company->settings;
|
||||
|
||||
/* We loop through each user and determine whether they need to be notified */
|
||||
foreach ($event->invitation->company->company_users as $company_user) {
|
||||
/* The User */
|
||||
@ -66,10 +61,16 @@ class PurchaseOrderEmailedNotification implements ShouldQueue
|
||||
if (($key = array_search('mail', $methods)) !== false) {
|
||||
unset($methods[$key]);
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntitySentObject($event->invitation, 'purchase_order', 'purchase_order'))->build());
|
||||
$nmo->company = $purchase_order->company;
|
||||
$nmo->settings = $purchase_order->company->settings;
|
||||
$nmo->to_user = $user;
|
||||
|
||||
(new NinjaMailerJob($nmo))->handle();
|
||||
|
||||
$nmo = null;
|
||||
|
||||
/* This prevents more than one notification being sent */
|
||||
$first_notification_sent = false;
|
||||
}
|
||||
|
@ -43,10 +43,6 @@ class QuoteApprovedNotification implements ShouldQueue
|
||||
|
||||
$quote = $event->quote;
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new QuoteApprovedObject($quote, $event->company))->build());
|
||||
$nmo->company = $quote->company;
|
||||
$nmo->settings = $quote->company->settings;
|
||||
|
||||
/* We loop through each user and determine whether they need to be notified */
|
||||
foreach ($event->company->company_users as $company_user) {
|
||||
@ -64,10 +60,17 @@ class QuoteApprovedNotification implements ShouldQueue
|
||||
if (($key = array_search('mail', $methods)) !== false) {
|
||||
unset($methods[$key]);
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new QuoteApprovedObject($quote, $event->company))->build());
|
||||
$nmo->company = $quote->company;
|
||||
$nmo->settings = $quote->company->settings;
|
||||
|
||||
$nmo->to_user = $user;
|
||||
|
||||
(new NinjaMailerJob($nmo))->handle();
|
||||
|
||||
$nmo = null;
|
||||
|
||||
/* This prevents more than one notification being sent */
|
||||
$first_notification_sent = false;
|
||||
}
|
||||
|
@ -44,10 +44,6 @@ class QuoteCreatedNotification implements ShouldQueue
|
||||
|
||||
$quote = $event->quote;
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntityCreatedObject($quote, 'quote'))->build());
|
||||
$nmo->company = $quote->company;
|
||||
$nmo->settings = $quote->company->settings;
|
||||
|
||||
/* We loop through each user and determine whether they need to be notified */
|
||||
foreach ($event->company->company_users as $company_user) {
|
||||
@ -68,10 +64,17 @@ class QuoteCreatedNotification implements ShouldQueue
|
||||
if (($key = array_search('mail', $methods)) !== false) {
|
||||
unset($methods[$key]);
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntityCreatedObject($quote, 'quote'))->build());
|
||||
$nmo->company = $quote->company;
|
||||
$nmo->settings = $quote->company->settings;
|
||||
|
||||
$nmo->to_user = $user;
|
||||
|
||||
(new NinjaMailerJob($nmo))->handle();
|
||||
|
||||
$nmo = null;
|
||||
|
||||
/* This prevents more than one notification being sent */
|
||||
$first_notification_sent = false;
|
||||
}
|
||||
|
@ -45,11 +45,6 @@ class QuoteEmailedNotification implements ShouldQueue
|
||||
$quote->last_sent_date = now();
|
||||
$quote->saveQuietly();
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntitySentObject($event->invitation, 'quote', $event->template))->build());
|
||||
$nmo->company = $quote->company;
|
||||
$nmo->settings = $quote->company->settings;
|
||||
|
||||
foreach ($event->invitation->company->company_users as $company_user) {
|
||||
$user = $company_user->user;
|
||||
|
||||
@ -58,9 +53,15 @@ class QuoteEmailedNotification implements ShouldQueue
|
||||
if (($key = array_search('mail', $methods)) !== false) {
|
||||
unset($methods[$key]);
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntitySentObject($event->invitation, 'quote', $event->template))->build());
|
||||
$nmo->company = $quote->company;
|
||||
$nmo->settings = $quote->company->settings;
|
||||
$nmo->to_user = $user;
|
||||
|
||||
(new NinjaMailerJob($nmo))->handle();
|
||||
|
||||
$nmo = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ class EntityCreatedObject
|
||||
);
|
||||
|
||||
$mail_obj->markdown = 'email.admin.generic';
|
||||
$mail_obj->tag = $this->company->company_key;
|
||||
// $mail_obj->tag = $this->company->company_key;
|
||||
$mail_obj->data = [
|
||||
'title' => $mail_obj->subject,
|
||||
'message' => ctrans(
|
||||
@ -97,7 +97,7 @@ class EntityCreatedObject
|
||||
$mail_obj->subject = $this->getSubject();
|
||||
$mail_obj->data = $this->getData();
|
||||
$mail_obj->markdown = 'email.admin.generic';
|
||||
$mail_obj->tag = $this->entity->company->company_key;
|
||||
// $mail_obj->tag = $this->entity->company->company_key;
|
||||
}
|
||||
|
||||
return $mail_obj;
|
||||
|
@ -36,9 +36,6 @@ class EntityNotificationMailer extends Mailable
|
||||
{
|
||||
return $this->from(config('mail.from.address'), config('mail.from.name'))
|
||||
->subject($this->mail_obj->subject)
|
||||
->markdown($this->mail_obj->markdown, $this->mail_obj->data)
|
||||
->withSymfonyMessage(function ($message) {
|
||||
$message->getHeaders()->addTextHeader('Tag', $this->mail_obj->tag);
|
||||
});
|
||||
->markdown($this->mail_obj->markdown, $this->mail_obj->data);
|
||||
}
|
||||
}
|
||||
|
@ -41,9 +41,6 @@ class UserNotificationMailer extends Mailable
|
||||
'title' => $this->mail_obj->data['title'],
|
||||
'body' => $this->mail_obj->data['message'],
|
||||
])
|
||||
->view($this->mail_obj->markdown, $this->mail_obj->data)
|
||||
->withSymfonyMessage(function ($message) {
|
||||
$message->getHeaders()->addTextHeader('Tag', $this->mail_obj->tag);
|
||||
});
|
||||
->view($this->mail_obj->markdown, $this->mail_obj->data);
|
||||
}
|
||||
}
|
||||
|
@ -42,8 +42,7 @@ class CompanyPresenter extends EntityPresenter
|
||||
} elseif (strlen($settings->company_logo) >= 1) {
|
||||
return url('') . $settings->company_logo;
|
||||
} else {
|
||||
return "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";
|
||||
//return asset('images/new_logo.png');
|
||||
return asset('images/blank.png');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,153 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
|
||||
*
|
||||
* @license https://www.elastic.co/licensing/elastic-license
|
||||
*/
|
||||
|
||||
namespace App\Notifications;
|
||||
|
||||
use App\Jobs\Invoice\CreateUbl;
|
||||
use App\Models\Invoice;
|
||||
use App\Utils\TempFile;
|
||||
use App\Utils\Traits\MakesInvoiceHtml;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
class BaseNotification extends Notification
|
||||
{
|
||||
// use Queueable;
|
||||
use MakesInvoiceHtml;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the notification's delivery channels.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return array
|
||||
*/
|
||||
public function via($notifiable)
|
||||
{
|
||||
return ['mail'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the mail representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return MailMessage
|
||||
*/
|
||||
public function toMail($notifiable)
|
||||
{
|
||||
return (new MailMessage)
|
||||
->line('The introduction to the notification.')
|
||||
->action('Notification Action', url('/'))
|
||||
->line('Thank you for using our application!');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the array representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($notifiable)
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public function buildMailMessageSettings(MailMessage $mail_message) :MailMessage
|
||||
{
|
||||
$mail_message->subject($this->generateEmailEntityHtml($this->entity, $this->subject, $this->contact));
|
||||
|
||||
if (strlen($this->settings->reply_to_email) > 1) {
|
||||
$mail_message->replyTo($this->settings->reply_to_email);
|
||||
}
|
||||
|
||||
if (strlen($this->settings->bcc_email) > 1) {
|
||||
$mail_message->bcc($this->settings->bcc_email);
|
||||
}
|
||||
|
||||
if ($this->settings->pdf_email_attachment) {
|
||||
$mail_message->attach(TempFile::path($this->invitation->pdf_file_path()), ['as' => basename($this->invitation->pdf_file_path())]);
|
||||
}
|
||||
|
||||
foreach ($this->entity->documents as $document) {
|
||||
$mail_message->attach(TempFile::path($document->generateUrl()), ['as' => $document->name]);
|
||||
}
|
||||
|
||||
if ($this->entity instanceof Invoice && $this->settings->ubl_email_attachment) {
|
||||
$ubl_string = (new Createubl($this->entity))->handle();
|
||||
$mail_message->attachData($ubl_string, $this->entity->getFileName('xml'));
|
||||
}
|
||||
|
||||
return $mail_message->withSymfonyMessage(function ($message) {
|
||||
$message->getHeaders()->addTextHeader('Tag', $this->invitation->company->company_key);
|
||||
});
|
||||
}
|
||||
|
||||
public function buildMailMessageData() :array
|
||||
{
|
||||
$body = $this->generateEmailEntityHtml($this->entity, $this->body, $this->contact);
|
||||
|
||||
$design_style = $this->settings->email_style;
|
||||
|
||||
if ($design_style == 'custom') {
|
||||
$email_style_custom = $this->settings->email_style_custom;
|
||||
$body = strtr($email_style_custom, "$body", $body);
|
||||
}
|
||||
|
||||
$data = [
|
||||
'body' => $body,
|
||||
'design' => $design_style,
|
||||
'footer' => '',
|
||||
'title' => '',
|
||||
'company' => '',
|
||||
'view_link' => $this->invitation->getLink(),
|
||||
'view_text' => ctrans('texts.view_'.$this->entity_string),
|
||||
'logo' => $this->entity->company->present()->logo(),
|
||||
'signature' => $this->settings->email_signature,
|
||||
'settings' => $this->settings,
|
||||
'whitelabel' => $this->entity->company->account->isPaid() ? true : false,
|
||||
];
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getTemplateView()
|
||||
{
|
||||
switch ($this->settings->email_style) {
|
||||
case 'plain':
|
||||
return 'email.template.plain';
|
||||
break;
|
||||
case 'custom':
|
||||
return 'email.template.custom';
|
||||
break;
|
||||
case 'light':
|
||||
return 'email.template.light';
|
||||
break;
|
||||
case 'dark':
|
||||
return 'email.template.dark';
|
||||
break;
|
||||
default:
|
||||
return 'email.admin.generic_email';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@ -74,6 +74,61 @@ class UpdatePaymentMethods
|
||||
}
|
||||
|
||||
$this->importBankAccounts($customer, $client);
|
||||
|
||||
$this->importPMBankAccounts($customer, $client);
|
||||
|
||||
}
|
||||
|
||||
/* ACH may also be nested inside Payment Methods.*/
|
||||
public function importPMBankAccounts($customer, $client)
|
||||
{
|
||||
$bank_methods = \Stripe\PaymentMethod::all(
|
||||
[
|
||||
'customer' => $customer->id,
|
||||
'type' => 'us_bank_account',
|
||||
],
|
||||
$this->stripe->stripe_connect_auth
|
||||
);
|
||||
|
||||
foreach($bank_methods->data as $method)
|
||||
{
|
||||
|
||||
$token_exists = ClientGatewayToken::where([
|
||||
'gateway_customer_reference' => $customer->id,
|
||||
'token' => $method->id,
|
||||
'client_id' => $client->id,
|
||||
'company_id' => $client->company_id,
|
||||
])->exists();
|
||||
|
||||
/* Already exists return */
|
||||
if ($token_exists) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$bank_account = $method['us_bank_account'];
|
||||
|
||||
$payment_meta = new \stdClass;
|
||||
$payment_meta->brand = (string) \sprintf('%s (%s)', $bank_account->bank_name, ctrans('texts.ach'));
|
||||
$payment_meta->last4 = (string) $bank_account->last4;
|
||||
$payment_meta->type = GatewayType::BANK_TRANSFER;
|
||||
$payment_meta->state = 'authorized';
|
||||
|
||||
$data = [
|
||||
'payment_meta' => $payment_meta,
|
||||
'token' => $method->id,
|
||||
'payment_method_id' => GatewayType::BANK_TRANSFER,
|
||||
];
|
||||
|
||||
$additional_data = ['gateway_customer_reference' => $customer->id];
|
||||
|
||||
if ($customer->default_source === $method->id) {
|
||||
$additional_data = ['gateway_customer_reference' => $customer->id, 'is_default' => 1];
|
||||
}
|
||||
|
||||
$this->stripe->storeGatewayToken($data, $additional_data);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function importBankAccounts($customer, $client)
|
||||
|
@ -766,6 +766,10 @@ class Design extends BaseDesign
|
||||
if ($this->entity->partial > 0) {
|
||||
$variables[] = '$partial_due';
|
||||
}
|
||||
|
||||
if (in_array('$paid_to_date', $variables)) {
|
||||
$variables = \array_diff($variables, ['$paid_to_date']);
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->entity instanceof Credit) {
|
||||
|
@ -200,6 +200,7 @@ return [
|
||||
'replication' => 'sentinel',
|
||||
'service' => env('REDIS_SENTINEL_SERVICE', 'mymaster'),
|
||||
'sentinel_timeout' => 3.0,
|
||||
// 'load_balancing' => false,
|
||||
'parameters' => [
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'database' => env('REDIS_DB', 0),
|
||||
@ -229,3 +230,11 @@ return [
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
*'replication' => function () {
|
||||
* $strategy = new Predis\Replication\ReplicationStrategy();
|
||||
* $strategy->disableLoadBalancing();
|
||||
* return new Predis\Connection\Replication\SentinelReplication($strategy);
|
||||
*}];
|
||||
*/
|
1
cypress.config.js
vendored
1
cypress.config.js
vendored
@ -3,6 +3,7 @@ const { defineConfig } = require('cypress')
|
||||
module.exports = defineConfig({
|
||||
chromeWebSecurity: false,
|
||||
retries: 2,
|
||||
video: false,
|
||||
defaultCommandTimeout: 5000,
|
||||
watchForFileChanges: false,
|
||||
videosFolder: 'tests/cypress/videos',
|
||||
|
18626
openapi/api-docs.yaml
18626
openapi/api-docs.yaml
File diff suppressed because it is too large
Load Diff
@ -1,195 +1,4 @@
|
||||
components:
|
||||
parameters:
|
||||
X-API-SECRET:
|
||||
name: X-API-SECRET
|
||||
in: header
|
||||
description: 'The API secret as defined by the .env variable API_SECRET. Only needed for self hosted users, and only applicable on the login route.'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: password
|
||||
X-Requested-With:
|
||||
name: X-Requested-With
|
||||
in: header
|
||||
description: 'Used to send the XMLHttpRequest header'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
readOnly: true
|
||||
example: XMLHttpRequest
|
||||
X-API-TOKEN:
|
||||
name: X-API-TOKEN
|
||||
in: header
|
||||
description: 'The API token to be used for authentication'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: TOKEN
|
||||
X-API-PASSWORD:
|
||||
name: X-API-PASSWORD
|
||||
in: header
|
||||
description: 'The login password when challenged on certain protected routes'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: supersecretpassword
|
||||
bank_integration_include:
|
||||
name: include
|
||||
in: query
|
||||
description: Include child relations of the BankIntegration object. Format is comma separated.
|
||||
require: false
|
||||
schema:
|
||||
type: string
|
||||
examples:
|
||||
company:
|
||||
value: company
|
||||
summary: The associated Company
|
||||
account:
|
||||
value: account
|
||||
summary: The associated Account
|
||||
bank_transactions:
|
||||
value: bank_transactions
|
||||
summary: The associated Bank Transactions
|
||||
client_include:
|
||||
name: include
|
||||
in: query
|
||||
description: Include child relationships of the Client Object.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
examples:
|
||||
activities:
|
||||
value: activities
|
||||
summary: include=activities will include the activities object in the response
|
||||
ledger:
|
||||
value: ledger
|
||||
summary: include=ledger will include the ledger object in the response
|
||||
system_logs:
|
||||
value: system_logs
|
||||
summary: include=system_logs will include the system_logs object in the response
|
||||
activity_include:
|
||||
name: include
|
||||
in: query
|
||||
description: Include child relations of the Activity object, format is comma separated. **Note** it is possible to chain multiple includes together, ie. include=account,token
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
examples:
|
||||
history:
|
||||
value: history
|
||||
summary: include=history will include the history object in the response (This could include references to the backup HTML of the entity)
|
||||
user:
|
||||
value: user
|
||||
summary: include=user will include the user object in the response
|
||||
client:
|
||||
value: client
|
||||
summary: include=client will include the client object in the response
|
||||
recurring_invoice:
|
||||
value: recurring_invoice
|
||||
summary: include=recurring_invoice will include the recurring_invoice object in the response
|
||||
invoice:
|
||||
value: invoice
|
||||
summary: include=invoice will include the invoice object in the response
|
||||
credit:
|
||||
value: credit
|
||||
summary: include=credit will include the credit object in the response
|
||||
quote:
|
||||
value: quote
|
||||
summary: include=quote will include the quote object in the response
|
||||
payment:
|
||||
value: payment
|
||||
summary: include=payment will include the payment object in the response
|
||||
expense:
|
||||
value: expense
|
||||
summary: include=expense will include the expense object in the response
|
||||
vendor_contact:
|
||||
value: vendor_contact
|
||||
summary: include=vendor_contact will include the vendor_contact object in the response
|
||||
vendor:
|
||||
value: vendor
|
||||
summary: include=vendor will include the vendor object in the response
|
||||
purchase_order:
|
||||
value: purchase_order
|
||||
summary: include=purchase_order will include the purchase_order object in the response
|
||||
task:
|
||||
value: task
|
||||
summary: include=task will include the task object in the response
|
||||
login_include:
|
||||
name: include
|
||||
in: query
|
||||
description: Include child relations of the CompanyUser object, format is comma separated. **Note** it is possible to chain multiple includes together, ie. include=account,token
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
examples:
|
||||
user:
|
||||
value: user
|
||||
summary: include=user will include the user object in the response
|
||||
company:
|
||||
value: company
|
||||
summary: include=company will include the company object in the response
|
||||
token:
|
||||
value: token
|
||||
summary: include=token will include the token object in the response
|
||||
account:
|
||||
value: account
|
||||
summary: include=account will include the account object in the response
|
||||
per_page_meta:
|
||||
name: per_page
|
||||
in: query
|
||||
description: The number of records to return for each request, default is 20
|
||||
required: false
|
||||
schema:
|
||||
type: int
|
||||
example: 20
|
||||
page_meta:
|
||||
name: page
|
||||
in: query
|
||||
description: The page number to return for this request (when performing pagination), default is 1
|
||||
required: false
|
||||
schema:
|
||||
type: int
|
||||
example: 1
|
||||
include:
|
||||
name: include
|
||||
in: query
|
||||
description: 'Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: 'first_load'
|
||||
include_static:
|
||||
name: include_static
|
||||
in: query
|
||||
description: 'Returns static variables'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: include_static=true
|
||||
clear_cache:
|
||||
name: clear_cache
|
||||
in: query
|
||||
description: 'Clears the static cache'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: clear_cache=true
|
||||
index:
|
||||
name: index
|
||||
in: query
|
||||
description: 'Replaces the default response index from data to a user specific string'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: user
|
||||
api_version:
|
||||
name: api_version
|
||||
in: query
|
||||
description: 'The API version'
|
||||
required: false
|
||||
schema:
|
||||
type: number
|
||||
example: user
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
description: 'The API version'
|
||||
|
192
openapi/components/parameters.yaml
Normal file
192
openapi/components/parameters.yaml
Normal file
@ -0,0 +1,192 @@
|
||||
parameters:
|
||||
X-API-SECRET:
|
||||
name: X-API-SECRET
|
||||
in: header
|
||||
description: 'The API secret as defined by the .env variable API_SECRET. Only needed for self hosted users, and only applicable on the login route.'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: password
|
||||
X-Requested-With:
|
||||
name: X-Requested-With
|
||||
in: header
|
||||
description: 'Used to send the XMLHttpRequest header'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
readOnly: true
|
||||
example: XMLHttpRequest
|
||||
X-API-TOKEN:
|
||||
name: X-API-TOKEN
|
||||
in: header
|
||||
description: 'The API token to be used for authentication'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: TOKEN
|
||||
X-API-PASSWORD:
|
||||
name: X-API-PASSWORD
|
||||
in: header
|
||||
description: 'The login password when challenged on certain protected routes'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: supersecretpassword
|
||||
bank_integration_include:
|
||||
name: include
|
||||
in: query
|
||||
description: Include child relations of the BankIntegration object. Format is comma separated.
|
||||
require: false
|
||||
schema:
|
||||
type: string
|
||||
examples:
|
||||
company:
|
||||
value: company
|
||||
summary: The associated Company
|
||||
account:
|
||||
value: account
|
||||
summary: The associated Account
|
||||
bank_transactions:
|
||||
value: bank_transactions
|
||||
summary: The associated Bank Transactions
|
||||
client_include:
|
||||
name: include
|
||||
in: query
|
||||
description: Include child relationships of the Client Object.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
examples:
|
||||
activities:
|
||||
value: activities
|
||||
summary: include=activities will include the activities object in the response
|
||||
ledger:
|
||||
value: ledger
|
||||
summary: include=ledger will include the ledger object in the response
|
||||
system_logs:
|
||||
value: system_logs
|
||||
summary: include=system_logs will include the system_logs object in the response
|
||||
activity_include:
|
||||
name: include
|
||||
in: query
|
||||
description: Include child relations of the Activity object, format is comma separated. **Note** it is possible to chain multiple includes together, ie. include=account,token
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
examples:
|
||||
history:
|
||||
value: history
|
||||
summary: include=history will include the history object in the response (This could include references to the backup HTML of the entity)
|
||||
user:
|
||||
value: user
|
||||
summary: include=user will include the user object in the response
|
||||
client:
|
||||
value: client
|
||||
summary: include=client will include the client object in the response
|
||||
recurring_invoice:
|
||||
value: recurring_invoice
|
||||
summary: include=recurring_invoice will include the recurring_invoice object in the response
|
||||
invoice:
|
||||
value: invoice
|
||||
summary: include=invoice will include the invoice object in the response
|
||||
credit:
|
||||
value: credit
|
||||
summary: include=credit will include the credit object in the response
|
||||
quote:
|
||||
value: quote
|
||||
summary: include=quote will include the quote object in the response
|
||||
payment:
|
||||
value: payment
|
||||
summary: include=payment will include the payment object in the response
|
||||
expense:
|
||||
value: expense
|
||||
summary: include=expense will include the expense object in the response
|
||||
vendor_contact:
|
||||
value: vendor_contact
|
||||
summary: include=vendor_contact will include the vendor_contact object in the response
|
||||
vendor:
|
||||
value: vendor
|
||||
summary: include=vendor will include the vendor object in the response
|
||||
purchase_order:
|
||||
value: purchase_order
|
||||
summary: include=purchase_order will include the purchase_order object in the response
|
||||
task:
|
||||
value: task
|
||||
summary: include=task will include the task object in the response
|
||||
login_include:
|
||||
name: include
|
||||
in: query
|
||||
description: Include child relations of the CompanyUser object, format is comma separated. **Note** it is possible to chain multiple includes together, ie. include=account,token
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
examples:
|
||||
user:
|
||||
value: user
|
||||
summary: include=user will include the user object in the response
|
||||
company:
|
||||
value: company
|
||||
summary: include=company will include the company object in the response
|
||||
token:
|
||||
value: token
|
||||
summary: include=token will include the token object in the response
|
||||
account:
|
||||
value: account
|
||||
summary: include=account will include the account object in the response
|
||||
per_page_meta:
|
||||
name: per_page
|
||||
in: query
|
||||
description: The number of records to return for each request, default is 20
|
||||
required: false
|
||||
schema:
|
||||
type: int
|
||||
example: 20
|
||||
page_meta:
|
||||
name: page
|
||||
in: query
|
||||
description: The page number to return for this request (when performing pagination), default is 1
|
||||
required: false
|
||||
schema:
|
||||
type: int
|
||||
example: 1
|
||||
include:
|
||||
name: include
|
||||
in: query
|
||||
description: 'Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: 'first_load'
|
||||
include_static:
|
||||
name: include_static
|
||||
in: query
|
||||
description: 'Returns static variables'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: include_static=true
|
||||
clear_cache:
|
||||
name: clear_cache
|
||||
in: query
|
||||
description: 'Clears the static cache'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: clear_cache=true
|
||||
index:
|
||||
name: index
|
||||
in: query
|
||||
description: 'Replaces the default response index from data to a user specific string'
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: user
|
||||
api_version:
|
||||
name: api_version
|
||||
in: query
|
||||
description: 'The API version'
|
||||
required: false
|
||||
schema:
|
||||
type: number
|
||||
example: user
|
||||
|
68
openapi/components/parameters/default_filters.yaml
Normal file
68
openapi/components/parameters/default_filters.yaml
Normal file
@ -0,0 +1,68 @@
|
||||
########################### Generic filters available across all filter ##################################
|
||||
status:
|
||||
name: status
|
||||
in: query
|
||||
description: |
|
||||
Filter the entity based on their status. ie active / archived / deleted. Format is a comma separated string with any of the following options:
|
||||
- active
|
||||
- archived
|
||||
- deleted
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: ?status=archived,deleted
|
||||
client_id:
|
||||
name: client_id
|
||||
in: query
|
||||
description: |
|
||||
Filters the entity list by client_id. Suitable when you only want the entities of a specific client.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: ?client_id={client_id}
|
||||
created_at:
|
||||
name: created_at
|
||||
in: query
|
||||
description: |
|
||||
Filters the entity list by the created at timestamp. Parameter value can be a datetime string or unix timestamp
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
example: ?created_at=2022-01-10
|
||||
updated_at:
|
||||
name: updated_at
|
||||
in: query
|
||||
description: |
|
||||
Filters the entity list by the updated at timestamp. Parameter value can be a datetime string or unix timestamp
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
example: ?updated_at=2022-01-10
|
||||
is_deleted:
|
||||
name: is_deleted
|
||||
in: query
|
||||
description: |
|
||||
Filters the entity list by entities that have been deleted.
|
||||
required: false
|
||||
schema:
|
||||
type: booleans
|
||||
example: ?is_deleted=true
|
||||
vendor_id:
|
||||
name: vendor_id
|
||||
in: query
|
||||
description: |
|
||||
Filters the entity list by an associated vendor
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: ?vendor_id={vendor_id}
|
||||
filter_deleted_clients:
|
||||
name: filter_deleted_clients
|
||||
in: query
|
||||
description: |
|
||||
Filters the entity list and only returns entities for clients that have not been deleted
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: ?filter_deleted_clients=true
|
||||
########################### Generic filters available across all filter ##################################
|
1
openapi/components/responses.yaml
Normal file
1
openapi/components/responses.yaml
Normal file
@ -0,0 +1 @@
|
||||
responses:
|
6
openapi/components/responses/401.yaml
Normal file
6
openapi/components/responses/401.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
6
openapi/components/responses/403.yaml
Normal file
6
openapi/components/responses/403.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
0
openapi/components/responses/404.yaml
Normal file
0
openapi/components/responses/404.yaml
Normal file
6
openapi/components/responses/422.yaml
Normal file
6
openapi/components/responses/422.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
6
openapi/components/responses/default.yaml
Normal file
6
openapi/components/responses/default.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
@ -1,5 +1,4 @@
|
||||
schemas:
|
||||
|
||||
BankTransactionRule:
|
||||
properties:
|
||||
id:
|
||||
|
@ -1,25 +1,58 @@
|
||||
tags:
|
||||
-
|
||||
name: login
|
||||
- name: login
|
||||
description: |
|
||||
Attempts to authenticate with the API using a email/password combination.
|
||||
Attempts to authenticate with the API using a email/password combination.
|
||||
externalDocs:
|
||||
description: 'Find out more'
|
||||
url: 'https://invoiceninja.github.io'
|
||||
-
|
||||
name: clients
|
||||
description: "Find out more"
|
||||
url: "https://invoiceninja.github.io"
|
||||
- name: clients
|
||||
description: |
|
||||
Endpoint definitions for interacting with clients.
|
||||
-
|
||||
name: products
|
||||
Endpoint definitions for interacting with clients.
|
||||
- name: products
|
||||
description: |
|
||||
Endpoint definitions for interacting with products.
|
||||
-
|
||||
name: invoices
|
||||
Endpoint definitions for interacting with products.
|
||||
- name: invoices
|
||||
description: |
|
||||
Endpoint definitions for interacting with invoices.
|
||||
Endpoint definitions for interacting with invoices.
|
||||
- name: recurring_invoices
|
||||
description: |
|
||||
Endpoint definitions for interacting with recurring_invoices.
|
||||
- name: payments
|
||||
description: |
|
||||
Endpoint definitions for interacting with payments.
|
||||
- name: quotes
|
||||
description: |
|
||||
Endpoint definitions for interacting with quotes.
|
||||
- name: credits
|
||||
description: |
|
||||
Endpoint definitions for interacting with credits.
|
||||
- name: projects
|
||||
description: |
|
||||
Endpoint definitions for interacting with projects.
|
||||
- name: tasks
|
||||
description: |
|
||||
Endpoint definitions for interacting with tasks.
|
||||
- name: vendors
|
||||
description: |
|
||||
Endpoint definitions for interacting with vendors.
|
||||
- name: Purchase Orders
|
||||
summary: Purchase Orders
|
||||
description: |
|
||||
Endpoint definitions for interacting with purchase orders.
|
||||
- name: expenses
|
||||
description: |
|
||||
Endpoint definitions for interacting with expenses.
|
||||
- name: recurring_expenses
|
||||
description: |
|
||||
Endpoint definitions for interacting with recurring_expenses.
|
||||
- name: bank_transactions
|
||||
description: |
|
||||
Endpoint definitions for interacting with bank transactions.
|
||||
- name: reports
|
||||
description: |
|
||||
Endpoint definitions for interacting with reports.
|
||||
externalDocs:
|
||||
description: 'https://invoiceninja.github.io'
|
||||
url: 'https://invoiceninja.github.io'
|
||||
description: "https://invoiceninja.github.io"
|
||||
url: "https://invoiceninja.github.io"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
13617
openapi/paths.yaml
13617
openapi/paths.yaml
File diff suppressed because it is too large
Load Diff
@ -7,72 +7,66 @@
|
||||
Lists clients. Fine grained filtering is also available using query parameters.
|
||||
operationId: getClients
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
$ref: '#/components/parameters/index'
|
||||
-
|
||||
name: name
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/client_include'
|
||||
- $ref: '#/components/parameters/index'
|
||||
- $ref: "#/components/parameters/status"
|
||||
- $ref: "#/components/parameters/created_at"
|
||||
- $ref: "#/components/parameters/updated_at"
|
||||
- $ref: "#/components/parameters/is_deleted"
|
||||
- $ref: "#/components/parameters/filter_deleted_clients"
|
||||
- $ref: "#/components/parameters/vendor_id"
|
||||
- name: name
|
||||
in: query
|
||||
description: Filter by client name
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: bob
|
||||
-
|
||||
name: balance
|
||||
- name: balance
|
||||
in: query
|
||||
description: Filter by client balance, format uses an operator and value separated by a colon. lt,lte, gt, gte, eq
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: lt:10
|
||||
-
|
||||
name: between_balance
|
||||
- name: between_balance
|
||||
in: query
|
||||
description: Filter between client balances, format uses two values separated by a colon
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: 10:100
|
||||
-
|
||||
name: email
|
||||
- name: email
|
||||
in: query
|
||||
description: Filter by client email
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: bob@gmail.com
|
||||
-
|
||||
name: id_number
|
||||
- name: id_number
|
||||
in: query
|
||||
description: Filter by client id_number
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: a1039883
|
||||
-
|
||||
name: number
|
||||
- name: number
|
||||
in: query
|
||||
description: Filter by client number
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: a1039883
|
||||
-
|
||||
name: filter
|
||||
- name: filter
|
||||
in: query
|
||||
description: Filters clients on columns - name, id_number, contact.first_name contact.last_name, contact.email, custom_value1-4
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: a1039883
|
||||
-
|
||||
name: sort
|
||||
- name: sort
|
||||
in: query
|
||||
description: Returns the list sorted by column in ascending or descending order.
|
||||
required: false
|
||||
@ -95,42 +89,23 @@
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
||||
post:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Create client'
|
||||
description: 'Adds an client to a company'
|
||||
description: 'Adds a client to a company'
|
||||
operationId: storeClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/client_include'
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the saved client object'
|
||||
@ -146,29 +121,13 @@
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
||||
'/api/v1/clients/{id}':
|
||||
get:
|
||||
tags:
|
||||
@ -177,74 +136,10 @@
|
||||
description: 'Displays a client by id'
|
||||
operationId: showClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the cl.ient object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
put:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Update client'
|
||||
description: 'Handles the updating of a client by id'
|
||||
operationId: updateClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
name: id
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/client_include'
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
@ -267,29 +162,53 @@
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
$ref: '#/components/responses/default'
|
||||
put:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Update client'
|
||||
description: 'Handles the updating of a client by id'
|
||||
operationId: updateClient
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/client_include'
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the client object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
$ref: '#/components/responses/default'
|
||||
delete:
|
||||
tags:
|
||||
- clients
|
||||
@ -297,14 +216,10 @@
|
||||
description: 'Handles the deletion of a client by id'
|
||||
operationId: deleteClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
name: id
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/client_include'
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
@ -323,29 +238,13 @@
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
||||
'/api/v1/clients/{id}/edit':
|
||||
get:
|
||||
tags:
|
||||
@ -354,14 +253,10 @@
|
||||
description: 'Displays a client by id'
|
||||
operationId: editClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
-
|
||||
name: id
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/include'
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
@ -384,29 +279,13 @@
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
||||
/api/v1/clients/create:
|
||||
get:
|
||||
tags:
|
||||
@ -415,12 +294,9 @@
|
||||
description: 'Returns a blank object with default values'
|
||||
operationId: getClientsCreate
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/client_include'
|
||||
responses:
|
||||
200:
|
||||
description: 'A blank client object'
|
||||
@ -436,43 +312,24 @@
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
||||
/api/v1/clients/bulk:
|
||||
post:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Bulk actions'
|
||||
description: ''
|
||||
summary: 'Bulk client actions'
|
||||
description: 'Archive / Restore / Delete in bulk'
|
||||
operationId: bulkClients
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/index'
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/index'
|
||||
requestBody:
|
||||
description: 'User credentials'
|
||||
required: true
|
||||
@ -499,45 +356,25 @@
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
||||
'/api/v1/clients/{id}/upload':
|
||||
put:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Add client document'
|
||||
description: 'Handles the uploading of a document to a client'
|
||||
description: 'Handles the uploading of a document to a client, please note due to a quirk in REST you will need to use a _method parameter with value of POST'
|
||||
operationId: uploadClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
name: id
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/client_include'
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
@ -545,6 +382,21 @@
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
produces:
|
||||
- application/json
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
_method:
|
||||
type: string
|
||||
example: POST
|
||||
documents:
|
||||
type: array
|
||||
format: binary
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the client object'
|
||||
@ -560,29 +412,13 @@
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
||||
'/api/v1/clients/{id}/purge':
|
||||
post:
|
||||
tags:
|
||||
@ -591,14 +427,10 @@
|
||||
description: 'Handles purging a client'
|
||||
operationId: purgeClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
name: id
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/client_include'
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
@ -617,29 +449,13 @@
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
||||
'/api/v1/clients/{id}/{mergeable_client_hashed_id}/merge':
|
||||
post:
|
||||
tags:
|
||||
@ -648,14 +464,10 @@
|
||||
description: 'Handles merging 2 clients'
|
||||
operationId: mergeClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
name: id
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/client_include'
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
@ -663,8 +475,7 @@
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
-
|
||||
name: mergeable_client_hashed_id
|
||||
- name: mergeable_client_hashed_id
|
||||
in: path
|
||||
description: 'The Mergeable Client Hashed ID'
|
||||
required: true
|
||||
@ -683,29 +494,13 @@
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
||||
/api/v1/client_statement:
|
||||
post:
|
||||
tags:
|
||||
@ -714,12 +509,9 @@
|
||||
description: 'Return a PDF of the client statement'
|
||||
operationId: clientStatement
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/include'
|
||||
requestBody:
|
||||
description: 'Statment Options'
|
||||
required: true
|
||||
@ -758,26 +550,10 @@
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
384
openapi/paths/credits.yaml
Normal file
384
openapi/paths/credits.yaml
Normal file
@ -0,0 +1,384 @@
|
||||
/api/v1/credits:
|
||||
get:
|
||||
tags:
|
||||
- credits
|
||||
summary: "List credits"
|
||||
description: "Lists credits, search and filters allow fine grained lists to be generated.\n *\n * Query parameters can be added to performed more fine grained filtering of the credits, these are handled by the CreditFilters class which defines the methods available"
|
||||
operationId: getCredits
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "A list of credits"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Credit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
post:
|
||||
tags:
|
||||
- credits
|
||||
summary: "Create credit"
|
||||
description: "Adds an credit to the system"
|
||||
operationId: storeCredit
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the saved credit object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Credit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
|
||||
"/api/v1/credits/{id}":
|
||||
get:
|
||||
tags:
|
||||
- credits
|
||||
summary: "Show credit"
|
||||
description: "Displays an credit by id"
|
||||
operationId: showCredit
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Credit Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the credit object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Credit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
put:
|
||||
tags:
|
||||
- Credits
|
||||
summary: "Update credit"
|
||||
description: "Handles the updating of an Credit by id"
|
||||
operationId: updateCredit
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Credit Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Credit object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Credit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
delete:
|
||||
tags:
|
||||
- credits
|
||||
summary: "Delete credit"
|
||||
description: "Handles the deletion of an credit by id"
|
||||
operationId: deleteCredit
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Credit Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns a HTTP status"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/credits/{id}/edit":
|
||||
get:
|
||||
tags:
|
||||
- credits
|
||||
summary: "Edit credit"
|
||||
description: "Displays an credit by id"
|
||||
operationId: editCredit
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Invoice Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the credit object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Invoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
/api/v1/credits/create:
|
||||
get:
|
||||
tags:
|
||||
- credits
|
||||
summary: "Blank credit"
|
||||
description: "Returns a blank object with default values"
|
||||
operationId: getCreditsCreate
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "A blank credit object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Credit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
/api/v1/credits/bulk:
|
||||
post:
|
||||
tags:
|
||||
- credits
|
||||
summary: "Bulk credit actions"
|
||||
description: ""
|
||||
operationId: bulkCredits
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/index"
|
||||
requestBody:
|
||||
description: "User credentials"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
description: "Array of hashed IDs to be bulk 'actioned"
|
||||
type: integer
|
||||
example: "[0,1,2,3]"
|
||||
responses:
|
||||
200:
|
||||
description: "The Bulk Action response"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/credit/{invitation_key}/download":
|
||||
get:
|
||||
tags:
|
||||
- quotes
|
||||
summary: "Download quote PDF"
|
||||
description: "Downloads a specific quote"
|
||||
operationId: downloadCredit
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: invitation_key
|
||||
in: path
|
||||
description: "The Credit Invitation Key"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the credit pdf"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/credits/{id}/upload":
|
||||
put:
|
||||
tags:
|
||||
- credits
|
||||
summary: "Upload a credit document"
|
||||
description: "Handles the uploading of a document to a credit"
|
||||
operationId: uploadCredits
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Credit Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Credit object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Credit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
610
openapi/paths/invoices.yaml
Normal file
610
openapi/paths/invoices.yaml
Normal file
@ -0,0 +1,610 @@
|
||||
/api/v1/invoices:
|
||||
get:
|
||||
tags:
|
||||
- invoices
|
||||
summary: "List invoices"
|
||||
description: |
|
||||
Lists invoices with the option to chain multiple query parameters allowing fine grained filtering of the list.
|
||||
|
||||
operationId: getInvoices
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- $ref: "#/components/parameters/status"
|
||||
- $ref: "#/components/parameters/client_id"
|
||||
- $ref: "#/components/parameters/created_at"
|
||||
- $ref: "#/components/parameters/updated_at"
|
||||
- $ref: "#/components/parameters/is_deleted"
|
||||
- $ref: "#/components/parameters/filter_deleted_clients"
|
||||
- $ref: "#/components/parameters/vendor_id"
|
||||
- name: client_status
|
||||
in: query
|
||||
description: |
|
||||
A comma separated list of invoice status strings. Valid options include:
|
||||
- all
|
||||
- paid
|
||||
- unpaid
|
||||
- overdue
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: ?client_status=paid,unpaid
|
||||
- name: number
|
||||
in: query
|
||||
description: |
|
||||
Search invoices by invoice number
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: ?number=INV-001
|
||||
- name: filter
|
||||
in: query
|
||||
description: |
|
||||
Searches across a range of columns including:
|
||||
- number
|
||||
- po_number
|
||||
- date
|
||||
- amount
|
||||
- balance
|
||||
- custom_value1
|
||||
- custom_value2
|
||||
- custom_value3
|
||||
- custom_value4
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: ?filter=bob
|
||||
- name: without_deleted_clients
|
||||
in: query
|
||||
description: |
|
||||
Returns the invoice list without the invoices of deleted clients.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: ?without_deleted_clients=
|
||||
- name: overdue
|
||||
in: query
|
||||
description: |
|
||||
Returns the list of invoices that are overdue
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: ?over_due=
|
||||
- name: payable
|
||||
in: query
|
||||
description: |
|
||||
Returns the invoice list that are payable for a defined client. Please note, you must pass the client_id as the value for this query parameter
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: ?payable={client_id}
|
||||
- name: sort
|
||||
in: query
|
||||
description: Returns the list sorted by column in ascending or descending order.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: id|desc number|desc balance|asc
|
||||
- name: private_notes
|
||||
in: query
|
||||
description: |
|
||||
Searches on the private_notes field of the invoices
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: ?private_notes=super secret
|
||||
responses:
|
||||
200:
|
||||
description: "A list of invoices"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Invoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
post:
|
||||
tags:
|
||||
- invoices
|
||||
summary: "Create invoice"
|
||||
description: "Adds a invoice to a company"
|
||||
operationId: storeInvoice
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/FillableInvoice"
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the saved invoice entity"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Invoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
|
||||
"/api/v1/invoices/{id}":
|
||||
get:
|
||||
tags:
|
||||
- invoices
|
||||
summary: "Show invoice"
|
||||
description: "Displays an invoice by id"
|
||||
operationId: showInvoice
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Invoice Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the invoice object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Invoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
|
||||
put:
|
||||
tags:
|
||||
- invoices
|
||||
summary: "Update invoice"
|
||||
description: "Handles the updating of an invoice by id"
|
||||
operationId: updateInvoice
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Invoice Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the invoice object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Invoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
delete:
|
||||
tags:
|
||||
- invoices
|
||||
summary: "Delete invoice"
|
||||
description: "Handles the deletion of an invoice by id"
|
||||
operationId: deleteInvoice
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Invoice Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns a HTTP status"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/invoices/{id}/edit":
|
||||
get:
|
||||
tags:
|
||||
- invoices
|
||||
summary: "Edit invoice"
|
||||
description: "Displays an invoice by id for editting"
|
||||
operationId: editInvoice
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Invoice Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the invoice object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Invoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
|
||||
/api/v1/invoices/create:
|
||||
get:
|
||||
tags:
|
||||
- invoices
|
||||
summary: "Blank invoice"
|
||||
description: "Returns a blank object with default values"
|
||||
operationId: getInvoicesCreate
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "A blank invoice object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Invoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
|
||||
/api/v1/invoices/bulk:
|
||||
post:
|
||||
tags:
|
||||
- invoices
|
||||
summary: "Bulk invoice actions"
|
||||
description: |
|
||||
There are multiple actions that are available including:
|
||||
|
||||
operationId: bulkInvoices
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/index"
|
||||
requestBody:
|
||||
description: "Bulk action details"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
action:
|
||||
type: string
|
||||
description: |
|
||||
The action to be performed, options include:
|
||||
- `bulk_download`
|
||||
Bulk download an array of invoice PDFs (These are sent to the admin via email.)
|
||||
- `download`
|
||||
Download a single PDF. (Returns a single PDF object)
|
||||
- `bulk_print`
|
||||
Merges an array of Invoice PDFs for easy one click printing.
|
||||
- `auto_bill`
|
||||
Attempts to automatically bill the invoices with the payment method on file.
|
||||
- `clone_to_invoice`
|
||||
Returns a clone of the invoice.
|
||||
- `clone_to_quote`
|
||||
Returns a quote cloned using the properties of the given invoice.
|
||||
- `mark_paid`
|
||||
Marks an array of invoices as paid.
|
||||
- `mark_sent`
|
||||
Marks an array of invoices as sent.
|
||||
- `restore`
|
||||
Restores an array of invoices
|
||||
- `delete`
|
||||
Deletes an array of invoices
|
||||
- `archive`
|
||||
Archives an array of invoices
|
||||
- `cancel`
|
||||
Cancels an array of invoices
|
||||
- `email`
|
||||
Emails an array of invoices
|
||||
- `send_email`
|
||||
Emails an array of invoices. Requires additional properties to be sent. `email_type`
|
||||
required: true
|
||||
ids:
|
||||
required: true
|
||||
type: array
|
||||
items:
|
||||
description: "Array of hashed IDs to be bulk 'actioned - ['D2J234DFA','D2J234DFA','D2J234DFA']"
|
||||
type: string
|
||||
example:
|
||||
action: bulk_download
|
||||
ids: "['D2J234DFA','D2J234DFA','D2J234DFA']"
|
||||
|
||||
responses:
|
||||
200:
|
||||
description: "The Bulk Action response"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
|
||||
"/api/v1/invoices/{id}/{action}":
|
||||
get:
|
||||
deprecated: true
|
||||
tags:
|
||||
- invoices
|
||||
summary: "Custom invoice action"
|
||||
description: |
|
||||
Performs a custom action on an invoice.
|
||||
The current range of actions are as follows
|
||||
- clone_to_invoice
|
||||
- clone_to_quote
|
||||
- history
|
||||
- delivery_note
|
||||
- mark_paid
|
||||
- download
|
||||
- archive
|
||||
- delete
|
||||
- email
|
||||
operationId: actionInvoice
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Invoice Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
- name: action
|
||||
in: path
|
||||
description: "The action string to be performed"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: clone_to_quote
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the invoice object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Invoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/invoice/{invitation_key}/download":
|
||||
get:
|
||||
tags:
|
||||
- invoices
|
||||
summary: "Download invoice PDF"
|
||||
description: "Downloads a specific invoice"
|
||||
operationId: downloadInvoice
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: invitation_key
|
||||
in: path
|
||||
description: "The Invoice Invitation Key"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the invoice pdf"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/invoices/{id}/delivery_note":
|
||||
get:
|
||||
tags:
|
||||
- invoices
|
||||
summary: "Download delivery note"
|
||||
description: "Downloads a specific invoice delivery notes"
|
||||
operationId: deliveryNote
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Invoice Hahsed Id"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the invoice delivery note pdf"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/invoices/{id}/upload":
|
||||
put:
|
||||
tags:
|
||||
- invoices
|
||||
summary: "Add invoice document"
|
||||
description: "Handles the uploading of a document to a invoice"
|
||||
operationId: uploadInvoice
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Invoice Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Invoice object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Invoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
476
openapi/paths/payments.yaml
Normal file
476
openapi/paths/payments.yaml
Normal file
@ -0,0 +1,476 @@
|
||||
/api/v1/payments:
|
||||
get:
|
||||
tags:
|
||||
- payments
|
||||
summary: "List payments"
|
||||
description: "Lists payments, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the payments, these are handled by the PaymentFilters class which defines the methods available"
|
||||
operationId: getPayments
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- $ref: "#/components/parameters/status"
|
||||
- $ref: "#/components/parameters/client_id"
|
||||
- $ref: "#/components/parameters/created_at"
|
||||
- $ref: "#/components/parameters/updated_at"
|
||||
- $ref: "#/components/parameters/is_deleted"
|
||||
- $ref: "#/components/parameters/filter_deleted_clients"
|
||||
- $ref: "#/components/parameters/vendor_id"
|
||||
- name: filter
|
||||
in: query
|
||||
description: |
|
||||
Searches across a range of columns including:
|
||||
- amount
|
||||
- date
|
||||
- custom_value1
|
||||
- custom_value2
|
||||
- custom_value3
|
||||
- custom_value4
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: ?filter=10
|
||||
- name: number
|
||||
in: query
|
||||
description: |
|
||||
Search payments by payment number
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: ?number=0001
|
||||
- name: sort
|
||||
in: query
|
||||
description: Returns the list sorted by column in ascending or descending order.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: id|desc number|desc balance|asc
|
||||
responses:
|
||||
200:
|
||||
description: "A list of payments"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Payment"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
post:
|
||||
tags:
|
||||
- payments
|
||||
summary: "Create payment"
|
||||
description: "Adds an Payment to the system"
|
||||
operationId: storePayment
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
requestBody:
|
||||
description: "The payment request"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Payment"
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the saved Payment object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Payment"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
|
||||
"/api/v1/payments/{id}":
|
||||
get:
|
||||
tags:
|
||||
- payments
|
||||
summary: "Show payment"
|
||||
description: "Displays an Payment by id"
|
||||
operationId: showPayment
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Payment Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Payment object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Payment"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
put:
|
||||
tags:
|
||||
- payments
|
||||
summary: "Update payment"
|
||||
description: "Handles the updating of an Payment by id"
|
||||
operationId: updatePayment
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Payment Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Payment object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Payment"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
delete:
|
||||
tags:
|
||||
- payments
|
||||
summary: "Delete payment"
|
||||
description: "Handles the deletion of an Payment by id"
|
||||
operationId: deletePayment
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Payment Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns a HTTP status"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/payments/{id}/edit":
|
||||
get:
|
||||
tags:
|
||||
- payments
|
||||
summary: "Edit payment"
|
||||
description: "Displays an Payment by id"
|
||||
operationId: editPayment
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Payment Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Payment object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Payment"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
/api/v1/payments/create:
|
||||
get:
|
||||
tags:
|
||||
- payments
|
||||
summary: "Blank payment"
|
||||
description: "Returns a blank object with default values"
|
||||
operationId: getPaymentsCreate
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "A blank Payment object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Payment"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
/api/v1/payments/refund:
|
||||
post:
|
||||
tags:
|
||||
- payments
|
||||
summary: "Refund payment"
|
||||
description: "Adds an Refund to the system"
|
||||
operationId: storeRefund
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
requestBody:
|
||||
description: "The refund request"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Payment"
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the saved Payment object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Payment"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
/api/v1/payments/bulk:
|
||||
post:
|
||||
tags:
|
||||
- payments
|
||||
summary: "Bulk payment actions"
|
||||
description: ""
|
||||
operationId: bulkPayments
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/index"
|
||||
requestBody:
|
||||
description: "User credentials"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
description: "Array of hashed IDs to be bulk 'actioned"
|
||||
type: integer
|
||||
example: "[0,1,2,3]"
|
||||
responses:
|
||||
200:
|
||||
description: "The Payment response"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Payment"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/payments/{id}/{action}":
|
||||
get:
|
||||
deprecated: true
|
||||
tags:
|
||||
- payments
|
||||
summary: "Custom payment actions"
|
||||
description: "Performs a custom action on an Payment.\n\n The current range of actions are as follows\n - clone_to_Payment\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - email"
|
||||
operationId: actionPayment
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Payment Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
- name: action
|
||||
in: path
|
||||
description: "The action string to be performed"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: clone_to_quote
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Payment object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Payment"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
|
||||
"/api/v1/payments/{id}/upload":
|
||||
put:
|
||||
tags:
|
||||
- payments
|
||||
summary: "Upload a payment document"
|
||||
description: "Handles the uploading of a document to a payment"
|
||||
operationId: uploadPayment
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Payment Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Payment object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Payment"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
387
openapi/paths/products.yaml
Normal file
387
openapi/paths/products.yaml
Normal file
@ -0,0 +1,387 @@
|
||||
/api/v1/products:
|
||||
get:
|
||||
tags:
|
||||
- products
|
||||
summary: "List products"
|
||||
description: |
|
||||
Lists products, search and filters allow fine grained lists to be generated.
|
||||
Query parameters can be added to perform fine grained filtering of the products list, these are handled by the ProductFilters class
|
||||
which defines the methods available
|
||||
operationId: getProducts
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- $ref: "#/components/parameters/status"
|
||||
- $ref: "#/components/parameters/client_id"
|
||||
- $ref: "#/components/parameters/created_at"
|
||||
- $ref: "#/components/parameters/updated_at"
|
||||
- $ref: "#/components/parameters/is_deleted"
|
||||
- $ref: "#/components/parameters/filter_deleted_clients"
|
||||
- $ref: "#/components/parameters/vendor_id"
|
||||
- name: filter
|
||||
in: query
|
||||
description: Filter by product name
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: bob
|
||||
- name: product_key
|
||||
in: query
|
||||
description: Filter by product key
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: bob
|
||||
- name: sort
|
||||
in: query
|
||||
description: Returns the list sorted by column in ascending or descending order.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: id|desc product_key|desc
|
||||
responses:
|
||||
200:
|
||||
description: "A list of products"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Product"
|
||||
401:
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
$ref: '#/components/responses/default'
|
||||
post:
|
||||
tags:
|
||||
- products
|
||||
summary: "Create Product"
|
||||
description: "Adds a product to a company"
|
||||
operationId: storeProduct
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the saved product object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Product"
|
||||
401:
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
$ref: '#/components/responses/default'
|
||||
"/api/v1/products/{id}":
|
||||
get:
|
||||
tags:
|
||||
- products
|
||||
summary: "Show product"
|
||||
description: "Displays a product by id"
|
||||
operationId: showProduct
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Product Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the product object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Product"
|
||||
401:
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
$ref: '#/components/responses/default'
|
||||
put:
|
||||
tags:
|
||||
- products
|
||||
summary: "Update product"
|
||||
description: "Handles the updating of a product by id"
|
||||
operationId: updateProduct
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Product Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Product object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Product"
|
||||
401:
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
$ref: '#/components/responses/default'
|
||||
delete:
|
||||
tags:
|
||||
- products
|
||||
summary: "Delete product"
|
||||
description: "Handles the deletion of a product by id"
|
||||
operationId: deleteProduct
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Product Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns a HTTP status"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
$ref: '#/components/responses/default'
|
||||
"/api/v1/products/{id}/edit":
|
||||
get:
|
||||
tags:
|
||||
- products
|
||||
summary: "Edit product"
|
||||
description: "Displays an Product by id"
|
||||
operationId: editProduct
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Product Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Product object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Product"
|
||||
401:
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
$ref: '#/components/responses/default'
|
||||
"/api/v1/products/create":
|
||||
get:
|
||||
tags:
|
||||
- products
|
||||
summary: "Blank product"
|
||||
description: "Returns a blank product object with default values"
|
||||
operationId: getProductsCreate
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "A blank Product object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Product"
|
||||
401:
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
$ref: '#/components/responses/default'
|
||||
|
||||
/api/v1/products/bulk:
|
||||
post:
|
||||
tags:
|
||||
- products
|
||||
summary: "Bulk product actions"
|
||||
description: "Archive / Restore / Delete in bulk"
|
||||
operationId: bulkProducts
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/index"
|
||||
requestBody:
|
||||
description: "Hashed IDs"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
description: "Array of hashed IDs to be bulk 'actioned"
|
||||
type: integer
|
||||
example: "[0,1,2,3]"
|
||||
responses:
|
||||
200:
|
||||
description: "The Product response"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Product"
|
||||
401:
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
$ref: '#/components/responses/default'
|
||||
|
||||
"/api/v1/products/{id}/upload":
|
||||
put:
|
||||
tags:
|
||||
- products
|
||||
summary: "Add product document"
|
||||
description: "Handles the uploading of a document to a product"
|
||||
operationId: uploadProduct
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/client_include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Product Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
_method:
|
||||
type: string
|
||||
example: POST
|
||||
documents:
|
||||
type: array
|
||||
format: binary
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Product object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Product"
|
||||
401:
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
$ref: '#/components/responses/default'
|
342
openapi/paths/projects.yaml
Normal file
342
openapi/paths/projects.yaml
Normal file
@ -0,0 +1,342 @@
|
||||
/api/v1/projects:
|
||||
get:
|
||||
tags:
|
||||
- projects
|
||||
summary: "List projects"
|
||||
description: "Lists projects"
|
||||
operationId: getProjects
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- $ref: "#/components/parameters/index"
|
||||
responses:
|
||||
200:
|
||||
description: "A list of projects"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Project"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
post:
|
||||
tags:
|
||||
- projects
|
||||
summary: "Create project"
|
||||
description: "Adds an project to a company"
|
||||
operationId: storeProject
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the saved project object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Project"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/projects/{id}":
|
||||
get:
|
||||
tags:
|
||||
- projects
|
||||
summary: "Show project"
|
||||
description: "Displays a project by id"
|
||||
operationId: showProject
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Project Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the expense object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Project"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
put:
|
||||
tags:
|
||||
- projects
|
||||
summary: "Update project"
|
||||
description: "Handles the updating of a project by id"
|
||||
operationId: updateProject
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Project Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the project object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Project"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
delete:
|
||||
tags:
|
||||
- projects
|
||||
summary: "Delete project"
|
||||
description: "Handles the deletion of a project by id"
|
||||
operationId: deleteProject
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Project Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns a HTTP status"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/projects/{id}/edit":
|
||||
get:
|
||||
tags:
|
||||
- projects
|
||||
summary: "Edit project"
|
||||
description: "Displays a project by id"
|
||||
operationId: editProject
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Project Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the project object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Project"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
/api/v1/projects/create:
|
||||
get:
|
||||
tags:
|
||||
- projects
|
||||
summary: "Blank project"
|
||||
description: "Returns a blank object with default values"
|
||||
operationId: getProjectsCreate
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "A blank project object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Project"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
/api/v1/projects/bulk:
|
||||
post:
|
||||
tags:
|
||||
- projects
|
||||
summary: "Bulk project actions"
|
||||
description: ""
|
||||
operationId: bulkProjects
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/index"
|
||||
requestBody:
|
||||
description: "User credentials"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
description: "Array of hashed IDs to be bulk 'actioned"
|
||||
type: integer
|
||||
example: "[0,1,2,3]"
|
||||
responses:
|
||||
200:
|
||||
description: "The Project User response"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Project"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/projects/{id}/upload":
|
||||
put:
|
||||
tags:
|
||||
- projects
|
||||
summary: "Uploads a project document"
|
||||
description: "Handles the uploading of a document to a project"
|
||||
operationId: uploadProject
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Project Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Project object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Project"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
427
openapi/paths/purchase_orders.yaml
Normal file
427
openapi/paths/purchase_orders.yaml
Normal file
@ -0,0 +1,427 @@
|
||||
/api/v1/purchase_orders:
|
||||
get:
|
||||
tags:
|
||||
- Purchase Orders
|
||||
summary: "List purchase orders"
|
||||
description: "Lists purchase orders, search and filters allow fine grained lists to be generated.\n *\n * Query parameters can be added to performed more fine grained filtering of the purchase orders, these are handled by the PurchaseOrderFilters class which defines the methods available"
|
||||
operationId: getPurchaseOrders
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "A list of purchase orders"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Credit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
post:
|
||||
tags:
|
||||
- Purchase Orders
|
||||
summary: "Create purchase order"
|
||||
description: "Adds an purchase order to the system"
|
||||
operationId: storePurchaseOrder
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the saved purchase order object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Credit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
|
||||
"/api/v1/purchase_orders/{id}":
|
||||
get:
|
||||
tags:
|
||||
- Purchase Orders
|
||||
summary: "Show purchase order"
|
||||
description: "Displays an purchase order by id"
|
||||
operationId: showPurchaseOrder
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Purchase order Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the purchase order object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Credit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/purchase_order/{id}":
|
||||
put:
|
||||
tags:
|
||||
- Purchase Orders
|
||||
summary: "Update purchase order"
|
||||
description: "Handles the updating of an purchase order by id"
|
||||
operationId: updatePurchaseOrder
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The purchase order Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the purchase order object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Credit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
delete:
|
||||
tags:
|
||||
- Purchase Orders
|
||||
summary: "Delete purchase order"
|
||||
description: "Handles the deletion of an purchase orders by id"
|
||||
operationId: deletePurchaseOrder
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The purhcase order Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns a HTTP status"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/purchase_orders/{id}/edit":
|
||||
get:
|
||||
tags:
|
||||
- Purchase Orders
|
||||
summary: "Edit purchase order"
|
||||
description: "Displays an purchase order by id"
|
||||
operationId: editPurchaseOrder
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The purchase order Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the purchase order object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Invoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
|
||||
/api/v1/purchase_orders/create:
|
||||
get:
|
||||
tags:
|
||||
- Purchase Orders
|
||||
summary: "Blank purchase order"
|
||||
description: "Returns a blank object with default values"
|
||||
operationId: getPurchaseOrderCreate
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "A blank purchase order object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Credit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
/api/v1/purchase_orders/bulk:
|
||||
post:
|
||||
tags:
|
||||
- Purchase Orders
|
||||
summary: "Bulk purchase order action"
|
||||
description: ""
|
||||
operationId: bulkPurchaseOrderss
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/index"
|
||||
requestBody:
|
||||
description: "Purchase Order IDS"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
description: "Array of hashed IDs to be bulk 'actioned"
|
||||
type: integer
|
||||
example: "[0,1,2,3]"
|
||||
responses:
|
||||
200:
|
||||
description: "The Bulk Action response"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/purchase_orders/{id}/{action}":
|
||||
get:
|
||||
deprecated: true
|
||||
tags:
|
||||
- Purchase Orders
|
||||
summary: "Custom purchase order actions"
|
||||
description: "Performs a custom action on an purchase order.\n *\n * The current range of actions are as follows\n * - mark_paid\n * - download\n * - archive\n * - delete\n * - email"
|
||||
operationId: actionPurchaseOrder
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Purchase Order Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
- name: action
|
||||
in: path
|
||||
description: "The action string to be performed"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: clone_to_quote
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the invoice object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Invoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/purchase_orders/{id}/upload":
|
||||
put:
|
||||
tags:
|
||||
- Purchase Orders
|
||||
summary: "Uploads a purchase order document"
|
||||
description: "Handles the uploading of a document to a purchase_order"
|
||||
operationId: uploadPurchaseOrder
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Purchase Order Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Purchase Order object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Vendor"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/purchase_order/{invitation_key}/download":
|
||||
get:
|
||||
tags:
|
||||
- Purchase Orders
|
||||
summary: "Download a purchase order PDF"
|
||||
description: "Downloads a specific purchase order"
|
||||
operationId: downloadPurchaseOrder
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: invitation_key
|
||||
in: path
|
||||
description: "The Purchase Order Invitation Key"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Purchase Order pdf"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
477
openapi/paths/quotes.yaml
Normal file
477
openapi/paths/quotes.yaml
Normal file
@ -0,0 +1,477 @@
|
||||
/api/v1/quotes:
|
||||
get:
|
||||
tags:
|
||||
- quotes
|
||||
summary: "List quotes"
|
||||
description: "Lists quotes, search and filters allow fine grained lists to be generated.\n *\n * Query parameters can be added to performed more fine grained filtering of the quotes, these are handled by the QuoteFilters class which defines the methods available"
|
||||
operationId: getQuotes
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- $ref: "#/components/parameters/status"
|
||||
- $ref: "#/components/parameters/client_id"
|
||||
- $ref: "#/components/parameters/created_at"
|
||||
- $ref: "#/components/parameters/updated_at"
|
||||
- $ref: "#/components/parameters/is_deleted"
|
||||
- $ref: "#/components/parameters/filter_deleted_clients"
|
||||
- $ref: "#/components/parameters/vendor_id"
|
||||
- name: filter
|
||||
in: query
|
||||
description: |
|
||||
Searches across a range of columns including:
|
||||
- number
|
||||
- custom_value1
|
||||
- custom_value2
|
||||
- custom_value3
|
||||
- custom_value4
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: ?filter=bob
|
||||
- name: client_status
|
||||
in: query
|
||||
description: |
|
||||
A comma separated list of quote status strings. Valid options include:
|
||||
- all
|
||||
- draft
|
||||
- sent
|
||||
- approved
|
||||
- expired
|
||||
- upcoming
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: ?client_status=paid,unpaid
|
||||
- name: number
|
||||
in: query
|
||||
description: |
|
||||
Search quote by quote number
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: ?number=Q-001
|
||||
- name: sort
|
||||
in: query
|
||||
description: Returns the list sorted by column in ascending or descending order.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: id|desc number|desc balance|asc
|
||||
responses:
|
||||
200:
|
||||
description: "A list of quotes"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Quote"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
post:
|
||||
tags:
|
||||
- quotes
|
||||
summary: "Create quote"
|
||||
description: "Adds an Quote to the system"
|
||||
operationId: storeQuote
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the saved Quote object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Quote"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/quotes/{id}":
|
||||
get:
|
||||
tags:
|
||||
- quotes
|
||||
summary: "Show quote"
|
||||
description: "Displays an Quote by id"
|
||||
operationId: showQuote
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Quote Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Quote object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Quote"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
put:
|
||||
tags:
|
||||
- quotes
|
||||
summary: "Update quote"
|
||||
description: "Handles the updating of an Quote by id"
|
||||
operationId: updateQuote
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Quote Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Quote object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Quote"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
delete:
|
||||
tags:
|
||||
- quotes
|
||||
summary: "Delete quote"
|
||||
description: "Handles the deletion of an Quote by id"
|
||||
operationId: deleteQuote
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Quote Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns a HTTP status"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/quotes/{id}/edit":
|
||||
get:
|
||||
tags:
|
||||
- quotes
|
||||
summary: "Edit quote"
|
||||
description: "Displays an Quote by id"
|
||||
operationId: editQuote
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Quote Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Quote object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Quote"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
/api/v1/quotes/create:
|
||||
get:
|
||||
tags:
|
||||
- quotes
|
||||
summary: "Blank quote"
|
||||
description: "Returns a blank object with default values"
|
||||
operationId: getQuotesCreate
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "A blank Quote object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Quote"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
/api/v1/quotes/bulk:
|
||||
post:
|
||||
tags:
|
||||
- quotes
|
||||
summary: "Bulk quote actions"
|
||||
description: ""
|
||||
operationId: bulkQuotes
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/index"
|
||||
requestBody:
|
||||
description: "Hashed ids"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
description: "Array of hashed IDs to be bulk 'actioned"
|
||||
type: integer
|
||||
example: "[0,1,2,3]"
|
||||
responses:
|
||||
200:
|
||||
description: "The Quote response"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Quote"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/quotes/{id}/{action}":
|
||||
get:
|
||||
deprecated: true
|
||||
tags:
|
||||
- quotes
|
||||
summary: "Performs a custom action on an Quote"
|
||||
description: "Performs a custom action on an Quote.\n\n The current range of actions are as follows\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - convert\n - convert_to_invoice\n - email"
|
||||
operationId: actionQuote
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Quote Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
- name: action
|
||||
in: path
|
||||
description: "The action string to be performed"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: clone_to_quote
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Quote object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Quote"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/quote/{invitation_key}/download":
|
||||
get:
|
||||
tags:
|
||||
- quotes
|
||||
summary: "Download quote PDF"
|
||||
description: "Downloads a specific quote"
|
||||
operationId: downloadQuote
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: invitation_key
|
||||
in: path
|
||||
description: "The Quote Invitation Key"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the quote pdf"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/quotes/{id}/upload":
|
||||
put:
|
||||
tags:
|
||||
- quotes
|
||||
summary: "Upload a quote document"
|
||||
description: "Handles the uploading of a document to a quote"
|
||||
operationId: uploadQuote
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Quote Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Quote object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Quote"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
469
openapi/paths/recurring_invoices.yaml
Normal file
469
openapi/paths/recurring_invoices.yaml
Normal file
@ -0,0 +1,469 @@
|
||||
/api/v1/recurring_invoices:
|
||||
get:
|
||||
tags:
|
||||
- recurring_invoices
|
||||
summary: "List recurring invoices"
|
||||
description: |
|
||||
Lists invoices with the option to chain multiple query parameters allowing fine grained filtering of the list.
|
||||
|
||||
operationId: getRecurringInvoices
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- $ref: "#/components/parameters/client_id"
|
||||
- $ref: "#/components/parameters/created_at"
|
||||
- $ref: "#/components/parameters/updated_at"
|
||||
- $ref: "#/components/parameters/is_deleted"
|
||||
- $ref: "#/components/parameters/filter_deleted_clients"
|
||||
- $ref: "#/components/parameters/vendor_id"
|
||||
- name: filter
|
||||
in: query
|
||||
description: |
|
||||
Searches across a range of columns including:
|
||||
- custom_value1
|
||||
- custom_value2
|
||||
- custom_value3
|
||||
- custom_value4
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: ?filter=bob
|
||||
- name: client_status
|
||||
in: query
|
||||
description: |
|
||||
A comma separated list of invoice status strings. Valid options include:
|
||||
- all
|
||||
- active
|
||||
- paused
|
||||
- completed
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: ?client_status=active,paused
|
||||
- name: sort
|
||||
in: query
|
||||
description: Returns the list sorted by column in ascending or descending order.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: id|desc number|desc balance|asc
|
||||
responses:
|
||||
200:
|
||||
description: "A list of recurring_invoices"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/RecurringInvoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
post:
|
||||
tags:
|
||||
- recurring_invoices
|
||||
summary: "Create recurring invoice"
|
||||
description: "Adds a Recurring Invoice to the system"
|
||||
operationId: storeRecurringInvoice
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the saved RecurringInvoice object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/RecurringInvoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
|
||||
"/api/v1/recurring_invoices/{id}":
|
||||
get:
|
||||
tags:
|
||||
- recurring_invoices
|
||||
summary: "Show recurring invoice"
|
||||
description: "Displays an RecurringInvoice by id"
|
||||
operationId: showRecurringInvoice
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The RecurringInvoice Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the RecurringInvoice object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/RecurringInvoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
put:
|
||||
tags:
|
||||
- recurring_invoices
|
||||
summary: "Update recurring invoice"
|
||||
description: "Handles the updating of an RecurringInvoice by id"
|
||||
operationId: updateRecurringInvoice
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The RecurringInvoice Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the RecurringInvoice object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/RecurringInvoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
delete:
|
||||
tags:
|
||||
- recurring_invoices
|
||||
summary: "Delete recurring invoice"
|
||||
description: "Handles the deletion of an RecurringInvoice by id"
|
||||
operationId: deleteRecurringInvoice
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The RecurringInvoice Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns a HTTP status"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/recurring_invoices/{id}/edit":
|
||||
get:
|
||||
tags:
|
||||
- recurring_invoices
|
||||
summary: "Edit recurring invoice"
|
||||
description: "Displays an RecurringInvoice by id"
|
||||
operationId: editRecurringInvoice
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The RecurringInvoice Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the RecurringInvoice object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/RecurringInvoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
|
||||
/api/v1/recurring_invoices/create:
|
||||
get:
|
||||
tags:
|
||||
- recurring_invoices
|
||||
summary: "Blank recurring invoice"
|
||||
description: "Returns a blank object with default values"
|
||||
operationId: getRecurringInvoicesCreate
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "A blank RecurringInvoice object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/RecurringInvoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
/api/v1/recurring_invoices/bulk:
|
||||
post:
|
||||
tags:
|
||||
- recurring_invoices
|
||||
summary: "Bulk recurring invoice actions"
|
||||
description: ""
|
||||
operationId: bulkRecurringInvoices
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/index"
|
||||
requestBody:
|
||||
description: "Hashed IDs"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
description: "Array of hashed IDs to be bulk 'actioned"
|
||||
type: integer
|
||||
example: "[0,1,2,3]"
|
||||
responses:
|
||||
200:
|
||||
description: "The RecurringInvoice response"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/RecurringInvoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/recurring_invoices/{id}/{action}":
|
||||
get:
|
||||
deprecated: true
|
||||
tags:
|
||||
- recurring_invoices
|
||||
summary: "Custom recurring invoice action"
|
||||
description: "Performs a custom action on an RecurringInvoice.\n\n The current range of actions are as follows\n - clone_to_RecurringInvoice\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - email"
|
||||
operationId: actionRecurringInvoice
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The RecurringInvoice Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
- name: action
|
||||
in: path
|
||||
description: "The action string to be performed"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: clone_to_quote
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the RecurringInvoice object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/RecurringInvoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/recurring_invoice/{invitation_key}/download":
|
||||
get:
|
||||
tags:
|
||||
- recurring_invoices
|
||||
summary: "Download recurring invoice PDF"
|
||||
description: "Downloads a specific invoice"
|
||||
operationId: downloadRecurringInvoice
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: invitation_key
|
||||
in: path
|
||||
description: "The Recurring Invoice Invitation Key"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the recurring invoice pdf"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/recurring_invoices/{id}/upload":
|
||||
put:
|
||||
tags:
|
||||
- recurring_invoices
|
||||
summary: "Add recurring invoice document"
|
||||
description: "Handles the uploading of a document to a recurring_invoice"
|
||||
operationId: uploadRecurringInvoice
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The RecurringInvoice Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the RecurringInvoice object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/RecurringInvoice"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
371
openapi/paths/tasks.yaml
Normal file
371
openapi/paths/tasks.yaml
Normal file
@ -0,0 +1,371 @@
|
||||
/api/v1/tasks:
|
||||
get:
|
||||
tags:
|
||||
- tasks
|
||||
summary: "List tasks"
|
||||
description: "Lists tasks, search and filters allow fine grained lists to be generated.\n *\n * Query parameters can be added to performed more fine grained filtering of the tasks, these are handled by the TaskFilters class which defines the methods available"
|
||||
operationId: getTasks
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- $ref: "#/components/parameters/index"
|
||||
responses:
|
||||
200:
|
||||
description: "A list of tasks"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Task"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
post:
|
||||
tags:
|
||||
- tasks
|
||||
summary: "Create task"
|
||||
description: "Adds an task to a company"
|
||||
operationId: storeTask
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the saved task object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Task"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/tasks/{id}":
|
||||
get:
|
||||
tags:
|
||||
- tasks
|
||||
summary: "Show task"
|
||||
description: "Displays a task by id"
|
||||
operationId: showTask
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Task Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the task object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Task"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
put:
|
||||
tags:
|
||||
- tasks
|
||||
summary: "Update task"
|
||||
description: "Handles the updating of a task by id"
|
||||
operationId: updateTask
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The task Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the task object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Task"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
delete:
|
||||
tags:
|
||||
- tasks
|
||||
summary: "Delete task"
|
||||
description: "Handles the deletion of a task by id"
|
||||
operationId: deleteTask
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Task Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns a HTTP status"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/tasks/{id}/edit":
|
||||
get:
|
||||
tags:
|
||||
- tasks
|
||||
summary: "Edit task"
|
||||
description: "Displays a task by id"
|
||||
operationId: editTask
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Task Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the client object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Task"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
/api/v1/tasks/create:
|
||||
get:
|
||||
tags:
|
||||
- tasks
|
||||
summary: "Blank task"
|
||||
description: "Returns a blank task with default values"
|
||||
operationId: getTasksCreate
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "A blank task object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Task"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
/api/v1/tasks/bulk:
|
||||
post:
|
||||
tags:
|
||||
- tasks
|
||||
summary: "Bulk task actions"
|
||||
description: ""
|
||||
operationId: bulkTasks
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/index"
|
||||
requestBody:
|
||||
description: "User credentials"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
description: "Array of hashed IDs to be bulk 'actioned"
|
||||
type: integer
|
||||
example: "[0,1,2,3]"
|
||||
responses:
|
||||
200:
|
||||
description: "The Task User response"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Task"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/tasks/{id}/upload":
|
||||
put:
|
||||
tags:
|
||||
- tasks
|
||||
summary: "Uploads a task document"
|
||||
description: "Handles the uploading of a document to a task"
|
||||
operationId: uploadTask
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Task Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Task object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Task"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
/api/v1/tasks/sort:
|
||||
post:
|
||||
tags:
|
||||
- tasks
|
||||
summary: "Sort tasks on KanBan"
|
||||
description: "Sorts tasks after drag and drop on the KanBan."
|
||||
operationId: sortTasks
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "Returns an Ok, 200 HTTP status"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
342
openapi/paths/vendors.yaml
Normal file
342
openapi/paths/vendors.yaml
Normal file
@ -0,0 +1,342 @@
|
||||
/api/v1/vendors:
|
||||
get:
|
||||
tags:
|
||||
- vendors
|
||||
summary: "List vendors"
|
||||
description: "Lists vendors, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the vendors, these are handled by the VendorFilters class which defines the methods available"
|
||||
operationId: getVendors
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- $ref: "#/components/parameters/index"
|
||||
responses:
|
||||
200:
|
||||
description: "A list of vendors"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Vendor"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
post:
|
||||
tags:
|
||||
- vendors
|
||||
summary: "Create vendor"
|
||||
description: "Adds a vendor to a company"
|
||||
operationId: storeVendor
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the saved clivendorent object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Vendor"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/vendors/{id}":
|
||||
get:
|
||||
tags:
|
||||
- vendors
|
||||
summary: "Show vendor"
|
||||
description: "Displays a vendor by id"
|
||||
operationId: showVendor
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The vendor Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the vendor object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Vendor"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
put:
|
||||
tags:
|
||||
- vendors
|
||||
summary: "Update vendor"
|
||||
description: "Handles the updating of a vendor by id"
|
||||
operationId: updateVendor
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Vendor Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the vendor object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Vendor"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
delete:
|
||||
tags:
|
||||
- vendors
|
||||
summary: "Delete vendor"
|
||||
description: "Handles the deletion of a vendor by id"
|
||||
operationId: deleteVendor
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Vendor Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns a HTTP status"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/vendors/{id}/edit":
|
||||
get:
|
||||
tags:
|
||||
- vendors
|
||||
summary: "Edit vendor"
|
||||
description: "Displays a vendor by id"
|
||||
operationId: editVendor
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Vendor Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the vendor object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Vendor"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
/api/v1/vendors/create:
|
||||
get:
|
||||
tags:
|
||||
- vendors
|
||||
summary: "Blank vendor"
|
||||
description: "Returns a blank vendor with default values"
|
||||
operationId: getVendorsCreate
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "A blank vendor object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Vendor"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
/api/v1/vendors/bulk:
|
||||
post:
|
||||
tags:
|
||||
- vendors
|
||||
summary: "Bulk vendor actions"
|
||||
description: ""
|
||||
operationId: bulkVendors
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/index"
|
||||
requestBody:
|
||||
description: "User credentials"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
description: "Array of hashed IDs to be bulk 'actioned"
|
||||
type: integer
|
||||
example: "[0,1,2,3]"
|
||||
responses:
|
||||
200:
|
||||
description: "The Vendor User response"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Vendor"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
||||
"/api/v1/vendors/{id}/upload":
|
||||
put:
|
||||
tags:
|
||||
- vendors
|
||||
summary: "Uploads a vendor document"
|
||||
description: "Handles the uploading of a document to a vendor"
|
||||
operationId: uploadVendor
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: "The Vendor Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: "Returns the Vendor object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Vendor"
|
||||
401:
|
||||
$ref: "#/components/responses/401"
|
||||
403:
|
||||
$ref: "#/components/responses/403"
|
||||
422:
|
||||
$ref: "#/components/responses/422"
|
||||
default:
|
||||
$ref: "#/components/responses/default"
|
BIN
public/images/blank.png
Normal file
BIN
public/images/blank.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 555 B |
@ -147,9 +147,9 @@
|
||||
<tr>
|
||||
<td align="center" cellpadding="20">
|
||||
<div style="border: 1px solid #c2c2c2; border-bottom: none; padding-bottom: 10px; border-top-left-radius: 3px; border-top-right-radius: 3px;">
|
||||
|
||||
<img class="" src="{{ $logo ?? '' }}" width="570" height="" alt="alt_text" border="0" style="width: 50%; max-width: 570px; height: auto; display: block;" class="g-img">
|
||||
|
||||
@if($logo && strpos($logo, 'blank.png') === false)
|
||||
<img class="" src="{{ $logo ?? '' }}" width="50%" height="" alt="alt_text" border="0" style="width: 50%; max-width: 570px; display: block;">
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -6,7 +6,19 @@
|
||||
<div class="flex h-screen">
|
||||
<div class="m-auto md:w-1/3 lg:w-1/5">
|
||||
<div class="flex flex-col items-center">
|
||||
<img src="{{ asset('images/invoiceninja-black-logo-2.png') }}" class="border-b border-gray-100 h-18 pb-4" alt="Invoice Ninja logo">
|
||||
|
||||
@if($account && !$account->isPaid())
|
||||
<div>
|
||||
<img src="{{ asset('images/invoiceninja-black-logo-2.png') }}"
|
||||
class="border-b border-gray-100 h-18 pb-4" alt="Invoice Ninja logo">
|
||||
</div>
|
||||
@else
|
||||
<div>
|
||||
<img src="{{ $company->present()->logo() }}"
|
||||
class="mx-auto border-b border-gray-100 h-18 pb-4" alt="{{ $company->present()->name() }} logo">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<h1 class="text-center text-3xl mt-10">{{ $title }}</h1>
|
||||
<p class="text-center opacity-75">{{ $notification }}</p>
|
||||
</div>
|
||||
|
@ -54,6 +54,131 @@ class SchedulerTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testCustomDateRanges()
|
||||
{
|
||||
$data = [
|
||||
'name' => 'A test statement scheduler',
|
||||
'frequency_id' => RecurringInvoice::FREQUENCY_MONTHLY,
|
||||
'next_run' => now()->format('Y-m-d'),
|
||||
'template' => 'client_statement',
|
||||
'parameters' => [
|
||||
'date_range' => EmailStatement::CUSTOM_RANGE,
|
||||
'show_payments_table' => true,
|
||||
'show_aging_table' => true,
|
||||
'status' => 'paid',
|
||||
'clients' => [],
|
||||
'start_date' => now()->format('Y-m-d'),
|
||||
'end_date' => now()->addDays(4)->format('Y-m-d')
|
||||
],
|
||||
];
|
||||
|
||||
$response = $this->withHeaders([
|
||||
'X-API-SECRET' => config('ninja.api_secret'),
|
||||
'X-API-TOKEN' => $this->token,
|
||||
])->postJson('/api/v1/task_schedulers', $data);
|
||||
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
public function testCustomDateRangesFails()
|
||||
{
|
||||
$data = [
|
||||
'name' => 'A test statement scheduler',
|
||||
'frequency_id' => RecurringInvoice::FREQUENCY_MONTHLY,
|
||||
'next_run' => now()->format('Y-m-d'),
|
||||
'template' => 'client_statement',
|
||||
'parameters' => [
|
||||
'date_range' => EmailStatement::CUSTOM_RANGE,
|
||||
'show_payments_table' => true,
|
||||
'show_aging_table' => true,
|
||||
'status' => 'paid',
|
||||
'clients' => [],
|
||||
'start_date' => now()->format('Y-m-d'),
|
||||
'end_date' => now()->subDays(4)->format('Y-m-d')
|
||||
],
|
||||
];
|
||||
|
||||
$response = $this->withHeaders([
|
||||
'X-API-SECRET' => config('ninja.api_secret'),
|
||||
'X-API-TOKEN' => $this->token,
|
||||
])->postJson('/api/v1/task_schedulers', $data);
|
||||
|
||||
$response->assertStatus(422);
|
||||
|
||||
|
||||
$data = [
|
||||
'name' => 'A test statement scheduler',
|
||||
'frequency_id' => RecurringInvoice::FREQUENCY_MONTHLY,
|
||||
'next_run' => now()->format('Y-m-d'),
|
||||
'template' => 'client_statement',
|
||||
'parameters' => [
|
||||
'date_range' => EmailStatement::CUSTOM_RANGE,
|
||||
'show_payments_table' => true,
|
||||
'show_aging_table' => true,
|
||||
'status' => 'paid',
|
||||
'clients' => [],
|
||||
'start_date' => now()->format('Y-m-d'),
|
||||
'end_date' => null
|
||||
],
|
||||
];
|
||||
|
||||
$response = $this->withHeaders([
|
||||
'X-API-SECRET' => config('ninja.api_secret'),
|
||||
'X-API-TOKEN' => $this->token,
|
||||
])->postJson('/api/v1/task_schedulers', $data);
|
||||
|
||||
$response->assertStatus(422);
|
||||
|
||||
$data = [
|
||||
'name' => 'A test statement scheduler',
|
||||
'frequency_id' => RecurringInvoice::FREQUENCY_MONTHLY,
|
||||
'next_run' => now()->format('Y-m-d'),
|
||||
'template' => 'client_statement',
|
||||
'parameters' => [
|
||||
'date_range' => EmailStatement::CUSTOM_RANGE,
|
||||
'show_payments_table' => true,
|
||||
'show_aging_table' => true,
|
||||
'status' => 'paid',
|
||||
'clients' => [],
|
||||
'start_date' => null,
|
||||
'end_date' => now()->format('Y-m-d')
|
||||
],
|
||||
];
|
||||
|
||||
$response = $this->withHeaders([
|
||||
'X-API-SECRET' => config('ninja.api_secret'),
|
||||
'X-API-TOKEN' => $this->token,
|
||||
])->postJson('/api/v1/task_schedulers', $data);
|
||||
|
||||
$response->assertStatus(422);
|
||||
|
||||
|
||||
|
||||
$data = [
|
||||
'name' => 'A test statement scheduler',
|
||||
'frequency_id' => RecurringInvoice::FREQUENCY_MONTHLY,
|
||||
'next_run' => now()->format('Y-m-d'),
|
||||
'template' => 'client_statement',
|
||||
'parameters' => [
|
||||
'date_range' => EmailStatement::CUSTOM_RANGE,
|
||||
'show_payments_table' => true,
|
||||
'show_aging_table' => true,
|
||||
'status' => 'paid',
|
||||
'clients' => [],
|
||||
'start_date' => '',
|
||||
'end_date' => ''
|
||||
],
|
||||
];
|
||||
|
||||
$response = $this->withHeaders([
|
||||
'X-API-SECRET' => config('ninja.api_secret'),
|
||||
'X-API-TOKEN' => $this->token,
|
||||
])->postJson('/api/v1/task_schedulers', $data);
|
||||
|
||||
$response->assertStatus(422);
|
||||
|
||||
}
|
||||
|
||||
public function testClientCountResolution()
|
||||
{
|
||||
$c = Client::factory()->create([
|
||||
|
2
tests/cypress/screenshots/.gitignore
vendored
2
tests/cypress/screenshots/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
5
tests/cypress/support/index.js
vendored
5
tests/cypress/support/index.js
vendored
@ -23,7 +23,10 @@ before(() => {
|
||||
cy.task('activateCypressEnvFile', {}, { log: false });
|
||||
cy.artisan('config:clear', {}, { log: false });
|
||||
cy.refreshRoutes();
|
||||
cy.seed("RandomDataSeeder");
|
||||
cy.artisan("migrate:fresh", {
|
||||
'--seed': true,
|
||||
});
|
||||
cy.seed('RandomDataSeeder');
|
||||
});
|
||||
|
||||
after(() => {
|
||||
|
File diff suppressed because it is too large
Load Diff
2
tests/cypress/videos/.gitignore
vendored
2
tests/cypress/videos/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
Loading…
x
Reference in New Issue
Block a user