VoucherEndpoint   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\Voucher;
8
9
10
/**
11
 * VoucherEndpoint class
12
 *
13
 * Classe responsável pelo controle dos endpoints do recurso Voucher.
14
 *
15
 */
16
17
class VoucherEndpoint extends Endpoint
18
{
19
    protected string $location = '/service/resources/vouchers';
20
21
    /**
22
     * Endpoint para criar um novo recurso `Voucher`
23
     *
24
     * @param Voucher $voucher
25
     * @return Response
26
     */
27
    public function create(Voucher $voucher): Response
28
    {
29
        return $this->_POST($voucher->jsonSerialize());
30
    }
31
32
}