天择加密量化开放框架下载
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
8.0 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 AgencyCommission(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. 'commission_time': 'int',
  26. 'user_id': 'int',
  27. 'group_name': 'str',
  28. 'commission_amount': 'str',
  29. 'commission_asset': 'str',
  30. 'source': 'str',
  31. }
  32. attribute_map = {
  33. 'commission_time': 'commission_time',
  34. 'user_id': 'user_id',
  35. 'group_name': 'group_name',
  36. 'commission_amount': 'commission_amount',
  37. 'commission_asset': 'commission_asset',
  38. 'source': 'source',
  39. }
  40. def __init__(
  41. self,
  42. commission_time=None,
  43. user_id=None,
  44. group_name=None,
  45. commission_amount=None,
  46. commission_asset=None,
  47. source=None,
  48. local_vars_configuration=None,
  49. ): # noqa: E501
  50. # type: (int, int, str, str, str, str, Configuration) -> None
  51. """AgencyCommission - 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._commission_time = None
  56. self._user_id = None
  57. self._group_name = None
  58. self._commission_amount = None
  59. self._commission_asset = None
  60. self._source = None
  61. self.discriminator = None
  62. if commission_time is not None:
  63. self.commission_time = commission_time
  64. if user_id is not None:
  65. self.user_id = user_id
  66. if group_name is not None:
  67. self.group_name = group_name
  68. if commission_amount is not None:
  69. self.commission_amount = commission_amount
  70. if commission_asset is not None:
  71. self.commission_asset = commission_asset
  72. if source is not None:
  73. self.source = source
  74. @property
  75. def commission_time(self):
  76. """Gets the commission_time of this AgencyCommission. # noqa: E501
  77. Commission Time. (unix timestamp) # noqa: E501
  78. :return: The commission_time of this AgencyCommission. # noqa: E501
  79. :rtype: int
  80. """
  81. return self._commission_time
  82. @commission_time.setter
  83. def commission_time(self, commission_time):
  84. """Sets the commission_time of this AgencyCommission.
  85. Commission Time. (unix timestamp) # noqa: E501
  86. :param commission_time: The commission_time of this AgencyCommission. # noqa: E501
  87. :type: int
  88. """
  89. self._commission_time = commission_time
  90. @property
  91. def user_id(self):
  92. """Gets the user_id of this AgencyCommission. # noqa: E501
  93. User ID # noqa: E501
  94. :return: The user_id of this AgencyCommission. # noqa: E501
  95. :rtype: int
  96. """
  97. return self._user_id
  98. @user_id.setter
  99. def user_id(self, user_id):
  100. """Sets the user_id of this AgencyCommission.
  101. User ID # noqa: E501
  102. :param user_id: The user_id of this AgencyCommission. # noqa: E501
  103. :type: int
  104. """
  105. self._user_id = user_id
  106. @property
  107. def group_name(self):
  108. """Gets the group_name of this AgencyCommission. # noqa: E501
  109. Group name # noqa: E501
  110. :return: The group_name of this AgencyCommission. # noqa: E501
  111. :rtype: str
  112. """
  113. return self._group_name
  114. @group_name.setter
  115. def group_name(self, group_name):
  116. """Sets the group_name of this AgencyCommission.
  117. Group name # noqa: E501
  118. :param group_name: The group_name of this AgencyCommission. # noqa: E501
  119. :type: str
  120. """
  121. self._group_name = group_name
  122. @property
  123. def commission_amount(self):
  124. """Gets the commission_amount of this AgencyCommission. # noqa: E501
  125. Commission Amount # noqa: E501
  126. :return: The commission_amount of this AgencyCommission. # noqa: E501
  127. :rtype: str
  128. """
  129. return self._commission_amount
  130. @commission_amount.setter
  131. def commission_amount(self, commission_amount):
  132. """Sets the commission_amount of this AgencyCommission.
  133. Commission Amount # noqa: E501
  134. :param commission_amount: The commission_amount of this AgencyCommission. # noqa: E501
  135. :type: str
  136. """
  137. self._commission_amount = commission_amount
  138. @property
  139. def commission_asset(self):
  140. """Gets the commission_asset of this AgencyCommission. # noqa: E501
  141. Commission Asset # noqa: E501
  142. :return: The commission_asset of this AgencyCommission. # noqa: E501
  143. :rtype: str
  144. """
  145. return self._commission_asset
  146. @commission_asset.setter
  147. def commission_asset(self, commission_asset):
  148. """Sets the commission_asset of this AgencyCommission.
  149. Commission Asset # noqa: E501
  150. :param commission_asset: The commission_asset of this AgencyCommission. # noqa: E501
  151. :type: str
  152. """
  153. self._commission_asset = commission_asset
  154. @property
  155. def source(self):
  156. """Gets the source of this AgencyCommission. # noqa: E501
  157. Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501
  158. :return: The source of this AgencyCommission. # noqa: E501
  159. :rtype: str
  160. """
  161. return self._source
  162. @source.setter
  163. def source(self, source):
  164. """Sets the source of this AgencyCommission.
  165. Source. SPOT - SPOT Rebate, FUTURES - Futures Rebate # noqa: E501
  166. :param source: The source of this AgencyCommission. # noqa: E501
  167. :type: str
  168. """
  169. self._source = source
  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, AgencyCommission):
  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, AgencyCommission):
  203. return True
  204. return self.to_dict() != other.to_dict()