|
| 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