@@ -34,10 +34,10 @@ discard block |
||
| 34 | 34 | ]; |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - /** |
|
| 37 | + /** |
|
| 38 | 38 | * Retrieve a paymentInstrument from server and fill the $paymentInstrument Object with response. |
| 39 | - * |
|
| 40 | - */ |
|
| 39 | + * |
|
| 40 | + */ |
|
| 41 | 41 | public function get(): array |
| 42 | 42 | { |
| 43 | 43 | $response = []; |
@@ -49,49 +49,49 @@ discard block |
||
| 49 | 49 | }; |
| 50 | 50 | |
| 51 | 51 | return $response; |
| 52 | - } |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | - /** |
|
| 54 | + /** |
|
| 55 | 55 | * Delete an paymentInstrument from server. |
| 56 | - * |
|
| 56 | + * |
|
| 57 | 57 | * @param PaymentInstrumentInterface $paymentInstrument |
| 58 | 58 | * @return bool |
| 59 | - */ |
|
| 59 | + */ |
|
| 60 | 60 | public function disable(PaymentInstrumentInterface $paymentInstrument):?bool |
| 61 | 61 | { |
| 62 | 62 | $uri = $this->getEndPoint().'/'.$paymentInstrument->getToken(); |
| 63 | 63 | |
| 64 | 64 | return $this->request('delete', $paymentInstrument, $uri); |
| 65 | - } |
|
| 65 | + } |
|
| 66 | 66 | |
| 67 | - /** |
|
| 68 | - * CheckoutClientInterface constructor. |
|
| 69 | - * @param ContextInterface $context |
|
| 67 | + /** |
|
| 68 | + * CheckoutClientInterface constructor. |
|
| 69 | + * @param ContextInterface $context |
|
| 70 | 70 | * @param array $options |
| 71 | 71 | */ |
| 72 | 72 | public function __construct(ContextInterface $context, ?array $options = []) |
| 73 | - { |
|
| 73 | + { |
|
| 74 | 74 | $this->context = $context; |
| 75 | 75 | $this->options = $options; |
| 76 | - } |
|
| 77 | - |
|
| 78 | - /** |
|
| 79 | - * Return last response of client |
|
| 80 | - * @return ResponseInterface |
|
| 81 | - */ |
|
| 82 | - function getLastResponse(): ResponseInterface |
|
| 83 | - { |
|
| 76 | + } |
|
| 77 | + |
|
| 78 | + /** |
|
| 79 | + * Return last response of client |
|
| 80 | + * @return ResponseInterface |
|
| 81 | + */ |
|
| 82 | + function getLastResponse(): ResponseInterface |
|
| 83 | + { |
|
| 84 | 84 | return $this->lastResponse; |
| 85 | - } |
|
| 86 | - |
|
| 87 | - /** |
|
| 88 | - * return the context used to created the client. |
|
| 89 | - * @return ContextInterface |
|
| 90 | - */ |
|
| 91 | - function getContext(): ContextInterface |
|
| 92 | - { |
|
| 85 | + } |
|
| 86 | + |
|
| 87 | + /** |
|
| 88 | + * return the context used to created the client. |
|
| 89 | + * @return ContextInterface |
|
| 90 | + */ |
|
| 91 | + function getContext(): ContextInterface |
|
| 92 | + { |
|
| 93 | 93 | return $this->context; |
| 94 | - } |
|
| 94 | + } |
|
| 95 | 95 | |
| 96 | 96 | /** |
| 97 | 97 | * @param PaymentInstrumentInterface $object |
@@ -166,5 +166,5 @@ discard block |
||
| 166 | 166 | public function getCustomer(): CustomerInterface |
| 167 | 167 | { |
| 168 | 168 | return $this->customer; |
| 169 | - } |
|
| 169 | + } |
|
| 170 | 170 | } |
@@ -57,9 +57,9 @@ discard block |
||
| 57 | 57 | * @param PaymentInstrumentInterface $paymentInstrument |
| 58 | 58 | * @return bool |
| 59 | 59 | */ |
| 60 | - public function disable(PaymentInstrumentInterface $paymentInstrument):?bool |
|
| 60 | + public function disable(PaymentInstrumentInterface $paymentInstrument): ?bool |
|
| 61 | 61 | { |
| 62 | - $uri = $this->getEndPoint().'/'.$paymentInstrument->getToken(); |
|
| 62 | + $uri = $this->getEndPoint() . '/' . $paymentInstrument->getToken(); |
|
| 63 | 63 | |
| 64 | 64 | return $this->request('delete', $paymentInstrument, $uri); |
| 65 | 65 | } |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | function getEndPoint(): string |
| 129 | 129 | { |
| 130 | - return 'customers/'.$this->customer->getCustomerId().'/payment-instruments'; |
|
| 130 | + return 'customers/' . $this->customer->getCustomerId() . '/payment-instruments'; |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /** |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | /** |
| 145 | 145 | * @return AccessToken |
| 146 | 146 | */ |
| 147 | - function getToken():? AccessToken |
|
| 147 | + function getToken(): ? AccessToken |
|
| 148 | 148 | { |
| 149 | 149 | return $this->token; |
| 150 | 150 | } |