Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace ImovelZapAi\Billing\Application\Contracts; |
| 6 | |
| 7 | use ImovelZapAi\Billing\Domain\Enums\BillingCycle; |
| 8 | |
| 9 | interface MercadoPagoClient |
| 10 | { |
| 11 | /** |
| 12 | * @return array{id: string, init_point?: string|null, status?: string|null} |
| 13 | */ |
| 14 | public function createPreapprovalPlan( |
| 15 | string $reason, |
| 16 | int $amountCents, |
| 17 | BillingCycle $cycle, |
| 18 | int $trialDays = 0, |
| 19 | ): array; |
| 20 | |
| 21 | /** |
| 22 | * @return array{id: string, init_point?: string|null, status?: string|null, external_reference?: string|null} |
| 23 | */ |
| 24 | public function createPreapproval( |
| 25 | string $preapprovalPlanId, |
| 26 | string $payerEmail, |
| 27 | string $externalReference, |
| 28 | string $backUrl, |
| 29 | ?int $transactionAmountCents = null, |
| 30 | ): array; |
| 31 | |
| 32 | /** |
| 33 | * @return array{id: string, status?: string|null} |
| 34 | */ |
| 35 | public function updatePreapproval(string $preapprovalId, array $payload): array; |
| 36 | |
| 37 | /** |
| 38 | * @return array{id: string, status?: string|null, external_reference?: string|null} |
| 39 | */ |
| 40 | public function getPreapproval(string $preapprovalId): array; |
| 41 | |
| 42 | public function cancelPreapproval(string $preapprovalId): void; |
| 43 | } |