Passed
Push — master ( 67a5da...c35f7b )
by Jared
01:13
created

Authorization::getEndpoint()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace CultureKings\Afterpay\Model\InStore;
3
4
use CultureKings\Afterpay\Contacts\AuthorizationInterface;
5
6
/**
7
 * Class Authorization
8
 * @package CultureKings\Afterpay\Model\InStore
9
 */
10
class Authorization implements AuthorizationInterface
11
{
12
    const PRODUCTION_URI = 'https://posapi.secure-afterpay.com.au/v1/';
13
    const SANDBOX_URI = 'https://posapi-sandbox.secure-afterpay.com.au/v1/';
14
15
    /**
16
     * @var string
17
     */
18
    protected $endpoint;
19
20
    /**
21
     * @var string
22
     */
23
    protected $deviceToken;
24
25
    /**
26
     * @var string
27
     */
28
    protected $operator;
29
30
    /**
31
     * @var string
32
     */
33
    protected $userAgent;
34
35
    /**
36
     * Authorization constructor.
37
     * @param null $endpoint
38
     */
39
    public function __construct($endpoint = null)
40
    {
41
        $this->setEndpoint($endpoint);
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getEndpoint()
48
    {
49
        return $this->endpoint;
50
    }
51
52
    /**
53
     * @param string $endpoint
54
     *
55
     * @return $this
56
     */
57
    public function setEndpoint($endpoint)
58
    {
59
        $this->endpoint = $endpoint;
60
61
        return $this;
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    public function getDeviceToken()
68
    {
69
        return $this->deviceToken;
70
    }
71
72
    /**
73
     * @param string $deviceToken
74
     *
75
     * @return Authorization
76
     */
77
    public function setDeviceToken($deviceToken)
78
    {
79
        $this->deviceToken = $deviceToken;
80
81
        return $this;
82
    }
83
84
    /**
85
     * @return string
86
     */
87
    public function getOperator()
88
    {
89
        return $this->operator;
90
    }
91
92
    /**
93
     * @param string $operator
94
     *
95
     * @return Authorization
96
     */
97
    public function setOperator($operator)
98
    {
99
        $this->operator = $operator;
100
101
        return $this;
102
    }
103
104
    /**
105
     * @return string
106
     */
107
    public function getUserAgent()
108
    {
109
        return $this->userAgent;
110
    }
111
112
    /**
113
     * @param string $userAgent
114
     *
115
     * @return Authorization
116
     */
117
    public function setUserAgent($userAgent)
118
    {
119
        $this->userAgent = $userAgent;
120
121
        return $this;
122
    }
123
}
124