| @@ 8-57 (lines=50) @@ | ||
| 5 | use Cardinity\Method\MethodInterface; |
|
| 6 | use Symfony\Component\Validator\Constraints as Assert; |
|
| 7 | ||
| 8 | class Get implements MethodInterface |
|
| 9 | { |
|
| 10 | private $paymentId; |
|
| 11 | private $refundId; |
|
| 12 | ||
| 13 | public function __construct($paymentId, $refundId) |
|
| 14 | { |
|
| 15 | $this->paymentId = $paymentId; |
|
| 16 | $this->refundId = $refundId; |
|
| 17 | } |
|
| 18 | ||
| 19 | public function getAction() |
|
| 20 | { |
|
| 21 | return sprintf( |
|
| 22 | 'payments/%s/refunds/%s', |
|
| 23 | $this->getPaymentId(), |
|
| 24 | $this->getRefundId() |
|
| 25 | ); |
|
| 26 | } |
|
| 27 | ||
| 28 | public function getMethod() |
|
| 29 | { |
|
| 30 | return MethodInterface::GET; |
|
| 31 | } |
|
| 32 | ||
| 33 | public function createResultObject() |
|
| 34 | { |
|
| 35 | return new Refund(); |
|
| 36 | } |
|
| 37 | ||
| 38 | public function getAttributes() |
|
| 39 | { |
|
| 40 | return []; |
|
| 41 | } |
|
| 42 | ||
| 43 | public function getValidationConstraints() |
|
| 44 | { |
|
| 45 | return new Assert\Collection([]); |
|
| 46 | } |
|
| 47 | ||
| 48 | public function getPaymentId() |
|
| 49 | { |
|
| 50 | return $this->paymentId; |
|
| 51 | } |
|
| 52 | ||
| 53 | public function getRefundId() |
|
| 54 | { |
|
| 55 | return $this->refundId; |
|
| 56 | } |
|
| 57 | } |
|
| 58 | ||
| @@ 8-57 (lines=50) @@ | ||
| 5 | use Cardinity\Method\MethodInterface; |
|
| 6 | use Symfony\Component\Validator\Constraints as Assert; |
|
| 7 | ||
| 8 | class Get implements MethodInterface |
|
| 9 | { |
|
| 10 | private $paymentId; |
|
| 11 | private $settlementId; |
|
| 12 | ||
| 13 | public function __construct($paymentId, $settlementId) |
|
| 14 | { |
|
| 15 | $this->paymentId = $paymentId; |
|
| 16 | $this->settlementId = $settlementId; |
|
| 17 | } |
|
| 18 | ||
| 19 | public function getAction() |
|
| 20 | { |
|
| 21 | return sprintf( |
|
| 22 | 'payments/%s/settlements/%s', |
|
| 23 | $this->getPaymentId(), |
|
| 24 | $this->getSettlementId() |
|
| 25 | ); |
|
| 26 | } |
|
| 27 | ||
| 28 | public function getMethod() |
|
| 29 | { |
|
| 30 | return MethodInterface::GET; |
|
| 31 | } |
|
| 32 | ||
| 33 | public function createResultObject() |
|
| 34 | { |
|
| 35 | return new Settlement(); |
|
| 36 | } |
|
| 37 | ||
| 38 | public function getAttributes() |
|
| 39 | { |
|
| 40 | return []; |
|
| 41 | } |
|
| 42 | ||
| 43 | public function getValidationConstraints() |
|
| 44 | { |
|
| 45 | return new Assert\Collection([]); |
|
| 46 | } |
|
| 47 | ||
| 48 | public function getPaymentId() |
|
| 49 | { |
|
| 50 | return $this->paymentId; |
|
| 51 | } |
|
| 52 | ||
| 53 | public function getSettlementId() |
|
| 54 | { |
|
| 55 | return $this->settlementId; |
|
| 56 | } |
|
| 57 | } |
|
| 58 | ||
| @@ 8-57 (lines=50) @@ | ||
| 5 | use Cardinity\Method\MethodInterface; |
|
| 6 | use Symfony\Component\Validator\Constraints as Assert; |
|
| 7 | ||
| 8 | class Get implements MethodInterface |
|
| 9 | { |
|
| 10 | private $paymentId; |
|
| 11 | private $voidId; |
|
| 12 | ||
| 13 | public function __construct($paymentId, $voidId) |
|
| 14 | { |
|
| 15 | $this->paymentId = $paymentId; |
|
| 16 | $this->voidId = $voidId; |
|
| 17 | } |
|
| 18 | ||
| 19 | public function getAction() |
|
| 20 | { |
|
| 21 | return sprintf( |
|
| 22 | 'payments/%s/voids/%s', |
|
| 23 | $this->getPaymentId(), |
|
| 24 | $this->getvoidId() |
|
| 25 | ); |
|
| 26 | } |
|
| 27 | ||
| 28 | public function getMethod() |
|
| 29 | { |
|
| 30 | return MethodInterface::GET; |
|
| 31 | } |
|
| 32 | ||
| 33 | public function createResultObject() |
|
| 34 | { |
|
| 35 | return new VoidPayment(); |
|
| 36 | } |
|
| 37 | ||
| 38 | public function getAttributes() |
|
| 39 | { |
|
| 40 | return []; |
|
| 41 | } |
|
| 42 | ||
| 43 | public function getValidationConstraints() |
|
| 44 | { |
|
| 45 | return new Assert\Collection([]); |
|
| 46 | } |
|
| 47 | ||
| 48 | public function getPaymentId() |
|
| 49 | { |
|
| 50 | return $this->paymentId; |
|
| 51 | } |
|
| 52 | ||
| 53 | public function getvoidId() |
|
| 54 | { |
|
| 55 | return $this->voidId; |
|
| 56 | } |
|
| 57 | } |
|
| 58 | ||