feat(billing): renewals, coupons, VAT numbering, billing cycles and invoice payment tracking
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
ea9a53f742
commit
25f23d541e
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Api\Order;
|
||||
|
||||
use App\Support\BillingCycleCatalog;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class CouponPreviewRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'coupon_code' => ['required', 'string', 'max:50'],
|
||||
'product_id' => ['required', Rule::exists('products', 'uuid')->whereNull('deleted_at')],
|
||||
'billing_cycle' => ['required', Rule::in([...BillingCycleCatalog::codes(), 'onetime'])],
|
||||
'addons' => 'array',
|
||||
'addons.*.addon_id' => 'nullable|exists:product_addon,id',
|
||||
'addons.*.qty' => 'nullable|integer|min:0|max:1000000',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user