base.py 623 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. # -*- coding: utf-8 -*-
  2. # !/usr/bin/env python
  3. from enum import unique, IntEnum
  4. @unique
  5. class JDOpenErrorCode(IntEnum):
  6. # TODO 需要确定错误 code吗
  7. MY_ERROR_SIGNATURE = -101
  8. MY_VALID_ERROR = -102
  9. MY_INVALID_PARAMETER = -103
  10. class BankType(object):
  11. WX = 'WX'
  12. ALIPAY = 'ALIPAY'
  13. JDPAY = 'JDPAY'
  14. class SettleWay(object):
  15. MANUAL = 'MANUAL'
  16. AUTOMATIC = 'AUTOMATIC'
  17. @classmethod
  18. def choices(cls):
  19. return [cls.MANUAL, cls.AUTOMATIC]
  20. class WithdrawMode(object):
  21. D0 = 'D0'
  22. D1 = 'D1'
  23. @classmethod
  24. def choices(cls):
  25. return [cls.D0, cls.D1]