Total Complexity | 9 |
Total Lines | 65 |
Duplicated Lines | 0 % |
Coverage | 82.61% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class BillingRequestFlow implements \JsonSerializable |
||
9 | { |
||
10 | use Makeable; |
||
11 | |||
12 | protected array $params = []; |
||
13 | |||
14 | protected ?string $language = null; |
||
15 | |||
16 | protected ?ReturnUrls $returnUrls = null; |
||
17 | |||
18 | protected ?PrefilledCustomer $prefilledCustomer = null; |
||
19 | |||
20 | 1 | public function __construct(array $params = []) |
|
21 | { |
||
22 | 1 | $this->params = $params; |
|
23 | } |
||
24 | |||
25 | 1 | public function returnUrls(?ReturnUrls $returnUrls = null): static |
|
26 | { |
||
27 | 1 | $this->returnUrls = $returnUrls; |
|
28 | |||
29 | 1 | return $this; |
|
30 | } |
||
31 | |||
32 | 1 | public function prefilledCustomer(?PrefilledCustomer $prefilledCustomer): static |
|
33 | { |
||
34 | 1 | $this->prefilledCustomer = $prefilledCustomer; |
|
35 | |||
36 | 1 | return $this; |
|
37 | } |
||
38 | |||
39 | /** |
||
40 | * @see https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes |
||
41 | */ |
||
42 | public function language(?string $language = null): static |
||
43 | { |
||
44 | $this->language = $language; |
||
45 | |||
46 | return $this; |
||
47 | } |
||
48 | |||
49 | 1 | public function setBillingRequestId(string $billingResponseId): static |
|
50 | { |
||
51 | 1 | Arr::set($this->params, 'links.billing_request', $billingResponseId); |
|
52 | |||
53 | 1 | return $this; |
|
54 | } |
||
55 | |||
56 | 1 | public function jsonSerialize(): array |
|
73 | } |
||
74 | } |
||
75 |