Skip to content

Commit d196b56

Browse files
feat: sync SDK with API changes
1 parent 2d4bf9d commit d196b56

7 files changed

Lines changed: 71 additions & 5 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "blindpay"
3-
version = "2.2.0"
3+
version = "2.3.0"
44
description = "Official Python SDK for the Blindpay API — Global payments infrastructure"
55
readme = "README.md"
66
authors = [{ name = "Blindpay", email = "[email protected]" }]

src/blindpay/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "2.2.0"
1+
__version__ = "2.3.0"
22

33
from ._internal.exceptions import BlindPayError
44
from .client import BlindPay, BlindPaySync
@@ -12,14 +12,17 @@
1212
Country,
1313
Currency,
1414
CurrencyType,
15+
Decision,
1516
ErrorResponse,
1617
Network,
1718
PaginationMetadata,
1819
PaginationParams,
1920
PaymentMethod,
2021
Rail,
22+
ReceiverType,
2123
RecipientRelationship,
2224
StablecoinToken,
25+
SwiftPaymentCode,
2326
TrackingComplete,
2427
TrackingLiquidity,
2528
TrackingPartnerFee,
@@ -39,11 +42,14 @@
3942
"Country",
4043
"Currency",
4144
"CurrencyType",
45+
"Decision",
4246
"Network",
4347
"PaymentMethod",
4448
"Rail",
4549
"RecipientRelationship",
50+
"ReceiverType",
4651
"StablecoinToken",
52+
"SwiftPaymentCode",
4753
"TransactionDocumentType",
4854
"TransactionStatus",
4955
"BlindpayApiResponse",

src/blindpay/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
from blindpay.resources.wallets.offramp import OfframpWalletsResource, OfframpWalletsResourceSync
4040
from blindpay.resources.webhooks.webhooks import WebhookEndpointsResource, WebhookEndpointsResourceSync
4141

42-
__version__ = "2.2.0"
42+
__version__ = "2.3.0"
4343

4444
T = TypeVar("T")
4545

src/blindpay/resources/bank_accounts/bank_accounts.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
Rail,
1212
RecipientRelationship,
1313
SpeiProtocol,
14+
SwiftPaymentCode,
1415
)
1516

1617
ArgentinaTransfers = Literal["CVU", "CBU", "ALIAS"]
@@ -83,6 +84,7 @@ class BankAccount(TypedDict):
8384
swift_intermediary_bank_account_number_iban: Optional[str]
8485
swift_intermediary_bank_name: Optional[str]
8586
swift_intermediary_bank_country: Optional[Country]
87+
swift_ifsc_branch_code: Optional[str]
8688
tron_wallet_hash: Optional[str]
8789
offramp_wallets: Optional[List[OfframpWallet]]
8890
created_at: str
@@ -306,7 +308,8 @@ class CreateInternationalSwiftInput(_CreateInternationalSwiftInputRequired, tota
306308
swift_intermediary_bank_country: Optional[Country]
307309
swift_intermediary_bank_name: Optional[str]
308310
swift_intermediary_bank_swift_code_bic: Optional[str]
309-
swift_payment_code: Optional[str]
311+
swift_payment_code: Optional[SwiftPaymentCode]
312+
swift_ifsc_branch_code: Optional[str]
310313
business_industry: Optional[str]
311314
phone_number: Optional[str]
312315
tax_id: Optional[str]
@@ -344,6 +347,7 @@ class CreateInternationalSwiftResponse(TypedDict):
344347
swift_intermediary_bank_account_number_iban: Optional[str]
345348
swift_intermediary_bank_name: Optional[str]
346349
swift_intermediary_bank_country: Optional[Country]
350+
swift_ifsc_branch_code: Optional[str]
347351
created_at: str
348352

349353

src/blindpay/resources/receivers/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@
4040
ReceiverStatus,
4141
RequestLimitIncreaseInput,
4242
RequestLimitIncreaseResponse,
43+
Rfi,
44+
RfiSection,
45+
RfiStatus,
4346
SoleProprietorDocType,
4447
SourceOfFundsDocType,
4548
SourceOfWealth,
49+
SubmitRfiResponse,
4650
TaxType,
4751
TransactionLimit,
4852
UpdateReceiverInput,
@@ -101,4 +105,8 @@
101105
"AmlHits",
102106
"ListReceiversInput",
103107
"ListReceiversPaginatedResponse",
108+
"Rfi",
109+
"RfiSection",
110+
"RfiStatus",
111+
"SubmitRfiResponse",
104112
]

