| @@ 8-36 (lines=29) @@ | ||
| 5 | /** |
|
| 6 | * @method Response send() |
|
| 7 | */ |
|
| 8 | class DeletePaymentMethodRequest extends AbstractPaymentMethodRequest |
|
| 9 | {
|
|
| 10 | /** |
|
| 11 | * @return null |
|
| 12 | * @throws \Omnipay\Common\Exception\InvalidRequestException |
|
| 13 | */ |
|
| 14 | public function getData() |
|
| 15 | {
|
|
| 16 | $this->validate('payment_method_token');
|
|
| 17 | ||
| 18 | return null; |
|
| 19 | } |
|
| 20 | ||
| 21 | /** |
|
| 22 | * @return string |
|
| 23 | */ |
|
| 24 | public function getEndpoint() |
|
| 25 | {
|
|
| 26 | return $this->endpoint . 'payment_methods/' . $this->getPaymentMethodToken() . '/redact'; |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * @return string |
|
| 31 | */ |
|
| 32 | public function getHttpMethod() |
|
| 33 | {
|
|
| 34 | return 'PUT'; |
|
| 35 | } |
|
| 36 | } |
|
| 37 | ||
| @@ 8-36 (lines=29) @@ | ||
| 5 | /** |
|
| 6 | * @method Response send() |
|
| 7 | */ |
|
| 8 | class FetchPaymentMethodRequest extends AbstractPaymentMethodRequest |
|
| 9 | {
|
|
| 10 | /** |
|
| 11 | * @return null |
|
| 12 | * @throws \Omnipay\Common\Exception\InvalidRequestException |
|
| 13 | */ |
|
| 14 | public function getData() |
|
| 15 | {
|
|
| 16 | $this->validate('payment_method_token');
|
|
| 17 | ||
| 18 | return null; |
|
| 19 | } |
|
| 20 | ||
| 21 | /** |
|
| 22 | * @return string |
|
| 23 | */ |
|
| 24 | public function getEndpoint() |
|
| 25 | {
|
|
| 26 | return $this->endpoint . 'payment_methods/' . $this->getPaymentMethodToken(); |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * @return string |
|
| 31 | */ |
|
| 32 | public function getHttpMethod() |
|
| 33 | {
|
|
| 34 | return 'GET'; |
|
| 35 | } |
|
| 36 | } |
|
| 37 | ||
| @@ 8-36 (lines=29) @@ | ||
| 5 | /** |
|
| 6 | * @method Response send() |
|
| 7 | */ |
|
| 8 | class RetainPaymentMethodRequest extends AbstractPaymentMethodRequest |
|
| 9 | {
|
|
| 10 | /** |
|
| 11 | * @return null |
|
| 12 | * @throws \Omnipay\Common\Exception\InvalidRequestException |
|
| 13 | */ |
|
| 14 | public function getData() |
|
| 15 | {
|
|
| 16 | $this->validate('payment_method_token');
|
|
| 17 | ||
| 18 | return null; |
|
| 19 | } |
|
| 20 | ||
| 21 | /** |
|
| 22 | * @return string |
|
| 23 | */ |
|
| 24 | public function getEndpoint() |
|
| 25 | {
|
|
| 26 | return $this->endpoint . 'payment_methods/' . $this->getPaymentMethodToken() . '/retain'; |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * @return string |
|
| 31 | */ |
|
| 32 | public function getHttpMethod() |
|
| 33 | {
|
|
| 34 | return 'PUT'; |
|
| 35 | } |
|
| 36 | } |
|
| 37 | ||