|
51 | 51 |
|
52 | 52 | OwnerRole = Literal["beneficial_controlling", "beneficial_owner", "controlling_person"] |
53 | 53 |
|
| 54 | +LimitIncreaseRequestStatus = Literal["in_review", "approved", "rejected"] |
| 55 | + |
| 56 | +LimitIncreaseRequestSupportingDocumentType = Literal[ |
| 57 | + "individual_bank_statement", |
| 58 | + "individual_tax_return", |
| 59 | + "individual_proof_of_income", |
| 60 | + "business_bank_statement", |
| 61 | + "business_financial_statements", |
| 62 | + "business_tax_return", |
| 63 | +] |
| 64 | + |
54 | 65 |
|
55 | 66 | class KycWarning(TypedDict): |
56 | 67 | code: Optional[str] |
@@ -362,6 +373,35 @@ class GetReceiverLimitsResponse(TypedDict): |
362 | 373 | limits: Limits |
363 | 374 |
|
364 | 375 |
|
| 376 | +class LimitIncreaseRequest(TypedDict): |
| 377 | + id: str |
| 378 | + receiver_id: str |
| 379 | + status: LimitIncreaseRequestStatus |
| 380 | + daily: float |
| 381 | + monthly: float |
| 382 | + per_transaction: float |
| 383 | + supporting_document_file: str |
| 384 | + supporting_document_type: LimitIncreaseRequestSupportingDocumentType |
| 385 | + created_at: str |
| 386 | + updated_at: str |
| 387 | + |
| 388 | + |
| 389 | +GetLimitIncreaseRequestsResponse = List[LimitIncreaseRequest] |
| 390 | + |
| 391 | + |
| 392 | +class RequestLimitIncreaseInput(TypedDict): |
| 393 | + receiver_id: str |
| 394 | + daily: float |
| 395 | + monthly: float |
| 396 | + per_transaction: float |
| 397 | + supporting_document_file: str |
| 398 | + supporting_document_type: LimitIncreaseRequestSupportingDocumentType |
| 399 | + |
| 400 | + |
| 401 | +class RequestLimitIncreaseResponse(TypedDict): |
| 402 | + id: str |
| 403 | + |
| 404 | + |
365 | 405 | class ReceiversResource: |
366 | 406 | def __init__(self, instance_id: str, client: InternalApiClient): |
367 | 407 | self._instance_id = instance_id |
@@ -402,6 +442,20 @@ async def delete(self, receiver_id: str) -> BlindpayApiResponse[None]: |
402 | 442 | async def get_limits(self, receiver_id: str) -> BlindpayApiResponse[GetReceiverLimitsResponse]: |
403 | 443 | return await self._client.get(f"/instances/{self._instance_id}/limits/receivers/{receiver_id}") |
404 | 444 |
|
| 445 | + async def get_limit_increase_requests( |
| 446 | + self, receiver_id: str |
| 447 | + ) -> BlindpayApiResponse[GetLimitIncreaseRequestsResponse]: |
| 448 | + return await self._client.get(f"/instances/{self._instance_id}/receivers/{receiver_id}/limit-increase") |
| 449 | + |
| 450 | + async def request_limit_increase( |
| 451 | + self, data: RequestLimitIncreaseInput |
| 452 | + ) -> BlindpayApiResponse[RequestLimitIncreaseResponse]: |
| 453 | + receiver_id = data["receiver_id"] |
| 454 | + payload = {k: v for k, v in data.items() if k != "receiver_id"} |
| 455 | + return await self._client.post( |
| 456 | + f"/instances/{self._instance_id}/receivers/{receiver_id}/limit-increase", payload |
| 457 | + ) |
| 458 | + |
405 | 459 |
|
406 | 460 | class ReceiversResourceSync: |
407 | 461 | def __init__(self, instance_id: str, client: InternalApiClientSync): |
@@ -443,6 +497,16 @@ def delete(self, receiver_id: str) -> BlindpayApiResponse[None]: |
443 | 497 | def get_limits(self, receiver_id: str) -> BlindpayApiResponse[GetReceiverLimitsResponse]: |
444 | 498 | return self._client.get(f"/instances/{self._instance_id}/limits/receivers/{receiver_id}") |
445 | 499 |
|
| 500 | + def get_limit_increase_requests(self, receiver_id: str) -> BlindpayApiResponse[GetLimitIncreaseRequestsResponse]: |
| 501 | + return self._client.get(f"/instances/{self._instance_id}/receivers/{receiver_id}/limit-increase") |
| 502 | + |
| 503 | + def request_limit_increase( |
| 504 | + self, data: RequestLimitIncreaseInput |
| 505 | + ) -> BlindpayApiResponse[RequestLimitIncreaseResponse]: |
| 506 | + receiver_id = data["receiver_id"] |
| 507 | + payload = {k: v for k, v in data.items() if k != "receiver_id"} |
| 508 | + return self._client.post(f"/instances/{self._instance_id}/receivers/{receiver_id}/limit-increase", payload) |
| 509 | + |
446 | 510 |
|
447 | 511 | def create_receivers_resource(instance_id: str, client: InternalApiClient) -> ReceiversResource: |
448 | 512 | return ReceiversResource(instance_id, client) |
|
0 commit comments