Skip to content

Commit

Permalink
Add setCurrencies method to PaymentMethodResponse
Browse files Browse the repository at this point in the history
CS-5051
  • Loading branch information
MarijaIv committed Jan 26, 2024
1 parent f323605 commit 3303b54
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/BusinessLogic/Domain/Payment/Models/PaymentMethodResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,16 @@ public function getCurrencies(): array
return $this->currencies;
}

/**
* @param array $currencies
*
* @return void
*/
public function setCurrencies(array $currencies): void
{
$this->currencies = $currencies;
}

/**
* @return string
*/
Expand Down
5 changes: 3 additions & 2 deletions src/BusinessLogic/Domain/Payment/Services/PaymentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,8 @@ protected function getAllowedPaymentMethods(): array
* @return PaymentMethodResponse|null
*/
private function getCreditCardManagementMethodWithFilteredCurrencies(array $managementMethods
): ?PaymentMethodResponse {
): ?PaymentMethodResponse
{
$managementMethods = $this->getCreditCardManagementMethods($managementMethods);

if (empty($managementMethods)) {
Expand Down Expand Up @@ -474,7 +475,7 @@ private function getCreditCardManagementMethodWithFilteredCurrencies(array $mana
/**
* @param array $managementMethods
*
* @return array
* @return PaymentMethodResponse[]
*/
private function getCreditCardManagementMethods(array $managementMethods): array
{
Expand Down

0 comments on commit 3303b54

Please sign in to comment.