diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index 37ab040..66f2f7c 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -284,6 +284,7 @@ docs/NetworkRecord.md
docs/NoneNetworkRoutingDest.md
docs/NotFoundException.md
docs/Notification.md
+docs/NotificationAttempt.md
docs/NotificationPaginatedResponse.md
docs/NotificationStatus.md
docs/NotificationWithData.md
@@ -867,6 +868,7 @@ fireblocks/models/network_record.py
fireblocks/models/none_network_routing_dest.py
fireblocks/models/not_found_exception.py
fireblocks/models/notification.py
+fireblocks/models/notification_attempt.py
fireblocks/models/notification_paginated_response.py
fireblocks/models/notification_status.py
fireblocks/models/notification_with_data.py
@@ -1425,6 +1427,7 @@ test/test_nfts_api.py
test/test_none_network_routing_dest.py
test/test_not_found_exception.py
test/test_notification.py
+test/test_notification_attempt.py
test/test_notification_paginated_response.py
test/test_notification_status.py
test/test_notification_with_data.py
diff --git a/README.md b/README.md
index 21bc2a0..1846576 100644
--- a/README.md
+++ b/README.md
@@ -489,6 +489,7 @@ Class | Method | HTTP request | Description
*WebhooksV2BetaApi* | [**get_notifications**](docs/WebhooksV2BetaApi.md#get_notifications) | **GET** /webhooks/{webhookId}/notifications | Get all notifications by webhook id
*WebhooksV2BetaApi* | [**get_webhook**](docs/WebhooksV2BetaApi.md#get_webhook) | **GET** /webhooks/{webhookId} | Get webhook by id
*WebhooksV2BetaApi* | [**get_webhooks**](docs/WebhooksV2BetaApi.md#get_webhooks) | **GET** /webhooks | Get all webhooks
+*WebhooksV2BetaApi* | [**resend_notification_by_id**](docs/WebhooksV2BetaApi.md#resend_notification_by_id) | **POST** /webhooks/{webhookId}/notifications/{notificationId}/resend | Resend notification by id
*WebhooksV2BetaApi* | [**update_webhook**](docs/WebhooksV2BetaApi.md#update_webhook) | **PATCH** /webhooks/{webhookId} | Update webhook
*WorkspaceStatusBetaApi* | [**get_workspace_status**](docs/WorkspaceStatusBetaApi.md#get_workspace_status) | **GET** /management/workspace_status | Returns current workspace status
*WhitelistIpAddressesApi* | [**get_whitelist_ip_addresses**](docs/WhitelistIpAddressesApi.md#get_whitelist_ip_addresses) | **GET** /management/api_users/{userId}/whitelist_ip_addresses | Gets whitelisted ip addresses
@@ -754,6 +755,7 @@ Class | Method | HTTP request | Description
- [NoneNetworkRoutingDest](docs/NoneNetworkRoutingDest.md)
- [NotFoundException](docs/NotFoundException.md)
- [Notification](docs/Notification.md)
+ - [NotificationAttempt](docs/NotificationAttempt.md)
- [NotificationPaginatedResponse](docs/NotificationPaginatedResponse.md)
- [NotificationStatus](docs/NotificationStatus.md)
- [NotificationWithData](docs/NotificationWithData.md)
diff --git a/docs/CreateWebhookRequest.md b/docs/CreateWebhookRequest.md
index ea2b71d..1f80f75 100644
--- a/docs/CreateWebhookRequest.md
+++ b/docs/CreateWebhookRequest.md
@@ -6,7 +6,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**url** | **str** | The url of the webhook where notifications will be sent. URL must be valid, unique and https. |
-**description** | **str** | description of the webhook. should not contain special characters. |
+**description** | **str** | description of the webhook. should not contain special characters. | [optional]
**events** | [**List[WebhookEvent]**](WebhookEvent.md) | event types the webhook will subscribe to |
**enabled** | **bool** | The status of the webhook. If false, the webhook will not receive notifications. | [optional] [default to True]
diff --git a/docs/NetworkConnectionsApi.md b/docs/NetworkConnectionsApi.md
index 0a5cfcc..637d0cb 100644
--- a/docs/NetworkConnectionsApi.md
+++ b/docs/NetworkConnectionsApi.md
@@ -757,7 +757,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **search_network_ids**
-> SearchNetworkIdsResponse search_network_ids(search=search, exclude_self=exclude_self, exclude_connected=exclude_connected, page_cursor=page_cursor, page_size=page_size)
+> SearchNetworkIdsResponse search_network_ids(search=search, exclude_self=exclude_self, only_self=only_self, exclude_connected=exclude_connected, page_cursor=page_cursor, page_size=page_size)
Search network IDs, both local IDs and discoverable remote IDs
@@ -790,13 +790,14 @@ configuration = ClientConfiguration(
with Fireblocks(configuration) as fireblocks:
search = 'search_example' # str | Search string - displayName networkId. Optional (optional)
exclude_self = True # bool | Exclude your networkIds. Optional, default false (optional)
+ only_self = True # bool | Include just your networkIds. Optional, default false (optional)
exclude_connected = True # bool | Exclude connected networkIds. Optional, default false (optional)
page_cursor = 'page_cursor_example' # str | ID of the record after which to fetch $limit records (optional)
page_size = 50 # float | Number of records to fetch. By default, it is 50 (optional) (default to 50)
try:
# Search network IDs, both local IDs and discoverable remote IDs
- api_response = fireblocks.network_connections.search_network_ids(search=search, exclude_self=exclude_self, exclude_connected=exclude_connected, page_cursor=page_cursor, page_size=page_size).result()
+ api_response = fireblocks.network_connections.search_network_ids(search=search, exclude_self=exclude_self, only_self=only_self, exclude_connected=exclude_connected, page_cursor=page_cursor, page_size=page_size).result()
print("The response of NetworkConnectionsApi->search_network_ids:\n")
pprint(api_response)
except Exception as e:
@@ -812,6 +813,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**search** | **str**| Search string - displayName networkId. Optional | [optional]
**exclude_self** | **bool**| Exclude your networkIds. Optional, default false | [optional]
+ **only_self** | **bool**| Include just your networkIds. Optional, default false | [optional]
**exclude_connected** | **bool**| Exclude connected networkIds. Optional, default false | [optional]
**page_cursor** | **str**| ID of the record after which to fetch $limit records | [optional]
**page_size** | **float**| Number of records to fetch. By default, it is 50 | [optional] [default to 50]
diff --git a/docs/Notification.md b/docs/Notification.md
index 76cdc7c..8be75f2 100644
--- a/docs/Notification.md
+++ b/docs/Notification.md
@@ -6,13 +6,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | The id of the Notification |
-**created_at** | **datetime** | The creation date of the notification |
-**updated_at** | **datetime** | The date when the notification was updated |
+**created_at** | **int** | The creation date of the notification in milliseconds |
+**updated_at** | **int** | The date when the notification was updated in milliseconds |
**status** | [**NotificationStatus**](NotificationStatus.md) | |
**event_type** | [**WebhookEvent**](WebhookEvent.md) | |
-**event_version** | **float** | The event version of the Notification |
**resource_id** | **str** | The resource id of the event which the Notification is listen to | [optional]
-**attempts** | **List[str]** | The attempts related to Notification | [optional] [default to []]
+**attempts** | [**List[NotificationAttempt]**](NotificationAttempt.md) | The attempts related to Notification | [default to []]
## Example
diff --git a/docs/NotificationAttempt.md b/docs/NotificationAttempt.md
new file mode 100644
index 0000000..b79350e
--- /dev/null
+++ b/docs/NotificationAttempt.md
@@ -0,0 +1,32 @@
+# NotificationAttempt
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**sent_time** | **int** | The time when the attempt was sent in milliseconds. |
+**duration** | **int** | The duration of the attempt in milliseconds. |
+**response_code** | **int** | The response code of the attempt, when missing refer to failureReason. | [optional]
+**failure_reason** | **str** | The request failure reason in case responseCode is missing. | [optional]
+
+## Example
+
+```python
+from fireblocks.models.notification_attempt import NotificationAttempt
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of NotificationAttempt from a JSON string
+notification_attempt_instance = NotificationAttempt.from_json(json)
+# print the JSON string representation of the object
+print(NotificationAttempt.to_json())
+
+# convert the object into a dict
+notification_attempt_dict = notification_attempt_instance.to_dict()
+# create an instance of NotificationAttempt from a dict
+notification_attempt_from_dict = NotificationAttempt.from_dict(notification_attempt_dict)
+```
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/NotificationWithData.md b/docs/NotificationWithData.md
index af6b108..ff39cf4 100644
--- a/docs/NotificationWithData.md
+++ b/docs/NotificationWithData.md
@@ -6,13 +6,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | |
-**created_at** | **datetime** | The creation date of the notification |
-**updated_at** | **datetime** | The date when the notification was updated |
+**created_at** | **int** | The creation date of the notification in milliseconds |
+**updated_at** | **int** | The date when the notification was updated in milliseconds |
**status** | [**NotificationStatus**](NotificationStatus.md) | |
**event_type** | [**WebhookEvent**](WebhookEvent.md) | |
-**event_version** | **float** | The event version which the Notification is listen to |
**resource_id** | **str** | The resource id of the event which the Notification is listen to | [optional]
-**attempts** | **List[str]** | The attempts related to Notification | [default to []]
+**attempts** | [**List[NotificationAttempt]**](NotificationAttempt.md) | The attempts related to Notification | [default to []]
**data** | **object** | notification data | [optional]
## Example
diff --git a/docs/Webhook.md b/docs/Webhook.md
index a0d216c..f4311fc 100644
--- a/docs/Webhook.md
+++ b/docs/Webhook.md
@@ -5,13 +5,13 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**id** | **str** | The id of the webhook | [optional]
-**url** | **str** | The url of the webhook where notifications will be sent. Must be a valid URL and https. | [optional]
+**id** | **str** | The id of the webhook |
+**url** | **str** | The url of the webhook where notifications will be sent. Must be a valid URL and https. |
**description** | **str** | description of the webhook of what it is used for | [optional]
-**events** | [**List[WebhookEvent]**](WebhookEvent.md) | The events that the webhook will be subscribed to | [optional]
-**status** | **str** | The status of the webhook | [optional]
-**created_at** | **datetime** | The date and time the webhook was created | [optional]
-**updated_at** | **datetime** | The date and time the webhook was last updated | [optional]
+**events** | [**List[WebhookEvent]**](WebhookEvent.md) | The events that the webhook will be subscribed to |
+**status** | **str** | The status of the webhook |
+**created_at** | **int** | The date and time the webhook was created in milliseconds |
+**updated_at** | **int** | The date and time the webhook was last updated in milliseconds |
## Example
diff --git a/docs/WebhooksV2BetaApi.md b/docs/WebhooksV2BetaApi.md
index f601bc7..912127d 100644
--- a/docs/WebhooksV2BetaApi.md
+++ b/docs/WebhooksV2BetaApi.md
@@ -10,6 +10,7 @@ Method | HTTP request | Description
[**get_notifications**](WebhooksV2BetaApi.md#get_notifications) | **GET** /webhooks/{webhookId}/notifications | Get all notifications by webhook id
[**get_webhook**](WebhooksV2BetaApi.md#get_webhook) | **GET** /webhooks/{webhookId} | Get webhook by id
[**get_webhooks**](WebhooksV2BetaApi.md#get_webhooks) | **GET** /webhooks | Get all webhooks
+[**resend_notification_by_id**](WebhooksV2BetaApi.md#resend_notification_by_id) | **POST** /webhooks/{webhookId}/notifications/{notificationId}/resend | Resend notification by id
[**update_webhook**](WebhooksV2BetaApi.md#update_webhook) | **PATCH** /webhooks/{webhookId} | Update webhook
@@ -238,6 +239,7 @@ No authorization required
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | * X-Request-ID -
|
+**0** | Error Response | * X-Request-ID -
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -329,6 +331,7 @@ No authorization required
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | A paginated response containing NotificationExternalDTO objects | * X-Request-ID -
|
+**0** | Error Response | * X-Request-ID -
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -484,6 +487,80 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+# **resend_notification_by_id**
+> resend_notification_by_id(webhook_id, notification_id, idempotency_key=idempotency_key)
+
+Resend notification by id
+
+Resend notification by ID **Note:** These endpoints are currently in beta and might be subject to changes.
+
+### Example
+
+
+```python
+from fireblocks.client import Fireblocks
+from fireblocks.client_configuration import ClientConfiguration
+from fireblocks.exceptions import ApiException
+from fireblocks.base_path import BasePath
+
+# load the secret key content from a file
+with open('your_secret_key_file_path', 'r') as file:
+ secret_key_value = file.read()
+
+# build the configuration
+configuration = ClientConfiguration(
+ api_key="your_api_key",
+ secret_key=secret_key_value,
+ base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1"
+)
+
+
+# Enter a context with an instance of the API client
+with Fireblocks(configuration) as fireblocks:
+ webhook_id = 'webhook_id_example' # str | The ID of the webhook
+ notification_id = 'notification_id_example' # str | The ID of the notification
+ idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional)
+
+ try:
+ # Resend notification by id
+ fireblocks.webhooks_v2_beta.resend_notification_by_id(webhook_id, notification_id, idempotency_key=idempotency_key).result()
+ except Exception as e:
+ print("Exception when calling WebhooksV2BetaApi->resend_notification_by_id: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **webhook_id** | **str**| The ID of the webhook |
+ **notification_id** | **str**| The ID of the notification |
+ **idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional]
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**202** | Resend notification request was accepted and is being processed | * X-Request-ID -
|
+**0** | Error Response | * X-Request-ID -
|
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
# **update_webhook**
> Webhook update_webhook(webhook_id, update_webhook_request)
diff --git a/fireblocks/__init__.py b/fireblocks/__init__.py
index f226936..5ef0ecf 100644
--- a/fireblocks/__init__.py
+++ b/fireblocks/__init__.py
@@ -15,7 +15,7 @@
""" # noqa: E501
-__version__ = "7.0.0"
+__version__ = "0.0.0"
# import apis into sdk package
from fireblocks.api.api_user_api import ApiUserApi
@@ -477,6 +477,7 @@
from fireblocks.models.none_network_routing_dest import NoneNetworkRoutingDest
from fireblocks.models.not_found_exception import NotFoundException
from fireblocks.models.notification import Notification
+from fireblocks.models.notification_attempt import NotificationAttempt
from fireblocks.models.notification_paginated_response import (
NotificationPaginatedResponse,
)
diff --git a/fireblocks/api/network_connections_api.py b/fireblocks/api/network_connections_api.py
index acd0670..b06a085 100644
--- a/fireblocks/api/network_connections_api.py
+++ b/fireblocks/api/network_connections_api.py
@@ -1343,6 +1343,7 @@ def search_network_ids(
self,
search: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="Search string - displayName networkId. Optional")] = None,
exclude_self: Annotated[Optional[StrictBool], Field(description="Exclude your networkIds. Optional, default false")] = None,
+ only_self: Annotated[Optional[StrictBool], Field(description="Include just your networkIds. Optional, default false")] = None,
exclude_connected: Annotated[Optional[StrictBool], Field(description="Exclude connected networkIds. Optional, default false")] = None,
page_cursor: Annotated[Optional[StrictStr], Field(description="ID of the record after which to fetch $limit records")] = None,
page_size: Annotated[Optional[Union[Annotated[float, Field(le=50, strict=True, ge=1)], Annotated[int, Field(le=50, strict=True, ge=1)]]], Field(description="Number of records to fetch. By default, it is 50")] = None,
@@ -1367,6 +1368,8 @@ def search_network_ids(
:type search: str
:param exclude_self: Exclude your networkIds. Optional, default false
:type exclude_self: bool
+ :param only_self: Include just your networkIds. Optional, default false
+ :type only_self: bool
:param exclude_connected: Exclude connected networkIds. Optional, default false
:type exclude_connected: bool
:param page_cursor: ID of the record after which to fetch $limit records
@@ -1399,6 +1402,7 @@ def search_network_ids(
_param = self._search_network_ids_serialize(
search=search,
exclude_self=exclude_self,
+ only_self=only_self,
exclude_connected=exclude_connected,
page_cursor=page_cursor,
page_size=page_size,
@@ -1423,6 +1427,7 @@ def _search_network_ids_serialize(
self,
search,
exclude_self,
+ only_self,
exclude_connected,
page_cursor,
page_size,
@@ -1454,6 +1459,10 @@ def _search_network_ids_serialize(
_query_params.append(('excludeSelf', exclude_self))
+ if only_self is not None:
+
+ _query_params.append(('onlySelf', only_self))
+
if exclude_connected is not None:
_query_params.append(('excludeConnected', exclude_connected))
diff --git a/fireblocks/api/webhooks_v2_beta_api.py b/fireblocks/api/webhooks_v2_beta_api.py
index 9dc38cd..7039ca0 100644
--- a/fireblocks/api/webhooks_v2_beta_api.py
+++ b/fireblocks/api/webhooks_v2_beta_api.py
@@ -386,6 +386,7 @@ def get_notification(
_response_types_map: Dict[str, Optional[str]] = {
'200': "NotificationWithData",
+ 'default': "ErrorSchema",
}
return self.api_client.call_api(
@@ -551,6 +552,7 @@ def get_notifications(
_response_types_map: Dict[str, Optional[str]] = {
'200': "NotificationPaginatedResponse",
+ 'default': "ErrorSchema",
}
return self.api_client.call_api(
@@ -932,6 +934,147 @@ def _get_webhooks_serialize(
+ @validate_call
+ def resend_notification_by_id(
+ self,
+ webhook_id: Annotated[StrictStr, Field(description="The ID of the webhook")],
+ notification_id: Annotated[StrictStr, Field(description="The ID of the notification")],
+ idempotency_key: Annotated[Optional[StrictStr], Field(description="A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> Future[ApiResponse[None]]:
+ """Resend notification by id
+
+ Resend notification by ID **Note:** These endpoints are currently in beta and might be subject to changes.
+
+ :param webhook_id: The ID of the webhook (required)
+ :type webhook_id: str
+ :param notification_id: The ID of the notification (required)
+ :type notification_id: str
+ :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.
+ :type idempotency_key: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ validate_not_empty_string(function_name="resend_notification_by_id", param_name="webhook_id", param_value=webhook_id)
+ validate_not_empty_string(function_name="resend_notification_by_id", param_name="notification_id", param_value=notification_id)
+
+ _param = self._resend_notification_by_id_serialize(
+ webhook_id=webhook_id,
+ notification_id=notification_id,
+ idempotency_key=idempotency_key,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '202': None,
+ 'default': "ErrorSchema",
+ }
+
+ return self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout,
+ _response_types_map=_response_types_map,
+ )
+
+ def _resend_notification_by_id_serialize(
+ self,
+ webhook_id,
+ notification_id,
+ idempotency_key,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, Union[str, bytes]] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if webhook_id is not None:
+ _path_params['webhookId'] = webhook_id
+ if notification_id is not None:
+ _path_params['notificationId'] = notification_id
+ # process the query parameters
+ # process the header parameters
+ if idempotency_key is not None:
+ _header_params['Idempotency-Key'] = idempotency_key
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/webhooks/{webhookId}/notifications/{notificationId}/resend',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
@validate_call
def update_webhook(
self,
diff --git a/fireblocks/configuration.py b/fireblocks/configuration.py
index 030e3f0..03f60c7 100644
--- a/fireblocks/configuration.py
+++ b/fireblocks/configuration.py
@@ -424,7 +424,7 @@ def to_debug_report(self):
"OS: {env}\n"
"Python Version: {pyversion}\n"
"Version of the API: 1.6.2\n"
- "SDK Package Version: 7.0.0".format(env=sys.platform, pyversion=sys.version)
+ "SDK Package Version: 0.0.0".format(env=sys.platform, pyversion=sys.version)
)
def get_host_settings(self):
diff --git a/fireblocks/models/__init__.py b/fireblocks/models/__init__.py
index 1e42384..da4b4a0 100644
--- a/fireblocks/models/__init__.py
+++ b/fireblocks/models/__init__.py
@@ -273,6 +273,7 @@
from fireblocks.models.none_network_routing_dest import NoneNetworkRoutingDest
from fireblocks.models.not_found_exception import NotFoundException
from fireblocks.models.notification import Notification
+from fireblocks.models.notification_attempt import NotificationAttempt
from fireblocks.models.notification_paginated_response import NotificationPaginatedResponse
from fireblocks.models.notification_status import NotificationStatus
from fireblocks.models.notification_with_data import NotificationWithData
diff --git a/fireblocks/models/create_webhook_request.py b/fireblocks/models/create_webhook_request.py
index 27599e7..879c2f1 100644
--- a/fireblocks/models/create_webhook_request.py
+++ b/fireblocks/models/create_webhook_request.py
@@ -30,7 +30,7 @@ class CreateWebhookRequest(BaseModel):
CreateWebhookRequest
""" # noqa: E501
url: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The url of the webhook where notifications will be sent. URL must be valid, unique and https.")
- description: Annotated[str, Field(min_length=1, strict=True)] = Field(description="description of the webhook. should not contain special characters.")
+ description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="description of the webhook. should not contain special characters.")
events: List[WebhookEvent] = Field(description="event types the webhook will subscribe to")
enabled: Optional[StrictBool] = Field(default=True, description="The status of the webhook. If false, the webhook will not receive notifications.")
__properties: ClassVar[List[str]] = ["url", "description", "events", "enabled"]
diff --git a/fireblocks/models/notification.py b/fireblocks/models/notification.py
index b5af306..0e206e7 100644
--- a/fireblocks/models/notification.py
+++ b/fireblocks/models/notification.py
@@ -18,9 +18,9 @@
import re # noqa: F401
import json
-from datetime import datetime
-from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
-from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from fireblocks.models.notification_attempt import NotificationAttempt
from fireblocks.models.notification_status import NotificationStatus
from fireblocks.models.webhook_event import WebhookEvent
from typing import Optional, Set
@@ -31,14 +31,13 @@ class Notification(BaseModel):
Notification
""" # noqa: E501
id: StrictStr = Field(description="The id of the Notification")
- created_at: datetime = Field(description="The creation date of the notification", alias="createdAt")
- updated_at: datetime = Field(description="The date when the notification was updated", alias="updatedAt")
+ created_at: StrictInt = Field(description="The creation date of the notification in milliseconds", alias="createdAt")
+ updated_at: StrictInt = Field(description="The date when the notification was updated in milliseconds", alias="updatedAt")
status: NotificationStatus
event_type: WebhookEvent = Field(alias="eventType")
- event_version: Union[StrictFloat, StrictInt] = Field(description="The event version of the Notification", alias="eventVersion")
resource_id: Optional[StrictStr] = Field(default=None, description="The resource id of the event which the Notification is listen to", alias="resourceId")
- attempts: Optional[List[StrictStr]] = Field(default=None, description="The attempts related to Notification")
- __properties: ClassVar[List[str]] = ["id", "createdAt", "updatedAt", "status", "eventType", "eventVersion", "resourceId", "attempts"]
+ attempts: List[NotificationAttempt] = Field(description="The attempts related to Notification")
+ __properties: ClassVar[List[str]] = ["id", "createdAt", "updatedAt", "status", "eventType", "resourceId", "attempts"]
model_config = ConfigDict(
populate_by_name=True,
@@ -79,6 +78,13 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # override the default output from pydantic by calling `to_dict()` of each item in attempts (list)
+ _items = []
+ if self.attempts:
+ for _item in self.attempts:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['attempts'] = _items
# set to None if resource_id (nullable) is None
# and model_fields_set contains the field
if self.resource_id is None and "resource_id" in self.model_fields_set:
@@ -101,9 +107,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"updatedAt": obj.get("updatedAt"),
"status": obj.get("status"),
"eventType": obj.get("eventType"),
- "eventVersion": obj.get("eventVersion"),
"resourceId": obj.get("resourceId"),
- "attempts": obj.get("attempts")
+ "attempts": [NotificationAttempt.from_dict(_item) for _item in obj["attempts"]] if obj.get("attempts") is not None else None
})
return _obj
diff --git a/fireblocks/models/notification_attempt.py b/fireblocks/models/notification_attempt.py
new file mode 100644
index 0000000..a7c5159
--- /dev/null
+++ b/fireblocks/models/notification_attempt.py
@@ -0,0 +1,104 @@
+# coding: utf-8
+
+"""
+ Fireblocks API
+
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+ The version of the OpenAPI document: 1.6.2
+ Contact: support@fireblocks.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class NotificationAttempt(BaseModel):
+ """
+ NotificationAttempt
+ """ # noqa: E501
+ sent_time: StrictInt = Field(description="The time when the attempt was sent in milliseconds.", alias="sentTime")
+ duration: StrictInt = Field(description="The duration of the attempt in milliseconds.")
+ response_code: Optional[StrictInt] = Field(default=None, description="The response code of the attempt, when missing refer to failureReason.", alias="responseCode")
+ failure_reason: Optional[StrictStr] = Field(default=None, description="The request failure reason in case responseCode is missing.", alias="failureReason")
+ __properties: ClassVar[List[str]] = ["sentTime", "duration", "responseCode", "failureReason"]
+
+ @field_validator('failure_reason')
+ def failure_reason_validate_enum(cls, value):
+ """Validates the enum"""
+ if value is None:
+ return value
+
+ if value not in set(['TIMED_OUT', 'NO_RESPONSE']):
+ raise ValueError("must be one of enum values ('TIMED_OUT', 'NO_RESPONSE')")
+ return value
+
+ model_config = ConfigDict(
+ populate_by_name=True,
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Optional[Self]:
+ """Create an instance of NotificationAttempt from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ """
+ excluded_fields: Set[str] = set([
+ ])
+
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude=excluded_fields,
+ exclude_none=True,
+ )
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of NotificationAttempt from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "sentTime": obj.get("sentTime"),
+ "duration": obj.get("duration"),
+ "responseCode": obj.get("responseCode"),
+ "failureReason": obj.get("failureReason")
+ })
+ return _obj
+
+
diff --git a/fireblocks/models/notification_with_data.py b/fireblocks/models/notification_with_data.py
index 7d2fb6f..6a7a900 100644
--- a/fireblocks/models/notification_with_data.py
+++ b/fireblocks/models/notification_with_data.py
@@ -18,9 +18,9 @@
import re # noqa: F401
import json
-from datetime import datetime
-from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
-from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from fireblocks.models.notification_attempt import NotificationAttempt
from fireblocks.models.notification_status import NotificationStatus
from fireblocks.models.webhook_event import WebhookEvent
from typing import Optional, Set
@@ -31,15 +31,14 @@ class NotificationWithData(BaseModel):
NotificationWithData
""" # noqa: E501
id: StrictStr
- created_at: datetime = Field(description="The creation date of the notification", alias="createdAt")
- updated_at: datetime = Field(description="The date when the notification was updated", alias="updatedAt")
+ created_at: StrictInt = Field(description="The creation date of the notification in milliseconds", alias="createdAt")
+ updated_at: StrictInt = Field(description="The date when the notification was updated in milliseconds", alias="updatedAt")
status: NotificationStatus
event_type: WebhookEvent = Field(alias="eventType")
- event_version: Union[StrictFloat, StrictInt] = Field(description="The event version which the Notification is listen to", alias="eventVersion")
resource_id: Optional[StrictStr] = Field(default=None, description="The resource id of the event which the Notification is listen to", alias="resourceId")
- attempts: List[StrictStr] = Field(description="The attempts related to Notification")
+ attempts: List[NotificationAttempt] = Field(description="The attempts related to Notification")
data: Optional[Dict[str, Any]] = Field(default=None, description="notification data")
- __properties: ClassVar[List[str]] = ["id", "createdAt", "updatedAt", "status", "eventType", "eventVersion", "resourceId", "attempts", "data"]
+ __properties: ClassVar[List[str]] = ["id", "createdAt", "updatedAt", "status", "eventType", "resourceId", "attempts", "data"]
model_config = ConfigDict(
populate_by_name=True,
@@ -80,6 +79,13 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
+ # override the default output from pydantic by calling `to_dict()` of each item in attempts (list)
+ _items = []
+ if self.attempts:
+ for _item in self.attempts:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['attempts'] = _items
# set to None if resource_id (nullable) is None
# and model_fields_set contains the field
if self.resource_id is None and "resource_id" in self.model_fields_set:
@@ -102,9 +108,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"updatedAt": obj.get("updatedAt"),
"status": obj.get("status"),
"eventType": obj.get("eventType"),
- "eventVersion": obj.get("eventVersion"),
"resourceId": obj.get("resourceId"),
- "attempts": obj.get("attempts"),
+ "attempts": [NotificationAttempt.from_dict(_item) for _item in obj["attempts"]] if obj.get("attempts") is not None else None,
"data": obj.get("data")
})
return _obj
diff --git a/fireblocks/models/webhook.py b/fireblocks/models/webhook.py
index 712687f..96a1b56 100644
--- a/fireblocks/models/webhook.py
+++ b/fireblocks/models/webhook.py
@@ -18,8 +18,7 @@
import re # noqa: F401
import json
-from datetime import datetime
-from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
+from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from fireblocks.models.webhook_event import WebhookEvent
@@ -30,23 +29,20 @@ class Webhook(BaseModel):
"""
Webhook
""" # noqa: E501
- id: Optional[StrictStr] = Field(default=None, description="The id of the webhook")
- url: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The url of the webhook where notifications will be sent. Must be a valid URL and https.")
+ id: StrictStr = Field(description="The id of the webhook")
+ url: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The url of the webhook where notifications will be sent. Must be a valid URL and https.")
description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="description of the webhook of what it is used for")
- events: Optional[List[WebhookEvent]] = Field(default=None, description="The events that the webhook will be subscribed to")
- status: Optional[StrictStr] = Field(default=None, description="The status of the webhook")
- created_at: Optional[datetime] = Field(default=None, description="The date and time the webhook was created", alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, description="The date and time the webhook was last updated", alias="updatedAt")
+ events: List[WebhookEvent] = Field(description="The events that the webhook will be subscribed to")
+ status: StrictStr = Field(description="The status of the webhook")
+ created_at: StrictInt = Field(description="The date and time the webhook was created in milliseconds", alias="createdAt")
+ updated_at: StrictInt = Field(description="The date and time the webhook was last updated in milliseconds", alias="updatedAt")
__properties: ClassVar[List[str]] = ["id", "url", "description", "events", "status", "createdAt", "updatedAt"]
@field_validator('status')
def status_validate_enum(cls, value):
"""Validates the enum"""
- if value is None:
- return value
-
- if value not in set(['DISABLED', 'ENABLED']):
- raise ValueError("must be one of enum values ('DISABLED', 'ENABLED')")
+ if value not in set(['DISABLED', 'ENABLED', 'SUSPENDED']):
+ raise ValueError("must be one of enum values ('DISABLED', 'ENABLED', 'SUSPENDED')")
return value
model_config = ConfigDict(
diff --git a/fireblocks/models/webhook_event.py b/fireblocks/models/webhook_event.py
index 5f429bb..a61f08a 100644
--- a/fireblocks/models/webhook_event.py
+++ b/fireblocks/models/webhook_event.py
@@ -39,36 +39,12 @@ class WebhookEvent(str, Enum):
VAULT_ACCOUNT_DOT_CREATED = 'vault_account.created'
VAULT_ACCOUNT_DOT_ASSET_DOT_LISTED = 'vault_account.asset.listed'
VAULT_ACCOUNT_DOT_ASSET_DOT_BALANCE_UPDATED = 'vault_account.asset.balance_updated'
- VAULT_ACCOUNT_DOT_NFT_DOT_BALANCE_UPDATED = 'vault_account.nft.balance_updated'
+ EMBEDDED_WALLET_DOT_STATUS_DOT_UPDATED = 'embedded_wallet.status.updated'
EMBEDDED_WALLET_DOT_CREATED = 'embedded_wallet.created'
EMBEDDED_WALLET_DOT_ASSET_DOT_BALANCE_UPDATED = 'embedded_wallet.asset.balance_updated'
EMBEDDED_WALLET_DOT_ASSET_DOT_LISTED = 'embedded_wallet.asset.listed'
EMBEDDED_WALLET_DOT_ACCOUNT_DOT_CREATED = 'embedded_wallet.account.created'
EMBEDDED_WALLET_DOT_DEVICE_DOT_ADDED = 'embedded_wallet.device.added'
- EMBEDDED_WALLET_DOT_TRANSACTION_DOT_UPDATED = 'embedded_wallet.transaction.updated'
- EXCHANGE_ACCOUNT_DOT_CONNECTED = 'exchange_account.connected'
- FIAT_ACCOUNT_DOT_CONNECTED = 'fiat_account.connected'
- TICKET_DOT_CREATED = 'ticket.created'
- TICKET_DOT_SUBMITTED = 'ticket.submitted'
- TICKET_DOT_EXPIRED = 'ticket.expired'
- TICKET_DOT_CANCELED = 'ticket.canceled'
- TICKET_DOT_FULFILLED = 'ticket.fulfilled'
- TICKET_DOT_COUNTERPARTY_DOT_ADDED = 'ticket.counterparty.added'
- TICKET_DOT_COUNTERPARTY_EXTERNAL_ID_DOT_SET = 'ticket.counterparty_external_id.set'
- TICKET_DOT_NOTE_DOT_ADDED = 'ticket.note.added'
- TICKET_DOT_EXPIRED_IN_DOT_SET = 'ticket.expired_in.set'
- TICKET_DOT_EXPIRED_AT_DOT_SET = 'ticket.expired_at.set'
- TICKET_DOT_TERM_DOT_ADDED = 'ticket.term.added'
- TICKET_DOT_TERM_DOT_UPDATED = 'ticket.term.updated'
- TICKET_DOT_TERM_DOT_DELETED = 'ticket.term.deleted'
- TICKET_DOT_TERM_DOT_FUNDED = 'ticket.term.funded'
- TICKET_DOT_TERM_DOT_MANUALLY_FUNDED = 'ticket.term.manually_funded'
- TICKET_DOT_TERM_DOT_FUNDING_CANCELED = 'ticket.term.funding_canceled'
- TICKET_DOT_TERM_DOT_FUNDING_FAILED = 'ticket.term.funding_failed'
- TICKET_DOT_TERM_DOT_FUNDING_COMPLETED = 'ticket.term.funding_completed'
- TICKET_DOT_TERM_DOT_TRANSACTION_STATUS_CHANGED = 'ticket.term.transaction_status_changed'
- SETTLEMENT_DOT_CREATED = 'settlement.created'
- COLLATERAL_DOT_STATUS_DOT_UPDATED = 'collateral.status.updated'
@classmethod
def from_json(cls, json_str: str) -> Self:
diff --git a/pyproject.toml b/pyproject.toml
index cfb6dcc..176ccaf 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "fireblocks"
-version = "7.0.0"
+version = "0.0.0"
description = "Fireblocks API"
authors = ["Fireblocks "]
license = "MIT License"
diff --git a/setup.py b/setup.py
index d6e3bd7..f0a9f52 100644
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
NAME = "fireblocks"
-VERSION = "7.0.0"
+VERSION = "0.0.0"
PYTHON_REQUIRES = ">=3.8"
REQUIRES = [
"urllib3 >= 1.25.3, < 2.1.0",
diff --git a/test/test_create_webhook_request.py b/test/test_create_webhook_request.py
index b5a148d..5c39ab0 100644
--- a/test/test_create_webhook_request.py
+++ b/test/test_create_webhook_request.py
@@ -45,7 +45,6 @@ def make_instance(self, include_optional) -> CreateWebhookRequest:
else:
return CreateWebhookRequest(
url = 'https://example.com/webhook',
- description = 'This webhook is used for transactions notifications',
events = ["transaction.created","transaction.status.updated"],
)
"""
diff --git a/test/test_notification.py b/test/test_notification.py
index 588be2d..11e56a1 100644
--- a/test/test_notification.py
+++ b/test/test_notification.py
@@ -38,24 +38,33 @@ def make_instance(self, include_optional) -> Notification:
if include_optional:
return Notification(
id = '44fcead0-7053-4831-a53a-df7fb90d440f',
- created_at = '2021-07-01T00:00Z',
- updated_at = '2021-07-01T00:00Z',
+ created_at = 1625126400000,
+ updated_at = 1625126400000,
status = 'COMPLETED',
event_type = 'transaction.created',
- event_version = 1,
resource_id = '44fcead0-7053-4831-a53a-df7fb90d440f',
attempts = [
- ''
+ fireblocks.models.notification_attempt.NotificationAttempt(
+ sent_time = 1625126400000,
+ duration = 130,
+ response_code = 200,
+ failure_reason = 'TIMED_OUT', )
]
)
else:
return Notification(
id = '44fcead0-7053-4831-a53a-df7fb90d440f',
- created_at = '2021-07-01T00:00Z',
- updated_at = '2021-07-01T00:00Z',
+ created_at = 1625126400000,
+ updated_at = 1625126400000,
status = 'COMPLETED',
event_type = 'transaction.created',
- event_version = 1,
+ attempts = [
+ fireblocks.models.notification_attempt.NotificationAttempt(
+ sent_time = 1625126400000,
+ duration = 130,
+ response_code = 200,
+ failure_reason = 'TIMED_OUT', )
+ ],
)
"""
diff --git a/test/test_notification_attempt.py b/test/test_notification_attempt.py
new file mode 100644
index 0000000..1154ee0
--- /dev/null
+++ b/test/test_notification_attempt.py
@@ -0,0 +1,59 @@
+# coding: utf-8
+
+"""
+ Fireblocks API
+
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+ The version of the OpenAPI document: 1.6.2
+ Contact: support@fireblocks.com
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from fireblocks.models.notification_attempt import NotificationAttempt
+
+
+class TestNotificationAttempt(unittest.TestCase):
+ """NotificationAttempt unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> NotificationAttempt:
+ """Test NotificationAttempt
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included"""
+ # uncomment below to create an instance of `NotificationAttempt`
+ """
+ model = NotificationAttempt()
+ if include_optional:
+ return NotificationAttempt(
+ sent_time = 1625126400000,
+ duration = 130,
+ response_code = 200,
+ failure_reason = 'TIMED_OUT'
+ )
+ else:
+ return NotificationAttempt(
+ sent_time = 1625126400000,
+ duration = 130,
+ )
+ """
+
+ def testNotificationAttempt(self):
+ """Test NotificationAttempt"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/test/test_notification_paginated_response.py b/test/test_notification_paginated_response.py
index 3801bbf..e4d0422 100644
--- a/test/test_notification_paginated_response.py
+++ b/test/test_notification_paginated_response.py
@@ -42,14 +42,17 @@ def make_instance(self, include_optional) -> NotificationPaginatedResponse:
data = [
fireblocks.models.notification.Notification(
id = '44fcead0-7053-4831-a53a-df7fb90d440f',
- created_at = '2021-07-01T00:00Z',
- updated_at = '2021-07-01T00:00Z',
+ created_at = 1625126400000,
+ updated_at = 1625126400000,
status = 'COMPLETED',
event_type = 'transaction.created',
- event_version = 1,
resource_id = '44fcead0-7053-4831-a53a-df7fb90d440f',
attempts = [
- ''
+ fireblocks.models.notification_attempt.NotificationAttempt(
+ sent_time = 1625126400000,
+ duration = 130,
+ response_code = 200,
+ failure_reason = 'TIMED_OUT', )
], )
],
next = 'eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9'
@@ -59,14 +62,17 @@ def make_instance(self, include_optional) -> NotificationPaginatedResponse:
data = [
fireblocks.models.notification.Notification(
id = '44fcead0-7053-4831-a53a-df7fb90d440f',
- created_at = '2021-07-01T00:00Z',
- updated_at = '2021-07-01T00:00Z',
+ created_at = 1625126400000,
+ updated_at = 1625126400000,
status = 'COMPLETED',
event_type = 'transaction.created',
- event_version = 1,
resource_id = '44fcead0-7053-4831-a53a-df7fb90d440f',
attempts = [
- ''
+ fireblocks.models.notification_attempt.NotificationAttempt(
+ sent_time = 1625126400000,
+ duration = 130,
+ response_code = 200,
+ failure_reason = 'TIMED_OUT', )
], )
],
)
diff --git a/test/test_notification_with_data.py b/test/test_notification_with_data.py
index ab0d8ac..f08a001 100644
--- a/test/test_notification_with_data.py
+++ b/test/test_notification_with_data.py
@@ -38,27 +38,33 @@ def make_instance(self, include_optional) -> NotificationWithData:
if include_optional:
return NotificationWithData(
id = '44fcead0-7053-4831-a53a-df7fb90d440f',
- created_at = '2021-07-01T00:00Z',
- updated_at = '2021-07-01T00:00Z',
+ created_at = 1625126400000,
+ updated_at = 1625126400000,
status = 'COMPLETED',
event_type = 'transaction.created',
- event_version = 1,
resource_id = '44fcead0-7053-4831-a53a-df7fb90d440f',
attempts = [
- ''
+ fireblocks.models.notification_attempt.NotificationAttempt(
+ sent_time = 1625126400000,
+ duration = 130,
+ response_code = 200,
+ failure_reason = 'TIMED_OUT', )
],
data = None
)
else:
return NotificationWithData(
id = '44fcead0-7053-4831-a53a-df7fb90d440f',
- created_at = '2021-07-01T00:00Z',
- updated_at = '2021-07-01T00:00Z',
+ created_at = 1625126400000,
+ updated_at = 1625126400000,
status = 'COMPLETED',
event_type = 'transaction.created',
- event_version = 1,
attempts = [
- ''
+ fireblocks.models.notification_attempt.NotificationAttempt(
+ sent_time = 1625126400000,
+ duration = 130,
+ response_code = 200,
+ failure_reason = 'TIMED_OUT', )
],
)
"""
diff --git a/test/test_webhook.py b/test/test_webhook.py
index df01d02..38cca6b 100644
--- a/test/test_webhook.py
+++ b/test/test_webhook.py
@@ -42,11 +42,17 @@ def make_instance(self, include_optional) -> Webhook:
description = 'This webhook is used for transactions notifications',
events = ["transaction.created","transaction.status.updated"],
status = 'ENABLED',
- created_at = '2021-09-01T12:00Z',
- updated_at = '2021-09-05T15:00Z'
+ created_at = 1625126400000,
+ updated_at = 1625126400000
)
else:
return Webhook(
+ id = '123e4567-e89b-12d3-a456-426614174000',
+ url = 'https://example.com/webhook',
+ events = ["transaction.created","transaction.status.updated"],
+ status = 'ENABLED',
+ created_at = 1625126400000,
+ updated_at = 1625126400000,
)
"""
diff --git a/test/test_webhook_paginated_response.py b/test/test_webhook_paginated_response.py
index f5de6c9..f406921 100644
--- a/test/test_webhook_paginated_response.py
+++ b/test/test_webhook_paginated_response.py
@@ -44,8 +44,8 @@ def make_instance(self, include_optional) -> WebhookPaginatedResponse:
description = 'This webhook is used for transactions notifications',
events = ["transaction.created","transaction.status.updated"],
status = 'ENABLED',
- created_at = '2021-09-01T12:00Z',
- updated_at = '2021-09-05T15:00Z', )
+ created_at = 1625126400000,
+ updated_at = 1625126400000, )
],
next = 'eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9'
)
@@ -58,8 +58,8 @@ def make_instance(self, include_optional) -> WebhookPaginatedResponse:
description = 'This webhook is used for transactions notifications',
events = ["transaction.created","transaction.status.updated"],
status = 'ENABLED',
- created_at = '2021-09-01T12:00Z',
- updated_at = '2021-09-05T15:00Z', )
+ created_at = 1625126400000,
+ updated_at = 1625126400000, )
],
)
"""
diff --git a/test/test_webhooks_v2_beta_api.py b/test/test_webhooks_v2_beta_api.py
index a4c7e32..71b4f2f 100644
--- a/test/test_webhooks_v2_beta_api.py
+++ b/test/test_webhooks_v2_beta_api.py
@@ -69,6 +69,13 @@ def test_get_webhooks(self) -> None:
"""
pass
+ def test_resend_notification_by_id(self) -> None:
+ """Test case for resend_notification_by_id
+
+ Resend notification by id
+ """
+ pass
+
def test_update_webhook(self) -> None:
"""Test case for update_webhook