CheckoutEndpoint   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 3 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\Checkout;
8
9
/**
10
 * CheckoutEndpoint class
11
 *
12
 * Classe responsável pelo controle dos endpoints do recurso Checkout.
13
 */
14
class CheckoutEndpoint extends Endpoint
15
{
16
    protected string $location = '/service/resources/checkout';
17
18
    /**
19
     * Endpoint para criar um recurso `Checkout`.
20
     *
21
     * @param Checkout $checkout
22
     * @return Response
23
     */
24
    public function create(Checkout $checkout): Response
25
    {
26
        return $this->_POST($checkout->jsonSerialize());
27
    }
28
}