From 89d15f1e2a58186928ed44960fc4402c229cb3f8 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 7 Jul 2020 20:56:28 +1000 Subject: [PATCH] Fixes for API Documentation --- app/Http/Controllers/OpenAPI/CompanyTokenSchema.php | 1 + .../OpenAPI/{SubscriptionSchema.php => WebhookSchema.php} | 2 +- app/Services/Invoice/TriggeredActions.php | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) rename app/Http/Controllers/OpenAPI/{SubscriptionSchema.php => WebhookSchema.php} (94%) diff --git a/app/Http/Controllers/OpenAPI/CompanyTokenSchema.php b/app/Http/Controllers/OpenAPI/CompanyTokenSchema.php index d3b77814b369..192eb3fbf54f 100644 --- a/app/Http/Controllers/OpenAPI/CompanyTokenSchema.php +++ b/app/Http/Controllers/OpenAPI/CompanyTokenSchema.php @@ -5,5 +5,6 @@ * type="object", * @OA\Property(property="name", type="string", example="Token Name", description="The token name"), * @OA\Property(property="token", type="string", example="AS3df3jUUH765fhfd9KJuidj3JShjA", description="The token value"), + * @OA\Property(property="is_system", type="boolean", example="true", description="Determines whether the token is created by the system rather than a user"), * ) */ diff --git a/app/Http/Controllers/OpenAPI/SubscriptionSchema.php b/app/Http/Controllers/OpenAPI/WebhookSchema.php similarity index 94% rename from app/Http/Controllers/OpenAPI/SubscriptionSchema.php rename to app/Http/Controllers/OpenAPI/WebhookSchema.php index ba59cfaa64fc..210e1ade77c5 100644 --- a/app/Http/Controllers/OpenAPI/SubscriptionSchema.php +++ b/app/Http/Controllers/OpenAPI/WebhookSchema.php @@ -1,7 +1,7 @@ request->has('paid')) { + if($this->request->has('paid') && (bool)$this->request->input('paid') !== false) { + + $this->invoice->service()->markPaid()->save(); }