src/blindpay/resources/receivers/receivers.py

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import List, Optional, Union
1+
from typing import Any, Dict, List, Optional, Union
22
from urllib.parse import urlencode
33

44
from typing_extensions import Literal, TypedDict
@@ -9,6 +9,7 @@
99
Country,
1010
PaginationMetadata,
1111
PaginationParams,
12+
ReceiverType,
1213
)
1314

1415
IndividualType = Literal["individual"]
@@ -94,6 +95,7 @@
9495
"112120",
9596
"113310",
9697
"115114",
98+
"446120",
9799
"541211",
98100
"541810",
99101
"541430",
@@ -731,6 +733,34 @@ class RequestLimitIncreaseResponse(TypedDict):
731733
id: str
732734

733735

736+
RfiStatus = Literal["pending", "submitted", "expired", "cancelled"]
737+
738+
739+
class RfiSection(TypedDict):
740+
# The changelog doesn't specify the structure of RfiSection items,
741+
# so we'll leave this as a flexible dict for now
742+
pass
743+
744+
745+
class Rfi(TypedDict):
746+
id: str
747+
receiver_id: str
748+
instance_id: str
749+
status: RfiStatus
750+
request: List[RfiSection]
751+
response: object
752+
expires_at: str
753+
submitted_at: Optional[str]
754+
created_at: str
755+
receiver_type: ReceiverType
756+
receiver_aiprise_session_id: Optional[str]
757+
receiver_kyc_status: str
758+
759+
760+
class SubmitRfiResponse(TypedDict):
761+
success: bool
762+
763+
734764
class ReceiversResource:
735765
def __init__(self, instance_id: str, client: InternalApiClient):
736766
self._instance_id = instance_id
@@ -792,6 +822,12 @@ async def request_limit_increase(
792822
f"/instances/{self._instance_id}/receivers/{receiver_id}/limit-increase", payload
793823
)
794824

825+
async def get_rfi(self, receiver_id: str) -> BlindpayApiResponse[Rfi]:
826+
return await self._client.get(f"/instances/{self._instance_id}/receivers/{receiver_id}/rfi")
827+
828+
async def submit_rfi(self, receiver_id: str, data: Dict[str, Any]) -> BlindpayApiResponse[SubmitRfiResponse]:
829+
return await self._client.post(f"/instances/{self._instance_id}/receivers/{receiver_id}/rfi", data)
830+
795831

796832
class ReceiversResourceSync:
797833
def __init__(self, instance_id: str, client: InternalApiClientSync):
@@ -850,6 +886,12 @@ def request_limit_increase(
850886
payload = {k: v for k, v in data.items() if k != "receiver_id"}
851887
return self._client.post(f"/instances/{self._instance_id}/receivers/{receiver_id}/limit-increase", payload)
852888

889+
def get_rfi(self, receiver_id: str) -> BlindpayApiResponse[Rfi]:
890+
return self._client.get(f"/instances/{self._instance_id}/receivers/{receiver_id}/rfi")
891+
892+
def submit_rfi(self, receiver_id: str, data: Dict[str, Any]) -> BlindpayApiResponse[SubmitRfiResponse]:
893+
return self._client.post(f"/instances/{self._instance_id}/receivers/{receiver_id}/rfi", data)
894+
853895

854896
def create_receivers_resource(instance_id: str, client: InternalApiClient) -> ReceiversResource:
855897
return ReceiversResource(instance_id, client)

src/blindpay/types.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,3 +392,9 @@ class TrackingPartnerFee(TypedDict):
392392
PaymentMethod = Literal["ach", "wire", "pix", "spei", "transfers", "pse", "international_swift", "rtp", "ted"]
393393

394394
KycStatus = Literal["awaiting_contract", "compliance_request"]
395+
396+
Decision = Literal["approved", "rejected"]
397+
398+
ReceiverType = Literal["business", "individual"]
399+
400+
SwiftPaymentCode = Literal["hk_swift_charitabledonation", "hk_swift_goods", "hk_swift_personal", "hk_swift_services"]

0 commit comments

Comments
 (0)