Skip to content

Commit 3d680d7

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

9 files changed

Lines changed: 38 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 = "alves@blindpay.com" }]

src/blindpay/__init__.py

Lines changed: 5 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
@@ -13,6 +13,7 @@
1313
Currency,
1414
CurrencyType,
1515
ErrorResponse,
16+
ManualExecutionStatus,
1617
Network,
1718
PaginationMetadata,
1819
PaginationParams,
@@ -27,6 +28,7 @@
2728
TrackingTransaction,
2829
TransactionDocumentType,
2930
TransactionStatus,
31+
WebhookEvent,
3032
)
3133

3234
__all__ = [
@@ -39,13 +41,15 @@
3941
"Country",
4042
"Currency",
4143
"CurrencyType",
44+
"ManualExecutionStatus",
4245
"Network",
4346
"PaymentMethod",
4447
"Rail",
4548
"RecipientRelationship",
4649
"StablecoinToken",
4750
"TransactionDocumentType",
4851
"TransactionStatus",
52+
"WebhookEvent",
4953
"BlindpayApiResponse",
5054
"BlindpayErrorResponse",
5155
"BlindpaySuccessResponse",

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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
BankAccountType,
99
BlindpayApiResponse,
1010
Country,
11+
Network,
1112
Rail,
1213
RecipientRelationship,
1314
SpeiProtocol,
1415
)
1516

1617
ArgentinaTransfers = Literal["CVU", "CBU", "ALIAS"]
1718
AchCopDocument = Literal["CC", "CE", "NIT", "PASS", "PEP"]
18-
OfframpNetwork = Literal["tron"]
1919
PixType = Literal["pix"]
2020
TransfersBitsoType = Literal["transfers_bitso"]
2121
SpeiBitsoType = Literal["spei_bitso"]
@@ -31,7 +31,7 @@
3131
class OfframpWallet(TypedDict):
3232
address: str
3333
id: str
34-
network: OfframpNetwork
34+
network: Network
3535
external_id: str
3636

3737

@@ -89,6 +89,7 @@ class BankAccount(TypedDict):
8989
ted_bank_code: Optional[str]
9090
ted_branch_code: Optional[str]
9191
ted_cpf_cnpj: Optional[str]
92+
sepa_beneficiary_bic: Optional[str]
9293

9394

9495
class ListBankAccountsResponse(TypedDict):
@@ -311,6 +312,7 @@ class CreateInternationalSwiftInput(_CreateInternationalSwiftInputRequired, tota
311312
phone_number: Optional[str]
312313
tax_id: Optional[str]
313314
date_of_birth: Optional[str]
315+
sepa_beneficiary_bic: Optional[str]
314316

315317

316318
class CreateInternationalSwiftResponse(TypedDict):
@@ -344,6 +346,7 @@ class CreateInternationalSwiftResponse(TypedDict):
344346
swift_intermediary_bank_account_number_iban: Optional[str]
345347
swift_intermediary_bank_name: Optional[str]
346348
swift_intermediary_bank_country: Optional[Country]
349+
sepa_beneficiary_bic: Optional[str]
347350
created_at: str
348351

349352

src/blindpay/resources/instances/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
InstanceMemberRole,
55
InstancesResource,
66
InstancesResourceSync,
7+
MigrateInstanceOwnershipInput,
8+
MigrateInstanceOwnershipResponse,
79
UpdateInstanceInput,
810
UpdateInstanceMemberRoleInput,
911
create_instances_resource,
@@ -15,6 +17,8 @@
1517
"create_instances_resource_sync",
1618
"InstancesResource",
1719
"InstancesResourceSync",
20+
"MigrateInstanceOwnershipInput",
21+
"MigrateInstanceOwnershipResponse",
1822
"UpdateInstanceInput",
1923
"UpdateInstanceMemberRoleInput",
2024
"InstanceMemberRole",

src/blindpay/resources/instances/instances.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ class UpdateInstanceMemberRoleInput(TypedDict):
3434
role: InstanceMemberRole
3535

3636

37+
class MigrateInstanceOwnershipInput(TypedDict):
38+
user_id: str
39+
40+
41+
class MigrateInstanceOwnershipResponse(TypedDict):
42+
success: bool
43+
44+
3745
class InstancesResource:
3846
def __init__(self, instance_id: str, client: InternalApiClient):
3947
self._instance_id = instance_id
@@ -54,6 +62,9 @@ async def delete_member(self, member_id: str) -> BlindpayApiResponse[None]:
5462
async def update_member_role(self, member_id: str, role: InstanceMemberRole) -> BlindpayApiResponse[None]:
5563
return await self._client.put(f"/instances/{self._instance_id}/members/{member_id}", {"user_role": role})
5664

65+
async def migrate_ownership(self, data: MigrateInstanceOwnershipInput) -> BlindpayApiResponse[MigrateInstanceOwnershipResponse]:
66+
return await self._client.post(f"/instances/{self._instance_id}/ownership", data)
67+
5768

5869
class InstancesResourceSync:
5970
def __init__(self, instance_id: str, client: InternalApiClientSync):
@@ -75,6 +86,9 @@ def delete_member(self, member_id: str) -> BlindpayApiResponse[None]:
7586
def update_member_role(self, member_id: str, role: InstanceMemberRole) -> BlindpayApiResponse[None]:
7687
return self._client.put(f"/instances/{self._instance_id}/members/{member_id}", {"user_role": role})
7788

89+
def migrate_ownership(self, data: MigrateInstanceOwnershipInput) -> BlindpayApiResponse[MigrateInstanceOwnershipResponse]:
90+
return self._client.post(f"/instances/{self._instance_id}/ownership", data)
91+
7892

7993
def create_instances_resource(instance_id: str, client: InternalApiClient) -> InstancesResource:
8094
return InstancesResource(instance_id, client)

src/blindpay/resources/payins/payins.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from ..._internal.api_client import InternalApiClient, InternalApiClientSync
55
from ...types import (
66
BlindpayApiResponse,
7+
ManualExecutionStatus,
78
Network,
89
PaginationMetadata,
910
PaginationParams,
@@ -96,6 +97,7 @@ class Payin(TypedDict):
9697
pse_payment_link: Optional[str]
9798
pse_tax_id: Optional[str]
9899
partner_fee_id: Optional[str]
100+
manual_execution_status: Optional[ManualExecutionStatus]
99101

100102

101103
class ListPayinsInput(PaginationParams):
@@ -167,6 +169,7 @@ class GetPayinTrackResponse(TypedDict):
167169
network: Network
168170
blindpay_bank_details: BankDetails
169171
partner_fee_id: Optional[str]
172+
manual_execution_status: Optional[ManualExecutionStatus]
170173

171174

172175
class ExportPayinsInput(TypedDict):

src/blindpay/resources/payouts/payouts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ class Payout(TypedDict):
9696
ted_bank_code: Optional[str]
9797
ted_branch_code: Optional[str]
9898
ted_cpf_cnpj: Optional[str]
99+
cpn_payment_id: Optional[str]
99100

100101

101102
class ListPayoutsInput(PaginationParams, total=False):

src/blindpay/types.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,3 +392,7 @@ 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+
ManualExecutionStatus = Literal["failed"]
397+
398+
WebhookEvent = Literal["receiver.delete"]

0 commit comments

Comments
 (0)