Environment::getApiBoletoUrl()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
namespace Itau\API;
3
4
/**
5
 * Class Environment
6
 *
7
 * @package Itau\API
8
 */
9
class Environment
10
{
11
12
    private $apiPix;
13
    private $apiBolecode;
14
    private $apiAuth;
15
    private $apiBoleto;
16
    private $apiBoletoConsulta;
17
18
    /**
19
     *
20
     * @param string $api
21
     *
22
     */
23
    private function __construct($apiAuth, $apiPix, $apiBolecode, $apiBoleto, $apiBoletoConsulta)
24
    {
25
        $this->apiAuth = $apiAuth;
26
        $this->apiPix = $apiPix;
27
        $this->apiBolecode = $apiBolecode;
28
        $this->apiBoleto = $apiBoleto;
29
        $this->apiBoletoConsulta = $apiBoletoConsulta;
30
    }
31
32
    /**
33
     *
34
     * @return Environment
35
     */
36
    public static function production()
37
    {
38
        return new Environment(
39
            'https://sts.itau.com.br/api/oauth/token',
40
            'https://secure.api.itau/pix_recebimentos/v2',
41
            'https://secure.api.itau/pix_recebimentos_conciliacoes/v2',
42
            'https://api.itau.com.br/cash_management/v2',
43
            'https://secure.api.cloud.itau.com.br/boletoscash/v2'
44
        );
45
    }
46
47
    public function getApiPixUrl(): string
48
    {
49
        return $this->apiPix;
50
    }
51
52
    public function getApiBoleCodeUrl(): string
53
    {
54
        return $this->apiBolecode;
55
    }
56
57
    public function getApiBoletoUrl(): string
58
    {
59
        return $this->apiBoleto;
60
    }
61
62
    public function getApiBoletoConsultaUrl(): string
63
    {
64
        return $this->apiBoletoConsulta;
65
    }
66
67
    public function getApiUrlAuth(): string
68
    {
69
        return $this->apiAuth;
70
    }
71
}