Skip to content

Commit 9980aa7

Browse files
author
Andrey Helldar
committed
Added DTO\Config
1 parent a96a6f0 commit 9980aa7

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

src/Cashier/DTO/Config.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace Helldar\Contracts\Cashier\DTO;
4+
5+
interface Config
6+
{
7+
public function __construct(array $data);
8+
9+
public function getDriver(): string;
10+
11+
public function getRequest(): string;
12+
13+
public function getClientId(): ?string;
14+
15+
public function getClientSecret(): ?string;
16+
}

src/Cashier/Driver.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22

33
namespace Helldar\Contracts\Cashier;
44

5-
use Helldar\Contracts\Cashier\Authentication\Client;
5+
use Helldar\Contracts\Cashier\DTO\Config;
66
use Helldar\Contracts\Cashier\Exceptions\Exception;
77
use Helldar\Contracts\Cashier\Http\Response;
88
use Helldar\Contracts\Cashier\Resources\Status;
99
use Illuminate\Database\Eloquent\Model;
1010

11+
/**
12+
* @method static Driver make(Config $config)
13+
*/
1114
interface Driver
1215
{
13-
/** @return \Helldar\Contracts\Cashier\Driver */
14-
public static function make();
16+
public function __construct(array $config);
1517

1618
public function response(array $data, bool $mapping = true): Response;
1719

1820
public function model(Model $model, string $request): self;
1921

20-
public function auth(Client $client): self;
21-
2222
public function statuses(): Status;
2323

2424
public function exception(): Exception;

0 commit comments

Comments
 (0)