11<?php
2- /**
3- * Created by PhpStorm.
4- * User: jam
5- * Date: 24.9.15
6- * Time: 11:08
7- */
2+ declare (strict_types=1 );
83
94namespace Trejjam \ThePay \Helper ;
105
@@ -25,20 +20,12 @@ function __construct(Trejjam\ThePay\MerchantConfig $config)
2520 $ this ->config = $ config ;
2621 }
2722
28- /**
29- * @return Trejjam\ThePay\MerchantConfig
30- */
31- public function getMerchantConfig ()
23+ public function getMerchantConfig () : Trejjam \ThePay \MerchantConfig
3224 {
3325 return $ this ->config ;
3426 }
3527
36- /**
37- * @param bool $onlyActive
38- *
39- * @return Tp\DataApi\Responses\GetPaymentMethodsResponse
40- */
41- public function getPaymentMethods ($ onlyActive = TRUE )
28+ public function getPaymentMethods (bool $ onlyActive = TRUE ) : Tp \DataApi \Responses \GetPaymentMethodsResponse
4229 {
4330 return Tp \Helper \DataApi::getPaymentMethods ($ this ->config , $ onlyActive );
4431 }
@@ -49,55 +36,48 @@ public function getPaymentMethods($onlyActive = TRUE)
4936 *
5037 * @return null|string
5138 */
52- public function getPaymentMethodIcon (Parameters \MerchantAccountMethod $ method , $ type = 'tight ' )
39+ public function getPaymentMethodIcon (Parameters \MerchantAccountMethod $ method , string $ type = 'tight ' ) : string
5340 {
5441 return Nette \Utils \Strings::replace ($ this ->config ->gateUrl , [
55- '~/demo-~ ' => '/ ' ,
56- ]) . 'images/logos/public/ ' . $ type . '/ ' . $ method ->getId () . '.png ' ;
42+ '~/demo-~ ' => '/ ' ,
43+ ]) . 'images/logos/public/ ' . $ type . '/ ' . $ method ->getId () . '.png ' ;
5744 }
5845
59- /**
60- * @param string $paymentId
61- *
62- * @return Tp\DataApi\Responses\GetPaymentResponse
63- */
64- public function getPayment ($ paymentId )
46+ public function getPayment (string $ paymentId ) : Tp \DataApi \Responses \GetPaymentResponse
6547 {
6648 return Tp \Helper \DataApi::getPayment ($ this ->config , $ paymentId );
6749 }
6850
69- /**
70- * @param string $paymentId
71- *
72- * @return Tp\DataApi\Responses\GetPaymentInstructionsResponse
73- */
74- public function getPaymentInstructions ($ paymentId )
51+ public function getPaymentInstructions (string $ paymentId ) : Tp \DataApi \Responses \GetPaymentInstructionsResponse
7552 {
7653 return Tp \Helper \DataApi::getPaymentInstructions ($ this ->config , $ paymentId );
7754 }
7855
79- /**
80- * @param string $paymentId
81- *
82- * @return Tp\DataApi\Responses\GetPaymentStateResponse
83- */
84- public function getPaymentState ($ paymentId )
56+ public function getPaymentState (string $ paymentId ) : Tp \DataApi \Responses \GetPaymentStateResponse
8557 {
8658 return Tp \Helper \DataApi::getPaymentState ($ this ->config , $ paymentId );
8759 }
8860
89- /**
90- * @param Parameters\GetPaymentsSearchParams|NULL $searchParams
91- * @param Parameters\PaginationRequest|NULL $pagination
92- * @param Parameters\Ordering|NULL $ordering
93- *
94- * @return Tp\DataApi\Responses\GetPaymentsResponse
95- */
9661 public function getPayments (
9762 Parameters \GetPaymentsSearchParams $ searchParams = NULL ,
9863 Parameters \PaginationRequest $ pagination = NULL ,
99- Parameters \Ordering $ ordering = NULL )
100- {
64+ Parameters \Ordering $ ordering = NULL
65+ ) : Tp \ DataApi \ Responses \ GetPaymentsResponse {
10166 return Tp \Helper \DataApi::getPayments ($ this ->config , $ searchParams , $ pagination , $ ordering );
10267 }
68+
69+ /**
70+ * @param $type
71+ * @param array $paymentMethods
72+ *
73+ * @return Tp\DataApi\Responses\SetPaymentMethodsResponse
74+ * @throws Tp\InvalidSignatureException
75+ * @throws Tp\SoapException
76+ */
77+ public function setPaymentMethods (
78+ $ type ,
79+ array $ paymentMethods = NULL
80+ ) : Tp \DataApi \Responses \SetPaymentMethodsResponse {
81+ return Tp \Helper \DataApi::setPaymentMethods ($ this ->config , $ type , $ paymentMethods );
82+ }
10383}
0 commit comments