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