KoubeiTradeKbdeliveryDeliveryApplyModel.py 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. from alipay.aop.api.domain.LogisticsExternalInfo import LogisticsExternalInfo
  6. class KoubeiTradeKbdeliveryDeliveryApplyModel(object):
  7. def __init__(self):
  8. self._attach = None
  9. self._logistics_external_info = None
  10. self._logistics_type = None
  11. self._order_no = None
  12. self._remark = None
  13. self._request_id = None
  14. @property
  15. def attach(self):
  16. return self._attach
  17. @attach.setter
  18. def attach(self, value):
  19. self._attach = value
  20. @property
  21. def logistics_external_info(self):
  22. return self._logistics_external_info
  23. @logistics_external_info.setter
  24. def logistics_external_info(self, value):
  25. if isinstance(value, LogisticsExternalInfo):
  26. self._logistics_external_info = value
  27. else:
  28. self._logistics_external_info = LogisticsExternalInfo.from_alipay_dict(value)
  29. @property
  30. def logistics_type(self):
  31. return self._logistics_type
  32. @logistics_type.setter
  33. def logistics_type(self, value):
  34. self._logistics_type = value
  35. @property
  36. def order_no(self):
  37. return self._order_no
  38. @order_no.setter
  39. def order_no(self, value):
  40. self._order_no = value
  41. @property
  42. def remark(self):
  43. return self._remark
  44. @remark.setter
  45. def remark(self, value):
  46. self._remark = value
  47. @property
  48. def request_id(self):
  49. return self._request_id
  50. @request_id.setter
  51. def request_id(self, value):
  52. self._request_id = value
  53. def to_alipay_dict(self):
  54. params = dict()
  55. if self.attach:
  56. if hasattr(self.attach, 'to_alipay_dict'):
  57. params['attach'] = self.attach.to_alipay_dict()
  58. else:
  59. params['attach'] = self.attach
  60. if self.logistics_external_info:
  61. if hasattr(self.logistics_external_info, 'to_alipay_dict'):
  62. params['logistics_external_info'] = self.logistics_external_info.to_alipay_dict()
  63. else:
  64. params['logistics_external_info'] = self.logistics_external_info
  65. if self.logistics_type:
  66. if hasattr(self.logistics_type, 'to_alipay_dict'):
  67. params['logistics_type'] = self.logistics_type.to_alipay_dict()
  68. else:
  69. params['logistics_type'] = self.logistics_type
  70. if self.order_no:
  71. if hasattr(self.order_no, 'to_alipay_dict'):
  72. params['order_no'] = self.order_no.to_alipay_dict()
  73. else:
  74. params['order_no'] = self.order_no
  75. if self.remark:
  76. if hasattr(self.remark, 'to_alipay_dict'):
  77. params['remark'] = self.remark.to_alipay_dict()
  78. else:
  79. params['remark'] = self.remark
  80. if self.request_id:
  81. if hasattr(self.request_id, 'to_alipay_dict'):
  82. params['request_id'] = self.request_id.to_alipay_dict()
  83. else:
  84. params['request_id'] = self.request_id
  85. return params
  86. @staticmethod
  87. def from_alipay_dict(d):
  88. if not d:
  89. return None
  90. o = KoubeiTradeKbdeliveryDeliveryApplyModel()
  91. if 'attach' in d:
  92. o.attach = d['attach']
  93. if 'logistics_external_info' in d:
  94. o.logistics_external_info = d['logistics_external_info']
  95. if 'logistics_type' in d:
  96. o.logistics_type = d['logistics_type']
  97. if 'order_no' in d:
  98. o.order_no = d['order_no']
  99. if 'remark' in d:
  100. o.remark = d['remark']
  101. if 'request_id' in d:
  102. o.request_id = d['request_id']
  103. return o