-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4080b2e
commit 4b08cf6
Showing
11 changed files
with
405 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Kami\Cocktail\OpenAPI\Schemas; | ||
|
||
use OpenApi\Attributes as OAT; | ||
use Kami\Cocktail\External\ExportTypeEnum; | ||
use Kami\Cocktail\External\ForceUnitConvertEnum; | ||
|
||
#[OAT\Schema()] | ||
class ExportRequest | ||
{ | ||
#[OAT\Property()] | ||
public ExportTypeEnum $type; | ||
|
||
#[OAT\Property()] | ||
public ForceUnitConvertEnum $units; | ||
|
||
#[OAT\Property(property: 'bar_id')] | ||
public int $barId; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Kami\Cocktail\OpenAPI\Schemas; | ||
|
||
use OpenApi\Attributes as OAT; | ||
|
||
#[OAT\Schema()] | ||
class Subscription | ||
{ | ||
#[OAT\Property()] | ||
public string $type; | ||
|
||
#[OAT\Property()] | ||
public string $paddle_id; | ||
|
||
#[OAT\Property()] | ||
public string $status; | ||
|
||
#[OAT\Property(format: 'date-time')] | ||
public string $created_at; | ||
|
||
#[OAT\Property(format: 'date-time')] | ||
public ?string $updated_at; | ||
|
||
#[OAT\Property(format: 'date-time')] | ||
public ?string $paused_at; | ||
|
||
#[OAT\Property(format: 'date-time')] | ||
public ?string $ends_at; | ||
|
||
#[OAT\Property()] | ||
public bool $past_due; | ||
|
||
#[OAT\Property()] | ||
public bool $is_recurring; | ||
|
||
/** @var array<mixed> */ | ||
#[OAT\Property(items: new OAT\Items(type: 'object', properties: [ | ||
new OAT\Property(property: 'currency', type: 'string'), | ||
new OAT\Property(property: 'amount', type: 'string'), | ||
new OAT\Property(property: 'date', type: 'string', format: 'date-time'), | ||
]))] | ||
public array $next_billed_at; | ||
|
||
#[OAT\Property(format: 'uri')] | ||
public string $update_payment_url; | ||
|
||
#[OAT\Property(format: 'uri')] | ||
public string $cancel_url; | ||
|
||
/** @var Transaction[] */ | ||
#[OAT\Property()] | ||
public array $transactions; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Kami\Cocktail\OpenAPI\Schemas; | ||
|
||
use OpenApi\Attributes as OAT; | ||
|
||
#[OAT\Schema()] | ||
class Transaction | ||
{ | ||
#[OAT\Property()] | ||
public string $total; | ||
|
||
#[OAT\Property()] | ||
public string $tax; | ||
|
||
#[OAT\Property()] | ||
public string $currency; | ||
|
||
#[OAT\Property()] | ||
public string $status; | ||
|
||
#[OAT\Property()] | ||
public string $invoice_number; | ||
|
||
#[OAT\Property(format: 'uri')] | ||
public string $url; | ||
|
||
#[OAT\Property(format: 'date-time')] | ||
public string $billed_at; | ||
|
||
#[OAT\Property(format: 'date-time')] | ||
public string $created_at; | ||
|
||
#[OAT\Property(format: 'date-time')] | ||
public ?string $updated_at; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Kami\Cocktail\OpenAPI\Schemas; | ||
|
||
use OpenApi\Attributes as OAT; | ||
|
||
#[OAT\Schema(required: ['prices', 'customer', 'subscription'])] | ||
class UserSubscription | ||
{ | ||
#[OAT\Property()] | ||
public string $prices; | ||
|
||
/** @var array<mixed> */ | ||
#[OAT\Property(items: new OAT\Items(type: 'object', properties: [ | ||
new OAT\Property(property: 'paddle_id', type: 'string'), | ||
new OAT\Property(property: 'paddle_email', type: 'string'), | ||
new OAT\Property(property: 'paddle_name', type: 'string'), | ||
], required: ['paddle_id', 'paddle_email', 'paddle_name']))] | ||
public array $customer; | ||
|
||
#[OAT\Property()] | ||
public ?Subscription $subscription; | ||
} |
Oops, something went wrong.