BaseCardDetails.cs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. #region Apache License Version 2.0
  2. /*----------------------------------------------------------------
  3. Copyright 2019 Jeffrey Su & Suzhou Senparc Network Technology Co.,Ltd.
  4. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
  5. except in compliance with the License. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software distributed under the
  8. License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
  9. either express or implied. See the License for the specific language governing permissions
  10. and limitations under the License.
  11. Detail: https://github.com/JeffreySu/WeiXinMPSDK/blob/master/license.md
  12. ----------------------------------------------------------------*/
  13. #endregion Apache License Version 2.0
  14. /*----------------------------------------------------------------
  15. Copyright (C) 2019 Senparc
  16. 文件名:BaseCardDetails.cs
  17. 文件功能描述:卡券详情
  18. 创建标识:Senparc - 20150211
  19. 修改标识:Senparc - 20150303
  20. 修改描述:整理接口
  21. 修改标识:Senparc - 20150323
  22. 修改描述:添加新卡券类型:会议门票
  23. ----------------------------------------------------------------*/
  24. namespace Senparc.Weixin.MP.AdvancedAPIs.Card
  25. {
  26. /// <summary>
  27. /// 卡券详情
  28. /// </summary>
  29. public class BaseCardDetails
  30. {
  31. /// <summary>
  32. /// 通用券
  33. /// </summary>
  34. public Card_GeneralCouponResult general_coupon { get; set; }
  35. /// <summary>
  36. /// 团购券
  37. /// </summary>
  38. public Card_GrouponResult groupon { get; set; }
  39. /// <summary>
  40. /// 礼品券
  41. /// </summary>
  42. public Card_GiftResult gift { get; set; }
  43. /// <summary>
  44. /// 代金券
  45. /// </summary>
  46. public Card_CashResult cash { get; set; }
  47. /// <summary>
  48. /// 折扣券
  49. /// </summary>
  50. public Card_DisCountResult discount { get; set; }
  51. /// <summary>
  52. /// 会员卡
  53. /// </summary>
  54. public Card_MemberCardResult member_card { get; set; }
  55. /// <summary>
  56. /// 门票
  57. /// </summary>
  58. public Card_ScenicTicketResult scenic_ticket { get; set; }
  59. /// <summary>
  60. /// 电影票
  61. /// </summary>
  62. public Card_MovieTicketResult movie_ticket { get; set; }
  63. /// <summary>
  64. /// 飞机票
  65. /// </summary>
  66. public Card_BoardingPassResult boarding_pass { get; set; }
  67. /// <summary>
  68. /// 红包
  69. /// </summary>
  70. public Card_LuckyMoneyResult lucky_money { get; set; }
  71. /// <summary>
  72. /// 会议门票
  73. /// </summary>
  74. public Card_MeetingTicketResult meeting_ticket { get; set; }
  75. }
  76. /// <summary>
  77. /// 通用券数据
  78. /// </summary>
  79. public class Card_GeneralCouponResult : BaseCardInfoResult
  80. {
  81. /// <summary>
  82. /// 描述文本
  83. /// </summary>
  84. public string default_detail { get; set; }
  85. }
  86. /// <summary>
  87. /// 团购券数据
  88. /// </summary>
  89. public class Card_GrouponResult : BaseCardInfoResult
  90. {
  91. /// <summary>
  92. /// 团购券专用,团购详情
  93. /// </summary>
  94. public string deal_detail { get; set; }
  95. }
  96. /// <summary>
  97. /// 礼品券数据
  98. /// </summary>
  99. public class Card_GiftResult : BaseCardInfoResult
  100. {
  101. /// <summary>
  102. /// 礼品券专用,表示礼品名字
  103. /// </summary>
  104. public string gift { get; set; }
  105. }
  106. /// <summary>
  107. /// 代金券数据
  108. /// </summary>
  109. public class Card_CashResult : BaseCardInfoResult
  110. {
  111. /// <summary>
  112. /// 代金券专用,表示起用金额(单位为分)
  113. /// </summary>
  114. public decimal least_cost { get; set; }
  115. /// <summary>
  116. /// 代金券专用,表示减免金额(单位为分)
  117. /// </summary>
  118. public decimal reduce_cost { get; set; }
  119. }
  120. /// <summary>
  121. /// 折扣券数据
  122. /// </summary>
  123. public class Card_DisCountResult : BaseCardInfoResult
  124. {
  125. /// <summary>
  126. ///折扣券专用,表示打折额度(百分比)。填30 就是七折。
  127. /// </summary>
  128. public float discount { get; set; }
  129. }
  130. /// <summary>
  131. /// 会员卡数据
  132. /// </summary>
  133. public class Card_MemberCardResult : BaseCardInfoResult
  134. {
  135. /// <summary>
  136. /// 是否支持积分,填写true 或false,如填写true,积分相关字段均为必填。填写false,积分字段无需填写。储值字段处理方式相同。
  137. /// </summary>
  138. public bool supply_bonus { get; set; }
  139. /// <summary>
  140. /// 是否支持储值,填写true 或false。
  141. /// </summary>
  142. public bool supply_balance { get; set; }
  143. /// <summary>
  144. /// 积分清零规则
  145. /// </summary>
  146. public string bonus_cleared { get; set; }
  147. /// <summary>
  148. /// 积分规则
  149. /// </summary>
  150. public string bonus_rules { get; set; }
  151. /// <summary>
  152. /// 储值说明
  153. /// </summary>
  154. public string balance_rules { get; set; }
  155. /// <summary>
  156. /// 特权说明
  157. /// </summary>
  158. public string prerogative { get; set; }
  159. /// <summary>
  160. /// 绑定旧卡的url,与“activate_url”字段二选一必填。
  161. /// </summary>
  162. public string bind_old_card_url { get; set; }
  163. /// <summary>
  164. /// 激活会员卡的url,与“bind_old_card_url”字段二选一必填。
  165. /// </summary>
  166. public string activate_url { get; set; }
  167. //以下增加
  168. /// <summary>
  169. /// 会员卡背景图像,必须是上传媒体地址
  170. /// </summary>
  171. public string background_pic_url { get; set; }
  172. /// <summary>
  173. ///是否开通一键开卡
  174. /// </summary>
  175. public bool wx_activate { get; set; }
  176. /// <summary>
  177. /// 是否开通自动激活
  178. /// </summary>
  179. public bool auto_activate { get; set; }
  180. /// <summary>
  181. ///自定义会员信息类目,会员卡激活后显示
  182. /// </summary>
  183. public CustomField custom_field1 { get; set; }
  184. /// <summary>
  185. /// 自定义会员信息类目,会员卡激活后显示
  186. /// </summary>
  187. public CustomField custom_field2 { get; set; }
  188. /// <summary>
  189. /// 自定义会员信息类目,会员卡激活后显示
  190. /// </summary>
  191. public CustomField custom_field3 { get; set; }
  192. /// <summary>
  193. /// 自定义会员信息类目,会员卡激活后显示
  194. /// </summary>
  195. public CustomCell custom_cell1 { get; set; }
  196. /// <summary>
  197. /// 积分规则结构体
  198. /// </summary>
  199. public BonusRule bonus_rule { get; set; }
  200. /// <summary>
  201. /// 折扣
  202. /// </summary>
  203. public int discount { get; set; }
  204. }
  205. /// <summary>
  206. /// 门票数据
  207. /// </summary>
  208. public class Card_ScenicTicketResult : BaseCardInfoResult
  209. {
  210. /// <summary>
  211. /// 票类型,例如平日全票,套票等
  212. /// </summary>
  213. public string ticket_class { get; set; }
  214. /// <summary>
  215. /// 导览图url
  216. /// </summary>
  217. public string guide_url { get; set; }
  218. }
  219. /// <summary>
  220. /// 电影票数据
  221. /// </summary>
  222. public class Card_MovieTicketResult : BaseCardInfoResult
  223. {
  224. /// <summary>
  225. /// 电影票详请
  226. /// </summary>
  227. public string detail { get; set; }
  228. }
  229. /// <summary>
  230. /// 飞机票数据
  231. /// </summary>
  232. public class Card_BoardingPassResult : BaseCardInfoResult
  233. {
  234. /// <summary>
  235. /// 起点,上限为18 个汉字
  236. /// </summary>
  237. public string from { get; set; }
  238. /// <summary>
  239. /// 终点,上限为18 个汉字
  240. /// </summary>
  241. public string to { get; set; }
  242. /// <summary>
  243. /// 航班
  244. /// </summary>
  245. public string flight { get; set; }
  246. /// <summary>
  247. /// 起飞时间,上限为17 个汉字
  248. /// </summary>
  249. public string departure_time { get; set; }
  250. /// <summary>
  251. /// 降落时间,上限为17 个汉字
  252. /// </summary>
  253. public string landing_time { get; set; }
  254. /// <summary>
  255. /// 在线值机的链接
  256. /// </summary>
  257. public string check_in_url { get; set; }
  258. /// <summary>
  259. /// 登机口。如发生登机口变更,建议商家实时调用该接口变更
  260. /// </summary>
  261. public string gate { get; set; }
  262. /// <summary>
  263. /// 登机时间,只显示“时分”不显示日期,按时间戳格式填写。如发生登机时间变更,建议商家实时调用该接口变更
  264. /// </summary>
  265. public string boarding_time { get; set; }
  266. /// <summary>
  267. /// 机型,上限为8 个汉字
  268. /// </summary>
  269. public string air_model { get; set; }
  270. }
  271. /// <summary>
  272. /// 红包数据
  273. /// </summary>
  274. public class Card_LuckyMoneyResult : BaseCardInfoResult
  275. {
  276. }
  277. public class Card_MeetingTicketResult : BaseCardInfoResult
  278. {
  279. /// <summary>
  280. /// 会议详情
  281. /// </summary>
  282. public string meeting_detail { get; set; }
  283. /// <summary>
  284. /// 会场导览图
  285. /// </summary>
  286. public string map_url { get; set; }
  287. }
  288. public class BaseCardInfoResult
  289. {
  290. /// <summary>
  291. /// 基本的卡券数据
  292. /// </summary>
  293. public BaseInfoResult base_info { get; set; }
  294. }
  295. #region 基本的卡券数据,所有卡券通用(BaseInfoResult)
  296. /// <summary>
  297. /// 基本的卡券数据,所有卡券通用。
  298. /// </summary>
  299. public class BaseInfoResult : Card_BaseInfoBase
  300. {
  301. /// <summary>
  302. /// 卡券Id
  303. /// </summary>
  304. public string id { get; set; }
  305. public string status { get; set; }
  306. }
  307. #endregion
  308. }