天择加密量化开放框架下载
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.

169 lines
4.9 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 FundingBookItem(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 = {'rate': 'str', 'amount': 'str', 'days': 'int'}
  25. attribute_map = {'rate': 'rate', 'amount': 'amount', 'days': 'days'}
  26. def __init__(self, rate=None, amount=None, days=None, local_vars_configuration=None): # noqa: E501
  27. # type: (str, str, int, Configuration) -> None
  28. """FundingBookItem - 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._rate = None
  33. self._amount = None
  34. self._days = None
  35. self.discriminator = None
  36. if rate is not None:
  37. self.rate = rate
  38. if amount is not None:
  39. self.amount = amount
  40. if days is not None:
  41. self.days = days
  42. @property
  43. def rate(self):
  44. """Gets the rate of this FundingBookItem. # noqa: E501
  45. Loan rate (daily rate) # noqa: E501
  46. :return: The rate of this FundingBookItem. # noqa: E501
  47. :rtype: str
  48. """
  49. return self._rate
  50. @rate.setter
  51. def rate(self, rate):
  52. """Sets the rate of this FundingBookItem.
  53. Loan rate (daily rate) # noqa: E501
  54. :param rate: The rate of this FundingBookItem. # noqa: E501
  55. :type: str
  56. """
  57. self._rate = rate
  58. @property
  59. def amount(self):
  60. """Gets the amount of this FundingBookItem. # noqa: E501
  61. Borrowable amount # noqa: E501
  62. :return: The amount of this FundingBookItem. # noqa: E501
  63. :rtype: str
  64. """
  65. return self._amount
  66. @amount.setter
  67. def amount(self, amount):
  68. """Sets the amount of this FundingBookItem.
  69. Borrowable amount # noqa: E501
  70. :param amount: The amount of this FundingBookItem. # noqa: E501
  71. :type: str
  72. """
  73. self._amount = amount
  74. @property
  75. def days(self):
  76. """Gets the days of this FundingBookItem. # noqa: E501
  77. The number of days till the loan repayment's dateline # noqa: E501
  78. :return: The days of this FundingBookItem. # noqa: E501
  79. :rtype: int
  80. """
  81. return self._days
  82. @days.setter
  83. def days(self, days):
  84. """Sets the days of this FundingBookItem.
  85. The number of days till the loan repayment's dateline # noqa: E501
  86. :param days: The days of this FundingBookItem. # noqa: E501
  87. :type: int
  88. """
  89. self._days = days
  90. def to_dict(self):
  91. """Returns the model properties as a dict"""
  92. result = {}
  93. for attr, _ in six.iteritems(self.openapi_types):
  94. value = getattr(self, attr)
  95. if isinstance(value, list):
  96. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  97. elif hasattr(value, "to_dict"):
  98. result[attr] = value.to_dict()
  99. elif isinstance(value, dict):
  100. result[attr] = dict(
  101. map(
  102. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  103. value.items(),
  104. )
  105. )
  106. else:
  107. result[attr] = value
  108. return result
  109. def to_str(self):
  110. """Returns the string representation of the model"""
  111. return pprint.pformat(self.to_dict())
  112. def __repr__(self):
  113. """For `print` and `pprint`"""
  114. return self.to_str()
  115. def __eq__(self, other):
  116. """Returns true if both objects are equal"""
  117. if not isinstance(other, FundingBookItem):
  118. return False
  119. return self.to_dict() == other.to_dict()
  120. def __ne__(self, other):
  121. """Returns true if both objects are not equal"""
  122. if not isinstance(other, FundingBookItem):
  123. return True
  124. return self.to_dict() != other.to_dict()