Skip to content

Commit 15bd95c

Browse files
authored
🆕 binarywang#2097 【微信支付】增加微信商户平台商家券相关业务接口
1 parent 51dc661 commit 15bd95c

File tree

46 files changed

+4557
-10
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+4557
-10
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package com.github.binarywang.wxpay.bean.marketing;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
import lombok.Data;
5+
import lombok.NoArgsConstructor;
6+
7+
import java.io.Serializable;
8+
9+
/**
10+
* 设置商家券事件通知地址请求对象
11+
* <pre>
12+
* 文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter9_2_7.shtml
13+
* </pre>
14+
*
15+
* @author yujam
16+
*/
17+
@Data
18+
@NoArgsConstructor
19+
public class BusiFavorCallbacksRequest implements Serializable {
20+
21+
private static final long serialVersionUID = 1L;
22+
23+
/**
24+
* <pre>* 字段名:商户号
25+
* 变量名:mchid
26+
* 是否必填:否
27+
* 类型:string[8,15]
28+
* 描述:
29+
* body 微信支付商户的商户号,由微信支付生成并下发,不填默认查询调用方商户的通知URL。 示例值:10000098
30+
* </pre>
31+
*/
32+
@SerializedName(value = "mchid")
33+
private String mchid;
34+
35+
/**
36+
* <pre>* 字段名:通知URL地址
37+
* 变量名:notify_url
38+
* 是否必填:是
39+
* 类型:string[10,256]
40+
* 描述:
41+
* body 商户提供的用于接收商家券事件通知的url地址,必须支持https。 示例值:https://pay.weixin.qq.com
42+
* </pre>
43+
*/
44+
@SerializedName(value = "notify_url")
45+
private String notifyUrl;
46+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
package com.github.binarywang.wxpay.bean.marketing;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
import lombok.Data;
5+
import lombok.NoArgsConstructor;
6+
7+
import java.io.Serializable;
8+
9+
/**
10+
* 设置商家券事件通知地址返回对象
11+
* <pre>
12+
* 文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter9_2_7.shtml
13+
* </pre>
14+
*
15+
* @author yujam
16+
*/
17+
@Data
18+
@NoArgsConstructor
19+
public class BusiFavorCallbacksResult implements Serializable {
20+
private static final long serialVersionUID = 1L;
21+
22+
/**
23+
* <pre>* 字段名:修改时间
24+
* 变量名:update_time
25+
* 是否必填:否
26+
* 类型:string[1,32]
27+
* 描述:
28+
* 修改时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。 示例值:2015-05-20T13:29:35+08:00
29+
* </pre>
30+
*/
31+
@SerializedName(value = "update_time")
32+
private String updateTime;
33+
34+
/**
35+
* <pre>* 字段名:通知URL地址
36+
* 变量名:notify_url
37+
* 是否必填:是
38+
* 类型:string[10,256]
39+
* 描述:
40+
* 商户提供的用于接收商家券事件通知的url地址,必须支持https。 示例值:https://pay.weixin.qq.com
41+
* </pre>
42+
*/
43+
@SerializedName(value = "notify_url")
44+
private String notifyUrl;
45+
46+
/**
47+
* <pre>* 字段名:商户号
48+
* 变量名:mchid
49+
* 是否必填:是
50+
* 类型:string[8,15]
51+
* 描述:
52+
* 微信支付商户的商户号,由微信支付生成并下发。 示例值:10000098
53+
* </pre>
54+
*/
55+
@SerializedName(value = "mchid")
56+
private String mchid;
57+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
package com.github.binarywang.wxpay.bean.marketing;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
import lombok.Data;
5+
import lombok.NoArgsConstructor;
6+
7+
import java.io.Serializable;
8+
import java.util.List;
9+
10+
/**
11+
* 上传预存code请求对象
12+
* <pre>
13+
* 文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter9_2_6.shtml
14+
* </pre>
15+
*
16+
* @author yujam
17+
*/
18+
@Data
19+
@NoArgsConstructor
20+
public class BusiFavorCouponCodeRequest implements Serializable {
21+
public static final float serialVersionUID = 1L;
22+
23+
/**
24+
* <pre>* 字段名:批次号
25+
* 变量名:stock_id
26+
* 是否必填:是
27+
* 类型:string[1,20]
28+
* 描述:
29+
* path 微信为每个商家券批次分配的唯一ID 示例值:98065001
30+
* </pre>
31+
*/
32+
@SerializedName(value = "stock_id")
33+
private String stockId;
34+
35+
/**
36+
* <pre>* 字段名:券code列表
37+
* 变量名:coupon_code_list
38+
* 是否必填:否
39+
* 类型:array
40+
* 描述:
41+
* body 商户上传的券code列表,code允许包含的字符有0-9、a-z、A-Z、-、_、\、/、=、|。 特殊规则:单个券code长度为【1,32】,条目个数限制为【1,200】。 示例值:ABC9588200,ABC9588201
42+
* </pre>
43+
*/
44+
@SerializedName(value = "coupon_code_list")
45+
private List<String> couponCodeList;
46+
47+
/**
48+
* <pre>* 字段名:请求业务单据号
49+
* 变量名:upload_request_no
50+
* 是否必填:是
51+
* 类型:string[1,128]
52+
* 描述:
53+
* body 商户上传code的凭据号,商户侧需保持唯一性。 示例值:100002322019090134234sfdf
54+
* </pre>
55+
*/
56+
@SerializedName(value = "upload_request_no")
57+
private String uploadRequestNo;
58+
}
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
package com.github.binarywang.wxpay.bean.marketing;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
import lombok.Data;
5+
import lombok.NoArgsConstructor;
6+
7+
import java.io.Serializable;
8+
import java.util.List;
9+
10+
/**
11+
* 上传预存code返回对象
12+
* <pre>
13+
* 文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter9_2_6.shtml
14+
* </pre>
15+
*
16+
* @author yujam
17+
*/
18+
@Data
19+
@NoArgsConstructor
20+
public class BusiFavorCouponCodeResult implements Serializable {
21+
public static final float serialVersionUID = 1L;
22+
23+
/**
24+
* <pre>* 字段名:批次号
25+
* 变量名:stock_id
26+
* 是否必填:是
27+
* 类型:string[1,20]
28+
* 描述:
29+
* 微信为每个商家券批次分配的唯一ID。 示例值:98065001
30+
* </pre>
31+
*/
32+
@SerializedName(value = "stock_id")
33+
private String stockId;
34+
35+
/**
36+
* <pre>* 字段名:去重后上传code总数
37+
* 变量名:total_count
38+
* 是否必填:是
39+
* 类型:uint64
40+
* 描述:
41+
* 本次上传操作,去重后实际上传的code数目。 示例值:500
42+
* </pre>
43+
*/
44+
@SerializedName(value = "total_count")
45+
private Integer totalCount;
46+
47+
/**
48+
* <pre>* 字段名:上传成功code个数
49+
* 变量名:success_count
50+
* 是否必填:是
51+
* 类型:uint64
52+
* 描述:
53+
* 本次上传操作上传成功个数。 示例值:20
54+
* </pre>
55+
*/
56+
@SerializedName(value = "success_count")
57+
private Integer successCount;
58+
59+
/**
60+
* <pre>* 字段名:上传成功的code列表
61+
* 变量名:success_codes
62+
* 是否必填:否
63+
* 类型:array
64+
* 描述:
65+
* 本次新增上传成功的code信息。 特殊规则:单个券code长度为【1,32】,条目个数限制为【1,200】。 示例值:MMAA12345
66+
* </pre>
67+
*/
68+
@SerializedName(value = "success_codes")
69+
private List<String> successCodes;
70+
71+
/**
72+
* <pre>* 字段名:上传成功时间
73+
* 变量名:success_time
74+
* 是否必填:是
75+
* 类型:string[1,32]
76+
* 描述:
77+
* 上传操作完成时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。 示例值:2015-05-20T13:29:35+08:00
78+
* </pre>
79+
*/
80+
@SerializedName(value = "success_time")
81+
private String successTime;
82+
83+
/**
84+
* <pre>* 字段名:上传失败code个数
85+
* 变量名:fail_count
86+
* 是否必填:否
87+
* 类型:uint64
88+
* 描述:
89+
* 本次上传操作上传失败的code数。 示例值:10
90+
* </pre>
91+
*/
92+
@SerializedName(value = "fail_count")
93+
private Integer failCount;
94+
95+
/**
96+
* <pre>* 字段名:+上传失败的code及原因
97+
* 变量名:fail_codes
98+
* 是否必填:否
99+
* 类型:array
100+
* 描述:
101+
* 本次导入失败的code信息,请参照错误信息,修改后重试。
102+
* </pre>
103+
*/
104+
@SerializedName(value = "fail_codes")
105+
private List<FailCode> failCodes;
106+
107+
/**
108+
* <pre>* 字段名:已存在的code列表
109+
* 变量名:exist_codes
110+
* 是否必填:否
111+
* 类型:array
112+
* 描述:
113+
* 历史已存在的code列表,本次不会重复导入。 特殊规则:单个券code长度为【1,32】,条目个数限制为【1,200】。 示例值:ABCD2345
114+
* </pre>
115+
*/
116+
@SerializedName(value = "exist_codes")
117+
private List<String> existCodes;
118+
119+
/**
120+
* <pre>* 字段名:本次请求中重复的code列表
121+
* 变量名:duplicate_codes
122+
* 是否必填:否
123+
* 类型:array
124+
* 描述:
125+
* 本次重复导入的code会被自动过滤,仅保留一个做导入,如满足要求则成功;如不满足要求,则失败;请参照报错提示修改重试。 特殊规则:单个券code长度为【1,32】,条目个数限制为【1,200】。 示例值:AACC2345
126+
* </pre>
127+
*/
128+
@SerializedName(value = "duplicate_codes")
129+
private List<String> duplicateCodes;
130+
131+
@Data
132+
@NoArgsConstructor
133+
public static class FailCode {
134+
public static final float serialVersionUID = 1L;
135+
136+
/**
137+
* <pre>* 字段名:上传失败的券code
138+
* 变量名:coupon_code
139+
* 是否必填:是
140+
* 类型:string[1,32]
141+
* 描述:
142+
* 商户通过API上传的券code。 示例值:ABCD23456
143+
* </pre>
144+
*/
145+
@SerializedName(value = "coupon_code")
146+
private String couponCode;
147+
148+
/**
149+
* <pre>* 字段名:上传失败错误码
150+
* 变量名:code
151+
* 是否必填:是
152+
* 类型:string[1,32]
153+
* 描述:
154+
* 对应券code上传失败的错误码。 示例值:LENGTH_LIMIT
155+
* </pre>
156+
*/
157+
@SerializedName(value = "code")
158+
private String code;
159+
160+
/**
161+
* <pre>* 字段名:上传失败错误信息
162+
* 变量名:message
163+
* 是否必填:是
164+
* 类型:string[1,128]
165+
* 描述:
166+
* 上传失败的错误信息描述。 示例值:长度超过最大值32位
167+
* </pre>
168+
*/
169+
@SerializedName(value = "message")
170+
private String message;
171+
}
172+
}

0 commit comments

Comments
 (0)