EstablishmentPaymentMethodsEndpoint   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A config() 0 7 1
1
<?php
2
3
namespace Ipag\Sdk\Endpoint;
4
5
use Ipag\Sdk\Core\Endpoint;
6
use Ipag\Sdk\Http\Response;
7
use Ipag\Sdk\Model\PaymentMethod;
8
9
/**
10
 * EstablishmentPaymentMethodsEndpoint class
11
 *
12
 * Classe responsável pelo controle dos endpoints do recurso Establishment Payment Methods.
13
 *
14
 */
15
16
class EstablishmentPaymentMethodsEndpoint extends Endpoint
17
{
18
    protected string $location = '/service/v2/establishments';
19
20
    /**
21
     * Endpoint para configuração de métodos de pagamento
22
     *
23
     * @param PaymentMethod $paymentMethod
24
     * @param string $establishmentUuid
25
     * @return Response
26
     */
27
    public function config(PaymentMethod $paymentMethod, string $establishmentUuid): Response
28
    {
29
        return $this->_POST(
30
            $paymentMethod->jsonSerialize(),
31
            [],
32
            [],
33
            "/{$establishmentUuid}/payment_methods"
34
        );
35
    }
36
37
}