LoginParams::getUserPass()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace SalesforceBulkApi\conf;
4
5
use BaseHelpers\hydrators\ConstructFromArrayOrJson;
6
7
class LoginParams extends ConstructFromArrayOrJson
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $userName;
13
14
    /**
15
     * @var string
16
     */
17
    protected $userPass;
18
19
    /**
20
     * @var string
21
     */
22
    protected $userSecretToken;
23
24
    /**
25
     * @var string
26
     */
27
    protected $apiVersion = '39.0';
28
29
    /**
30
     * @var bool
31
     */
32
    protected $asPartner = true;
33
34
    /**
35
     * @var string
36
     */
37
    protected $endpointPrefix = 'login';
38
39
    /**
40
     * @return string
41
     */
42
    public function getUserName()
43
    {
44
        return $this->userName;
45
    }
46
47
    /**
48
     * @param string $userName
49
     *
50
     * @return $this
51
     */
52
    public function setUserName($userName)
53
    {
54
        $this->userName = $userName;
55
        return $this;
56
    }
57
58
    /**
59
     * @return string
60
     */
61
    public function getUserPass()
62
    {
63
        return $this->userPass;
64
    }
65
66
    /**
67
     * @param string $userPass
68
     *
69
     * @return $this
70
     */
71
    public function setUserPass($userPass)
72
    {
73
        $this->userPass = $userPass;
74
        return $this;
75
    }
76
77
    /**
78
     * @return string
79
     */
80
    public function getUserSecretToken()
81
    {
82
        return $this->userSecretToken;
83
    }
84
85
    /**
86
     * @param string $userSecretToken
87
     *
88
     * @return $this
89
     */
90
    public function setUserSecretToken($userSecretToken)
91
    {
92
        $this->userSecretToken = $userSecretToken;
93
        return $this;
94
    }
95
96
    /**
97
     * @return string
98
     */
99
    public function getApiVersion()
100
    {
101
        return $this->apiVersion;
102
    }
103
104
    /**
105
     * @param string $apiVersion
106
     *
107
     * @return $this
108
     */
109
    public function setApiVersion($apiVersion)
110
    {
111
        $this->apiVersion = $apiVersion;
112
        return $this;
113
    }
114
115
    /**
116
     * @return bool
117
     */
118
    public function amIPartner()
119
    {
120
        return $this->asPartner;
121
    }
122
123
    /**
124
     * @return bool
125
     */
126
    public function amIEnterprise()
127
    {
128
        return !$this->asPartner;
129
    }
130
131
    /**
132
     * @return $this
133
     */
134
    public function setAsPartner()
135
    {
136
        $this->asPartner = true;
137
        return $this;
138
    }
139
140
    /**
141
     * @return $this
142
     */
143
    public function setAsEnterprise()
144
    {
145
        $this->asPartner = false;
146
        return $this;
147
    }
148
149
    /**
150
     * @return string
151
     */
152
    public function getEndpointPrefix()
153
    {
154
        return $this->endpointPrefix;
155
    }
156
157
    /**
158
     * @return $this
159
     */
160
    public function setEndpointPrefixAsProduction()
161
    {
162
        $this->endpointPrefix = 'login';
163
        return $this;
164
    }
165
166
    /**
167
     * @return $this
168
     */
169
    public function setEndpointPrefixAsSandbox()
170
    {
171
        $this->endpointPrefix = 'test';
172
        return $this;
173
    }
174
175
    /**
176
     * @param string $endpointPrefix
177
     *
178
     * @return $this
179
     */
180
    public function setEndpointPrefix($endpointPrefix)
181
    {
182
        $this->endpointPrefix = $endpointPrefix;
183
        return $this;
184
    }
185
}
186