Skip to content

Commit 778aaa0

Browse files
committed
Merge remote-tracking branch 'github/v2.x' into v3.x
2 parents 9e2a8b5 + 8e28be2 commit 778aaa0

File tree

8 files changed

+24
-24
lines changed

8 files changed

+24
-24
lines changed

src/Filter/PaymentsFilter.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ class PaymentsFilter implements SignableRequest
5252
* @param string|null $orderId
5353
*/
5454
public function __construct(
55-
\DateTime $createdFrom = null,
56-
\DateTime $createdTo = null,
57-
\DateTime $finishedFrom = null,
58-
\DateTime $finishedTo = null,
55+
?\DateTime $createdFrom = null,
56+
?\DateTime $createdTo = null,
57+
?\DateTime $finishedFrom = null,
58+
?\DateTime $finishedTo = null,
5959
?string $methodCode = null,
60-
PaymentState $state = null,
61-
CurrencyCode $currency = null,
62-
Amount $amountFrom = null,
63-
Amount $amountTo = null,
60+
?PaymentState $state = null,
61+
?CurrencyCode $currency = null,
62+
?Amount $amountFrom = null,
63+
?Amount $amountTo = null,
6464
$orderId = null
6565
) {
6666
$this->createdFrom = $createdFrom;

src/Model/CreatePaymentCustomer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ final class CreatePaymentCustomer
2626
* @param string|null $email
2727
* @param string|null $phone - customer phone in international format max 15 numeric chars https://en.wikipedia.org/wiki/MSISDN
2828
*/
29-
public function __construct(string $name, string $surname, $email, $phone, Address $billingAddress = null, Address $shippingAddress = null)
29+
public function __construct(string $name, string $surname, $email, $phone, ?Address $billingAddress = null, ?Address $shippingAddress = null)
3030
{
3131
if ($email === null && $phone === null) {
3232
throw new InvalidArgumentException('At least one of $email and $phone is required.');

src/Model/CreatePaymentParams.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function getSubscription()
150150
*
151151
* @return CreatePaymentParams
152152
*/
153-
public function setSubscription(Subscription $subscription = null)
153+
public function setSubscription(?Subscription $subscription = null)
154154
{
155155
$this->subscription = $subscription;
156156

src/Service/ApiService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function getActivePaymentMethods(?LanguageCode $languageCode = null): Pay
133133
*
134134
* @return array<AccountBalance>
135135
*/
136-
public function getAccountsBalances(StringValue $accountIban = null, $projectId = null, \DateTime $balanceAt = null)
136+
public function getAccountsBalances(?StringValue $accountIban = null, $projectId = null, ?\DateTime $balanceAt = null)
137137
{
138138
$arguments = [];
139139
if ($accountIban !== null) {
@@ -480,7 +480,7 @@ public function getPaymentUrlsForPayment(Identifier $uid, ?LanguageCode $languag
480480
*
481481
* @throws ApiException if payment is not paid yet
482482
*/
483-
public function generatePaymentConfirmationPdf(Identifier $uid, LanguageCode $languageCode = null): string
483+
public function generatePaymentConfirmationPdf(Identifier $uid, ?LanguageCode $languageCode = null): string
484484
{
485485
$arguments = [];
486486
if ($languageCode !== null) {

src/Service/ApiServiceInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function getProjects();
4242
* @return PaymentMethodCollection
4343
* @throws ApiException
4444
*/
45-
public function getActivePaymentMethods(LanguageCode $languageCode = null);
45+
public function getActivePaymentMethods(?LanguageCode $languageCode = null);
4646

4747
/**
4848
* @param Identifier $paymentUid
@@ -103,7 +103,7 @@ public function getPayments(PaymentsFilter $filter, int $page = 1, int $limit =
103103
*
104104
* @return array<AccountBalance>
105105
*/
106-
public function getAccountsBalances(StringValue $accountIban = null, $projectId = null, \DateTime $balanceAt = null);
106+
public function getAccountsBalances(?StringValue $accountIban = null, $projectId = null, ?\DateTime $balanceAt = null);
107107

108108
/**
109109
* @param int<1, max> $page
@@ -148,7 +148,7 @@ public function createPaymentRefund(Identifier $uid, Amount $amount, string $rea
148148
*
149149
* @return array<PaymentMethodWithPayUrl>
150150
*/
151-
public function getPaymentUrlsForPayment(Identifier $uid, LanguageCode $languageCode = null);
151+
public function getPaymentUrlsForPayment(Identifier $uid, ?LanguageCode $languageCode = null);
152152

153153
/**
154154
* Method will generate PDF file as confirmation for paid payment
@@ -159,5 +159,5 @@ public function getPaymentUrlsForPayment(Identifier $uid, LanguageCode $language
159159
*
160160
* @throws ApiException if payment is not paid yet
161161
*/
162-
public function generatePaymentConfirmationPdf(Identifier $uid, LanguageCode $languageCode = null): string;
162+
public function generatePaymentConfirmationPdf(Identifier $uid, ?LanguageCode $languageCode = null): string;
163163
}

src/Service/GateService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function getPaymentButtons(CreatePaymentParams $params, PaymentMethodColl
110110
* @param Identifier $uid UID of payment
111111
* @return string HTML
112112
*/
113-
public function getPaymentButtonsForPayment(Identifier $uid, LanguageCode $languageCode = null)
113+
public function getPaymentButtonsForPayment(Identifier $uid, ?LanguageCode $languageCode = null)
114114
{
115115
$paymentMethods = $this->api->getPaymentUrlsForPayment($uid, $languageCode);
116116
$result = '';

src/Service/GateServiceInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function getPaymentButtons(CreatePaymentParams $params, PaymentMethodColl
2525
* @param Identifier $uid UID of payment
2626
* @return string HTML
2727
*/
28-
public function getPaymentButtonsForPayment(Identifier $uid, LanguageCode $languageCode = null);
28+
public function getPaymentButtonsForPayment(Identifier $uid, ?LanguageCode $languageCode = null);
2929

3030
/**
3131
* @param string $content HTML content of button

src/TheClient.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
class TheClient
3939
{
4040
/** @var string */
41-
public const VERSION = '3.0.0';
41+
public const VERSION = '3.0.1';
4242

4343
private TheConfig $config;
4444
private GateServiceInterface $gate;
@@ -75,7 +75,7 @@ public function getProjects()
7575
*
7676
* @return array<AccountBalance>
7777
*/
78-
public function getAccountsBalances($accountIban = null, $projectId = null, \DateTime $balanceAt = null)
78+
public function getAccountsBalances($accountIban = null, $projectId = null, ?\DateTime $balanceAt = null)
7979
{
8080
return $this->api->getAccountsBalances(
8181
$accountIban !== null ? new StringValue($accountIban) : null,
@@ -106,7 +106,7 @@ public function getAccountTransactionHistory(TransactionFilter $filter, $page =
106106
* @return PaymentMethodCollection
107107
* @throws ApiException
108108
*/
109-
public function getActivePaymentMethods(PaymentMethodFilter $filter = null, LanguageCode $languageCode = null, $isRecurring = false, $isDeposit = true)
109+
public function getActivePaymentMethods(?PaymentMethodFilter $filter = null, ?LanguageCode $languageCode = null, $isRecurring = false, $isDeposit = true)
110110
{
111111
$paymentMethods = $this
112112
->api
@@ -199,7 +199,7 @@ public function realizePaymentBySavedAuthorization($parentPaymentUid, RealizePay
199199
* @return PaymentCollection<SimplePayment>
200200
* @throws ApiException
201201
*/
202-
public function getPayments(PaymentsFilter $filter = null, $page = 1, $limit = 25)
202+
public function getPayments(?PaymentsFilter $filter = null, $page = 1, $limit = 25)
203203
{
204204
if ($filter === null) {
205205
$filter = new PaymentsFilter();
@@ -241,7 +241,7 @@ public function getPaymentUrlsForPayment($uid, $languageCode = null)
241241
* @return string
242242
* @throws ApiException
243243
*/
244-
public function getPaymentButtons(CreatePaymentParams $params, PaymentMethodFilter $filter = null, $useInlineAssets = true)
244+
public function getPaymentButtons(CreatePaymentParams $params, ?PaymentMethodFilter $filter = null, $useInlineAssets = true)
245245
{
246246
$params = $this->setLanguageCodeIfMissing($params);
247247

@@ -402,7 +402,7 @@ public function createPaymentRefund($paymentUid, $amount, $reason)
402402
*
403403
* @throws ApiException if payment is not paid yet
404404
*/
405-
public function generatePaymentConfirmationPdf(string $paymentUid, string $languageCode = null): string
405+
public function generatePaymentConfirmationPdf(string $paymentUid, ?string $languageCode = null): string
406406
{
407407
$this->validateUid($paymentUid);
408408
return $this->api->generatePaymentConfirmationPdf(

0 commit comments

Comments
 (0)