Passed
Pull Request — master (#4)
by Andrey
11:07 queued 03:32
created

AmazonpayConfig   A

Complexity

Total Complexity 17

Size/Duplication

Total Lines 137
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 137
rs 10
c 0
b 0
f 0
wmc 17

17 Methods

Rating   Name   Duplication   Size   Complexity  
A getRegion() 0 3 1
A getWidgetScriptPath() 0 3 1
A getSellerId() 0 3 1
A getButtonColor() 0 3 1
A getAccessKeyId() 0 3 1
A getCurrencyIsoCode() 0 3 1
A getClientSecret() 0 3 1
A getSecretAccessKey() 0 3 1
A getAuthTransactionTimeout() 0 3 1
A getClientId() 0 3 1
A getErrorReportLevel() 0 3 1
A getButtonSize() 0 3 1
A getPopupLogin() 0 3 1
A getButtonType() 0 3 1
A getWidgetScriptPathSandbox() 0 3 1
A isSandbox() 0 3 1
A getCaptureNow() 0 3 1
1
<?php
2
3
/**
4
 * Apache OSL-2
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Shared\Amazonpay;
9
10
use Spryker\Shared\Kernel\AbstractBundleConfig;
11
use Spryker\Shared\Kernel\Store;
12
13
class AmazonpayConfig extends AbstractBundleConfig implements AmazonpayConfigInterface
14
{
15
16
    /**
17
     * @return string
18
     */
19
    public function getClientId()
20
    {
21
        return $this->get(AmazonpayConstants::CLIENT_ID);
22
    }
23
24
    /**
25
     * @return string
26
     */
27
    public function getAccessKeyId()
28
    {
29
        return $this->get(AmazonpayConstants::ACCESS_KEY_ID);
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getSellerId()
36
    {
37
        return $this->get(AmazonpayConstants::SELLER_ID);
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function getSecretAccessKey()
44
    {
45
        return $this->get(AmazonpayConstants::SECRET_ACCESS_KEY);
46
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function getClientSecret()
52
    {
53
        return $this->get(AmazonpayConstants::CLIENT_SECRET);
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function getRegion()
60
    {
61
        return $this->get(AmazonpayConstants::REGION);
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    public function getCurrencyIsoCode()
68
    {
69
        return Store::getInstance()->getCurrencyIsoCode();
70
    }
71
72
    /**
73
     * @return bool
74
     */
75
    public function isSandbox()
76
    {
77
        return (bool)$this->get(AmazonpayConstants::SANDBOX);
78
    }
79
80
    /**
81
     * @return string
82
     */
83
    public function getErrorReportLevel()
84
    {
85
        return $this->get(AmazonpayConstants::ERROR_REPORT_LEVEL);
86
    }
87
88
    /**
89
     * @return bool
90
     */
91
    public function getCaptureNow()
92
    {
93
        return (bool)$this->get(AmazonpayConstants::CAPTURE_NOW);
94
    }
95
96
    /**
97
     * @return int
98
     */
99
    public function getAuthTransactionTimeout()
100
    {
101
        return (int)$this->get(AmazonpayConstants::AUTH_TRANSACTION_TIMEOUT);
102
    }
103
104
    /**
105
     * @return string
106
     */
107
    public function getWidgetScriptPath()
108
    {
109
        return $this->get(AmazonpayConstants::WIDGET_SCRIPT_PATH);
110
    }
111
112
    /**
113
     * @return string
114
     */
115
    public function getWidgetScriptPathSandbox()
116
    {
117
        return $this->get(AmazonpayConstants::WIDGET_SCRIPT_PATH_SANDBOX);
118
    }
119
120
    /**
121
     * @return bool
122
     */
123
    public function getPopupLogin()
124
    {
125
        return (bool)$this->get(AmazonpayConstants::WIDGET_POPUP_LOGIN);
126
    }
127
128
    /**
129
     * @return string
130
     */
131
    public function getButtonSize()
132
    {
133
        return $this->get(AmazonpayConstants::WIDGET_BUTTON_SIZE);
134
    }
135
136
    /**
137
     * @return string
138
     */
139
    public function getButtonColor()
140
    {
141
        return $this->get(AmazonpayConstants::WIDGET_BUTTON_COLOR);
142
    }
143
144
    /**
145
     * @return string
146
     */
147
    public function getButtonType()
148
    {
149
        return $this->get(AmazonpayConstants::WIDGET_BUTTON_TYPE);
150
    }
151
152
}
153