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

270 lines
7.5 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 CrossMarginRepayment(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 = {
  25. 'id': 'str',
  26. 'create_time': 'int',
  27. 'loan_id': 'str',
  28. 'currency': 'str',
  29. 'principal': 'str',
  30. 'interest': 'str',
  31. }
  32. attribute_map = {
  33. 'id': 'id',
  34. 'create_time': 'create_time',
  35. 'loan_id': 'loan_id',
  36. 'currency': 'currency',
  37. 'principal': 'principal',
  38. 'interest': 'interest',
  39. }
  40. def __init__(
  41. self,
  42. id=None,
  43. create_time=None,
  44. loan_id=None,
  45. currency=None,
  46. principal=None,
  47. interest=None,
  48. local_vars_configuration=None,
  49. ): # noqa: E501
  50. # type: (str, int, str, str, str, str, Configuration) -> None
  51. """CrossMarginRepayment - a model defined in OpenAPI""" # noqa: E501
  52. if local_vars_configuration is None:
  53. local_vars_configuration = Configuration()
  54. self.local_vars_configuration = local_vars_configuration
  55. self._id = None
  56. self._create_time = None
  57. self._loan_id = None
  58. self._currency = None
  59. self._principal = None
  60. self._interest = None
  61. self.discriminator = None
  62. if id is not None:
  63. self.id = id
  64. if create_time is not None:
  65. self.create_time = create_time
  66. if loan_id is not None:
  67. self.loan_id = loan_id
  68. if currency is not None:
  69. self.currency = currency
  70. if principal is not None:
  71. self.principal = principal
  72. if interest is not None:
  73. self.interest = interest
  74. @property
  75. def id(self):
  76. """Gets the id of this CrossMarginRepayment. # noqa: E501
  77. Loan record ID # noqa: E501
  78. :return: The id of this CrossMarginRepayment. # noqa: E501
  79. :rtype: str
  80. """
  81. return self._id
  82. @id.setter
  83. def id(self, id):
  84. """Sets the id of this CrossMarginRepayment.
  85. Loan record ID # noqa: E501
  86. :param id: The id of this CrossMarginRepayment. # noqa: E501
  87. :type: str
  88. """
  89. self._id = id
  90. @property
  91. def create_time(self):
  92. """Gets the create_time of this CrossMarginRepayment. # noqa: E501
  93. Repayment time # noqa: E501
  94. :return: The create_time of this CrossMarginRepayment. # noqa: E501
  95. :rtype: int
  96. """
  97. return self._create_time
  98. @create_time.setter
  99. def create_time(self, create_time):
  100. """Sets the create_time of this CrossMarginRepayment.
  101. Repayment time # noqa: E501
  102. :param create_time: The create_time of this CrossMarginRepayment. # noqa: E501
  103. :type: int
  104. """
  105. self._create_time = create_time
  106. @property
  107. def loan_id(self):
  108. """Gets the loan_id of this CrossMarginRepayment. # noqa: E501
  109. Borrow loan ID # noqa: E501
  110. :return: The loan_id of this CrossMarginRepayment. # noqa: E501
  111. :rtype: str
  112. """
  113. return self._loan_id
  114. @loan_id.setter
  115. def loan_id(self, loan_id):
  116. """Sets the loan_id of this CrossMarginRepayment.
  117. Borrow loan ID # noqa: E501
  118. :param loan_id: The loan_id of this CrossMarginRepayment. # noqa: E501
  119. :type: str
  120. """
  121. self._loan_id = loan_id
  122. @property
  123. def currency(self):
  124. """Gets the currency of this CrossMarginRepayment. # noqa: E501
  125. Currency name # noqa: E501
  126. :return: The currency of this CrossMarginRepayment. # noqa: E501
  127. :rtype: str
  128. """
  129. return self._currency
  130. @currency.setter
  131. def currency(self, currency):
  132. """Sets the currency of this CrossMarginRepayment.
  133. Currency name # noqa: E501
  134. :param currency: The currency of this CrossMarginRepayment. # noqa: E501
  135. :type: str
  136. """
  137. self._currency = currency
  138. @property
  139. def principal(self):
  140. """Gets the principal of this CrossMarginRepayment. # noqa: E501
  141. Repaid principal # noqa: E501
  142. :return: The principal of this CrossMarginRepayment. # noqa: E501
  143. :rtype: str
  144. """
  145. return self._principal
  146. @principal.setter
  147. def principal(self, principal):
  148. """Sets the principal of this CrossMarginRepayment.
  149. Repaid principal # noqa: E501
  150. :param principal: The principal of this CrossMarginRepayment. # noqa: E501
  151. :type: str
  152. """
  153. self._principal = principal
  154. @property
  155. def interest(self):
  156. """Gets the interest of this CrossMarginRepayment. # noqa: E501
  157. Repaid interest # noqa: E501
  158. :return: The interest of this CrossMarginRepayment. # noqa: E501
  159. :rtype: str
  160. """
  161. return self._interest
  162. @interest.setter
  163. def interest(self, interest):
  164. """Sets the interest of this CrossMarginRepayment.
  165. Repaid interest # noqa: E501
  166. :param interest: The interest of this CrossMarginRepayment. # noqa: E501
  167. :type: str
  168. """
  169. self._interest = interest
  170. def to_dict(self):
  171. """Returns the model properties as a dict"""
  172. result = {}
  173. for attr, _ in six.iteritems(self.openapi_types):
  174. value = getattr(self, attr)
  175. if isinstance(value, list):
  176. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  177. elif hasattr(value, "to_dict"):
  178. result[attr] = value.to_dict()
  179. elif isinstance(value, dict):
  180. result[attr] = dict(
  181. map(
  182. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  183. value.items(),
  184. )
  185. )
  186. else:
  187. result[attr] = value
  188. return result
  189. def to_str(self):
  190. """Returns the string representation of the model"""
  191. return pprint.pformat(self.to_dict())
  192. def __repr__(self):
  193. """For `print` and `pprint`"""
  194. return self.to_str()
  195. def __eq__(self, other):
  196. """Returns true if both objects are equal"""
  197. if not isinstance(other, CrossMarginRepayment):
  198. return False
  199. return self.to_dict() == other.to_dict()
  200. def __ne__(self, other):
  201. """Returns true if both objects are not equal"""
  202. if not isinstance(other, CrossMarginRepayment):
  203. return True
  204. return self.to_dict() != other.to_dict()