com.foxinmy.weixin4j.payment.mch
Class Redpacket

java.lang.Object
  extended by com.foxinmy.weixin4j.http.weixin.XmlResult
      extended by com.foxinmy.weixin4j.payment.mch.MerchantResult
          extended by com.foxinmy.weixin4j.payment.mch.Redpacket
All Implemented Interfaces:
Serializable

public class Redpacket
extends MerchantResult

红包

Since:
JDK 1.6
Author:
jinyu(foxinmy@gmail.com)
See Also:
普通红包, 裂变红包, Serialized Form

Constructor Summary
Redpacket(String outTradeNo, String openId, String sendName, double totalAmount, int totalNum, String wishing, String clientIp, String actName, String remark)
          红包
 
Method Summary
 Redpacket copy(String outTradeNo, String openId)
          批量发送时可能需要
 String getActName()
           
 String getAmtType()
           
 String getClientIp()
           
 String getConsumeMchId()
           
 double getFormatTotalAmount()
          调用接口获取单位为分,get方法转换为元方便使用
 String getMsgAppId()
           
 String getOpenId()
           
 String getOutTradeNo()
           
 String getRemark()
           
 String getRisk()
           
 RedpacketSceneType getSceneType()
           
 String getSendName()
           
 int getTotalAmount()
           
 int getTotalNum()
           
 String getWishing()
           
 void setConsumeMchId(String consumeMchId)
           
 void setMsgAppId(String msgAppId)
           
 void setRisk(RedpacketRisk risk)
           
 void setRisk(String risk)
           
 void setSceneType(RedpacketSceneType sceneType)
           
 String toString()
           
 
Methods inherited from class com.foxinmy.weixin4j.payment.mch.MerchantResult
getAppId, getDeviceInfo, getFormatRecall, getFormatSignType, getMchId, getNonceStr, getRecall, getSign, getSignType, getSubAppId, getSubMchId, setAppId, setDeviceInfo, setMchId, setNonceStr, setRecall, setSign, setSignType, setSubAppId, setSubMchId
 
Methods inherited from class com.foxinmy.weixin4j.http.weixin.XmlResult
getErrCode, getErrCodeDes, getResultCode, getReturnCode, getReturnMsg, setErrCode, setErrCodeDes, setResultCode
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Redpacket

public Redpacket(String outTradeNo,
                 String openId,
                 String sendName,
                 double totalAmount,
                 int totalNum,
                 String wishing,
                 String clientIp,
                 String actName,
                 String remark)
红包

Parameters:
outTradeNo - 商户侧一天内不可重复的订单号 接口根据商户订单号支持重入 如出现超时可再调用 必填
openId - 接受收红包的用户的openid 必填
sendName - 红包发送者名称 必填
totalAmount - 付款金额 单位为元,自动格式化为分 必填
totalNum - 红包发放总人数 大于1视为裂变红包 必填
wishing - 红包祝福语 必填
clientIp - Ip地址 必填
actName - 活动名称 必填
remark - 备注 必填
Method Detail

copy

public Redpacket copy(String outTradeNo,
                      String openId)
批量发送时可能需要

Parameters:
outTradeNo - 订单号
openId - 用户ID
Returns:
红包实体

getOutTradeNo

public String getOutTradeNo()

getOpenId

public String getOpenId()

getSendName

public String getSendName()

getTotalAmount

public int getTotalAmount()

getFormatTotalAmount

public double getFormatTotalAmount()
调用接口获取单位为分,get方法转换为元方便使用

Returns:
元单位

getTotalNum

public int getTotalNum()

getWishing

public String getWishing()

getAmtType

public String getAmtType()

getClientIp

public String getClientIp()

getActName

public String getActName()

getRemark

public String getRemark()

getMsgAppId

public String getMsgAppId()

setMsgAppId

public void setMsgAppId(String msgAppId)

getConsumeMchId

public String getConsumeMchId()

setConsumeMchId

public void setConsumeMchId(String consumeMchId)

getSceneType

public RedpacketSceneType getSceneType()

setSceneType

public void setSceneType(RedpacketSceneType sceneType)

getRisk

public String getRisk()

setRisk

public void setRisk(String risk)

setRisk

public void setRisk(RedpacketRisk risk)

toString

public String toString()
Overrides:
toString in class MerchantResult


Copyright © 2014–2017. All rights reserved.