View Javadoc
1   package com.foxinmy.weixin4j.payment.coupon;
2   
3   import java.io.Serializable;
4   
5   import javax.xml.bind.annotation.XmlAccessType;
6   import javax.xml.bind.annotation.XmlAccessorType;
7   import javax.xml.bind.annotation.XmlElement;
8   import javax.xml.bind.annotation.XmlRootElement;
9   
10  import com.alibaba.fastjson.annotation.JSONField;
11  
12  /**
13   * 退款代金券信息
14   * 
15   * @className RefundCouponInfo
16   * @author jinyu(foxinmy@gmail.com)
17   * @date 2015年3月24日
18   * @since JDK 1.6
19   * @see
20   * @deprecated 迁移到子模块weixin4j-pay
21   */
22  @Deprecated
23  @XmlRootElement
24  @XmlAccessorType(XmlAccessType.FIELD)
25  public class RefundCouponInfo implements Serializable {
26  
27  	private static final long serialVersionUID = -8744999305258786901L;
28  
29  	/**
30  	 * 代金券或立减优惠批次ID
31  	 */
32  	@XmlElement(name = "coupon_refund_batch_id")
33  	@JSONField(name = "coupon_refund_batch_id")
34  	private String couponBatchId;
35  	/**
36  	 * 退款代金券ID
37  	 */
38  	@XmlElement(name = "coupon_refund_id")
39  	@JSONField(name = "coupon_refund_id")
40  	private String couponId;
41  	/**
42  	 * 单个代金券或立减优惠支付金额
43  	 */
44  	@XmlElement(name = "coupon_refund_fee")
45  	@JSONField(name = "coupon_refund_fee")
46  	private Integer couponFee;
47  
48  	protected RefundCouponInfo() {
49  		// jaxb requried
50  	}
51  
52  	public String getCouponBatchId() {
53  		return couponBatchId;
54  	}
55  
56  	public String getCouponId() {
57  		return couponId;
58  	}
59  
60  	public Integer getCouponFee() {
61  		return couponFee;
62  	}
63  
64  	/**
65  	 * <font color="red">调用接口获取单位为分,get方法转换为元方便使用</font>
66  	 * 
67  	 * @return 元单位
68  	 */
69  	@JSONField(serialize = false)
70  	public double getFormatCouponFee() {
71  		return couponFee != null ? couponFee.doubleValue() / 100d : 0d;
72  	}
73  
74  	@Override
75  	public String toString() {
76  		return "couponBatchId=" + couponBatchId + ", couponId=" + couponId
77  				+ ", couponFee=" + couponFee;
78  	}
79  }