1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* MIT License |
5
|
|
|
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. |
6
|
|
|
*/ |
7
|
|
|
|
8
|
|
|
namespace SprykerEco\Zed\Ratepay\Business\Api\Model\Response; |
9
|
|
|
|
10
|
|
|
class ConfigurationResponse extends BaseResponse |
11
|
|
|
{ |
12
|
|
|
/** |
13
|
|
|
* @return float |
14
|
|
|
*/ |
15
|
|
|
public function getInterestrateMin() |
16
|
|
|
{ |
17
|
|
|
return (float)($this->xmlObject->content->{'installment-configuration-result'}->{'interestrate-min'}); |
|
|
|
|
18
|
|
|
} |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* @return float |
22
|
|
|
*/ |
23
|
|
|
public function getInterestrateDefault() |
24
|
|
|
{ |
25
|
|
|
return (float)($this->xmlObject->content->{'installment-configuration-result'}->{'interestrate-default'}); |
|
|
|
|
26
|
|
|
} |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @return float |
30
|
|
|
*/ |
31
|
|
|
public function getInterestrateMax() |
32
|
|
|
{ |
33
|
|
|
return (float)($this->xmlObject->content->{'installment-configuration-result'}->{'interestrate-max'}); |
|
|
|
|
34
|
|
|
} |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* @return float |
38
|
|
|
*/ |
39
|
|
|
public function getInterestRateMerchantTowardsBank() |
40
|
|
|
{ |
41
|
|
|
return (float)($this->xmlObject->content->{'installment-configuration-result'}->{'interest-rate-merchant-towards-bank'}); |
|
|
|
|
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @return int |
46
|
|
|
*/ |
47
|
|
|
public function getMonthNumberMin() |
48
|
|
|
{ |
49
|
|
|
return (int)$this->xmlObject->content->{'installment-configuration-result'}->{'month-number-min'}; |
|
|
|
|
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @return int |
54
|
|
|
*/ |
55
|
|
|
public function getMonthNumberMax() |
56
|
|
|
{ |
57
|
|
|
return (int)$this->xmlObject->content->{'installment-configuration-result'}->{'month-number-max'}; |
|
|
|
|
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @return int |
62
|
|
|
*/ |
63
|
|
|
public function getMonthLongrun() |
64
|
|
|
{ |
65
|
|
|
return (int)$this->xmlObject->content->{'installment-configuration-result'}->{'month-longrun'}; |
|
|
|
|
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* @return int |
70
|
|
|
*/ |
71
|
|
|
public function getAmountMinLongrun() |
72
|
|
|
{ |
73
|
|
|
return (int)$this->xmlObject->content->{'installment-configuration-result'}->{'amount-min-longrun'}; |
|
|
|
|
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @return array |
78
|
|
|
*/ |
79
|
|
|
public function getMonthAllowed() |
80
|
|
|
{ |
81
|
|
|
$monthAllowed = (string)$this->xmlObject->content->{'installment-configuration-result'}->{'month-allowed'}; |
|
|
|
|
82
|
|
|
$monthAllowed = array_values(explode(',', $monthAllowed)); |
83
|
|
|
|
84
|
|
|
return array_combine($monthAllowed, $monthAllowed); |
|
|
|
|
85
|
|
|
} |
86
|
|
|
|
87
|
|
|
/** |
88
|
|
|
* @return int |
89
|
|
|
*/ |
90
|
|
|
public function getValidPaymentFirstdays() |
91
|
|
|
{ |
92
|
|
|
return (int)$this->xmlObject->content->{'installment-configuration-result'}->{'valid-payment-firstdays'}; |
|
|
|
|
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* @return int |
97
|
|
|
*/ |
98
|
|
|
public function getPaymentFirstday() |
99
|
|
|
{ |
100
|
|
|
return (int)$this->xmlObject->content->{'installment-configuration-result'}->{'payment-firstday'}; |
|
|
|
|
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* @return int |
105
|
|
|
*/ |
106
|
|
|
public function getPaymentAmount() |
107
|
|
|
{ |
108
|
|
|
return (int)$this->xmlObject->content->{'installment-configuration-result'}->{'payment-amount'}; |
|
|
|
|
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
/** |
112
|
|
|
* @return int |
113
|
|
|
*/ |
114
|
|
|
public function getPaymentLastrate() |
115
|
|
|
{ |
116
|
|
|
return (int)$this->xmlObject->content->{'installment-configuration-result'}->{'payment-lastrate'}; |
|
|
|
|
117
|
|
|
} |
118
|
|
|
|
119
|
|
|
/** |
120
|
|
|
* @return int |
121
|
|
|
*/ |
122
|
|
|
public function getRateMinNormal() |
123
|
|
|
{ |
124
|
|
|
return (int)$this->xmlObject->content->{'installment-configuration-result'}->{'rate-min-normal'}; |
|
|
|
|
125
|
|
|
} |
126
|
|
|
|
127
|
|
|
/** |
128
|
|
|
* @return int |
129
|
|
|
*/ |
130
|
|
|
public function getRateMinLongrun() |
131
|
|
|
{ |
132
|
|
|
return (int)$this->xmlObject->content->{'installment-configuration-result'}->{'rate-min-longrun'}; |
|
|
|
|
133
|
|
|
} |
134
|
|
|
|
135
|
|
|
/** |
136
|
|
|
* @return float |
137
|
|
|
*/ |
138
|
|
|
public function getServiceCharge() |
139
|
|
|
{ |
140
|
|
|
return (float)($this->xmlObject->content->{'installment-configuration-result'}->{'service-charge'}); |
|
|
|
|
141
|
|
|
} |
142
|
|
|
|
143
|
|
|
/** |
144
|
|
|
* @return int |
145
|
|
|
*/ |
146
|
|
|
public function getMinDifferenceDueday() |
147
|
|
|
{ |
148
|
|
|
return (int)$this->xmlObject->content->{'installment-configuration-result'}->{'min-difference-dueday'}; |
|
|
|
|
149
|
|
|
} |
150
|
|
|
} |
151
|
|
|
|