From 2e3dd1a573726cc72f4715825e776dc0640b5722 Mon Sep 17 00:00:00 2001 From: arashalaei Date: Tue, 17 Dec 2024 18:02:51 +0330 Subject: [PATCH] bug fixes --- setup.py | 2 +- .../openapi_client/models/chain_activity_step_data.py | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 98aa560..54d710d 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="zarban", - version="0.5.3", + version="0.5.4", author="Zarban", author_email="info@zarban.io", description="Python SDK for Zarban", diff --git a/src/zarban/service/openapi_client/models/chain_activity_step_data.py b/src/zarban/service/openapi_client/models/chain_activity_step_data.py index d668779..5294cb8 100644 --- a/src/zarban/service/openapi_client/models/chain_activity_step_data.py +++ b/src/zarban/service/openapi_client/models/chain_activity_step_data.py @@ -57,6 +57,9 @@ class ChainActivityStepData(object): 'message': 'message' } + discriminator_value_class_map = { + } + def __init__(self, type=None, label=None, gas_use_estimate=None, gas_fee_estimate=None, method_parameters=None, name=None, typed_data=None, hash=None, message=None, local_vars_configuration=None): # noqa: E501 """ChainActivityStepData - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: @@ -72,7 +75,7 @@ def __init__(self, type=None, label=None, gas_use_estimate=None, gas_fee_estimat self._typed_data = None self._hash = None self._message = None - self.discriminator = None + self.discriminator = 'type' self.type = type self.label = label @@ -300,6 +303,12 @@ def message(self, message): self._message = message + def get_real_child_model(self, data): + """Returns the real base class specified by the discriminator""" + discriminator_key = self.attribute_map[self.discriminator] + discriminator_value = data[discriminator_key] + return self.discriminator_value_class_map.get(discriminator_value) + def to_dict(self): """Returns the model properties as a dict""" result = {}