|
18 | 18 | use Comfino\Api\Request\GetOrder as GetOrderRequest; |
19 | 19 | use Comfino\Api\Request\GetPaywall as GetPaywallRequest; |
20 | 20 | use Comfino\Api\Request\GetPaywallItemDetails as GetPaywallItemDetailsRequest; |
| 21 | +use Comfino\Api\Request\GetCreditors as GetCreditorsRequest; |
21 | 22 | use Comfino\Api\Request\GetProductTypes as GetProductTypesRequest; |
22 | 23 | use Comfino\Api\Request\GetWidgetKey as GetWidgetKeyRequest; |
23 | 24 | use Comfino\Api\Request\GetWidgetTypes as GetWidgetTypesRequest; |
|
29 | 30 | use Comfino\Api\Response\GetOrder as GetOrderResponse; |
30 | 31 | use Comfino\Api\Response\GetPaywall as GetPaywallResponse; |
31 | 32 | use Comfino\Api\Response\GetPaywallItemDetails as GetPaywallItemDetailsResponse; |
| 33 | +use Comfino\Api\Response\GetCreditors as GetCreditorsResponse; |
32 | 34 | use Comfino\Api\Response\GetProductTypes as GetProductTypesResponse; |
33 | 35 | use Comfino\Api\Response\GetWidgetKey as GetWidgetKeyResponse; |
34 | 36 | use Comfino\Api\Response\GetWidgetTypes as GetWidgetTypesResponse; |
@@ -390,7 +392,7 @@ public function validateOrder(OrderInterface $order): ValidateOrderResponse |
390 | 392 | } |
391 | 393 |
|
392 | 394 | /** |
393 | | - * Returns a details of specified loan application. |
| 395 | + * Returns details of a specified loan application. |
394 | 396 | * |
395 | 397 | * @param string $orderId Loan application ID returned by createOrder action. |
396 | 398 | * |
@@ -445,6 +447,23 @@ public function getProductTypes(ProductTypesListTypeEnum $listType): GetProductT |
445 | 447 | return new GetProductTypesResponse($this->request, $this->sendRequest($this->request), $this->serializer); |
446 | 448 | } |
447 | 449 |
|
| 450 | + /** |
| 451 | + * Returns a map of available creditors grouped by product type for an authorized shop account. |
| 452 | + * |
| 453 | + * @throws RequestValidationError |
| 454 | + * @throws ResponseValidationError |
| 455 | + * @throws AuthorizationError |
| 456 | + * @throws AccessDenied |
| 457 | + * @throws ServiceUnavailable |
| 458 | + * @throws ClientExceptionInterface |
| 459 | + */ |
| 460 | + public function getCreditors(): GetCreditorsResponse |
| 461 | + { |
| 462 | + $this->request = (new GetCreditorsRequest())->setSerializer($this->serializer); |
| 463 | + |
| 464 | + return new GetCreditorsResponse($this->request, $this->sendRequest($this->request), $this->serializer); |
| 465 | + } |
| 466 | + |
448 | 467 | /** |
449 | 468 | * Returns a widget key associated with an authorized shop account. |
450 | 469 | * |
|
0 commit comments