AlipayMarketingCampaignDiscountBudgetCreateModel.py 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayMarketingCampaignDiscountBudgetCreateModel(object):
  6. def __init__(self):
  7. self._biz_from = None
  8. self._fund_type = None
  9. self._gmt_end = None
  10. self._name = None
  11. self._out_biz_no = None
  12. self._out_budget_no = None
  13. self._publisher_logon_id = None
  14. self._total_amount = None
  15. @property
  16. def biz_from(self):
  17. return self._biz_from
  18. @biz_from.setter
  19. def biz_from(self, value):
  20. self._biz_from = value
  21. @property
  22. def fund_type(self):
  23. return self._fund_type
  24. @fund_type.setter
  25. def fund_type(self, value):
  26. self._fund_type = value
  27. @property
  28. def gmt_end(self):
  29. return self._gmt_end
  30. @gmt_end.setter
  31. def gmt_end(self, value):
  32. self._gmt_end = value
  33. @property
  34. def name(self):
  35. return self._name
  36. @name.setter
  37. def name(self, value):
  38. self._name = value
  39. @property
  40. def out_biz_no(self):
  41. return self._out_biz_no
  42. @out_biz_no.setter
  43. def out_biz_no(self, value):
  44. self._out_biz_no = value
  45. @property
  46. def out_budget_no(self):
  47. return self._out_budget_no
  48. @out_budget_no.setter
  49. def out_budget_no(self, value):
  50. self._out_budget_no = value
  51. @property
  52. def publisher_logon_id(self):
  53. return self._publisher_logon_id
  54. @publisher_logon_id.setter
  55. def publisher_logon_id(self, value):
  56. self._publisher_logon_id = value
  57. @property
  58. def total_amount(self):
  59. return self._total_amount
  60. @total_amount.setter
  61. def total_amount(self, value):
  62. self._total_amount = value
  63. def to_alipay_dict(self):
  64. params = dict()
  65. if self.biz_from:
  66. if hasattr(self.biz_from, 'to_alipay_dict'):
  67. params['biz_from'] = self.biz_from.to_alipay_dict()
  68. else:
  69. params['biz_from'] = self.biz_from
  70. if self.fund_type:
  71. if hasattr(self.fund_type, 'to_alipay_dict'):
  72. params['fund_type'] = self.fund_type.to_alipay_dict()
  73. else:
  74. params['fund_type'] = self.fund_type
  75. if self.gmt_end:
  76. if hasattr(self.gmt_end, 'to_alipay_dict'):
  77. params['gmt_end'] = self.gmt_end.to_alipay_dict()
  78. else:
  79. params['gmt_end'] = self.gmt_end
  80. if self.name:
  81. if hasattr(self.name, 'to_alipay_dict'):
  82. params['name'] = self.name.to_alipay_dict()
  83. else:
  84. params['name'] = self.name
  85. if self.out_biz_no:
  86. if hasattr(self.out_biz_no, 'to_alipay_dict'):
  87. params['out_biz_no'] = self.out_biz_no.to_alipay_dict()
  88. else:
  89. params['out_biz_no'] = self.out_biz_no
  90. if self.out_budget_no:
  91. if hasattr(self.out_budget_no, 'to_alipay_dict'):
  92. params['out_budget_no'] = self.out_budget_no.to_alipay_dict()
  93. else:
  94. params['out_budget_no'] = self.out_budget_no
  95. if self.publisher_logon_id:
  96. if hasattr(self.publisher_logon_id, 'to_alipay_dict'):
  97. params['publisher_logon_id'] = self.publisher_logon_id.to_alipay_dict()
  98. else:
  99. params['publisher_logon_id'] = self.publisher_logon_id
  100. if self.total_amount:
  101. if hasattr(self.total_amount, 'to_alipay_dict'):
  102. params['total_amount'] = self.total_amount.to_alipay_dict()
  103. else:
  104. params['total_amount'] = self.total_amount
  105. return params
  106. @staticmethod
  107. def from_alipay_dict(d):
  108. if not d:
  109. return None
  110. o = AlipayMarketingCampaignDiscountBudgetCreateModel()
  111. if 'biz_from' in d:
  112. o.biz_from = d['biz_from']
  113. if 'fund_type' in d:
  114. o.fund_type = d['fund_type']
  115. if 'gmt_end' in d:
  116. o.gmt_end = d['gmt_end']
  117. if 'name' in d:
  118. o.name = d['name']
  119. if 'out_biz_no' in d:
  120. o.out_biz_no = d['out_biz_no']
  121. if 'out_budget_no' in d:
  122. o.out_budget_no = d['out_budget_no']
  123. if 'publisher_logon_id' in d:
  124. o.publisher_logon_id = d['publisher_logon_id']
  125. if 'total_amount' in d:
  126. o.total_amount = d['total_amount']
  127. return o