@@ 8-33 (lines=26) @@ | ||
5 | /** |
|
6 | * @author Sullivan Senechal <[email protected]> |
|
7 | */ |
|
8 | abstract class AbstractBearerTransactionRequest extends AbstractTransactionRequest |
|
9 | { |
|
10 | use BearerRequestTrait; |
|
11 | ||
12 | /** |
|
13 | * @param int $amount |
|
14 | * @param string $bearer |
|
15 | * @param string $validityDate |
|
16 | * @param string|null $subscriberRef |
|
17 | */ |
|
18 | public function __construct($amount, $bearer, $validityDate, $subscriberRef = null) |
|
19 | { |
|
20 | parent::__construct($amount, $subscriberRef); |
|
21 | ||
22 | $this->bearer = $bearer; |
|
23 | $this->validityDate = $validityDate; |
|
24 | } |
|
25 | ||
26 | /** |
|
27 | * {@inheritdoc} |
|
28 | */ |
|
29 | public function getParameters() |
|
30 | { |
|
31 | return array_merge(parent::getParameters(), $this->getBearerParameters()); |
|
32 | } |
|
33 | } |
|
34 |
@@ 10-36 (lines=27) @@ | ||
7 | * |
|
8 | * @author Sullivan Senechal <[email protected]> |
|
9 | */ |
|
10 | abstract class AbstractReferencedBearerTransactionRequest extends AbstractReferencedTransactionRequest |
|
11 | { |
|
12 | use BearerRequestTrait; |
|
13 | ||
14 | /** |
|
15 | * @param int $reference |
|
16 | * @param int $amount |
|
17 | * @param string $bearer |
|
18 | * @param string $validityDate |
|
19 | * @param string|null $subscriberRef |
|
20 | */ |
|
21 | public function __construct($reference, $amount, $bearer, $validityDate, $subscriberRef = null) |
|
22 | { |
|
23 | parent::__construct($reference, $amount, $subscriberRef); |
|
24 | ||
25 | $this->bearer = $bearer; |
|
26 | $this->validityDate = $validityDate; |
|
27 | } |
|
28 | ||
29 | /** |
|
30 | * {@inheritdoc} |
|
31 | */ |
|
32 | public function getParameters() |
|
33 | { |
|
34 | return array_merge(parent::getParameters(), $this->getBearerParameters()); |
|
35 | } |
|
36 | } |
|
37 |