From 25e513279977e801d8ee9fb7a4acd18d9b9da596 Mon Sep 17 00:00:00 2001 From: Yuval Niezni Date: Wed, 2 Nov 2022 14:24:12 +0200 Subject: [PATCH 1/2] add validate_peer_destination --- fireblocks_sdk/sdk.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fireblocks_sdk/sdk.py b/fireblocks_sdk/sdk.py index b8ebb9e..a1dca40 100644 --- a/fireblocks_sdk/sdk.py +++ b/fireblocks_sdk/sdk.py @@ -260,6 +260,15 @@ def set_network_connection_routing_policy(self, connection_id: str, routing_poli return self._patch_request(f"/v1/network_connections/{connection_id}/set_routing_policy", body) + def validate_peer_destination(self, connection_id: str, asset_type: str): + """Sets routing policy for a network connection + Args: + connection_id (string): The network connection's id + asset_type (routingAsset): The desired asset type + """ + + return self._get_request(f"/v1/network_connections/{connection_id}/is_third_party_routing/{asset_type}") + def get_discoverable_network_ids(self): """Gets all discoverable network profiles """ From cb8296ff1c4905c03715349e1ffb2a9eb5e2275d Mon Sep 17 00:00:00 2001 From: Yuval Niezni Date: Wed, 2 Nov 2022 15:01:07 +0200 Subject: [PATCH 2/2] update description --- fireblocks_sdk/sdk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fireblocks_sdk/sdk.py b/fireblocks_sdk/sdk.py index a1dca40..c68cf2f 100644 --- a/fireblocks_sdk/sdk.py +++ b/fireblocks_sdk/sdk.py @@ -261,7 +261,7 @@ def set_network_connection_routing_policy(self, connection_id: str, routing_poli return self._patch_request(f"/v1/network_connections/{connection_id}/set_routing_policy", body) def validate_peer_destination(self, connection_id: str, asset_type: str): - """Sets routing policy for a network connection + """Validates if peer's routing policy is set to it's workspace or to third party service Args: connection_id (string): The network connection's id asset_type (routingAsset): The desired asset type