天择加密量化开放框架下载
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

143 lines
4.4 KiB

1 year ago
  1. # coding: utf-8
  2. """
  3. Gate API v4
  4. Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
  5. Contact: support@mail.gate.io
  6. Generated by: https://openapi-generator.tech
  7. """
  8. import pprint
  9. import re # noqa: F401
  10. import six
  11. from gate_api.configuration import Configuration
  12. class CrossMarginTransferable(object):
  13. """NOTE: This class is auto generated by OpenAPI Generator.
  14. Ref: https://openapi-generator.tech
  15. Do not edit the class manually.
  16. """
  17. """
  18. Attributes:
  19. openapi_types (dict): The key is attribute name
  20. and the value is attribute type.
  21. attribute_map (dict): The key is attribute name
  22. and the value is json key in definition.
  23. """
  24. openapi_types = {'currency': 'str', 'amount': 'str'}
  25. attribute_map = {'currency': 'currency', 'amount': 'amount'}
  26. def __init__(self, currency=None, amount=None, local_vars_configuration=None): # noqa: E501
  27. # type: (str, str, Configuration) -> None
  28. """CrossMarginTransferable - a model defined in OpenAPI""" # noqa: E501
  29. if local_vars_configuration is None:
  30. local_vars_configuration = Configuration()
  31. self.local_vars_configuration = local_vars_configuration
  32. self._currency = None
  33. self._amount = None
  34. self.discriminator = None
  35. if currency is not None:
  36. self.currency = currency
  37. if amount is not None:
  38. self.amount = amount
  39. @property
  40. def currency(self):
  41. """Gets the currency of this CrossMarginTransferable. # noqa: E501
  42. Currency detail # noqa: E501
  43. :return: The currency of this CrossMarginTransferable. # noqa: E501
  44. :rtype: str
  45. """
  46. return self._currency
  47. @currency.setter
  48. def currency(self, currency):
  49. """Sets the currency of this CrossMarginTransferable.
  50. Currency detail # noqa: E501
  51. :param currency: The currency of this CrossMarginTransferable. # noqa: E501
  52. :type: str
  53. """
  54. self._currency = currency
  55. @property
  56. def amount(self):
  57. """Gets the amount of this CrossMarginTransferable. # noqa: E501
  58. Max transferable amount # noqa: E501
  59. :return: The amount of this CrossMarginTransferable. # noqa: E501
  60. :rtype: str
  61. """
  62. return self._amount
  63. @amount.setter
  64. def amount(self, amount):
  65. """Sets the amount of this CrossMarginTransferable.
  66. Max transferable amount # noqa: E501
  67. :param amount: The amount of this CrossMarginTransferable. # noqa: E501
  68. :type: str
  69. """
  70. self._amount = amount
  71. def to_dict(self):
  72. """Returns the model properties as a dict"""
  73. result = {}
  74. for attr, _ in six.iteritems(self.openapi_types):
  75. value = getattr(self, attr)
  76. if isinstance(value, list):
  77. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  78. elif hasattr(value, "to_dict"):
  79. result[attr] = value.to_dict()
  80. elif isinstance(value, dict):
  81. result[attr] = dict(
  82. map(
  83. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  84. value.items(),
  85. )
  86. )
  87. else:
  88. result[attr] = value
  89. return result
  90. def to_str(self):
  91. """Returns the string representation of the model"""
  92. return pprint.pformat(self.to_dict())
  93. def __repr__(self):
  94. """For `print` and `pprint`"""
  95. return self.to_str()
  96. def __eq__(self, other):
  97. """Returns true if both objects are equal"""
  98. if not isinstance(other, CrossMarginTransferable):
  99. return False
  100. return self.to_dict() == other.to_dict()
  101. def __ne__(self, other):
  102. """Returns true if both objects are not equal"""
  103. if not isinstance(other, CrossMarginTransferable):
  104. return True
  105. return self.to_dict() != other.to_dict()