From a318c3a1b7a4ea0aa6898362cbe24b9e4822dc8c Mon Sep 17 00:00:00 2001 From: Eric Viana Date: Mon, 27 Jul 2026 12:15:36 -0300 Subject: [PATCH 1/5] feat(customers): add customer.* webhook events and customer_id list filters The deployed API already accepts these; this is additive and safe against production today. - Add customer.new/customer.update/customer.delete to the WebhookEvents Literal, and fold the previously orphaned receiver.delete (from src/blindpay/types.py, disconnected from WebhookEvents and never wired up) into the same Literal alongside it. - Mark receiver.new/receiver.update/receiver.delete deprecated with a comment pointing at the same changelog post used by the receivers namespace deprecation warning in client.py. They are not removed: receiver.* webhooks are still dual-emitted by the deployed API. - Retire the stray, publicly exported types.WebhookEvent alias now that receiver.delete lives in WebhookEvents. - Add customer_id as an optional list filter on ListPayinsInput and ListPayoutsInput, alongside the existing receiver_id (not removed). GET /v1/instances/{id}/payins and /payouts already accept customer_id as a query filter in the deployed API spec. - Update the README quickstart example to use blindpay.customers.get() instead of the runtime-deprecated blindpay.receivers.get(). Deliberately excluded (wave 2, needs blindpay-v2 PR #1799 deployed first): the remaining 11 receiver_* -> customer_* field renames, and removal of receiver.* from the webhook enum. Shipping those today would break every SDK user still on the deployed field names. Claude-Session: https://claude.ai/code/session_01F1stiNzuNtJXoXtiW9ZCbs --- README.md | 6 +++--- src/blindpay/__init__.py | 2 -- src/blindpay/resources/payins/payins.py | 1 + src/blindpay/resources/payouts/payouts.py | 1 + src/blindpay/resources/webhooks/webhooks.py | 10 ++++++++++ src/blindpay/types.py | 3 --- 6 files changed, 15 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a112e35..b36b533 100644 --- a/README.md +++ b/README.md @@ -27,14 +27,14 @@ All API methods return a response dictionary with either `data` or `error`: instance_id="your_instance_id_here" ) - response = await blindpay.receivers.get("receiver-id") + response = await blindpay.customers.get("customer-id") if response['error']: print(f"Error: {response['error']['message']}") return - receiver = response['data'] - print(f"Receiver: {receiver}") + customer = response['data'] + print(f"Customer: {customer}") ``` ## Types diff --git a/src/blindpay/__init__.py b/src/blindpay/__init__.py index eed3fae..eede8a6 100644 --- a/src/blindpay/__init__.py +++ b/src/blindpay/__init__.py @@ -30,7 +30,6 @@ TrackingTransaction, TransactionDocumentType, TransactionStatus, - WebhookEvent, ) __all__ = [ @@ -53,7 +52,6 @@ "StablecoinToken", "TransactionDocumentType", "TransactionStatus", - "WebhookEvent", "BlindpayApiResponse", "BlindpayErrorResponse", "BlindpaySuccessResponse", diff --git a/src/blindpay/resources/payins/payins.py b/src/blindpay/resources/payins/payins.py index 2fb1510..df9cffe 100644 --- a/src/blindpay/resources/payins/payins.py +++ b/src/blindpay/resources/payins/payins.py @@ -103,6 +103,7 @@ class Payin(TypedDict): class ListPayinsInput(PaginationParams): status: Optional[TransactionStatus] receiver_id: Optional[str] + customer_id: Optional[str] class ListPayinsResponse(TypedDict): diff --git a/src/blindpay/resources/payouts/payouts.py b/src/blindpay/resources/payouts/payouts.py index ee03f31..a234660 100644 --- a/src/blindpay/resources/payouts/payouts.py +++ b/src/blindpay/resources/payouts/payouts.py @@ -103,6 +103,7 @@ class Payout(TypedDict): class ListPayoutsInput(PaginationParams, total=False): receiver_id: str + customer_id: str class ListPayoutsResponse(TypedDict): diff --git a/src/blindpay/resources/webhooks/webhooks.py b/src/blindpay/resources/webhooks/webhooks.py index a75dcba..b937f74 100644 --- a/src/blindpay/resources/webhooks/webhooks.py +++ b/src/blindpay/resources/webhooks/webhooks.py @@ -6,8 +6,18 @@ from ...types import BlindpayApiResponse WebhookEvents = Literal[ + # deprecated: use "customer.new" instead. See + # https://www.blindpay.com/changelog/2026-06-04-customers-rename "receiver.new", + # deprecated: use "customer.update" instead. See + # https://www.blindpay.com/changelog/2026-06-04-customers-rename "receiver.update", + # deprecated: use "customer.delete" instead. See + # https://www.blindpay.com/changelog/2026-06-04-customers-rename + "receiver.delete", + "customer.new", + "customer.update", + "customer.delete", "bankAccount.new", "payout.new", "payout.update", diff --git a/src/blindpay/types.py b/src/blindpay/types.py index 5f4e0b9..0dfcb40 100644 --- a/src/blindpay/types.py +++ b/src/blindpay/types.py @@ -407,6 +407,3 @@ class TrackingPartnerFee(TypedDict): ApprovalRate = Literal["high", "low", "medium"] ManualExecutionStatus = Literal["failed"] - - -WebhookEvent = Literal["receiver.delete"] From b5307c4242631b4428e038cd45f4c87cd84c0455 Mon Sep 17 00:00:00 2001 From: Eric Viana Date: Mon, 27 Jul 2026 12:33:22 -0300 Subject: [PATCH 2/5] fix: keep the WebhookEvent export so this release stays additive The branch had deleted the public `WebhookEvent` alias from types.py and dropped it from __init__.py's imports and __all__. It is dead inside the repo, but it is an exported symbol, so `from blindpay import WebhookEvent` would break on what is otherwise a purely additive minor release. Restored with its original value and a deprecation note pointing at WebhookEvents, which is the alias that actually lists every event. Removal belongs in the next major, alongside dropping the receiver.* members. Claude-Session: https://claude.ai/code/session_01F1stiNzuNtJXoXtiW9ZCbs --- src/blindpay/__init__.py | 2 ++ src/blindpay/types.py | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/blindpay/__init__.py b/src/blindpay/__init__.py index eede8a6..eed3fae 100644 --- a/src/blindpay/__init__.py +++ b/src/blindpay/__init__.py @@ -30,6 +30,7 @@ TrackingTransaction, TransactionDocumentType, TransactionStatus, + WebhookEvent, ) __all__ = [ @@ -52,6 +53,7 @@ "StablecoinToken", "TransactionDocumentType", "TransactionStatus", + "WebhookEvent", "BlindpayApiResponse", "BlindpayErrorResponse", "BlindpaySuccessResponse", diff --git a/src/blindpay/types.py b/src/blindpay/types.py index 0dfcb40..5e1dff3 100644 --- a/src/blindpay/types.py +++ b/src/blindpay/types.py @@ -407,3 +407,8 @@ class TrackingPartnerFee(TypedDict): ApprovalRate = Literal["high", "low", "medium"] ManualExecutionStatus = Literal["failed"] + +# Deprecated: use WebhookEvents from blindpay.resources.webhooks, which lists every +# event. Kept exported so this stays an additive release; scheduled for removal in the +# next major. +WebhookEvent = Literal["receiver.delete"] From 4e9d1acbe5455f4fa5b53e8a6b76ce208a131eab Mon Sep 17 00:00:00 2001 From: Eric Viana Date: Mon, 27 Jul 2026 12:50:46 -0300 Subject: [PATCH 3/5] fix(customers): align response field names with the deployed API The customer.* rename shims declared customer_id on nested owners, limit-increase requests, blockchain wallets, and offramp wallets. The deployed API still sends receiver_id in all four places (server-side customers rename is not deployed yet). Since these are TypedDicts, a consumer indexing the declared key gets a KeyError today. Verified against apps/api/openapi.json: ReceiverOut.owners[], required receiver_id on BlockchainWalletOut, OfframpWallet, and GetReceiverLimitIncreaseOut. Updated the wallet test fixtures to match and added receiver_id assertions so a regression of this exact bug fails the suite. bank_accounts.py's owners field is untouched: the deployed BankAccountOut has neither receiver_id nor customer_id, so that is a separate pre-existing type-accuracy issue, not this bug. Claude-Session: https://claude.ai/code/session_01F1stiNzuNtJXoXtiW9ZCbs --- src/blindpay/resources/customers/customers.py | 4 ++-- src/blindpay/resources/wallets/blockchain.py | 2 +- src/blindpay/resources/wallets/offramp.py | 2 +- tests/resources/test_blockchain_wallets.py | 18 ++++++++++-------- tests/resources/test_offramp_wallets.py | 9 +++++---- uv.lock | 2 +- 6 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/blindpay/resources/customers/customers.py b/src/blindpay/resources/customers/customers.py index 43b98cd..7c055c8 100644 --- a/src/blindpay/resources/customers/customers.py +++ b/src/blindpay/resources/customers/customers.py @@ -302,7 +302,7 @@ class TransactionLimit(TypedDict): class Owner(TypedDict): id: str instance_id: str - customer_id: str + receiver_id: str role: OwnerRole first_name: str last_name: str @@ -704,7 +704,7 @@ class GetCustomerLimitsResponse(TypedDict): class LimitIncreaseRequest(TypedDict): id: str - customer_id: str + receiver_id: str status: LimitIncreaseRequestStatus daily: float monthly: float diff --git a/src/blindpay/resources/wallets/blockchain.py b/src/blindpay/resources/wallets/blockchain.py index 04b289e..f39bcb1 100644 --- a/src/blindpay/resources/wallets/blockchain.py +++ b/src/blindpay/resources/wallets/blockchain.py @@ -17,7 +17,7 @@ class BlockchainWallet(TypedDict): address: Optional[str] signature_tx_hash: Optional[str] is_account_abstraction: bool - customer_id: str + receiver_id: str ListBlockchainWalletsResponse = List[BlockchainWallet] diff --git a/src/blindpay/resources/wallets/offramp.py b/src/blindpay/resources/wallets/offramp.py index 2c76692..49f06e8 100644 --- a/src/blindpay/resources/wallets/offramp.py +++ b/src/blindpay/resources/wallets/offramp.py @@ -10,7 +10,7 @@ class OfframpWallet(TypedDict): id: str external_id: str instance_id: str - customer_id: str + receiver_id: str bank_account_id: str network: Network address: str diff --git a/tests/resources/test_blockchain_wallets.py b/tests/resources/test_blockchain_wallets.py index 124edb3..9422bde 100644 --- a/tests/resources/test_blockchain_wallets.py +++ b/tests/resources/test_blockchain_wallets.py @@ -35,7 +35,7 @@ async def test_list_blockchain_wallets(self): "address": "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C", "signature_tx_hash": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", "is_account_abstraction": False, - "customer_id": "re_000000000000", + "receiver_id": "re_000000000000", } ] @@ -46,6 +46,7 @@ async def test_list_blockchain_wallets(self): assert response["error"] is None assert response["data"] == mocked_wallets + assert response["data"][0]["receiver_id"] == "re_000000000000" mock_request.assert_called_once_with( "GET", "/instances/in_000000000000/customers/re_000000000000/blockchain-wallets" ) @@ -59,7 +60,7 @@ async def test_create_blockchain_wallet_with_address(self): "address": "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C", "signature_tx_hash": None, "is_account_abstraction": True, - "customer_id": "re_000000000000", + "receiver_id": "re_000000000000", } with patch.object(self.blindpay._api, "_request") as mock_request: @@ -96,7 +97,7 @@ async def test_create_blockchain_wallet_with_hash(self): "address": "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C", "signature_tx_hash": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", "is_account_abstraction": False, - "customer_id": "re_000000000000", + "receiver_id": "re_000000000000", } with patch.object(self.blindpay._api, "_request") as mock_request: @@ -133,7 +134,7 @@ async def test_get_blockchain_wallet(self): "address": "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C", "signature_tx_hash": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", "is_account_abstraction": False, - "customer_id": "re_000000000000", + "receiver_id": "re_000000000000", } with patch.object(self.blindpay._api, "_request") as mock_request: @@ -315,7 +316,7 @@ def test_list_blockchain_wallets(self): "address": "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C", "signature_tx_hash": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", "is_account_abstraction": False, - "customer_id": "re_000000000000", + "receiver_id": "re_000000000000", } ] @@ -326,6 +327,7 @@ def test_list_blockchain_wallets(self): assert response["error"] is None assert response["data"] == mocked_wallets + assert response["data"][0]["receiver_id"] == "re_000000000000" mock_request.assert_called_once_with( "GET", "/instances/in_000000000000/customers/re_000000000000/blockchain-wallets" ) @@ -338,7 +340,7 @@ def test_create_blockchain_wallet_with_address(self): "address": "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C", "signature_tx_hash": None, "is_account_abstraction": True, - "customer_id": "re_000000000000", + "receiver_id": "re_000000000000", } with patch.object(self.blindpay._api, "_request") as mock_request: @@ -374,7 +376,7 @@ def test_create_blockchain_wallet_with_hash(self): "address": "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C", "signature_tx_hash": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", "is_account_abstraction": False, - "customer_id": "re_000000000000", + "receiver_id": "re_000000000000", } with patch.object(self.blindpay._api, "_request") as mock_request: @@ -410,7 +412,7 @@ def test_get_blockchain_wallet(self): "address": "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C", "signature_tx_hash": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", "is_account_abstraction": False, - "customer_id": "re_000000000000", + "receiver_id": "re_000000000000", } with patch.object(self.blindpay._api, "_request") as mock_request: diff --git a/tests/resources/test_offramp_wallets.py b/tests/resources/test_offramp_wallets.py index 0dbdea2..9d70cbd 100644 --- a/tests/resources/test_offramp_wallets.py +++ b/tests/resources/test_offramp_wallets.py @@ -17,7 +17,7 @@ async def test_list_offramp_wallets(self): "id": "ow_000000000000", "external_id": "your_external_id", "instance_id": "in_000000000000", - "customer_id": "re_000000000000", + "receiver_id": "re_000000000000", "bank_account_id": "ba_000000000000", "network": "tron", "address": "TALJN9zTTEL9TVBb4WuTt6wLvPqJZr3hvb", @@ -38,6 +38,7 @@ async def test_list_offramp_wallets(self): assert response["error"] is None assert response["data"] == mocked_offramp_wallets + assert response["data"][0]["receiver_id"] == "re_000000000000" mock_request.assert_called_once_with( "GET", "/instances/in_000000000000/customers/re_000000000000/bank-accounts/ba_000000000000/offramp-wallets", @@ -81,7 +82,7 @@ async def test_get_offramp_wallet(self): "id": "ow_000000000000", "external_id": "your_external_id", "instance_id": "in_000000000000", - "customer_id": "re_000000000000", + "receiver_id": "re_000000000000", "bank_account_id": "ba_000000000000", "network": "tron", "address": "TALJN9zTTEL9TVBb4WuTt6wLvPqJZr3hvb", @@ -119,7 +120,7 @@ def test_list_offramp_wallets(self): "id": "ow_000000000000", "external_id": "your_external_id", "instance_id": "in_000000000000", - "customer_id": "re_000000000000", + "receiver_id": "re_000000000000", "bank_account_id": "ba_000000000000", "network": "tron", "address": "TALJN9zTTEL9TVBb4WuTt6wLvPqJZr3hvb", @@ -181,7 +182,7 @@ def test_get_offramp_wallet(self): "id": "ow_000000000000", "external_id": "your_external_id", "instance_id": "in_000000000000", - "customer_id": "re_000000000000", + "receiver_id": "re_000000000000", "bank_account_id": "ba_000000000000", "network": "tron", "address": "TALJN9zTTEL9TVBb4WuTt6wLvPqJZr3hvb", diff --git a/uv.lock b/uv.lock index 52335b6..306e87e 100644 --- a/uv.lock +++ b/uv.lock @@ -27,7 +27,7 @@ wheels = [ [[package]] name = "blindpay" -version = "2.1.0" +version = "2.4.0" source = { editable = "." } dependencies = [ { name = "httpx" }, From 476dd47c871f9533052dddb47370a94bd1c9cf57 Mon Sep 17 00:00:00 2001 From: Eric Viana Date: Mon, 27 Jul 2026 13:06:54 -0300 Subject: [PATCH 4/5] fix(tests): narrow Optional data before subscripting in wallet list assertions pyright flagged reportOptionalSubscript on response["data"][0] since BlindpayApiResponse["data"] is Optional. Add the same is-not-None assert already used elsewhere in the suite to narrow the type. Claude-Session: https://claude.ai/code/session_01F1stiNzuNtJXoXtiW9ZCbs --- tests/resources/test_blockchain_wallets.py | 2 ++ tests/resources/test_offramp_wallets.py | 1 + 2 files changed, 3 insertions(+) diff --git a/tests/resources/test_blockchain_wallets.py b/tests/resources/test_blockchain_wallets.py index 9422bde..111e33d 100644 --- a/tests/resources/test_blockchain_wallets.py +++ b/tests/resources/test_blockchain_wallets.py @@ -46,6 +46,7 @@ async def test_list_blockchain_wallets(self): assert response["error"] is None assert response["data"] == mocked_wallets + assert response["data"] is not None assert response["data"][0]["receiver_id"] == "re_000000000000" mock_request.assert_called_once_with( "GET", "/instances/in_000000000000/customers/re_000000000000/blockchain-wallets" @@ -327,6 +328,7 @@ def test_list_blockchain_wallets(self): assert response["error"] is None assert response["data"] == mocked_wallets + assert response["data"] is not None assert response["data"][0]["receiver_id"] == "re_000000000000" mock_request.assert_called_once_with( "GET", "/instances/in_000000000000/customers/re_000000000000/blockchain-wallets" diff --git a/tests/resources/test_offramp_wallets.py b/tests/resources/test_offramp_wallets.py index 9d70cbd..eceb42e 100644 --- a/tests/resources/test_offramp_wallets.py +++ b/tests/resources/test_offramp_wallets.py @@ -38,6 +38,7 @@ async def test_list_offramp_wallets(self): assert response["error"] is None assert response["data"] == mocked_offramp_wallets + assert response["data"] is not None assert response["data"][0]["receiver_id"] == "re_000000000000" mock_request.assert_called_once_with( "GET", From fbe681db984def4dae5a1a008b4da17c1b623145 Mon Sep 17 00:00:00 2001 From: Eric Viana Date: Mon, 27 Jul 2026 13:16:06 -0300 Subject: [PATCH 5/5] fix(customers): declare customer_id where the middleware alias sends it Blockchain wallets, offramp wallets and limit-increase responses go through addCustomerIdMiddleware, which adds customer_id wherever receiver_id is present today, and both are required in the post-#1799 spec. Revert the earlier reversion to receiver_id for those three. Owner is different: it's a nested owners[] element, which the middleware does not recurse into, so customer_id is not sent today but will be after #1799. Declare both keys as NotRequired so neither shape breaks. Claude-Session: https://claude.ai/code/session_01F1stiNzuNtJXoXtiW9ZCbs --- src/blindpay/resources/customers/customers.py | 9 ++++++--- src/blindpay/resources/wallets/blockchain.py | 2 +- src/blindpay/resources/wallets/offramp.py | 2 +- tests/resources/test_blockchain_wallets.py | 20 +++++++++---------- tests/resources/test_offramp_wallets.py | 10 +++++----- 5 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/blindpay/resources/customers/customers.py b/src/blindpay/resources/customers/customers.py index 7c055c8..92caea4 100644 --- a/src/blindpay/resources/customers/customers.py +++ b/src/blindpay/resources/customers/customers.py @@ -1,7 +1,7 @@ from typing import List, Optional, Union from urllib.parse import urlencode -from typing_extensions import Literal, TypedDict +from typing_extensions import Literal, NotRequired, TypedDict from ..._internal.api_client import InternalApiClient, InternalApiClientSync from ...types import ( @@ -302,7 +302,10 @@ class TransactionLimit(TypedDict): class Owner(TypedDict): id: str instance_id: str - receiver_id: str + # Not yet added by the response middleware for nested owners; both keys are + # optional until the API sends customer_id here directly (post-#1799). + receiver_id: NotRequired[str] + customer_id: NotRequired[str] role: OwnerRole first_name: str last_name: str @@ -704,7 +707,7 @@ class GetCustomerLimitsResponse(TypedDict): class LimitIncreaseRequest(TypedDict): id: str - receiver_id: str + customer_id: str status: LimitIncreaseRequestStatus daily: float monthly: float diff --git a/src/blindpay/resources/wallets/blockchain.py b/src/blindpay/resources/wallets/blockchain.py index f39bcb1..04b289e 100644 --- a/src/blindpay/resources/wallets/blockchain.py +++ b/src/blindpay/resources/wallets/blockchain.py @@ -17,7 +17,7 @@ class BlockchainWallet(TypedDict): address: Optional[str] signature_tx_hash: Optional[str] is_account_abstraction: bool - receiver_id: str + customer_id: str ListBlockchainWalletsResponse = List[BlockchainWallet] diff --git a/src/blindpay/resources/wallets/offramp.py b/src/blindpay/resources/wallets/offramp.py index 49f06e8..2c76692 100644 --- a/src/blindpay/resources/wallets/offramp.py +++ b/src/blindpay/resources/wallets/offramp.py @@ -10,7 +10,7 @@ class OfframpWallet(TypedDict): id: str external_id: str instance_id: str - receiver_id: str + customer_id: str bank_account_id: str network: Network address: str diff --git a/tests/resources/test_blockchain_wallets.py b/tests/resources/test_blockchain_wallets.py index 111e33d..1018790 100644 --- a/tests/resources/test_blockchain_wallets.py +++ b/tests/resources/test_blockchain_wallets.py @@ -35,7 +35,7 @@ async def test_list_blockchain_wallets(self): "address": "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C", "signature_tx_hash": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", "is_account_abstraction": False, - "receiver_id": "re_000000000000", + "customer_id": "re_000000000000", } ] @@ -47,7 +47,7 @@ async def test_list_blockchain_wallets(self): assert response["error"] is None assert response["data"] == mocked_wallets assert response["data"] is not None - assert response["data"][0]["receiver_id"] == "re_000000000000" + assert response["data"][0]["customer_id"] == "re_000000000000" mock_request.assert_called_once_with( "GET", "/instances/in_000000000000/customers/re_000000000000/blockchain-wallets" ) @@ -61,7 +61,7 @@ async def test_create_blockchain_wallet_with_address(self): "address": "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C", "signature_tx_hash": None, "is_account_abstraction": True, - "receiver_id": "re_000000000000", + "customer_id": "re_000000000000", } with patch.object(self.blindpay._api, "_request") as mock_request: @@ -98,7 +98,7 @@ async def test_create_blockchain_wallet_with_hash(self): "address": "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C", "signature_tx_hash": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", "is_account_abstraction": False, - "receiver_id": "re_000000000000", + "customer_id": "re_000000000000", } with patch.object(self.blindpay._api, "_request") as mock_request: @@ -135,7 +135,7 @@ async def test_get_blockchain_wallet(self): "address": "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C", "signature_tx_hash": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", "is_account_abstraction": False, - "receiver_id": "re_000000000000", + "customer_id": "re_000000000000", } with patch.object(self.blindpay._api, "_request") as mock_request: @@ -317,7 +317,7 @@ def test_list_blockchain_wallets(self): "address": "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C", "signature_tx_hash": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", "is_account_abstraction": False, - "receiver_id": "re_000000000000", + "customer_id": "re_000000000000", } ] @@ -329,7 +329,7 @@ def test_list_blockchain_wallets(self): assert response["error"] is None assert response["data"] == mocked_wallets assert response["data"] is not None - assert response["data"][0]["receiver_id"] == "re_000000000000" + assert response["data"][0]["customer_id"] == "re_000000000000" mock_request.assert_called_once_with( "GET", "/instances/in_000000000000/customers/re_000000000000/blockchain-wallets" ) @@ -342,7 +342,7 @@ def test_create_blockchain_wallet_with_address(self): "address": "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C", "signature_tx_hash": None, "is_account_abstraction": True, - "receiver_id": "re_000000000000", + "customer_id": "re_000000000000", } with patch.object(self.blindpay._api, "_request") as mock_request: @@ -378,7 +378,7 @@ def test_create_blockchain_wallet_with_hash(self): "address": "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C", "signature_tx_hash": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", "is_account_abstraction": False, - "receiver_id": "re_000000000000", + "customer_id": "re_000000000000", } with patch.object(self.blindpay._api, "_request") as mock_request: @@ -414,7 +414,7 @@ def test_get_blockchain_wallet(self): "address": "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C", "signature_tx_hash": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", "is_account_abstraction": False, - "receiver_id": "re_000000000000", + "customer_id": "re_000000000000", } with patch.object(self.blindpay._api, "_request") as mock_request: diff --git a/tests/resources/test_offramp_wallets.py b/tests/resources/test_offramp_wallets.py index eceb42e..11455c1 100644 --- a/tests/resources/test_offramp_wallets.py +++ b/tests/resources/test_offramp_wallets.py @@ -17,7 +17,7 @@ async def test_list_offramp_wallets(self): "id": "ow_000000000000", "external_id": "your_external_id", "instance_id": "in_000000000000", - "receiver_id": "re_000000000000", + "customer_id": "re_000000000000", "bank_account_id": "ba_000000000000", "network": "tron", "address": "TALJN9zTTEL9TVBb4WuTt6wLvPqJZr3hvb", @@ -39,7 +39,7 @@ async def test_list_offramp_wallets(self): assert response["error"] is None assert response["data"] == mocked_offramp_wallets assert response["data"] is not None - assert response["data"][0]["receiver_id"] == "re_000000000000" + assert response["data"][0]["customer_id"] == "re_000000000000" mock_request.assert_called_once_with( "GET", "/instances/in_000000000000/customers/re_000000000000/bank-accounts/ba_000000000000/offramp-wallets", @@ -83,7 +83,7 @@ async def test_get_offramp_wallet(self): "id": "ow_000000000000", "external_id": "your_external_id", "instance_id": "in_000000000000", - "receiver_id": "re_000000000000", + "customer_id": "re_000000000000", "bank_account_id": "ba_000000000000", "network": "tron", "address": "TALJN9zTTEL9TVBb4WuTt6wLvPqJZr3hvb", @@ -121,7 +121,7 @@ def test_list_offramp_wallets(self): "id": "ow_000000000000", "external_id": "your_external_id", "instance_id": "in_000000000000", - "receiver_id": "re_000000000000", + "customer_id": "re_000000000000", "bank_account_id": "ba_000000000000", "network": "tron", "address": "TALJN9zTTEL9TVBb4WuTt6wLvPqJZr3hvb", @@ -183,7 +183,7 @@ def test_get_offramp_wallet(self): "id": "ow_000000000000", "external_id": "your_external_id", "instance_id": "in_000000000000", - "receiver_id": "re_000000000000", + "customer_id": "re_000000000000", "bank_account_id": "ba_000000000000", "network": "tron", "address": "TALJN9zTTEL9TVBb4WuTt6wLvPqJZr3hvb",