From 8e1b53be671f4d3f86f3b9f4c681e572251a1618 Mon Sep 17 00:00:00 2001 From: chaoyuxie <31816849+chaoyuxie@users.noreply.github.com> Date: Thu, 25 May 2023 16:12:21 +0800 Subject: [PATCH 1/3] Update README.md add merchantexclusivecoupon --- service/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/service/README.md b/service/README.md index e5d6c8b6..1c700290 100644 --- a/service/README.md +++ b/service/README.md @@ -21,3 +21,4 @@ | transferbatch | 商家转账 |✔️|| | goldplan | 点金计划 ||✔️| | wexinpayscoreparking | 微信支付分停车 |✔️|✔️| +| merchantexclusivecoupon | 商家券 |✔️|✔️| From 3f7a871b7f2bbe2767ababe0b2c93cc3c59d7e8a Mon Sep 17 00:00:00 2001 From: chaoyuxie <31816849+chaoyuxie@users.noreply.github.com> Date: Thu, 25 May 2023 16:13:09 +0800 Subject: [PATCH 2/3] add merchantexclusivecoupon add merchantexclusivecoupon --- ...MerchantExclusiveCouponServiceExample.java | 208 ++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 service/src/example/java/com/wechat/pay/java/service/merchantexclusivecoupon/MerchantExclusiveCouponServiceExample.java diff --git a/service/src/example/java/com/wechat/pay/java/service/merchantexclusivecoupon/MerchantExclusiveCouponServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/merchantexclusivecoupon/MerchantExclusiveCouponServiceExample.java new file mode 100644 index 00000000..1b7cb7b7 --- /dev/null +++ b/service/src/example/java/com/wechat/pay/java/service/merchantexclusivecoupon/MerchantExclusiveCouponServiceExample.java @@ -0,0 +1,208 @@ +package com.wechat.pay.java.service.merchantexclusivecoupon; + +import com.wechat.pay.java.core.RSAConfig; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.AssociateTradeInfoRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.AssociateTradeInfoResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.CouponCodeInfoRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.CouponCodeInfoResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.CouponCodeListResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.CouponEntity; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.CouponListResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.CouponSendGovCardResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.CreateBusiFavorStockRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.CreateBusiFavorStockResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.DeactivateCouponRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.DeactivateCouponResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.DeleteCouponCodeRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.DeleteCouponCodeResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.DisassociateTradeInfoRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.DisassociateTradeInfoResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.GetCouponNotifyRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.GetCouponNotifyResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.ListCouponsByFilterRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.ModifyBudgetRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.ModifyBudgetResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.ModifyStockInfoRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.PayReceiptInfoRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.PayReceiptListRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.QueryCouponCodeListRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.QueryCouponRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.QueryStockRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.ReturnCouponRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.ReturnCouponResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.ReturnReceiptInfoRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SendCouponRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SendCouponResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SendGovCardRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SetCouponNotifyRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SetCouponNotifyResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.StockGetResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SubsidyPayReceipt; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SubsidyPayReceiptListResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SubsidyPayRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SubsidyReturnReceipt; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SubsidyReturnRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.UploadCouponCodeRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.UploadCouponCodeResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.UseCouponRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.UseCouponResponse; + +/** MerchantExclusiveCouponService使用示例 */ +public class MerchantExclusiveCouponServiceExample { + + public static String merchantId = ""; + public static String privateKeyPath = ""; + public static String merchantSerialNumber = ""; + public static String wechatPayCertificatePath = ""; + public static MerchantExclusiveCouponService service; + + public static void main(String[] args) { + // 初始化商户配置 + RSAConfig config = + new RSAConfig.Builder() + .merchantId(merchantId) + // 使用 com.wechat.pay.java.core.util 中的函数从本地文件中加载商户私钥,商户私钥会用来生成请求的签名 + .privateKeyFromPath(privateKeyPath) + .merchantSerialNumber(merchantSerialNumber) + .wechatPayCertificatesFromPath(wechatPayCertificatePath) + .build(); + + // 初始化服务 + service = new MerchantExclusiveCouponService.Builder().config(config).build(); + // ... 调用接口 + } + /** 查询预存code详情 */ + public static CouponCodeInfoResponse couponCodeInfo() { + + CouponCodeInfoRequest request = new CouponCodeInfoRequest(); + return service.couponCodeInfo(request); + } + /** 创建商家券 */ + public static CreateBusiFavorStockResponse createBusifavorStock() { + CreateBusiFavorStockRequest request = new CreateBusiFavorStockRequest(); + return service.createBusifavorStock(request); + } + /** 删除预存code */ + public static DeleteCouponCodeResponse deleteCouponCode() { + + DeleteCouponCodeRequest request = new DeleteCouponCodeRequest(); + return service.deleteCouponCode(request); + } + /** 修改批次预算 */ + public static ModifyBudgetResponse modifyBudget() { + + ModifyBudgetRequest request = new ModifyBudgetRequest(); + return service.modifyBudget(request); + } + /** 修改商家券基本信息 */ + public static void modifyStockInfo() { + + ModifyStockInfoRequest request = new ModifyStockInfoRequest(); + service.modifyStockInfo(request); + } + /** 查询预存code列表 */ + public static CouponCodeListResponse queryCouponCodeList() { + + QueryCouponCodeListRequest request = new QueryCouponCodeListRequest(); + return service.queryCouponCodeList(request); + } + /** 查询商家券批次详情 */ + public static StockGetResponse queryStock() { + + QueryStockRequest request = new QueryStockRequest(); + return service.queryStock(request); + } + /** 上传预存code */ + public static UploadCouponCodeResponse uploadCouponCode() { + + UploadCouponCodeRequest request = new UploadCouponCodeRequest(); + return service.uploadCouponCode(request); + } + /** 获取商家券事件通知地址 */ + public static GetCouponNotifyResponse getCouponNotify() { + + GetCouponNotifyRequest request = new GetCouponNotifyRequest(); + return service.getCouponNotify(request); + } + /** 设置商家券事件通知地址 */ + public static SetCouponNotifyResponse setCouponNotify() { + SetCouponNotifyRequest request = new SetCouponNotifyRequest(); + return service.setCouponNotify(request); + } + /** 关联订单信息 */ + public static AssociateTradeInfoResponse associateTradeInfo() { + AssociateTradeInfoRequest request = new AssociateTradeInfoRequest(); + return service.associateTradeInfo(request); + } + /** 使券失效 */ + public static DeactivateCouponResponse deactivateCoupon() { + DeactivateCouponRequest request = new DeactivateCouponRequest(); + return service.deactivateCoupon(request); + } + /** 取消关联订单信息 */ + public static DisassociateTradeInfoResponse disassociateTradeInfo() { + DisassociateTradeInfoRequest request = new DisassociateTradeInfoRequest(); + return service.disassociateTradeInfo(request); + } + /** 根据过滤条件查询用户的券 */ + public static CouponListResponse listCouponsByFilter() { + + ListCouponsByFilterRequest request = new ListCouponsByFilterRequest(); + return service.listCouponsByFilter(request); + } + /** 查询用户券详情 */ + public static CouponEntity queryCoupon() { + + QueryCouponRequest request = new QueryCouponRequest(); + return service.queryCoupon(request); + } + /** 申请退券 */ + public static ReturnCouponResponse returnCoupon() { + ReturnCouponRequest request = new ReturnCouponRequest(); + return service.returnCoupon(request); + } + /** 向用户发券 */ + public static SendCouponResponse sendCoupon() { + SendCouponRequest request = new SendCouponRequest(); + return service.sendCoupon(request); + } + /** 发放政府消费卡 */ + public static CouponSendGovCardResponse sendGovCard() { + + SendGovCardRequest request = new SendGovCardRequest(); + return service.sendGovCard(request); + } + /** 核销用户的券 */ + public static UseCouponResponse useCoupon() { + UseCouponRequest request = new UseCouponRequest(); + return service.useCoupon(request); + } + /** 查询商家券营销补差付款单详情 */ + public static SubsidyPayReceipt payReceiptInfo() { + + PayReceiptInfoRequest request = new PayReceiptInfoRequest(); + return service.payReceiptInfo(request); + } + /** 查询商家券营销补差付款单列表 */ + public static SubsidyPayReceiptListResponse payReceiptList() { + + PayReceiptListRequest request = new PayReceiptListRequest(); + return service.payReceiptList(request); + } + /** 查询商家券营销补差回退单详情 */ + public static SubsidyReturnReceipt returnReceiptInfo() { + + ReturnReceiptInfoRequest request = new ReturnReceiptInfoRequest(); + return service.returnReceiptInfo(request); + } + /** 商家券营销补差付款 */ + public static SubsidyPayReceipt subsidyPay() { + SubsidyPayRequest request = new SubsidyPayRequest(); + return service.subsidyPay(request); + } + /** 商家券营销补差回退 */ + public static SubsidyReturnReceipt subsidyReturn() { + SubsidyReturnRequest request = new SubsidyReturnRequest(); + return service.subsidyReturn(request); + } +} From 1c7783e2d4524cb2f0043ef18157c2117df45fc7 Mon Sep 17 00:00:00 2001 From: chaoyuxie <31816849+chaoyuxie@users.noreply.github.com> Date: Thu, 25 May 2023 16:15:37 +0800 Subject: [PATCH 3/3] add merchantexclusivecoupon add merchantexclusivecoupon --- .../MerchantExclusiveCouponService.java | 981 ++++++++++++++++++ .../model/AssociateTradeInfoRequest.java | 77 ++ .../model/AssociateTradeInfoResponse.java | 47 + .../model/AvailableCurrentDayTime.java | 53 + .../model/AvailableWeek.java | 54 + .../model/BusiFavorStockType.java | 27 + .../model/CodeDisplayMode.java | 27 + .../model/CouponCodeCount.java | 53 + .../model/CouponCodeEntity.java | 116 +++ .../model/CouponCodeInfoRequest.java | 69 ++ .../model/CouponCodeInfoResponse.java | 53 + .../model/CouponCodeListResponse.java | 90 ++ .../model/CouponCodeMode.java | 27 + .../model/CouponCodeStatus.java | 24 + .../model/CouponEntity.java | 335 ++++++ .../model/CouponListResponse.java | 78 ++ .../model/CouponSendGovCardRequest.java | 80 ++ .../model/CouponSendGovCardResponse.java | 41 + .../model/CouponStatus.java | 33 + .../model/CouponUseMethod.java | 30 + .../model/CouponUseRule.java | 115 ++ .../model/CreateBusiFavorStockRequest.java | 189 ++++ .../model/CreateBusiFavorStockResponse.java | 57 + .../model/CustomEntrance.java | 99 ++ .../model/DeactivateCouponRequest.java | 79 ++ .../model/DeactivateCouponResponse.java | 47 + .../model/DeleteCouponCodeRequest.java | 69 ++ .../model/DeleteCouponCodeResponse.java | 53 + .../model/DisassociateTradeInfoRequest.java | 77 ++ .../model/DisassociateTradeInfoResponse.java | 47 + .../model/DiscountMsg.java | 53 + .../model/DisplayPatternInfo.java | 115 ++ .../model/ExchangeMsg.java | 53 + .../model/FavorAvailableTime.java | 122 +++ .../model/FinderInfo.java | 76 ++ .../model/FixedValueStockMsg.java | 53 + .../model/GetCouponNotifyRequest.java | 43 + .../model/GetCouponNotifyResponse.java | 53 + .../model/IrregularAvailableTime.java | 61 ++ .../model/ListCouponsByFilterRequest.java | 153 +++ .../model/MiniAppInfo.java | 80 ++ .../model/ModifyBudgetBody.java | 106 ++ .../model/ModifyBudgetRequest.java | 120 +++ .../model/ModifyBudgetResponse.java | 53 + .../model/ModifyCouponUseRule.java | 65 ++ .../model/ModifyCustomEntrance.java | 80 ++ .../model/ModifyMiniAppInfo.java | 77 ++ .../model/ModifyStockInfoBody.java | 149 +++ .../model/ModifyStockInfoRequest.java | 163 +++ .../model/ModifyStockSendRule.java | 53 + .../model/NotifyConfig.java | 44 + .../model/PayReceiptInfoRequest.java | 43 + .../model/PayReceiptListRequest.java | 72 ++ .../model/QueryCouponCodeListRequest.java | 95 ++ .../model/QueryCouponRequest.java | 75 ++ .../model/QueryStockRequest.java | 43 + .../model/ReturnCouponRequest.java | 65 ++ .../model/ReturnCouponResponse.java | 47 + .../model/ReturnReceiptInfoRequest.java | 45 + .../model/SendCount.java | 77 ++ .../model/SendCouponRequest.java | 89 ++ .../model/SendCouponResponse.java | 41 + .../model/SendCouponResult.java | 65 ++ .../model/SendGovCardRequest.java | 94 ++ .../model/SetCouponNotifyRequest.java | 53 + .../model/SetCouponNotifyResponse.java | 69 ++ .../model/StockGetResponse.java | 226 ++++ .../model/StockSendRule.java | 142 +++ .../model/StockStatus.java | 30 + .../model/SubsidyPayReceipt.java | 196 ++++ .../model/SubsidyPayReceiptFailReason.java | 33 + .../model/SubsidyPayReceiptListResponse.java | 42 + .../model/SubsidyPayReceiptStatus.java | 39 + .../model/SubsidyPayRequest.java | 131 +++ .../model/SubsidyReturnReceipt.java | 211 ++++ .../model/SubsidyReturnReceiptFailReason.java | 24 + .../model/SubsidyReturnReceiptStatus.java | 30 + .../model/SubsidyReturnRequest.java | 140 +++ .../model/UploadCouponCodeBody.java | 58 ++ .../model/UploadCouponCodeFailReason.java | 65 ++ .../model/UploadCouponCodeRequest.java | 72 ++ .../model/UploadCouponCodeResponse.java | 145 +++ .../model/UseCouponRequest.java | 114 ++ .../model/UseCouponResponse.java | 69 ++ .../merchantexclusivecoupon/package-info.java | 2 + 85 files changed, 7641 insertions(+) create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/MerchantExclusiveCouponService.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AssociateTradeInfoRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AssociateTradeInfoResponse.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AvailableCurrentDayTime.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AvailableWeek.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/BusiFavorStockType.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CodeDisplayMode.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeCount.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeEntity.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeInfoRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeInfoResponse.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeListResponse.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeMode.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeStatus.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponEntity.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponListResponse.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponSendGovCardRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponSendGovCardResponse.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponStatus.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponUseMethod.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponUseRule.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CreateBusiFavorStockRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CreateBusiFavorStockResponse.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CustomEntrance.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeactivateCouponRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeactivateCouponResponse.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeleteCouponCodeRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeleteCouponCodeResponse.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisassociateTradeInfoRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisassociateTradeInfoResponse.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DiscountMsg.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisplayPatternInfo.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ExchangeMsg.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FavorAvailableTime.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FinderInfo.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FixedValueStockMsg.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/GetCouponNotifyRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/GetCouponNotifyResponse.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/IrregularAvailableTime.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ListCouponsByFilterRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/MiniAppInfo.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetBody.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetResponse.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyCouponUseRule.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyCustomEntrance.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyMiniAppInfo.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockInfoBody.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockInfoRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockSendRule.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/NotifyConfig.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/PayReceiptInfoRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/PayReceiptListRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryCouponCodeListRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryCouponRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryStockRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ReturnCouponRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ReturnCouponResponse.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ReturnReceiptInfoRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCount.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponResponse.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponResult.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendGovCardRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SetCouponNotifyRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SetCouponNotifyResponse.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockGetResponse.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockSendRule.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockStatus.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceipt.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceiptFailReason.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceiptListResponse.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceiptStatus.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnReceipt.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnReceiptFailReason.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnReceiptStatus.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeBody.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeFailReason.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeResponse.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UseCouponRequest.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UseCouponResponse.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/package-info.java diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/MerchantExclusiveCouponService.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/MerchantExclusiveCouponService.java new file mode 100644 index 00000000..4701a50a --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/MerchantExclusiveCouponService.java @@ -0,0 +1,981 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon; + +import static com.wechat.pay.java.core.http.UrlEncoder.urlEncode; +import static com.wechat.pay.java.core.util.GsonUtil.toJson; +import static java.util.Objects.requireNonNull; + +import com.wechat.pay.java.core.Config; +import com.wechat.pay.java.core.exception.HttpException; +import com.wechat.pay.java.core.exception.MalformedMessageException; +import com.wechat.pay.java.core.exception.ServiceException; +import com.wechat.pay.java.core.exception.ValidationException; +import com.wechat.pay.java.core.http.Constant; +import com.wechat.pay.java.core.http.DefaultHttpClientBuilder; +import com.wechat.pay.java.core.http.HostName; +import com.wechat.pay.java.core.http.HttpClient; +import com.wechat.pay.java.core.http.HttpHeaders; +import com.wechat.pay.java.core.http.HttpMethod; +import com.wechat.pay.java.core.http.HttpRequest; +import com.wechat.pay.java.core.http.HttpResponse; +import com.wechat.pay.java.core.http.JsonRequestBody; +import com.wechat.pay.java.core.http.MediaType; +import com.wechat.pay.java.core.http.QueryParameter; +import com.wechat.pay.java.core.http.RequestBody; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.AssociateTradeInfoRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.AssociateTradeInfoResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.CouponCodeInfoRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.CouponCodeInfoResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.CouponCodeListResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.CouponEntity; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.CouponListResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.CouponSendGovCardResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.CreateBusiFavorStockRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.CreateBusiFavorStockResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.DeactivateCouponRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.DeactivateCouponResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.DeleteCouponCodeRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.DeleteCouponCodeResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.DisassociateTradeInfoRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.DisassociateTradeInfoResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.GetCouponNotifyRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.GetCouponNotifyResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.ListCouponsByFilterRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.ModifyBudgetRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.ModifyBudgetResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.ModifyStockInfoRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.PayReceiptInfoRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.PayReceiptListRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.QueryCouponCodeListRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.QueryCouponRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.QueryStockRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.ReturnCouponRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.ReturnCouponResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.ReturnReceiptInfoRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SendCouponRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SendCouponResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SendGovCardRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SetCouponNotifyRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SetCouponNotifyResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.StockGetResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SubsidyPayReceipt; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SubsidyPayReceiptListResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SubsidyPayRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SubsidyReturnReceipt; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.SubsidyReturnRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.UploadCouponCodeRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.UploadCouponCodeResponse; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.UseCouponRequest; +import com.wechat.pay.java.service.merchantexclusivecoupon.model.UseCouponResponse; + +/** MerchantExclusiveCouponService服务 */ +public class MerchantExclusiveCouponService { + + private final HttpClient httpClient; + private final HostName hostName; + + private MerchantExclusiveCouponService(HttpClient httpClient, HostName hostName) { + this.httpClient = requireNonNull(httpClient); + this.hostName = hostName; + } + /** MerchantExclusiveCouponService构造器 */ + public static class Builder { + + private HttpClient httpClient; + private HostName hostName; + + public Builder config(Config config) { + this.httpClient = new DefaultHttpClientBuilder().config(config).build(); + + return this; + } + + public Builder hostName(HostName hostName) { + this.hostName = hostName; + return this; + } + + public Builder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + public MerchantExclusiveCouponService build() { + return new MerchantExclusiveCouponService(httpClient, hostName); + } + } + + /** + * 查询预存code详情 + * + * @param request 请求参数 + * @return CouponCodeInfoResponse + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public CouponCodeInfoResponse couponCodeInfo(CouponCodeInfoRequest request) { + String requestPath = + "https://api.mch.weixin.qq.com/v3/marketing/busifavor/stocks/{stock_id}/couponcodes/{coupon_code}"; + + CouponCodeInfoRequest realRequest = request; + // 添加 path param + requestPath = requestPath.replace("{" + "stock_id" + "}", urlEncode(realRequest.getStockId())); + + requestPath = + requestPath.replace("{" + "coupon_code" + "}", urlEncode(realRequest.getCouponCode())); + + // 添加 query param + QueryParameter queryParameter = new QueryParameter(); + if (realRequest.getAppid() != null) { + queryParameter.add("appid", urlEncode(realRequest.getAppid())); + } + requestPath += queryParameter.getQueryStr(); + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.GET) + .url(requestPath) + .headers(headers) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, CouponCodeInfoResponse.class); + return httpResponse.getServiceResponse(); + } + /** + * 创建商家券 + * + * @param request 请求参数 + * @return CreateBusiFavorStockResponse + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public CreateBusiFavorStockResponse createBusifavorStock(CreateBusiFavorStockRequest request) { + String requestPath = "https://api.mch.weixin.qq.com/v3/marketing/busifavor/stocks"; + CreateBusiFavorStockRequest realRequest = request; + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.POST) + .url(requestPath) + .headers(headers) + .body(createRequestBody(realRequest)) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, CreateBusiFavorStockResponse.class); + return httpResponse.getServiceResponse(); + } + /** + * 删除预存code + * + * @param request 请求参数 + * @return DeleteCouponCodeResponse + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public DeleteCouponCodeResponse deleteCouponCode(DeleteCouponCodeRequest request) { + String requestPath = + "https://api.mch.weixin.qq.com/v3/marketing/busifavor/stocks/{stock_id}/couponcodes/{coupon_code}"; + + DeleteCouponCodeRequest realRequest = request; + // 添加 path param + requestPath = requestPath.replace("{" + "stock_id" + "}", urlEncode(realRequest.getStockId())); + + requestPath = + requestPath.replace("{" + "coupon_code" + "}", urlEncode(realRequest.getCouponCode())); + + // 添加 query param + QueryParameter queryParameter = new QueryParameter(); + if (realRequest.getDeleteRequestNo() != null) { + queryParameter.add("delete_request_no", urlEncode(realRequest.getDeleteRequestNo())); + } + requestPath += queryParameter.getQueryStr(); + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.DELETE) + .url(requestPath) + .headers(headers) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, DeleteCouponCodeResponse.class); + return httpResponse.getServiceResponse(); + } + /** + * 修改批次预算 + * + * @param request 请求参数 + * @return ModifyBudgetResponse + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public ModifyBudgetResponse modifyBudget(ModifyBudgetRequest request) { + String requestPath = + "https://api.mch.weixin.qq.com/v3/marketing/busifavor/stocks/{stock_id}/budget"; + + ModifyBudgetRequest realRequest = request; + // 添加 path param + requestPath = requestPath.replace("{" + "stock_id" + "}", urlEncode(realRequest.getStockId())); + + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.PATCH) + .url(requestPath) + .headers(headers) + .body(createRequestBody(realRequest)) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, ModifyBudgetResponse.class); + return httpResponse.getServiceResponse(); + } + /** + * 修改商家券基本信息 + * + * @param request 请求参数 + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public void modifyStockInfo(ModifyStockInfoRequest request) { + String requestPath = "https://api.mch.weixin.qq.com/v3/marketing/busifavor/stocks/{stock_id}"; + + ModifyStockInfoRequest realRequest = request; + // 添加 path param + requestPath = requestPath.replace("{" + "stock_id" + "}", urlEncode(realRequest.getStockId())); + + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.PATCH) + .url(requestPath) + .headers(headers) + .body(createRequestBody(realRequest)) + .build(); + httpClient.execute(httpRequest, null); + } + /** + * 查询预存code列表 + * + * @param request 请求参数 + * @return CouponCodeListResponse + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public CouponCodeListResponse queryCouponCodeList(QueryCouponCodeListRequest request) { + String requestPath = + "https://api.mch.weixin.qq.com/v3/marketing/busifavor/stocks/{stock_id}/couponcodes"; + + QueryCouponCodeListRequest realRequest = request; + // 添加 path param + requestPath = requestPath.replace("{" + "stock_id" + "}", urlEncode(realRequest.getStockId())); + + // 添加 query param + QueryParameter queryParameter = new QueryParameter(); + if (realRequest.getLimit() != null) { + queryParameter.add("limit", urlEncode(realRequest.getLimit().toString())); + } + if (realRequest.getOffset() != null) { + queryParameter.add("offset", urlEncode(realRequest.getOffset().toString())); + } + if (realRequest.getAppid() != null) { + queryParameter.add("appid", urlEncode(realRequest.getAppid())); + } + if (realRequest.getStatus() != null) { + queryParameter.add("status", urlEncode(realRequest.getStatus().toString())); + } + requestPath += queryParameter.getQueryStr(); + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.GET) + .url(requestPath) + .headers(headers) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, CouponCodeListResponse.class); + return httpResponse.getServiceResponse(); + } + /** + * 查询商家券批次详情 + * + * @param request 请求参数 + * @return StockGetResponse + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public StockGetResponse queryStock(QueryStockRequest request) { + String requestPath = "https://api.mch.weixin.qq.com/v3/marketing/busifavor/stocks/{stock_id}"; + + QueryStockRequest realRequest = request; + // 添加 path param + requestPath = requestPath.replace("{" + "stock_id" + "}", urlEncode(realRequest.getStockId())); + + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.GET) + .url(requestPath) + .headers(headers) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, StockGetResponse.class); + return httpResponse.getServiceResponse(); + } + /** + * 上传预存code + * + * @param request 请求参数 + * @return UploadCouponCodeResponse + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public UploadCouponCodeResponse uploadCouponCode(UploadCouponCodeRequest request) { + String requestPath = + "https://api.mch.weixin.qq.com/v3/marketing/busifavor/stocks/{stock_id}/couponcodes"; + + UploadCouponCodeRequest realRequest = request; + // 添加 path param + requestPath = requestPath.replace("{" + "stock_id" + "}", urlEncode(realRequest.getStockId())); + + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.POST) + .url(requestPath) + .headers(headers) + .body(createRequestBody(realRequest)) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, UploadCouponCodeResponse.class); + return httpResponse.getServiceResponse(); + } + /** + * 获取商家券事件通知地址 + * + * @param request 请求参数 + * @return GetCouponNotifyResponse + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public GetCouponNotifyResponse getCouponNotify(GetCouponNotifyRequest request) { + String requestPath = "https://api.mch.weixin.qq.com/v3/marketing/busifavor/callbacks"; + + GetCouponNotifyRequest realRequest = request; + // 添加 query param + QueryParameter queryParameter = new QueryParameter(); + if (realRequest.getMchid() != null) { + queryParameter.add("mchid", urlEncode(realRequest.getMchid())); + } + requestPath += queryParameter.getQueryStr(); + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.GET) + .url(requestPath) + .headers(headers) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, GetCouponNotifyResponse.class); + return httpResponse.getServiceResponse(); + } + /** + * 设置商家券事件通知地址 + * + * @param request 请求参数 + * @return SetCouponNotifyResponse + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public SetCouponNotifyResponse setCouponNotify(SetCouponNotifyRequest request) { + String requestPath = "https://api.mch.weixin.qq.com/v3/marketing/busifavor/callbacks"; + SetCouponNotifyRequest realRequest = request; + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.POST) + .url(requestPath) + .headers(headers) + .body(createRequestBody(realRequest)) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, SetCouponNotifyResponse.class); + return httpResponse.getServiceResponse(); + } + /** + * 关联订单信息 + * + * @param request 请求参数 + * @return AssociateTradeInfoResponse + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public AssociateTradeInfoResponse associateTradeInfo(AssociateTradeInfoRequest request) { + String requestPath = "https://api.mch.weixin.qq.com/v3/marketing/busifavor/coupons/associate"; + AssociateTradeInfoRequest realRequest = request; + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.POST) + .url(requestPath) + .headers(headers) + .body(createRequestBody(realRequest)) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, AssociateTradeInfoResponse.class); + return httpResponse.getServiceResponse(); + } + /** + * 使券失效 + * + * @param request 请求参数 + * @return DeactivateCouponResponse + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public DeactivateCouponResponse deactivateCoupon(DeactivateCouponRequest request) { + String requestPath = "https://api.mch.weixin.qq.com/v3/marketing/busifavor/coupons/deactivate"; + DeactivateCouponRequest realRequest = request; + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.POST) + .url(requestPath) + .headers(headers) + .body(createRequestBody(realRequest)) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, DeactivateCouponResponse.class); + return httpResponse.getServiceResponse(); + } + /** + * 取消关联订单信息 + * + * @param request 请求参数 + * @return DisassociateTradeInfoResponse + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public DisassociateTradeInfoResponse disassociateTradeInfo(DisassociateTradeInfoRequest request) { + String requestPath = + "https://api.mch.weixin.qq.com/v3/marketing/busifavor/coupons/disassociate"; + DisassociateTradeInfoRequest realRequest = request; + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.POST) + .url(requestPath) + .headers(headers) + .body(createRequestBody(realRequest)) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, DisassociateTradeInfoResponse.class); + return httpResponse.getServiceResponse(); + } + /** + * 根据过滤条件查询用户的券 + * + * @param request 请求参数 + * @return CouponListResponse + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public CouponListResponse listCouponsByFilter(ListCouponsByFilterRequest request) { + String requestPath = + "https://api.mch.weixin.qq.com/v3/marketing/busifavor/users/{openid}/coupons"; + + ListCouponsByFilterRequest realRequest = request; + // 添加 path param + requestPath = requestPath.replace("{" + "openid" + "}", urlEncode(realRequest.getOpenid())); + + // 添加 query param + QueryParameter queryParameter = new QueryParameter(); + if (realRequest.getAppid() != null) { + queryParameter.add("appid", urlEncode(realRequest.getAppid())); + } + if (realRequest.getStockId() != null) { + queryParameter.add("stock_id", urlEncode(realRequest.getStockId())); + } + if (realRequest.getCreatorMerchant() != null) { + queryParameter.add("creator_merchant", urlEncode(realRequest.getCreatorMerchant())); + } + if (realRequest.getBelongMerchant() != null) { + queryParameter.add("belong_merchant", urlEncode(realRequest.getBelongMerchant())); + } + if (realRequest.getSenderMerchant() != null) { + queryParameter.add("sender_merchant", urlEncode(realRequest.getSenderMerchant())); + } + if (realRequest.getOffset() != null) { + queryParameter.add("offset", urlEncode(realRequest.getOffset().toString())); + } + if (realRequest.getLimit() != null) { + queryParameter.add("limit", urlEncode(realRequest.getLimit().toString())); + } + if (realRequest.getCouponState() != null) { + queryParameter.add("coupon_state", urlEncode(realRequest.getCouponState().toString())); + } + requestPath += queryParameter.getQueryStr(); + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.GET) + .url(requestPath) + .headers(headers) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, CouponListResponse.class); + return httpResponse.getServiceResponse(); + } + /** + * 查询用户券详情 + * + * @param request 请求参数 + * @return CouponEntity + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public CouponEntity queryCoupon(QueryCouponRequest request) { + String requestPath = + "https://api.mch.weixin.qq.com/v3/marketing/busifavor/users/{openid}/coupons/{coupon_code}/appids/{appid}"; + + QueryCouponRequest realRequest = request; + // 添加 path param + requestPath = + requestPath.replace("{" + "coupon_code" + "}", urlEncode(realRequest.getCouponCode())); + + requestPath = requestPath.replace("{" + "appid" + "}", urlEncode(realRequest.getAppid())); + + requestPath = requestPath.replace("{" + "openid" + "}", urlEncode(realRequest.getOpenid())); + + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.GET) + .url(requestPath) + .headers(headers) + .build(); + HttpResponse httpResponse = httpClient.execute(httpRequest, CouponEntity.class); + return httpResponse.getServiceResponse(); + } + /** + * 申请退券 + * + * @param request 请求参数 + * @return ReturnCouponResponse + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public ReturnCouponResponse returnCoupon(ReturnCouponRequest request) { + String requestPath = "https://api.mch.weixin.qq.com/v3/marketing/busifavor/coupons/return"; + ReturnCouponRequest realRequest = request; + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.POST) + .url(requestPath) + .headers(headers) + .body(createRequestBody(realRequest)) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, ReturnCouponResponse.class); + return httpResponse.getServiceResponse(); + } + /** + * 向用户发券 + * + * @param request 请求参数 + * @return SendCouponResponse + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public SendCouponResponse sendCoupon(SendCouponRequest request) { + String requestPath = "https://api.mch.weixin.qq.com/v3/marketing/busifavor/coupons/send"; + SendCouponRequest realRequest = request; + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.POST) + .url(requestPath) + .headers(headers) + .body(createRequestBody(realRequest)) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, SendCouponResponse.class); + return httpResponse.getServiceResponse(); + } + /** + * 发放政府消费卡 + * + * @param request 请求参数 + * @return CouponSendGovCardResponse + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public CouponSendGovCardResponse sendGovCard(SendGovCardRequest request) { + String requestPath = + "https://api.mch.weixin.qq.com/v3/marketing/busifavor/coupons/{card_id}/send"; + + SendGovCardRequest realRequest = request; + // 添加 path param + requestPath = requestPath.replace("{" + "card_id" + "}", urlEncode(realRequest.getCardId())); + + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.POST) + .url(requestPath) + .headers(headers) + .body(createRequestBody(realRequest)) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, CouponSendGovCardResponse.class); + return httpResponse.getServiceResponse(); + } + /** + * 核销用户的券 + * + * @param request 请求参数 + * @return UseCouponResponse + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public UseCouponResponse useCoupon(UseCouponRequest request) { + String requestPath = "https://api.mch.weixin.qq.com/v3/marketing/busifavor/coupons/use"; + UseCouponRequest realRequest = request; + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.POST) + .url(requestPath) + .headers(headers) + .body(createRequestBody(realRequest)) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, UseCouponResponse.class); + return httpResponse.getServiceResponse(); + } + /** + * 查询商家券营销补差付款单详情 + * + * @param request 请求参数 + * @return SubsidyPayReceipt + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public SubsidyPayReceipt payReceiptInfo(PayReceiptInfoRequest request) { + String requestPath = + "https://api.mch.weixin.qq.com/v3/marketing/busifavor/subsidy/pay-receipts/{subsidy_receipt_id}"; + + PayReceiptInfoRequest realRequest = request; + // 添加 path param + requestPath = + requestPath.replace( + "{" + "subsidy_receipt_id" + "}", urlEncode(realRequest.getSubsidyReceiptId())); + + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.GET) + .url(requestPath) + .headers(headers) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, SubsidyPayReceipt.class); + return httpResponse.getServiceResponse(); + } + /** + * 查询商家券营销补差付款单列表 + * + * @param request 请求参数 + * @return SubsidyPayReceiptListResponse + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public SubsidyPayReceiptListResponse payReceiptList(PayReceiptListRequest request) { + String requestPath = + "https://api.mch.weixin.qq.com/v3/marketing/busifavor/subsidy/pay-receipts"; + + PayReceiptListRequest realRequest = request; + // 添加 query param + QueryParameter queryParameter = new QueryParameter(); + if (realRequest.getStockId() != null) { + queryParameter.add("stock_id", urlEncode(realRequest.getStockId())); + } + if (realRequest.getCouponCode() != null) { + queryParameter.add("coupon_code", urlEncode(realRequest.getCouponCode())); + } + if (realRequest.getOutSubsidyNo() != null) { + queryParameter.add("out_subsidy_no", urlEncode(realRequest.getOutSubsidyNo())); + } + requestPath += queryParameter.getQueryStr(); + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.GET) + .url(requestPath) + .headers(headers) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, SubsidyPayReceiptListResponse.class); + return httpResponse.getServiceResponse(); + } + /** + * 查询商家券营销补差回退单详情 + * + * @param request 请求参数 + * @return SubsidyReturnReceipt + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public SubsidyReturnReceipt returnReceiptInfo(ReturnReceiptInfoRequest request) { + String requestPath = + "https://api.mch.weixin.qq.com/v3/marketing/busifavor/subsidy/return-receipts/{subsidy_return_receipt_id}"; + + ReturnReceiptInfoRequest realRequest = request; + // 添加 path param + requestPath = + requestPath.replace( + "{" + "subsidy_return_receipt_id" + "}", + urlEncode(realRequest.getSubsidyReturnReceiptId())); + + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.GET) + .url(requestPath) + .headers(headers) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, SubsidyReturnReceipt.class); + return httpResponse.getServiceResponse(); + } + /** + * 商家券营销补差付款 + * + * @param request 请求参数 + * @return SubsidyPayReceipt + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public SubsidyPayReceipt subsidyPay(SubsidyPayRequest request) { + String requestPath = + "https://api.mch.weixin.qq.com/v3/marketing/busifavor/subsidy/pay-receipts"; + SubsidyPayRequest realRequest = request; + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.POST) + .url(requestPath) + .headers(headers) + .body(createRequestBody(realRequest)) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, SubsidyPayReceipt.class); + return httpResponse.getServiceResponse(); + } + /** + * 商家券营销补差回退 + * + * @param request 请求参数 + * @return SubsidyReturnReceipt + * @throws HttpException 发送HTTP请求失败。例如构建请求参数失败、发送请求失败、I/O错误等。包含请求信息。 + * @throws ValidationException 发送HTTP请求成功,验证微信支付返回签名失败。 + * @throws ServiceException 发送HTTP请求成功,服务返回异常。例如返回状态码小于200或大于等于300。 + * @throws MalformedMessageException 服务返回成功,content-type不为application/json、解析返回体失败。 + */ + public SubsidyReturnReceipt subsidyReturn(SubsidyReturnRequest request) { + String requestPath = + "https://api.mch.weixin.qq.com/v3/marketing/busifavor/subsidy/return-receipts"; + SubsidyReturnRequest realRequest = request; + if (this.hostName != null) { + requestPath = requestPath.replaceFirst(HostName.API.getValue(), hostName.getValue()); + } + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(Constant.ACCEPT, MediaType.APPLICATION_JSON.getValue()); + headers.addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()); + HttpRequest httpRequest = + new HttpRequest.Builder() + .httpMethod(HttpMethod.POST) + .url(requestPath) + .headers(headers) + .body(createRequestBody(realRequest)) + .build(); + HttpResponse httpResponse = + httpClient.execute(httpRequest, SubsidyReturnReceipt.class); + return httpResponse.getServiceResponse(); + } + + private RequestBody createRequestBody(Object request) { + return new JsonRequestBody.Builder().body(toJson(request)).build(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AssociateTradeInfoRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AssociateTradeInfoRequest.java new file mode 100644 index 00000000..da52c20c --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AssociateTradeInfoRequest.java @@ -0,0 +1,77 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** AssociateTradeInfoRequest */ +public class AssociateTradeInfoRequest { + /** 批次号 说明:微信为每个商家券批次分配的唯一ID,对于商户自定义code的批次,关联请求必须填写批次号 */ + @SerializedName("stock_id") + private String stockId; + /** 券code 说明:券的唯一标识 */ + @SerializedName("coupon_code") + private String couponCode; + /** 关联的商户订单号 说明:微信支付下单时的商户订单号,欲与该商家券关联的微信支付 */ + @SerializedName("out_trade_no") + private String outTradeNo; + /** 请求业务单据号 说明:商户创建批次凭据号(格式:商户ID+日期+流水号),商户侧需保持唯一性,可包含英文字母,数字,|,\\_,\\*,-等内容,不允许出现其他不合法符号。 */ + @SerializedName("out_request_no") + private String outRequestNo; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getCouponCode() { + return couponCode; + } + + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + + public String getOutTradeNo() { + return outTradeNo; + } + + public void setOutTradeNo(String outTradeNo) { + this.outTradeNo = outTradeNo; + } + + public String getOutRequestNo() { + return outRequestNo; + } + + public void setOutRequestNo(String outRequestNo) { + this.outRequestNo = outRequestNo; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssociateTradeInfoRequest {\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" couponCode: ").append(toIndentedString(couponCode)).append("\n"); + sb.append(" outTradeNo: ").append(toIndentedString(outTradeNo)).append("\n"); + sb.append(" outRequestNo: ").append(toIndentedString(outRequestNo)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AssociateTradeInfoResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AssociateTradeInfoResponse.java new file mode 100644 index 00000000..97f6f91f --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AssociateTradeInfoResponse.java @@ -0,0 +1,47 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** AssociateTradeInfoResponse */ +public class AssociateTradeInfoResponse { + /** + * 关联成功时间 + * 说明:系统关联券成功的时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/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秒。 + */ + @SerializedName("wechatpay_associate_time") + private String wechatpayAssociateTime; + + public String getWechatpayAssociateTime() { + return wechatpayAssociateTime; + } + + public void setWechatpayAssociateTime(String wechatpayAssociateTime) { + this.wechatpayAssociateTime = wechatpayAssociateTime; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssociateTradeInfoResponse {\n"); + sb.append(" wechatpayAssociateTime: ") + .append(toIndentedString(wechatpayAssociateTime)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AvailableCurrentDayTime.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AvailableCurrentDayTime.java new file mode 100644 index 00000000..17ff41d0 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AvailableCurrentDayTime.java @@ -0,0 +1,53 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** AvailableCurrentDayTime */ +public class AvailableCurrentDayTime { + /** 当天可用开始时间 说明:当天可用开始时间 单位秒 1代表当天0点0分1秒 */ + @SerializedName("begin_time") + private Long beginTime; + /** 当天可用结束时间 说明:当天可用结束时间 单位秒 86399代表当天23点59分59秒 */ + @SerializedName("end_time") + private Long endTime; + + public Long getBeginTime() { + return beginTime; + } + + public void setBeginTime(Long beginTime) { + this.beginTime = beginTime; + } + + public Long getEndTime() { + return endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AvailableCurrentDayTime {\n"); + sb.append(" beginTime: ").append(toIndentedString(beginTime)).append("\n"); + sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AvailableWeek.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AvailableWeek.java new file mode 100644 index 00000000..7a4a7e4b --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AvailableWeek.java @@ -0,0 +1,54 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; +import java.util.List; + +/** AvailableWeek */ +public class AvailableWeek { + /** 可用星期数 说明:0代表周日,1代表周一,以此类推 当填写available_day_time时,week_day必填 */ + @SerializedName("week_day") + private List weekDay; + /** 当天可用时间段 说明:可以填写多个时间段,最多不超过2个 */ + @SerializedName("available_day_time") + private List availableDayTime; + + public List getWeekDay() { + return weekDay; + } + + public void setWeekDay(List weekDay) { + this.weekDay = weekDay; + } + + public List getAvailableDayTime() { + return availableDayTime; + } + + public void setAvailableDayTime(List availableDayTime) { + this.availableDayTime = availableDayTime; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AvailableWeek {\n"); + sb.append(" weekDay: ").append(toIndentedString(weekDay)).append("\n"); + sb.append(" availableDayTime: ").append(toIndentedString(availableDayTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/BusiFavorStockType.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/BusiFavorStockType.java new file mode 100644 index 00000000..70887b99 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/BusiFavorStockType.java @@ -0,0 +1,27 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import com.google.gson.annotations.SerializedName; + +/** BusiFavorStockType */ +public enum BusiFavorStockType { + @SerializedName("NORMAL") + NORMAL, + + @SerializedName("DISCOUNT") + DISCOUNT, + + @SerializedName("EXCHANGE") + EXCHANGE +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CodeDisplayMode.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CodeDisplayMode.java new file mode 100644 index 00000000..71939056 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CodeDisplayMode.java @@ -0,0 +1,27 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import com.google.gson.annotations.SerializedName; + +/** CodeDisplayMode */ +public enum CodeDisplayMode { + @SerializedName("NOT_SHOW") + NOT_SHOW, + + @SerializedName("BARCODE") + BARCODE, + + @SerializedName("QRCODE") + QRCODE +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeCount.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeCount.java new file mode 100644 index 00000000..8f7023bf --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeCount.java @@ -0,0 +1,53 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** CouponCodeCount */ +public class CouponCodeCount { + /** 该批次总共已上传的code总数 说明:该批次总共已上传的code总数 */ + @SerializedName("total_count") + private Long totalCount; + /** 该批次当前可用的code数 说明:该批次当前可用的code数 */ + @SerializedName("available_count") + private Long availableCount; + + public Long getTotalCount() { + return totalCount; + } + + public void setTotalCount(Long totalCount) { + this.totalCount = totalCount; + } + + public Long getAvailableCount() { + return availableCount; + } + + public void setAvailableCount(Long availableCount) { + this.availableCount = availableCount; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CouponCodeCount {\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append(" availableCount: ").append(toIndentedString(availableCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeEntity.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeEntity.java new file mode 100644 index 00000000..0a3e0ebc --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeEntity.java @@ -0,0 +1,116 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** CouponCodeEntity */ +public class CouponCodeEntity { + /** 商户上传code 说明:商户上传code */ + @SerializedName("code") + private String code; + /** 商户上传code分配状态 说明:商户上传code分配状态 */ + @SerializedName("code_status") + private CouponCodeStatus codeStatus; + /** 上传时间 说明:code上传成功的时间 */ + @SerializedName("upload_time") + private String uploadTime; + /** 被分配时间 说明:当code状态为被分配时,code被分配的时间 */ + @SerializedName("dispatched_time") + private String dispatchedTime; + /** 领券用户的OpenID 说明:领券用户的OpenID */ + @SerializedName("openid") + private String openid; + /** + * 领券用户的UnionID + * 说明:领券用户的UnionID,具体参见https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/union-id.html + */ + @SerializedName("unionid") + private String unionid; + /** 用户券code 说明:券的唯一标识 */ + @SerializedName("coupon_code") + private String couponCode; + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public CouponCodeStatus getCodeStatus() { + return codeStatus; + } + + public void setCodeStatus(CouponCodeStatus codeStatus) { + this.codeStatus = codeStatus; + } + + public String getUploadTime() { + return uploadTime; + } + + public void setUploadTime(String uploadTime) { + this.uploadTime = uploadTime; + } + + public String getDispatchedTime() { + return dispatchedTime; + } + + public void setDispatchedTime(String dispatchedTime) { + this.dispatchedTime = dispatchedTime; + } + + public String getOpenid() { + return openid; + } + + public void setOpenid(String openid) { + this.openid = openid; + } + + public String getUnionid() { + return unionid; + } + + public void setUnionid(String unionid) { + this.unionid = unionid; + } + + public String getCouponCode() { + return couponCode; + } + + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CouponCodeEntity {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" codeStatus: ").append(toIndentedString(codeStatus)).append("\n"); + sb.append(" uploadTime: ").append(toIndentedString(uploadTime)).append("\n"); + sb.append(" dispatchedTime: ").append(toIndentedString(dispatchedTime)).append("\n"); + sb.append(" openid: ").append(toIndentedString(openid)).append("\n"); + sb.append(" unionid: ").append(toIndentedString(unionid)).append("\n"); + sb.append(" couponCode: ").append(toIndentedString(couponCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeInfoRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeInfoRequest.java new file mode 100644 index 00000000..47133e0f --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeInfoRequest.java @@ -0,0 +1,69 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +/** CouponCodeInfoRequest */ +public class CouponCodeInfoRequest { + /** 批次号 说明:商家券批次号 */ + @SerializedName("stock_id") + @Expose(serialize = false) + private String stockId; + /** 商户上传code 说明:商户上传code */ + @SerializedName("coupon_code") + @Expose(serialize = false) + private String couponCode; + /** 公众账号ID 说明:公众账号ID */ + @SerializedName("appid") + @Expose(serialize = false) + private String appid; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getCouponCode() { + return couponCode; + } + + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + + public String getAppid() { + return appid; + } + + public void setAppid(String appid) { + this.appid = appid; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CouponCodeInfoRequest {\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" couponCode: ").append(toIndentedString(couponCode)).append("\n"); + sb.append(" appid: ").append(toIndentedString(appid)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeInfoResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeInfoResponse.java new file mode 100644 index 00000000..6a44ca5c --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeInfoResponse.java @@ -0,0 +1,53 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** CouponCodeInfoResponse */ +public class CouponCodeInfoResponse { + /** 商户上传code信息 说明:商户上传code信息,含状态,上传时间等 */ + @SerializedName("code_information") + private CouponCodeEntity codeInformation; + /** 用户券信息 说明:用户券信息,仅当商户上传code的状态为DISPATCHED时返回券详情 */ + @SerializedName("coupon_information") + private CouponEntity couponInformation; + + public CouponCodeEntity getCodeInformation() { + return codeInformation; + } + + public void setCodeInformation(CouponCodeEntity codeInformation) { + this.codeInformation = codeInformation; + } + + public CouponEntity getCouponInformation() { + return couponInformation; + } + + public void setCouponInformation(CouponEntity couponInformation) { + this.couponInformation = couponInformation; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CouponCodeInfoResponse {\n"); + sb.append(" codeInformation: ").append(toIndentedString(codeInformation)).append("\n"); + sb.append(" couponInformation: ").append(toIndentedString(couponInformation)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeListResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeListResponse.java new file mode 100644 index 00000000..1c9884df --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeListResponse.java @@ -0,0 +1,90 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; +import java.util.List; + +/** CouponCodeListResponse */ +public class CouponCodeListResponse { + /** 批次号 说明:商家券批次号 */ + @SerializedName("stock_id") + private String stockId; + /** 总数 说明:该批次已上传code总个数 */ + @SerializedName("total_count") + private Long totalCount; + /** 查询code结果列表 说明:查询code的结果列表 */ + @SerializedName("data") + private List data; + /** 分页起始位置 说明:分页起始位置,与请求相同 */ + @SerializedName("offset") + private Long offset; + /** 返回数据的个数 说明:返回数据的实际个数 */ + @SerializedName("limit") + private Long limit; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public Long getTotalCount() { + return totalCount; + } + + public void setTotalCount(Long totalCount) { + this.totalCount = totalCount; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public Long getOffset() { + return offset; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getLimit() { + return limit; + } + + public void setLimit(Long limit) { + this.limit = limit; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CouponCodeListResponse {\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeMode.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeMode.java new file mode 100644 index 00000000..d2158e6c --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeMode.java @@ -0,0 +1,27 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import com.google.gson.annotations.SerializedName; + +/** CouponCodeMode */ +public enum CouponCodeMode { + @SerializedName("WECHATPAY_MODE") + WECHATPAY_MODE, + + @SerializedName("MERCHANT_API") + MERCHANT_API, + + @SerializedName("MERCHANT_UPLOAD") + MERCHANT_UPLOAD +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeStatus.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeStatus.java new file mode 100644 index 00000000..e5dd3901 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeStatus.java @@ -0,0 +1,24 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import com.google.gson.annotations.SerializedName; + +/** CouponCodeStatus */ +public enum CouponCodeStatus { + @SerializedName("AVAILABLE") + AVAILABLE, + + @SerializedName("DISPATCHED") + DISPATCHED +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponEntity.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponEntity.java new file mode 100644 index 00000000..37ad8430 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponEntity.java @@ -0,0 +1,335 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** CouponEntity */ +public class CouponEntity { + /** 批次归属商户号 说明:代金券的所属商户号 */ + @SerializedName("belong_merchant") + private String belongMerchant; + /** 商家券批次名称 说明:批次名称,字数上限为21个,一个中文汉字/英文字母/数字均占用一个字数。 */ + @SerializedName("stock_name") + private String stockName; + /** 批次备注 说明:仅配置商户可见,用于自定义信息。字数上限为20个,一个中文汉字/英文字母/数字均占用一个字数。 */ + @SerializedName("comment") + private String comment; + /** 适用商品范围 说明:适用商品范围,字数上限为15个,一个中文汉字/英文字母/数字均占用一个字数。 */ + @SerializedName("goods_name") + private String goodsName; + /** 批次类型 说明:批次类型 */ + @SerializedName("stock_type") + private BusiFavorStockType stockType; + /** 是否允许转赠 说明:不填默认否,枚举值: true:是 false:否 该字段暂未开放 */ + @SerializedName("transferable") + private Boolean transferable; + /** 是否允许分享领券链接 说明:不填默认否,枚举值: true:是 false:否 该字段暂未开放 */ + @SerializedName("shareable") + private Boolean shareable; + /** 券状态 说明:商家券状态 */ + @SerializedName("coupon_state") + private CouponStatus couponState; + /** 样式信息 说明: */ + @SerializedName("display_pattern_info") + private DisplayPatternInfo displayPatternInfo; + /** 券核销规则 说明: */ + @SerializedName("coupon_use_rule") + private CouponUseRule couponUseRule; + /** 自定义入口 说明: */ + @SerializedName("custom_entrance") + private CustomEntrance customEntrance; + /** 券code 说明:券的唯一标识 */ + @SerializedName("coupon_code") + private String couponCode; + /** 批次号 说明:批次号 */ + @SerializedName("stock_id") + private String stockId; + /** + * 券可使用开始时间 说明:用户领取到的这张券实际可使用的开始时间:如批次设置的领取后可用,则开始时间即为券的领取时间; 如批次设置的领取后第X天可用,则为领取时间后第X天00:00:00 + */ + @SerializedName("available_start_time") + private String availableStartTime; + /** 券过期时间 说明:用户领取到这张券的过期时间 */ + @SerializedName("expire_time") + private String expireTime; + /** 券领取时间 说明:用户领取到这张券的时间 */ + @SerializedName("receive_time") + private String receiveTime; + /** 发券请求单号 说明:发券时传入的唯一凭证 */ + @SerializedName("send_request_no") + private String sendRequestNo; + /** 核销请求单号 说明:核销时传入的唯一凭证(如券已被核销,将返回此字段) */ + @SerializedName("use_request_no") + private String useRequestNo; + /** 券核销时间 说明:券被核销的时间(如券已被核销,将返回此字段) */ + @SerializedName("use_time") + private String useTime; + /** 关联的商户订单号 说明:若商家券操作过关联商户订单信息,则该字段返回商家券已关联的商户订单号。 */ + @SerializedName("associate_out_trade_no") + private String associateOutTradeNo; + /** 回退请求单号 说明:回退时传入的唯一凭证(如券发生了退回,将返回此字段) */ + @SerializedName("return_request_no") + private String returnRequestNo; + /** 券回退时间 说明:券被回退的时间(如券发生了退回,将返回此字段) */ + @SerializedName("return_time") + private String returnTime; + /** 失效请求单号 说明:失效时传入的唯一凭证(如果一张券已失效,将返回此字段) */ + @SerializedName("deactivate_request_no") + private String deactivateRequestNo; + /** 券失效时间 说明:券被失效的时间(如果一张券已失效,将返回此字段) */ + @SerializedName("deactivate_time") + private String deactivateTime; + /** 失效原因 说明:失效一张券的原因(如果一张券已失效,可能返回此字段) */ + @SerializedName("deactivate_reason") + private String deactivateReason; + + public String getBelongMerchant() { + return belongMerchant; + } + + public void setBelongMerchant(String belongMerchant) { + this.belongMerchant = belongMerchant; + } + + public String getStockName() { + return stockName; + } + + public void setStockName(String stockName) { + this.stockName = stockName; + } + + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName; + } + + public BusiFavorStockType getStockType() { + return stockType; + } + + public void setStockType(BusiFavorStockType stockType) { + this.stockType = stockType; + } + + public Boolean getTransferable() { + return transferable; + } + + public void setTransferable(Boolean transferable) { + this.transferable = transferable; + } + + public Boolean getShareable() { + return shareable; + } + + public void setShareable(Boolean shareable) { + this.shareable = shareable; + } + + public CouponStatus getCouponState() { + return couponState; + } + + public void setCouponState(CouponStatus couponState) { + this.couponState = couponState; + } + + public DisplayPatternInfo getDisplayPatternInfo() { + return displayPatternInfo; + } + + public void setDisplayPatternInfo(DisplayPatternInfo displayPatternInfo) { + this.displayPatternInfo = displayPatternInfo; + } + + public CouponUseRule getCouponUseRule() { + return couponUseRule; + } + + public void setCouponUseRule(CouponUseRule couponUseRule) { + this.couponUseRule = couponUseRule; + } + + public CustomEntrance getCustomEntrance() { + return customEntrance; + } + + public void setCustomEntrance(CustomEntrance customEntrance) { + this.customEntrance = customEntrance; + } + + public String getCouponCode() { + return couponCode; + } + + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getAvailableStartTime() { + return availableStartTime; + } + + public void setAvailableStartTime(String availableStartTime) { + this.availableStartTime = availableStartTime; + } + + public String getExpireTime() { + return expireTime; + } + + public void setExpireTime(String expireTime) { + this.expireTime = expireTime; + } + + public String getReceiveTime() { + return receiveTime; + } + + public void setReceiveTime(String receiveTime) { + this.receiveTime = receiveTime; + } + + public String getSendRequestNo() { + return sendRequestNo; + } + + public void setSendRequestNo(String sendRequestNo) { + this.sendRequestNo = sendRequestNo; + } + + public String getUseRequestNo() { + return useRequestNo; + } + + public void setUseRequestNo(String useRequestNo) { + this.useRequestNo = useRequestNo; + } + + public String getUseTime() { + return useTime; + } + + public void setUseTime(String useTime) { + this.useTime = useTime; + } + + public String getAssociateOutTradeNo() { + return associateOutTradeNo; + } + + public void setAssociateOutTradeNo(String associateOutTradeNo) { + this.associateOutTradeNo = associateOutTradeNo; + } + + public String getReturnRequestNo() { + return returnRequestNo; + } + + public void setReturnRequestNo(String returnRequestNo) { + this.returnRequestNo = returnRequestNo; + } + + public String getReturnTime() { + return returnTime; + } + + public void setReturnTime(String returnTime) { + this.returnTime = returnTime; + } + + public String getDeactivateRequestNo() { + return deactivateRequestNo; + } + + public void setDeactivateRequestNo(String deactivateRequestNo) { + this.deactivateRequestNo = deactivateRequestNo; + } + + public String getDeactivateTime() { + return deactivateTime; + } + + public void setDeactivateTime(String deactivateTime) { + this.deactivateTime = deactivateTime; + } + + public String getDeactivateReason() { + return deactivateReason; + } + + public void setDeactivateReason(String deactivateReason) { + this.deactivateReason = deactivateReason; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CouponEntity {\n"); + sb.append(" belongMerchant: ").append(toIndentedString(belongMerchant)).append("\n"); + sb.append(" stockName: ").append(toIndentedString(stockName)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" goodsName: ").append(toIndentedString(goodsName)).append("\n"); + sb.append(" stockType: ").append(toIndentedString(stockType)).append("\n"); + sb.append(" transferable: ").append(toIndentedString(transferable)).append("\n"); + sb.append(" shareable: ").append(toIndentedString(shareable)).append("\n"); + sb.append(" couponState: ").append(toIndentedString(couponState)).append("\n"); + sb.append(" displayPatternInfo: ").append(toIndentedString(displayPatternInfo)).append("\n"); + sb.append(" couponUseRule: ").append(toIndentedString(couponUseRule)).append("\n"); + sb.append(" customEntrance: ").append(toIndentedString(customEntrance)).append("\n"); + sb.append(" couponCode: ").append(toIndentedString(couponCode)).append("\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" availableStartTime: ").append(toIndentedString(availableStartTime)).append("\n"); + sb.append(" expireTime: ").append(toIndentedString(expireTime)).append("\n"); + sb.append(" receiveTime: ").append(toIndentedString(receiveTime)).append("\n"); + sb.append(" sendRequestNo: ").append(toIndentedString(sendRequestNo)).append("\n"); + sb.append(" useRequestNo: ").append(toIndentedString(useRequestNo)).append("\n"); + sb.append(" useTime: ").append(toIndentedString(useTime)).append("\n"); + sb.append(" associateOutTradeNo: ") + .append(toIndentedString(associateOutTradeNo)) + .append("\n"); + sb.append(" returnRequestNo: ").append(toIndentedString(returnRequestNo)).append("\n"); + sb.append(" returnTime: ").append(toIndentedString(returnTime)).append("\n"); + sb.append(" deactivateRequestNo: ") + .append(toIndentedString(deactivateRequestNo)) + .append("\n"); + sb.append(" deactivateTime: ").append(toIndentedString(deactivateTime)).append("\n"); + sb.append(" deactivateReason: ").append(toIndentedString(deactivateReason)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponListResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponListResponse.java new file mode 100644 index 00000000..90266707 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponListResponse.java @@ -0,0 +1,78 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; +import java.util.List; + +/** CouponListResponse */ +public class CouponListResponse { + /** 结果集 */ + @SerializedName("data") + private List data; + /** 总数量 说明:总数量 */ + @SerializedName("total_count") + private Integer totalCount; + /** 分页大小 说明:分页大小 */ + @SerializedName("limit") + private Integer limit; + /** 分页页码 说明:分页页码 */ + @SerializedName("offset") + private Integer offset; + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } + + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getOffset() { + return offset; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CouponListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponSendGovCardRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponSendGovCardRequest.java new file mode 100644 index 00000000..b3e5bd5c --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponSendGovCardRequest.java @@ -0,0 +1,80 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** CouponSendGovCardRequest */ +public class CouponSendGovCardRequest { + /** 消费卡card_id创建方AppID 说明:消费卡cardi\\_d创建方的AppID,需与API调用方商户号有绑定关系,入参中的用户OpenID也需用此AppID生成 */ + @SerializedName("appid") + private String appid; + /** 用户OpenID 说明:待发券用户的OpenID,需为消费卡创建方AppID生成的OpenID */ + @SerializedName("openid") + private String openid; + /** 商户单据号 说明:商户此次发放凭据号。推荐使用大小写字母和数字,不同添加请求发放凭据号不同,商户侧需保证同一发券请求的out_request_no+send_time唯一性 */ + @SerializedName("out_request_no") + private String outRequestNo; + /** + * 请求发卡时间 + * 说明:单次请求发卡时间,消费卡在商户系统的实际发放时间,为东八区标准时间(UTC+8)。商户需保证同一次请求的out_request_no+send_time唯一。由于系统限制,暂不支持传入早于当前时间24小时以上的时间进行发券请求。 + */ + @SerializedName("send_time") + private String sendTime; + + public String getAppid() { + return appid; + } + + public void setAppid(String appid) { + this.appid = appid; + } + + public String getOpenid() { + return openid; + } + + public void setOpenid(String openid) { + this.openid = openid; + } + + public String getOutRequestNo() { + return outRequestNo; + } + + public void setOutRequestNo(String outRequestNo) { + this.outRequestNo = outRequestNo; + } + + public String getSendTime() { + return sendTime; + } + + public void setSendTime(String sendTime) { + this.sendTime = sendTime; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CouponSendGovCardRequest {\n"); + sb.append(" appid: ").append(toIndentedString(appid)).append("\n"); + sb.append(" openid: ").append(toIndentedString(openid)).append("\n"); + sb.append(" outRequestNo: ").append(toIndentedString(outRequestNo)).append("\n"); + sb.append(" sendTime: ").append(toIndentedString(sendTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponSendGovCardResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponSendGovCardResponse.java new file mode 100644 index 00000000..ea1f9901 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponSendGovCardResponse.java @@ -0,0 +1,41 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** CouponSendGovCardResponse */ +public class CouponSendGovCardResponse { + /** 消费卡code 说明:消费卡card_id下的code */ + @SerializedName("card_code") + private String cardCode; + + public String getCardCode() { + return cardCode; + } + + public void setCardCode(String cardCode) { + this.cardCode = cardCode; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CouponSendGovCardResponse {\n"); + sb.append(" cardCode: ").append(toIndentedString(cardCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponStatus.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponStatus.java new file mode 100644 index 00000000..c911171c --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponStatus.java @@ -0,0 +1,33 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import com.google.gson.annotations.SerializedName; + +/** CouponStatus */ +public enum CouponStatus { + @SerializedName("SENDED") + SENDED, + + @SerializedName("USED") + USED, + + @SerializedName("EXPIRED") + EXPIRED, + + @SerializedName("DELETED") + DELETED, + + @SerializedName("DEACTIVATED") + DEACTIVATED +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponUseMethod.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponUseMethod.java new file mode 100644 index 00000000..0b3c969d --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponUseMethod.java @@ -0,0 +1,30 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import com.google.gson.annotations.SerializedName; + +/** CouponUseMethod */ +public enum CouponUseMethod { + @SerializedName("OFF_LINE") + OFF_LINE, + + @SerializedName("MINI_PROGRAMS") + MINI_PROGRAMS, + + @SerializedName("SELF_CONSUME") + SELF_CONSUME, + + @SerializedName("PAYMENT_CODE") + PAYMENT_CODE +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponUseRule.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponUseRule.java new file mode 100644 index 00000000..0b3bf3f0 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponUseRule.java @@ -0,0 +1,115 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** CouponUseRule */ +public class CouponUseRule { + /** 券可核销时间 说明:日期区间内可以使用优惠 */ + @SerializedName("coupon_available_time") + private FavorAvailableTime couponAvailableTime; + /** 固定面额满减券使用规则 说明:固定面额满减,折扣券,换购券使用规则三选一,stock_type为NORMAL时必填。 */ + @SerializedName("fixed_normal_coupon") + private FixedValueStockMsg fixedNormalCoupon; + /** 折扣券使用规则 说明:固定面额满减,折扣券,换购券使用规则三选一,stock_type为DISCOUNT时必填。 */ + @SerializedName("discount_coupon") + private DiscountMsg discountCoupon; + /** 换购券使用规则 说明:固定面额满减,折扣券,换购券使用规则三选一,stock_type为EXCHANGE时必填。 */ + @SerializedName("exchange_coupon") + private ExchangeMsg exchangeCoupon; + /** 核销方式 说明:核销方式 */ + @SerializedName("use_method") + private CouponUseMethod useMethod; + /** 小程序AppID 说明:核销方式为线上小程序核销才有效 */ + @SerializedName("mini_programs_appid") + private String miniProgramsAppid; + /** 小程序path 说明:核销方式为线上小程序核销才有效 */ + @SerializedName("mini_programs_path") + private String miniProgramsPath; + + public FavorAvailableTime getCouponAvailableTime() { + return couponAvailableTime; + } + + public void setCouponAvailableTime(FavorAvailableTime couponAvailableTime) { + this.couponAvailableTime = couponAvailableTime; + } + + public FixedValueStockMsg getFixedNormalCoupon() { + return fixedNormalCoupon; + } + + public void setFixedNormalCoupon(FixedValueStockMsg fixedNormalCoupon) { + this.fixedNormalCoupon = fixedNormalCoupon; + } + + public DiscountMsg getDiscountCoupon() { + return discountCoupon; + } + + public void setDiscountCoupon(DiscountMsg discountCoupon) { + this.discountCoupon = discountCoupon; + } + + public ExchangeMsg getExchangeCoupon() { + return exchangeCoupon; + } + + public void setExchangeCoupon(ExchangeMsg exchangeCoupon) { + this.exchangeCoupon = exchangeCoupon; + } + + public CouponUseMethod getUseMethod() { + return useMethod; + } + + public void setUseMethod(CouponUseMethod useMethod) { + this.useMethod = useMethod; + } + + public String getMiniProgramsAppid() { + return miniProgramsAppid; + } + + public void setMiniProgramsAppid(String miniProgramsAppid) { + this.miniProgramsAppid = miniProgramsAppid; + } + + public String getMiniProgramsPath() { + return miniProgramsPath; + } + + public void setMiniProgramsPath(String miniProgramsPath) { + this.miniProgramsPath = miniProgramsPath; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CouponUseRule {\n"); + sb.append(" couponAvailableTime: ") + .append(toIndentedString(couponAvailableTime)) + .append("\n"); + sb.append(" fixedNormalCoupon: ").append(toIndentedString(fixedNormalCoupon)).append("\n"); + sb.append(" discountCoupon: ").append(toIndentedString(discountCoupon)).append("\n"); + sb.append(" exchangeCoupon: ").append(toIndentedString(exchangeCoupon)).append("\n"); + sb.append(" useMethod: ").append(toIndentedString(useMethod)).append("\n"); + sb.append(" miniProgramsAppid: ").append(toIndentedString(miniProgramsAppid)).append("\n"); + sb.append(" miniProgramsPath: ").append(toIndentedString(miniProgramsPath)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CreateBusiFavorStockRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CreateBusiFavorStockRequest.java new file mode 100644 index 00000000..0b3e247c --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CreateBusiFavorStockRequest.java @@ -0,0 +1,189 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** CreateBusiFavorStockRequest */ +public class CreateBusiFavorStockRequest { + /** 商家券批次名称 说明:批次名称,字数上限为21个,一个中文汉字/英文字母/数字均占用一个字数。 */ + @SerializedName("stock_name") + private String stockName; + /** 批次归属商户号 说明:批次归属于哪个商户。 注: 普通直连模式,该参数为直连商户号; 服务商模式,该参数为子商户号; 间连模式,该参数为子商户号。 */ + @SerializedName("belong_merchant") + private String belongMerchant; + /** 批次备注 说明:仅配置商户可见,用于自定义信息。字数上限为20个,一个中文汉字/英文字母/数字均占用一个字数。 */ + @SerializedName("comment") + private String comment; + /** 适用商品范围 说明:用来描述批次在哪些商品可用,会显示在微信卡包中。字数上限为15个,一个中文汉字/英文字母/数字均占用一个字数。 */ + @SerializedName("goods_name") + private String goodsName; + /** 批次类型 说明:批次类型 */ + @SerializedName("stock_type") + private BusiFavorStockType stockType; + /** 核销规则 说明:券核销相关规则 */ + @SerializedName("coupon_use_rule") + private CouponUseRule couponUseRule; + /** 发放规则 说明:券发放相关规则 */ + @SerializedName("stock_send_rule") + private StockSendRule stockSendRule; + /** 商户请求单号 说明:商户创建批次凭据号(格式:商户ID+日期+流水号),商户侧需保持唯一性 */ + @SerializedName("out_request_no") + private String outRequestNo; + /** 自定义入口 说明:卡详情页面,可选择多种入口引导用户 */ + @SerializedName("custom_entrance") + private CustomEntrance customEntrance; + /** 样式信息 说明:创建批次时的样式信息。 */ + @SerializedName("display_pattern_info") + private DisplayPatternInfo displayPatternInfo; + /** + * 券code模式 说明:特殊规则: 1、券code模式为WECHATPAY\\_MODE时,是微信自动分配券code,商户不需要预存code;适用于多种场景 + * 2、券code模式为MERCHANT\\_API时,无需调用上传预存code接口,调用发券接口时需指定券code;更多用在商家自有流量场景(例如:商家自有小程序、H5网页等) + * 3、券code模式为MERCHANT\\_UPLOAD,需要调用上传预存code接口上传code,调用发券接口时无需指定code;更多适用在微信支付平台流量场景(例如:支付有礼、支付有优惠等) + */ + @SerializedName("coupon_code_mode") + private CouponCodeMode couponCodeMode; + /** 事件通知配置 说明:事件回调通知商户的配置 */ + @SerializedName("notify_config") + private NotifyConfig notifyConfig; + /** 是否允许营销补差 说明:该批次发放的券是否允许进行补差,默认为false 注:该字段暂未开放 */ + @SerializedName("subsidy") + private Boolean subsidy; + + public String getStockName() { + return stockName; + } + + public void setStockName(String stockName) { + this.stockName = stockName; + } + + public String getBelongMerchant() { + return belongMerchant; + } + + public void setBelongMerchant(String belongMerchant) { + this.belongMerchant = belongMerchant; + } + + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName; + } + + public BusiFavorStockType getStockType() { + return stockType; + } + + public void setStockType(BusiFavorStockType stockType) { + this.stockType = stockType; + } + + public CouponUseRule getCouponUseRule() { + return couponUseRule; + } + + public void setCouponUseRule(CouponUseRule couponUseRule) { + this.couponUseRule = couponUseRule; + } + + public StockSendRule getStockSendRule() { + return stockSendRule; + } + + public void setStockSendRule(StockSendRule stockSendRule) { + this.stockSendRule = stockSendRule; + } + + public String getOutRequestNo() { + return outRequestNo; + } + + public void setOutRequestNo(String outRequestNo) { + this.outRequestNo = outRequestNo; + } + + public CustomEntrance getCustomEntrance() { + return customEntrance; + } + + public void setCustomEntrance(CustomEntrance customEntrance) { + this.customEntrance = customEntrance; + } + + public DisplayPatternInfo getDisplayPatternInfo() { + return displayPatternInfo; + } + + public void setDisplayPatternInfo(DisplayPatternInfo displayPatternInfo) { + this.displayPatternInfo = displayPatternInfo; + } + + public CouponCodeMode getCouponCodeMode() { + return couponCodeMode; + } + + public void setCouponCodeMode(CouponCodeMode couponCodeMode) { + this.couponCodeMode = couponCodeMode; + } + + public NotifyConfig getNotifyConfig() { + return notifyConfig; + } + + public void setNotifyConfig(NotifyConfig notifyConfig) { + this.notifyConfig = notifyConfig; + } + + public Boolean getSubsidy() { + return subsidy; + } + + public void setSubsidy(Boolean subsidy) { + this.subsidy = subsidy; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBusiFavorStockRequest {\n"); + sb.append(" stockName: ").append(toIndentedString(stockName)).append("\n"); + sb.append(" belongMerchant: ").append(toIndentedString(belongMerchant)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" goodsName: ").append(toIndentedString(goodsName)).append("\n"); + sb.append(" stockType: ").append(toIndentedString(stockType)).append("\n"); + sb.append(" couponUseRule: ").append(toIndentedString(couponUseRule)).append("\n"); + sb.append(" stockSendRule: ").append(toIndentedString(stockSendRule)).append("\n"); + sb.append(" outRequestNo: ").append(toIndentedString(outRequestNo)).append("\n"); + sb.append(" customEntrance: ").append(toIndentedString(customEntrance)).append("\n"); + sb.append(" displayPatternInfo: ").append(toIndentedString(displayPatternInfo)).append("\n"); + sb.append(" couponCodeMode: ").append(toIndentedString(couponCodeMode)).append("\n"); + sb.append(" notifyConfig: ").append(toIndentedString(notifyConfig)).append("\n"); + sb.append(" subsidy: ").append(toIndentedString(subsidy)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CreateBusiFavorStockResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CreateBusiFavorStockResponse.java new file mode 100644 index 00000000..bef46084 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CreateBusiFavorStockResponse.java @@ -0,0 +1,57 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** CreateBusiFavorStockResponse */ +public class CreateBusiFavorStockResponse { + /** 批次号 说明:批次号 */ + @SerializedName("stock_id") + private String stockId; + /** + * 创建时间 + * 说明:创建时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/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秒。 + */ + @SerializedName("create_time") + private String createTime; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBusiFavorStockResponse {\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" createTime: ").append(toIndentedString(createTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CustomEntrance.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CustomEntrance.java new file mode 100644 index 00000000..15aa20cd --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CustomEntrance.java @@ -0,0 +1,99 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** CustomEntrance */ +public class CustomEntrance { + /** + * 小程序入口 说明:需要小程序APPID、path、入口文案、引导文案。如果需要跳转小程序,APPID、path、入口文案为必填,引导文案非必填。 AppID要与归属商户号有M-A or + * M-m-suba关系。 + * 注:请查看[绑定关系说明文档](https://pay.weixin.qq.com/wiki/doc/apiv3/open/pay/chapter5_2_2.shtml#part-7) + */ + @SerializedName("mini_programs_info") + private MiniAppInfo miniProgramsInfo; + /** + * 商户公众号AppID 说明:可配置商户公众号,从券详情可跳转至公众号,用户自定义字段。 校验规则:传入的AppID得是与调用方商户号(即请求头里面的商户号)有绑定关系的AppID 或 + * 传入的AppID得是归属商户号有绑定关系的AppID + */ + @SerializedName("appid") + private String appid; + /** + * 更多优惠入口;营销馆创建地址:https://pay.weixin.qq.com/index.php/xphp/cfav_market/hall#/pages/list/list + * 说明:填写微信支付营销馆的馆ID,用户自定义字段。[营销馆](https://pay.weixin.qq.com/index.php/xphp/cfav_market/hall#/pages/list/list)需在商户平台创建。 + */ + @SerializedName("hall_id") + private String hallId; + /** 可用门店ID 说明:填写代金券可用门店ID */ + @SerializedName("store_id") + private String storeId; + /** code展示模式 说明:code展示模式 */ + @SerializedName("code_display_mode") + private CodeDisplayMode codeDisplayMode; + + public MiniAppInfo getMiniProgramsInfo() { + return miniProgramsInfo; + } + + public void setMiniProgramsInfo(MiniAppInfo miniProgramsInfo) { + this.miniProgramsInfo = miniProgramsInfo; + } + + public String getAppid() { + return appid; + } + + public void setAppid(String appid) { + this.appid = appid; + } + + public String getHallId() { + return hallId; + } + + public void setHallId(String hallId) { + this.hallId = hallId; + } + + public String getStoreId() { + return storeId; + } + + public void setStoreId(String storeId) { + this.storeId = storeId; + } + + public CodeDisplayMode getCodeDisplayMode() { + return codeDisplayMode; + } + + public void setCodeDisplayMode(CodeDisplayMode codeDisplayMode) { + this.codeDisplayMode = codeDisplayMode; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomEntrance {\n"); + sb.append(" miniProgramsInfo: ").append(toIndentedString(miniProgramsInfo)).append("\n"); + sb.append(" appid: ").append(toIndentedString(appid)).append("\n"); + sb.append(" hallId: ").append(toIndentedString(hallId)).append("\n"); + sb.append(" storeId: ").append(toIndentedString(storeId)).append("\n"); + sb.append(" codeDisplayMode: ").append(toIndentedString(codeDisplayMode)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeactivateCouponRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeactivateCouponRequest.java new file mode 100644 index 00000000..4118696b --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeactivateCouponRequest.java @@ -0,0 +1,79 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** DeactivateCouponRequest */ +public class DeactivateCouponRequest { + /** 券code 说明:券的唯一标识 */ + @SerializedName("coupon_code") + private String couponCode; + /** 批次号 说明:券的所属批次号 */ + @SerializedName("stock_id") + private String stockId; + /** 失效请求单据号 说明:每次失效请求的唯一标识,商户需保证唯一 */ + @SerializedName("deactivate_request_no") + private String deactivateRequestNo; + /** 失效原因 说明:商户失效券的原因 */ + @SerializedName("deactivate_reason") + private String deactivateReason; + + public String getCouponCode() { + return couponCode; + } + + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getDeactivateRequestNo() { + return deactivateRequestNo; + } + + public void setDeactivateRequestNo(String deactivateRequestNo) { + this.deactivateRequestNo = deactivateRequestNo; + } + + public String getDeactivateReason() { + return deactivateReason; + } + + public void setDeactivateReason(String deactivateReason) { + this.deactivateReason = deactivateReason; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeactivateCouponRequest {\n"); + sb.append(" couponCode: ").append(toIndentedString(couponCode)).append("\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" deactivateRequestNo: ") + .append(toIndentedString(deactivateRequestNo)) + .append("\n"); + sb.append(" deactivateReason: ").append(toIndentedString(deactivateReason)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeactivateCouponResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeactivateCouponResponse.java new file mode 100644 index 00000000..c882d0d1 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeactivateCouponResponse.java @@ -0,0 +1,47 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** DeactivateCouponResponse */ +public class DeactivateCouponResponse { + /** + * 系统失效成功的时间 + * 说明:系统券成功失效的时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/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秒。 + */ + @SerializedName("wechatpay_deactivate_time") + private String wechatpayDeactivateTime; + + public String getWechatpayDeactivateTime() { + return wechatpayDeactivateTime; + } + + public void setWechatpayDeactivateTime(String wechatpayDeactivateTime) { + this.wechatpayDeactivateTime = wechatpayDeactivateTime; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeactivateCouponResponse {\n"); + sb.append(" wechatpayDeactivateTime: ") + .append(toIndentedString(wechatpayDeactivateTime)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeleteCouponCodeRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeleteCouponCodeRequest.java new file mode 100644 index 00000000..dedc40a8 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeleteCouponCodeRequest.java @@ -0,0 +1,69 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +/** DeleteCouponCodeRequest */ +public class DeleteCouponCodeRequest { + /** 批次号 说明:商家券批次号 */ + @SerializedName("stock_id") + @Expose(serialize = false) + private String stockId; + /** 券code 说明:上传的自定义code */ + @SerializedName("coupon_code") + @Expose(serialize = false) + private String couponCode; + /** 请求业务单据号 说明:商户删除code的凭据号,商户侧需保持唯一性 */ + @SerializedName("delete_request_no") + @Expose(serialize = false) + private String deleteRequestNo; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getCouponCode() { + return couponCode; + } + + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + + public String getDeleteRequestNo() { + return deleteRequestNo; + } + + public void setDeleteRequestNo(String deleteRequestNo) { + this.deleteRequestNo = deleteRequestNo; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteCouponCodeRequest {\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" couponCode: ").append(toIndentedString(couponCode)).append("\n"); + sb.append(" deleteRequestNo: ").append(toIndentedString(deleteRequestNo)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeleteCouponCodeResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeleteCouponCodeResponse.java new file mode 100644 index 00000000..2239b3c0 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeleteCouponCodeResponse.java @@ -0,0 +1,53 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** DeleteCouponCodeResponse */ +public class DeleteCouponCodeResponse { + /** 批次号 说明:商家券批次号 */ + @SerializedName("stock_id") + private String stockId; + /** 删除时间 说明:商家券code实际被删除的时间 */ + @SerializedName("delete_time") + private String deleteTime; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getDeleteTime() { + return deleteTime; + } + + public void setDeleteTime(String deleteTime) { + this.deleteTime = deleteTime; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteCouponCodeResponse {\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" deleteTime: ").append(toIndentedString(deleteTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisassociateTradeInfoRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisassociateTradeInfoRequest.java new file mode 100644 index 00000000..341d0b9f --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisassociateTradeInfoRequest.java @@ -0,0 +1,77 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** DisassociateTradeInfoRequest */ +public class DisassociateTradeInfoRequest { + /** 批次号 说明:微信为每个商家券批次分配的唯一ID, 对于商户自定义code的批次,关联请求必须填写批次号 */ + @SerializedName("stock_id") + private String stockId; + /** 券code 说明:券的唯一标识 */ + @SerializedName("coupon_code") + private String couponCode; + /** 取消关联的商户订单号 说明:欲取消与商家券关联的微信支付下单的商户订单号,该单号需要已操作过与券关联,否则无法取消关联 */ + @SerializedName("out_trade_no") + private String outTradeNo; + /** 请求业务单据号 说明:商户创建批次凭据号(格式:商户ID+日期+流水号),商户侧需保持唯一性,可包含英文字母,数字,|,_,*,-等内容,不允许出现其他不合法符号。 */ + @SerializedName("out_request_no") + private String outRequestNo; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getCouponCode() { + return couponCode; + } + + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + + public String getOutTradeNo() { + return outTradeNo; + } + + public void setOutTradeNo(String outTradeNo) { + this.outTradeNo = outTradeNo; + } + + public String getOutRequestNo() { + return outRequestNo; + } + + public void setOutRequestNo(String outRequestNo) { + this.outRequestNo = outRequestNo; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisassociateTradeInfoRequest {\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" couponCode: ").append(toIndentedString(couponCode)).append("\n"); + sb.append(" outTradeNo: ").append(toIndentedString(outTradeNo)).append("\n"); + sb.append(" outRequestNo: ").append(toIndentedString(outRequestNo)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisassociateTradeInfoResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisassociateTradeInfoResponse.java new file mode 100644 index 00000000..7d3f22b3 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisassociateTradeInfoResponse.java @@ -0,0 +1,47 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** DisassociateTradeInfoResponse */ +public class DisassociateTradeInfoResponse { + /** + * 取消关联券成功时间 + * 说明:系统成功取消商家券与订单信息关联关系的时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/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秒。 + */ + @SerializedName("wechatpay_disassociate_time") + private String wechatpayDisassociateTime; + + public String getWechatpayDisassociateTime() { + return wechatpayDisassociateTime; + } + + public void setWechatpayDisassociateTime(String wechatpayDisassociateTime) { + this.wechatpayDisassociateTime = wechatpayDisassociateTime; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisassociateTradeInfoResponse {\n"); + sb.append(" wechatpayDisassociateTime: ") + .append(toIndentedString(wechatpayDisassociateTime)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DiscountMsg.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DiscountMsg.java new file mode 100644 index 00000000..64003db7 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DiscountMsg.java @@ -0,0 +1,53 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** DiscountMsg */ +public class DiscountMsg { + /** 折扣比例 说明:折扣百分比,88为88折 */ + @SerializedName("discount_percent") + private Integer discountPercent; + /** 消费门槛 说明:消费门槛,单位:分。 特殊规则:取值范围 1 ≤ value ≤ 10000000 */ + @SerializedName("transaction_minimum") + private Long transactionMinimum; + + public Integer getDiscountPercent() { + return discountPercent; + } + + public void setDiscountPercent(Integer discountPercent) { + this.discountPercent = discountPercent; + } + + public Long getTransactionMinimum() { + return transactionMinimum; + } + + public void setTransactionMinimum(Long transactionMinimum) { + this.transactionMinimum = transactionMinimum; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DiscountMsg {\n"); + sb.append(" discountPercent: ").append(toIndentedString(discountPercent)).append("\n"); + sb.append(" transactionMinimum: ").append(toIndentedString(transactionMinimum)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisplayPatternInfo.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisplayPatternInfo.java new file mode 100644 index 00000000..6fa6f4d6 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisplayPatternInfo.java @@ -0,0 +1,115 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** DisplayPatternInfo */ +public class DisplayPatternInfo { + /** 使用须知 说明:用于说明详细的活动规则,会展示在代金券详情页。 */ + @SerializedName("description") + private String description; + /** + * 商户logo + * 说明:若券归属商户号有认证品牌,则系统将自动拉取对应品牌logo;若券归属商户号不在认证品牌下,需自定义上传logo,未上传时将展示兜底灰色logo样式,影响券详情页用户体验,请及时上传。 + * 商户logo的URL地址,仅支持通过《[图片上传API](https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter9_0_1.shtml)》接口获取的图片URL地址。 + * 1、商户logo大小需为120像素\\*120像素。 2、支持JPG/JPEG/PNG格式,且图片小于1M。 注:该字段暂不支持修改 + */ + @SerializedName("merchant_logo_url") + private String merchantLogoUrl; + /** + * 商户名称 说明:不支持商户自定义。若券归属商户号有认证品牌,系统将自动拉取认证品牌号下的品牌名称;若券归属商户号不在认证品牌下,则拉取本商户号的商户简称。展示上限12个字符。 + * 注:该字段暂不支持修改 + */ + @SerializedName("merchant_name") + private String merchantName; + /** + * 背景颜色 + * 说明:券的背景颜色,可设置10种颜色,色值请参考[卡券背景颜色图](https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter9_2_1.shtml#part-01)。颜色取值为颜色图中的颜色名称。 + */ + @SerializedName("background_color") + private String backgroundColor; + /** + * 券详情图片 + * 说明:券详情图片,1074像素(宽)\\*603像素(高),图片大小不超过2M,支持JPG/PNG格式。仅支持通过《[图片上传API](https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter9_0_1.shtml)》接口获取的图片URL地址。 + */ + @SerializedName("coupon_image_url") + private String couponImageUrl; + /** 视频号相关信息 说明:视频号相关信息 */ + @SerializedName("finder_info") + private FinderInfo finderInfo; + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getMerchantLogoUrl() { + return merchantLogoUrl; + } + + public void setMerchantLogoUrl(String merchantLogoUrl) { + this.merchantLogoUrl = merchantLogoUrl; + } + + public String getMerchantName() { + return merchantName; + } + + public void setMerchantName(String merchantName) { + this.merchantName = merchantName; + } + + public String getBackgroundColor() { + return backgroundColor; + } + + public void setBackgroundColor(String backgroundColor) { + this.backgroundColor = backgroundColor; + } + + public String getCouponImageUrl() { + return couponImageUrl; + } + + public void setCouponImageUrl(String couponImageUrl) { + this.couponImageUrl = couponImageUrl; + } + + public FinderInfo getFinderInfo() { + return finderInfo; + } + + public void setFinderInfo(FinderInfo finderInfo) { + this.finderInfo = finderInfo; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisplayPatternInfo {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" merchantLogoUrl: ").append(toIndentedString(merchantLogoUrl)).append("\n"); + sb.append(" merchantName: ").append(toIndentedString(merchantName)).append("\n"); + sb.append(" backgroundColor: ").append(toIndentedString(backgroundColor)).append("\n"); + sb.append(" couponImageUrl: ").append(toIndentedString(couponImageUrl)).append("\n"); + sb.append(" finderInfo: ").append(toIndentedString(finderInfo)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ExchangeMsg.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ExchangeMsg.java new file mode 100644 index 00000000..418eb9f7 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ExchangeMsg.java @@ -0,0 +1,53 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** ExchangeMsg */ +public class ExchangeMsg { + /** 单品换购价 说明:单品换购价,单位:分。 特殊规则:取值范围 0 ≤ value ≤ 10000000 */ + @SerializedName("exchange_price") + private Long exchangePrice; + /** 消费门槛 说明:消费门槛,单位:分。 特殊规则:取值范围 1 ≤ value ≤ 10000000 */ + @SerializedName("transaction_minimum") + private Long transactionMinimum; + + public Long getExchangePrice() { + return exchangePrice; + } + + public void setExchangePrice(Long exchangePrice) { + this.exchangePrice = exchangePrice; + } + + public Long getTransactionMinimum() { + return transactionMinimum; + } + + public void setTransactionMinimum(Long transactionMinimum) { + this.transactionMinimum = transactionMinimum; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExchangeMsg {\n"); + sb.append(" exchangePrice: ").append(toIndentedString(exchangePrice)).append("\n"); + sb.append(" transactionMinimum: ").append(toIndentedString(transactionMinimum)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FavorAvailableTime.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FavorAvailableTime.java new file mode 100644 index 00000000..f4bdbdb6 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FavorAvailableTime.java @@ -0,0 +1,122 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; +import java.util.List; + +/** FavorAvailableTime */ +public class FavorAvailableTime { + /** + * 开始时间 + * 说明:批次开始时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/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秒。 注意:商家券有效期最长为1年。 + */ + @SerializedName("available_begin_time") + private String availableBeginTime; + /** + * 结束时间 + * 说明:批次结束时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/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秒。 注意:商家券有效期最长为1年。 + */ + @SerializedName("available_end_time") + private String availableEndTime; + /** + * 生效后N天内有效 + * 说明:日期区间内,券生效后x天内有效。例如生效当天内有效填1,生效后2天内有效填2,以此类推……注意,用户在有效期开始前领取商家券,则从有效期第1天开始计算天数,用户在有效期内领取商家券,则从领取当天开始计算天数,无论用户何时领取商家券,商家券在活动有效期结束后均不可用。可配合wait_days_after_receive一同填写,也可单独填写。单独填写时,有效期内领券后立即生效,生效后x天内有效。 + */ + @SerializedName("available_day_after_receive") + private Integer availableDayAfterReceive; + /** 固定周期有效时间段 说明:可以设置多个星期下的多个可用时间段,比如每周二10点到18点 */ + @SerializedName("available_week") + private AvailableWeek availableWeek; + /** 无规律的有效时间段 说明:无规律的有效时间,多个无规律时间段 */ + @SerializedName("irregulary_avaliable_time") + private List irregularyAvaliableTime; + /** + * 领取后N天开始生效 + * 说明:日期区间内,用户领券后需等待x天开始生效。例如领券后当天开始生效则无需填写,领券后第2天开始生效填1,以此类推……用户在有效期开始前领取商家券,则从有效期第1天开始计算天数,用户在有效期内领取商家券,则从领取当天开始计算天数。无论用户何时领取商家券,商家券在活动有效期结束后均不可用。需配合available_day_after_receive一同填写,不可单独填写。注:最大不能超过30天 + */ + @SerializedName("wait_days_after_receive") + private Integer waitDaysAfterReceive; + + public String getAvailableBeginTime() { + return availableBeginTime; + } + + public void setAvailableBeginTime(String availableBeginTime) { + this.availableBeginTime = availableBeginTime; + } + + public String getAvailableEndTime() { + return availableEndTime; + } + + public void setAvailableEndTime(String availableEndTime) { + this.availableEndTime = availableEndTime; + } + + public Integer getAvailableDayAfterReceive() { + return availableDayAfterReceive; + } + + public void setAvailableDayAfterReceive(Integer availableDayAfterReceive) { + this.availableDayAfterReceive = availableDayAfterReceive; + } + + public AvailableWeek getAvailableWeek() { + return availableWeek; + } + + public void setAvailableWeek(AvailableWeek availableWeek) { + this.availableWeek = availableWeek; + } + + public List getIrregularyAvaliableTime() { + return irregularyAvaliableTime; + } + + public void setIrregularyAvaliableTime(List irregularyAvaliableTime) { + this.irregularyAvaliableTime = irregularyAvaliableTime; + } + + public Integer getWaitDaysAfterReceive() { + return waitDaysAfterReceive; + } + + public void setWaitDaysAfterReceive(Integer waitDaysAfterReceive) { + this.waitDaysAfterReceive = waitDaysAfterReceive; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FavorAvailableTime {\n"); + sb.append(" availableBeginTime: ").append(toIndentedString(availableBeginTime)).append("\n"); + sb.append(" availableEndTime: ").append(toIndentedString(availableEndTime)).append("\n"); + sb.append(" availableDayAfterReceive: ") + .append(toIndentedString(availableDayAfterReceive)) + .append("\n"); + sb.append(" availableWeek: ").append(toIndentedString(availableWeek)).append("\n"); + sb.append(" irregularyAvaliableTime: ") + .append(toIndentedString(irregularyAvaliableTime)) + .append("\n"); + sb.append(" waitDaysAfterReceive: ") + .append(toIndentedString(waitDaysAfterReceive)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FinderInfo.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FinderInfo.java new file mode 100644 index 00000000..b437dc36 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FinderInfo.java @@ -0,0 +1,76 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** FinderInfo */ +public class FinderInfo { + /** + * 视频号ID + * 说明:关联视频号将展示在优惠券详情的顶部右侧,作为跳转去视频号的入口,入参参数请配置视频号id,请前往[视频号助手](https://channels.weixin.qq.com)管理查看视频号ID + */ + @SerializedName("finder_id") + private String finderId; + /** + * 视频号视频ID + * 说明:券详情视频内容,支持配置关联视频号下的具体视频内容,入参参数请配置视频id,请前往[视频号助手](https://channels.weixin.qq.com)管理后台复制具体视频ID + */ + @SerializedName("finder_video_id") + private String finderVideoId; + /** + * 视频号封面图 说明:截取的视频号图片将在券到期提醒消息、券详情中展示。 1.图片尺寸:716像素(宽)\\*402像素(高);图片大小不超过2M,支持JPG/PNG格式。 + * 2.仅支持通过《[图片上传API](https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter9_0_1.shtml)》接口获取的图片URL地址。 + */ + @SerializedName("finder_video_cover_image_url") + private String finderVideoCoverImageUrl; + + public String getFinderId() { + return finderId; + } + + public void setFinderId(String finderId) { + this.finderId = finderId; + } + + public String getFinderVideoId() { + return finderVideoId; + } + + public void setFinderVideoId(String finderVideoId) { + this.finderVideoId = finderVideoId; + } + + public String getFinderVideoCoverImageUrl() { + return finderVideoCoverImageUrl; + } + + public void setFinderVideoCoverImageUrl(String finderVideoCoverImageUrl) { + this.finderVideoCoverImageUrl = finderVideoCoverImageUrl; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FinderInfo {\n"); + sb.append(" finderId: ").append(toIndentedString(finderId)).append("\n"); + sb.append(" finderVideoId: ").append(toIndentedString(finderVideoId)).append("\n"); + sb.append(" finderVideoCoverImageUrl: ") + .append(toIndentedString(finderVideoCoverImageUrl)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FixedValueStockMsg.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FixedValueStockMsg.java new file mode 100644 index 00000000..dbebd6dd --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FixedValueStockMsg.java @@ -0,0 +1,53 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** FixedValueStockMsg */ +public class FixedValueStockMsg { + /** 优惠金额 说明:优惠金额 单位分。 特殊规则:取值范围 1 ≤ value ≤ 10000000 */ + @SerializedName("discount_amount") + private Long discountAmount; + /** 消费门槛 说明:消费门槛,单位:分。 特殊规则:取值范围 1 ≤ value ≤ 10000000 */ + @SerializedName("transaction_minimum") + private Long transactionMinimum; + + public Long getDiscountAmount() { + return discountAmount; + } + + public void setDiscountAmount(Long discountAmount) { + this.discountAmount = discountAmount; + } + + public Long getTransactionMinimum() { + return transactionMinimum; + } + + public void setTransactionMinimum(Long transactionMinimum) { + this.transactionMinimum = transactionMinimum; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FixedValueStockMsg {\n"); + sb.append(" discountAmount: ").append(toIndentedString(discountAmount)).append("\n"); + sb.append(" transactionMinimum: ").append(toIndentedString(transactionMinimum)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/GetCouponNotifyRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/GetCouponNotifyRequest.java new file mode 100644 index 00000000..b7549049 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/GetCouponNotifyRequest.java @@ -0,0 +1,43 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +/** GetCouponNotifyRequest */ +public class GetCouponNotifyRequest { + /** 商户号 说明:商户号,不填默认查询调用方商户号 */ + @SerializedName("mchid") + @Expose(serialize = false) + private String mchid; + + public String getMchid() { + return mchid; + } + + public void setMchid(String mchid) { + this.mchid = mchid; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetCouponNotifyRequest {\n"); + sb.append(" mchid: ").append(toIndentedString(mchid)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/GetCouponNotifyResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/GetCouponNotifyResponse.java new file mode 100644 index 00000000..a25ce7c5 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/GetCouponNotifyResponse.java @@ -0,0 +1,53 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** GetCouponNotifyResponse */ +public class GetCouponNotifyResponse { + /** 商户号 说明:商户号 */ + @SerializedName("mchid") + private String mchid; + /** 通知URL地址 说明:商户提供的用于接收商家券事件通知的URL地址,必须支持HTTPS。 */ + @SerializedName("notify_url") + private String notifyUrl; + + public String getMchid() { + return mchid; + } + + public void setMchid(String mchid) { + this.mchid = mchid; + } + + public String getNotifyUrl() { + return notifyUrl; + } + + public void setNotifyUrl(String notifyUrl) { + this.notifyUrl = notifyUrl; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetCouponNotifyResponse {\n"); + sb.append(" mchid: ").append(toIndentedString(mchid)).append("\n"); + sb.append(" notifyUrl: ").append(toIndentedString(notifyUrl)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/IrregularAvailableTime.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/IrregularAvailableTime.java new file mode 100644 index 00000000..65cd6aa3 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/IrregularAvailableTime.java @@ -0,0 +1,61 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** IrregularAvailableTime */ +public class IrregularAvailableTime { + /** + * 开始时间 + * 说明:开始时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/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秒。 + */ + @SerializedName("begin_time") + private String beginTime; + /** + * 结束时间 + * 说明:结束时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/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秒。 + */ + @SerializedName("end_time") + private String endTime; + + public String getBeginTime() { + return beginTime; + } + + public void setBeginTime(String beginTime) { + this.beginTime = beginTime; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IrregularAvailableTime {\n"); + sb.append(" beginTime: ").append(toIndentedString(beginTime)).append("\n"); + sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ListCouponsByFilterRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ListCouponsByFilterRequest.java new file mode 100644 index 00000000..ffb90898 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ListCouponsByFilterRequest.java @@ -0,0 +1,153 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +/** ListCouponsByFilterRequest */ +public class ListCouponsByFilterRequest { + /** + * 用户标识 说明:Openid信息,用户在AppID下的唯一标识。 + * 校验规则:传入的OpenID得是调用方商户号(即请求头里面的商户号)有绑定关系的AppID获取的OpenID或传入的OpenID得是归属商户号有绑定关系的AppID获取的OpenID。[获取OpenID文档](https://pay.weixin.qq.com/wiki/doc/apiv3/terms_definition/chapter1_1_3.shtml#part-3) + */ + @SerializedName("openid") + @Expose(serialize = false) + private String openid; + /** + * 公众账号ID 说明:支持传入与当前调用接口商户号有绑定关系的AppID。支持小程序AppID与公众号AppID。 + * 校验规则:传入的AppID得是与调用方商户号(即请求头里面的商户号)有绑定关系的AppID 或 传入的AppID得是归属商户号有绑定关系的AppID + */ + @SerializedName("appid") + @Expose(serialize = false) + private String appid; + /** 批次号 说明:批次号,是否指定批次号查询 */ + @SerializedName("stock_id") + @Expose(serialize = false) + private String stockId; + /** 创建批次的商户号 说明:批次创建方商户号 校验规则:当调用方商户号(即请求头中的商户号)为创建批次方商户号时,该参数必传 */ + @SerializedName("creator_merchant") + @Expose(serialize = false) + private String creatorMerchant; + /** 批次归属商户号 说明:批次归属商户号 校验规则:当调用方商户号(即请求头中的商户号)为批次归属商户号时,该参数必传 */ + @SerializedName("belong_merchant") + @Expose(serialize = false) + private String belongMerchant; + /** 批次发放商户号 说明:批次发放商户号 校验规则:当调用方商户号(即请求头中的商户号)为批次发放商户号时,该参数必传;委托营销关系下,请填写委托发券的商户号 */ + @SerializedName("sender_merchant") + @Expose(serialize = false) + private String senderMerchant; + /** 分页页码 说明:分页页码 */ + @SerializedName("offset") + @Expose(serialize = false) + private Integer offset; + /** 分页大小 说明:分页大小 */ + @SerializedName("limit") + @Expose(serialize = false) + private Integer limit; + /** 券状态 说明:商家券状态 */ + @SerializedName("coupon_state") + @Expose(serialize = false) + private CouponStatus couponState; + + public String getOpenid() { + return openid; + } + + public void setOpenid(String openid) { + this.openid = openid; + } + + public String getAppid() { + return appid; + } + + public void setAppid(String appid) { + this.appid = appid; + } + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getCreatorMerchant() { + return creatorMerchant; + } + + public void setCreatorMerchant(String creatorMerchant) { + this.creatorMerchant = creatorMerchant; + } + + public String getBelongMerchant() { + return belongMerchant; + } + + public void setBelongMerchant(String belongMerchant) { + this.belongMerchant = belongMerchant; + } + + public String getSenderMerchant() { + return senderMerchant; + } + + public void setSenderMerchant(String senderMerchant) { + this.senderMerchant = senderMerchant; + } + + public Integer getOffset() { + return offset; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public CouponStatus getCouponState() { + return couponState; + } + + public void setCouponState(CouponStatus couponState) { + this.couponState = couponState; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListCouponsByFilterRequest {\n"); + sb.append(" openid: ").append(toIndentedString(openid)).append("\n"); + sb.append(" appid: ").append(toIndentedString(appid)).append("\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" creatorMerchant: ").append(toIndentedString(creatorMerchant)).append("\n"); + sb.append(" belongMerchant: ").append(toIndentedString(belongMerchant)).append("\n"); + sb.append(" senderMerchant: ").append(toIndentedString(senderMerchant)).append("\n"); + sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" couponState: ").append(toIndentedString(couponState)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/MiniAppInfo.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/MiniAppInfo.java new file mode 100644 index 00000000..a13c0f12 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/MiniAppInfo.java @@ -0,0 +1,80 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** MiniAppInfo */ +public class MiniAppInfo { + /** + * 商家小程序AppID 说明:商家小程序AppID要与归属商户号有M-A or M-m-suba关系。 + * 校验规则:传入的AppID得是与调用方商户号(即请求头里面的商户号)有绑定关系的AppID 或 传入的AppID得是归属商户号有绑定关系的AppID + */ + @SerializedName("mini_programs_appid") + private String miniProgramsAppid; + /** 商家小程序path 说明:商家小程序path */ + @SerializedName("mini_programs_path") + private String miniProgramsPath; + /** 入口文案 说明:入口文案,字数上限为5个,一个中文汉字/英文字母/数字均占用一个字数。 */ + @SerializedName("entrance_words") + private String entranceWords; + /** 引导文案 说明:小程序入口引导文案,用户自定义字段。字数上限为6个,一个中文汉字/英文字母/数字均占用一个字数。 */ + @SerializedName("guiding_words") + private String guidingWords; + + public String getMiniProgramsAppid() { + return miniProgramsAppid; + } + + public void setMiniProgramsAppid(String miniProgramsAppid) { + this.miniProgramsAppid = miniProgramsAppid; + } + + public String getMiniProgramsPath() { + return miniProgramsPath; + } + + public void setMiniProgramsPath(String miniProgramsPath) { + this.miniProgramsPath = miniProgramsPath; + } + + public String getEntranceWords() { + return entranceWords; + } + + public void setEntranceWords(String entranceWords) { + this.entranceWords = entranceWords; + } + + public String getGuidingWords() { + return guidingWords; + } + + public void setGuidingWords(String guidingWords) { + this.guidingWords = guidingWords; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MiniAppInfo {\n"); + sb.append(" miniProgramsAppid: ").append(toIndentedString(miniProgramsAppid)).append("\n"); + sb.append(" miniProgramsPath: ").append(toIndentedString(miniProgramsPath)).append("\n"); + sb.append(" entranceWords: ").append(toIndentedString(entranceWords)).append("\n"); + sb.append(" guidingWords: ").append(toIndentedString(guidingWords)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetBody.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetBody.java new file mode 100644 index 00000000..98708583 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetBody.java @@ -0,0 +1,106 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** ModifyBudgetBody */ +public class ModifyBudgetBody { + /** + * 目标批次最大发放个数 说明:批次最大发放个数,target\\_max\\_coupons与target\\_max\\_coupons\\_by\\_day只能修改一个 + * 注:目标批次即修改后的批次 + */ + @SerializedName("target_max_coupons") + private Long targetMaxCoupons; + /** + * 当前批次最大发放个数 说明:当前批次最大发放个数,当传入target\\_max\\_coupons大于0时,current\\_max\\_coupons必传 注:当前批次即未修改的批次 + */ + @SerializedName("current_max_coupons") + private Long currentMaxCoupons; + /** + * 目标单天发放上限个数 说明:单天发放上限个数,target\\_max\\_coupons与target\\_max\\_coupons\\_by\\_day只能修改一个 + * 注:目标批次即修改后的批次 + */ + @SerializedName("target_max_coupons_by_day") + private Long targetMaxCouponsByDay; + /** + * 当前单天发放上限个数 说明:当前单天发放上限个数 + * ,当传入target\\_max\\_coupons\\_by\\_day大于0时,current\\_max\\_coupons\\_by\\_day必填 注:当前批次即未修改的批次 + */ + @SerializedName("current_max_coupons_by_day") + private Long currentMaxCouponsByDay; + /** 修改预算请求单据号 说明:修改预算请求单据号 */ + @SerializedName("modify_budget_request_no") + private String modifyBudgetRequestNo; + + public Long getTargetMaxCoupons() { + return targetMaxCoupons; + } + + public void setTargetMaxCoupons(Long targetMaxCoupons) { + this.targetMaxCoupons = targetMaxCoupons; + } + + public Long getCurrentMaxCoupons() { + return currentMaxCoupons; + } + + public void setCurrentMaxCoupons(Long currentMaxCoupons) { + this.currentMaxCoupons = currentMaxCoupons; + } + + public Long getTargetMaxCouponsByDay() { + return targetMaxCouponsByDay; + } + + public void setTargetMaxCouponsByDay(Long targetMaxCouponsByDay) { + this.targetMaxCouponsByDay = targetMaxCouponsByDay; + } + + public Long getCurrentMaxCouponsByDay() { + return currentMaxCouponsByDay; + } + + public void setCurrentMaxCouponsByDay(Long currentMaxCouponsByDay) { + this.currentMaxCouponsByDay = currentMaxCouponsByDay; + } + + public String getModifyBudgetRequestNo() { + return modifyBudgetRequestNo; + } + + public void setModifyBudgetRequestNo(String modifyBudgetRequestNo) { + this.modifyBudgetRequestNo = modifyBudgetRequestNo; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModifyBudgetBody {\n"); + sb.append(" targetMaxCoupons: ").append(toIndentedString(targetMaxCoupons)).append("\n"); + sb.append(" currentMaxCoupons: ").append(toIndentedString(currentMaxCoupons)).append("\n"); + sb.append(" targetMaxCouponsByDay: ") + .append(toIndentedString(targetMaxCouponsByDay)) + .append("\n"); + sb.append(" currentMaxCouponsByDay: ") + .append(toIndentedString(currentMaxCouponsByDay)) + .append("\n"); + sb.append(" modifyBudgetRequestNo: ") + .append(toIndentedString(modifyBudgetRequestNo)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetRequest.java new file mode 100644 index 00000000..d0632f86 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetRequest.java @@ -0,0 +1,120 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +/** ModifyBudgetRequest */ +public class ModifyBudgetRequest { + /** 批次号 说明:批次号 */ + @SerializedName("stock_id") + @Expose(serialize = false) + private String stockId; + /** + * 目标批次最大发放个数 说明:批次最大发放个数,target\\_max\\_coupons与target\\_max\\_coupons\\_by\\_day只能修改一个 + * 注:目标批次即修改后的批次 + */ + @SerializedName("target_max_coupons") + private Long targetMaxCoupons; + /** + * 当前批次最大发放个数 说明:当前批次最大发放个数,当传入target\\_max\\_coupons大于0时,current\\_max\\_coupons必传 注:当前批次即未修改的批次 + */ + @SerializedName("current_max_coupons") + private Long currentMaxCoupons; + /** + * 目标单天发放上限个数 说明:单天发放上限个数,target\\_max\\_coupons与target\\_max\\_coupons\\_by\\_day只能修改一个 + * 注:目标批次即修改后的批次 + */ + @SerializedName("target_max_coupons_by_day") + private Long targetMaxCouponsByDay; + /** + * 当前单天发放上限个数 说明:当前单天发放上限个数 + * ,当传入target\\_max\\_coupons\\_by\\_day大于0时,current\\_max\\_coupons\\_by\\_day必填 注:当前批次即未修改的批次 + */ + @SerializedName("current_max_coupons_by_day") + private Long currentMaxCouponsByDay; + /** 修改预算请求单据号 说明:修改预算请求单据号 */ + @SerializedName("modify_budget_request_no") + private String modifyBudgetRequestNo; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public Long getTargetMaxCoupons() { + return targetMaxCoupons; + } + + public void setTargetMaxCoupons(Long targetMaxCoupons) { + this.targetMaxCoupons = targetMaxCoupons; + } + + public Long getCurrentMaxCoupons() { + return currentMaxCoupons; + } + + public void setCurrentMaxCoupons(Long currentMaxCoupons) { + this.currentMaxCoupons = currentMaxCoupons; + } + + public Long getTargetMaxCouponsByDay() { + return targetMaxCouponsByDay; + } + + public void setTargetMaxCouponsByDay(Long targetMaxCouponsByDay) { + this.targetMaxCouponsByDay = targetMaxCouponsByDay; + } + + public Long getCurrentMaxCouponsByDay() { + return currentMaxCouponsByDay; + } + + public void setCurrentMaxCouponsByDay(Long currentMaxCouponsByDay) { + this.currentMaxCouponsByDay = currentMaxCouponsByDay; + } + + public String getModifyBudgetRequestNo() { + return modifyBudgetRequestNo; + } + + public void setModifyBudgetRequestNo(String modifyBudgetRequestNo) { + this.modifyBudgetRequestNo = modifyBudgetRequestNo; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModifyBudgetRequest {\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" targetMaxCoupons: ").append(toIndentedString(targetMaxCoupons)).append("\n"); + sb.append(" currentMaxCoupons: ").append(toIndentedString(currentMaxCoupons)).append("\n"); + sb.append(" targetMaxCouponsByDay: ") + .append(toIndentedString(targetMaxCouponsByDay)) + .append("\n"); + sb.append(" currentMaxCouponsByDay: ") + .append(toIndentedString(currentMaxCouponsByDay)) + .append("\n"); + sb.append(" modifyBudgetRequestNo: ") + .append(toIndentedString(modifyBudgetRequestNo)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetResponse.java new file mode 100644 index 00000000..15817863 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetResponse.java @@ -0,0 +1,53 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** ModifyBudgetResponse */ +public class ModifyBudgetResponse { + /** 批次当前最大发放个数 说明:批次最大发放个数 */ + @SerializedName("max_coupons") + private Long maxCoupons; + /** 当前单天发放上限个数 说明:当前单天发放上限个数 */ + @SerializedName("max_coupons_by_day") + private Long maxCouponsByDay; + + public Long getMaxCoupons() { + return maxCoupons; + } + + public void setMaxCoupons(Long maxCoupons) { + this.maxCoupons = maxCoupons; + } + + public Long getMaxCouponsByDay() { + return maxCouponsByDay; + } + + public void setMaxCouponsByDay(Long maxCouponsByDay) { + this.maxCouponsByDay = maxCouponsByDay; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModifyBudgetResponse {\n"); + sb.append(" maxCoupons: ").append(toIndentedString(maxCoupons)).append("\n"); + sb.append(" maxCouponsByDay: ").append(toIndentedString(maxCouponsByDay)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyCouponUseRule.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyCouponUseRule.java new file mode 100644 index 00000000..b1a8e522 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyCouponUseRule.java @@ -0,0 +1,65 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** ModifyCouponUseRule */ +public class ModifyCouponUseRule { + /** 核销方式 说明:核销方式 */ + @SerializedName("use_method") + private CouponUseMethod useMethod; + /** 小程序AppID 说明:核销方式为线上小程序核销才有效 */ + @SerializedName("mini_programs_appid") + private String miniProgramsAppid; + /** 小程序path 说明:核销方式为线上小程序核销才有效 */ + @SerializedName("mini_programs_path") + private String miniProgramsPath; + + public CouponUseMethod getUseMethod() { + return useMethod; + } + + public void setUseMethod(CouponUseMethod useMethod) { + this.useMethod = useMethod; + } + + public String getMiniProgramsAppid() { + return miniProgramsAppid; + } + + public void setMiniProgramsAppid(String miniProgramsAppid) { + this.miniProgramsAppid = miniProgramsAppid; + } + + public String getMiniProgramsPath() { + return miniProgramsPath; + } + + public void setMiniProgramsPath(String miniProgramsPath) { + this.miniProgramsPath = miniProgramsPath; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModifyCouponUseRule {\n"); + sb.append(" useMethod: ").append(toIndentedString(useMethod)).append("\n"); + sb.append(" miniProgramsAppid: ").append(toIndentedString(miniProgramsAppid)).append("\n"); + sb.append(" miniProgramsPath: ").append(toIndentedString(miniProgramsPath)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyCustomEntrance.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyCustomEntrance.java new file mode 100644 index 00000000..bb60b72a --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyCustomEntrance.java @@ -0,0 +1,80 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** ModifyCustomEntrance */ +public class ModifyCustomEntrance { + /** 小程序入口 说明:需要小程序APPID、path、入口文案、引导文案。如果需要跳转小程序,APPID、path、入口文案为必填,引导文案非必填。AppID要与归属商户号有绑定关系 */ + @SerializedName("mini_programs_info") + private ModifyMiniAppInfo miniProgramsInfo; + /** 商户公众号AppID 说明:可配置商户公众号,从券详情可跳转至公众号 */ + @SerializedName("appid") + private String appid; + /** + * 更多优惠入口;营销馆创建地址:https://pay.weixin.qq.com/index.php/xphp/cfav_market/hall#/pages/list/list + * 说明:填写微信支付营销馆的馆id,用户自定义字段。[营销馆](https://pay.weixin.qq.com/index.php/xphp/cfav_market/hall#/pages/list/list)需在商户平台创建。 + */ + @SerializedName("hall_id") + private String hallId; + /** code展示模式 说明:code展示模式 */ + @SerializedName("code_display_mode") + private CodeDisplayMode codeDisplayMode; + + public ModifyMiniAppInfo getMiniProgramsInfo() { + return miniProgramsInfo; + } + + public void setMiniProgramsInfo(ModifyMiniAppInfo miniProgramsInfo) { + this.miniProgramsInfo = miniProgramsInfo; + } + + public String getAppid() { + return appid; + } + + public void setAppid(String appid) { + this.appid = appid; + } + + public String getHallId() { + return hallId; + } + + public void setHallId(String hallId) { + this.hallId = hallId; + } + + public CodeDisplayMode getCodeDisplayMode() { + return codeDisplayMode; + } + + public void setCodeDisplayMode(CodeDisplayMode codeDisplayMode) { + this.codeDisplayMode = codeDisplayMode; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModifyCustomEntrance {\n"); + sb.append(" miniProgramsInfo: ").append(toIndentedString(miniProgramsInfo)).append("\n"); + sb.append(" appid: ").append(toIndentedString(appid)).append("\n"); + sb.append(" hallId: ").append(toIndentedString(hallId)).append("\n"); + sb.append(" codeDisplayMode: ").append(toIndentedString(codeDisplayMode)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyMiniAppInfo.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyMiniAppInfo.java new file mode 100644 index 00000000..95cf5c88 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyMiniAppInfo.java @@ -0,0 +1,77 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** ModifyMiniAppInfo */ +public class ModifyMiniAppInfo { + /** 商家小程序AppID 说明:需要小程序AppID与归属商户号有绑定关系 */ + @SerializedName("mini_programs_appid") + private String miniProgramsAppid; + /** 商家小程序path 说明:商家小程序path */ + @SerializedName("mini_programs_path") + private String miniProgramsPath; + /** 入口文案 说明:入口文案,字数上限为5个,一个中文汉字/英文字母/数字均占用一个字数。 */ + @SerializedName("entrance_words") + private String entranceWords; + /** 引导文案 说明:小程序入口引导文案,字数上限为6个,一个中文汉字/英文字母/数字均占用一个字数。 */ + @SerializedName("guiding_words") + private String guidingWords; + + public String getMiniProgramsAppid() { + return miniProgramsAppid; + } + + public void setMiniProgramsAppid(String miniProgramsAppid) { + this.miniProgramsAppid = miniProgramsAppid; + } + + public String getMiniProgramsPath() { + return miniProgramsPath; + } + + public void setMiniProgramsPath(String miniProgramsPath) { + this.miniProgramsPath = miniProgramsPath; + } + + public String getEntranceWords() { + return entranceWords; + } + + public void setEntranceWords(String entranceWords) { + this.entranceWords = entranceWords; + } + + public String getGuidingWords() { + return guidingWords; + } + + public void setGuidingWords(String guidingWords) { + this.guidingWords = guidingWords; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModifyMiniAppInfo {\n"); + sb.append(" miniProgramsAppid: ").append(toIndentedString(miniProgramsAppid)).append("\n"); + sb.append(" miniProgramsPath: ").append(toIndentedString(miniProgramsPath)).append("\n"); + sb.append(" entranceWords: ").append(toIndentedString(entranceWords)).append("\n"); + sb.append(" guidingWords: ").append(toIndentedString(guidingWords)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockInfoBody.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockInfoBody.java new file mode 100644 index 00000000..08e959b3 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockInfoBody.java @@ -0,0 +1,149 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** ModifyStockInfoBody */ +public class ModifyStockInfoBody { + /** 自定义入口 说明:卡详情页面,可选择多种入口引导用户 */ + @SerializedName("custom_entrance") + private ModifyCustomEntrance customEntrance; + /** 批次名称 说明:批次名称,字数上限为21个,一个中文汉字/英文字母/数字均占用一个字数。 注:该字段暂不支持修改 */ + @SerializedName("stock_name") + private String stockName; + /** 批次备注 说明:仅配置商户可见,用于自定义信息。字数上限为20个,一个中文汉字/英文字母/数字均占用一个字数。 */ + @SerializedName("comment") + private String comment; + /** 适用商品范围 说明:用来描述批次在哪些商品可用,会显示在微信卡包中。字数上限为15个,一个中文汉字/英文字母/数字均占用一个字数。 */ + @SerializedName("goods_name") + private String goodsName; + /** 商户请求单号 说明:商户修改批次凭据号(格式:商户ID+日期+流水号),商户侧需保持唯一性。 */ + @SerializedName("out_request_no") + private String outRequestNo; + /** 样式信息 说明: */ + @SerializedName("display_pattern_info") + private DisplayPatternInfo displayPatternInfo; + /** 核销规则 说明:券核销相关规则 */ + @SerializedName("coupon_use_rule") + private ModifyCouponUseRule couponUseRule; + /** 发放规则 说明:券发放相关规则 */ + @SerializedName("stock_send_rule") + private ModifyStockSendRule stockSendRule; + /** 事件通知配置 说明:事件回调通知商户的配置 */ + @SerializedName("notify_config") + private NotifyConfig notifyConfig; + /** 是否允许营销补差 说明:该批次发放的券是否允许进行补差。只允许从false改为true,不支持从true改为false 注:该字段暂未开放 */ + @SerializedName("subsidy") + private Boolean subsidy; + + public ModifyCustomEntrance getCustomEntrance() { + return customEntrance; + } + + public void setCustomEntrance(ModifyCustomEntrance customEntrance) { + this.customEntrance = customEntrance; + } + + public String getStockName() { + return stockName; + } + + public void setStockName(String stockName) { + this.stockName = stockName; + } + + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName; + } + + public String getOutRequestNo() { + return outRequestNo; + } + + public void setOutRequestNo(String outRequestNo) { + this.outRequestNo = outRequestNo; + } + + public DisplayPatternInfo getDisplayPatternInfo() { + return displayPatternInfo; + } + + public void setDisplayPatternInfo(DisplayPatternInfo displayPatternInfo) { + this.displayPatternInfo = displayPatternInfo; + } + + public ModifyCouponUseRule getCouponUseRule() { + return couponUseRule; + } + + public void setCouponUseRule(ModifyCouponUseRule couponUseRule) { + this.couponUseRule = couponUseRule; + } + + public ModifyStockSendRule getStockSendRule() { + return stockSendRule; + } + + public void setStockSendRule(ModifyStockSendRule stockSendRule) { + this.stockSendRule = stockSendRule; + } + + public NotifyConfig getNotifyConfig() { + return notifyConfig; + } + + public void setNotifyConfig(NotifyConfig notifyConfig) { + this.notifyConfig = notifyConfig; + } + + public Boolean getSubsidy() { + return subsidy; + } + + public void setSubsidy(Boolean subsidy) { + this.subsidy = subsidy; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModifyStockInfoBody {\n"); + sb.append(" customEntrance: ").append(toIndentedString(customEntrance)).append("\n"); + sb.append(" stockName: ").append(toIndentedString(stockName)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" goodsName: ").append(toIndentedString(goodsName)).append("\n"); + sb.append(" outRequestNo: ").append(toIndentedString(outRequestNo)).append("\n"); + sb.append(" displayPatternInfo: ").append(toIndentedString(displayPatternInfo)).append("\n"); + sb.append(" couponUseRule: ").append(toIndentedString(couponUseRule)).append("\n"); + sb.append(" stockSendRule: ").append(toIndentedString(stockSendRule)).append("\n"); + sb.append(" notifyConfig: ").append(toIndentedString(notifyConfig)).append("\n"); + sb.append(" subsidy: ").append(toIndentedString(subsidy)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockInfoRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockInfoRequest.java new file mode 100644 index 00000000..6a6d2e16 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockInfoRequest.java @@ -0,0 +1,163 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +/** ModifyStockInfoRequest */ +public class ModifyStockInfoRequest { + /** 批次号 说明:批次号 */ + @SerializedName("stock_id") + @Expose(serialize = false) + private String stockId; + /** 自定义入口 说明:卡详情页面,可选择多种入口引导用户 */ + @SerializedName("custom_entrance") + private ModifyCustomEntrance customEntrance; + /** 批次名称 说明:批次名称,字数上限为21个,一个中文汉字/英文字母/数字均占用一个字数。 注:该字段暂不支持修改 */ + @SerializedName("stock_name") + private String stockName; + /** 批次备注 说明:仅配置商户可见,用于自定义信息。字数上限为20个,一个中文汉字/英文字母/数字均占用一个字数。 */ + @SerializedName("comment") + private String comment; + /** 适用商品范围 说明:用来描述批次在哪些商品可用,会显示在微信卡包中。字数上限为15个,一个中文汉字/英文字母/数字均占用一个字数。 */ + @SerializedName("goods_name") + private String goodsName; + /** 商户请求单号 说明:商户修改批次凭据号(格式:商户ID+日期+流水号),商户侧需保持唯一性。 */ + @SerializedName("out_request_no") + private String outRequestNo; + /** 样式信息 说明: */ + @SerializedName("display_pattern_info") + private DisplayPatternInfo displayPatternInfo; + /** 核销规则 说明:券核销相关规则 */ + @SerializedName("coupon_use_rule") + private ModifyCouponUseRule couponUseRule; + /** 发放规则 说明:券发放相关规则 */ + @SerializedName("stock_send_rule") + private ModifyStockSendRule stockSendRule; + /** 事件通知配置 说明:事件回调通知商户的配置 */ + @SerializedName("notify_config") + private NotifyConfig notifyConfig; + /** 是否允许营销补差 说明:该批次发放的券是否允许进行补差。只允许从false改为true,不支持从true改为false 注:该字段暂未开放 */ + @SerializedName("subsidy") + private Boolean subsidy; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public ModifyCustomEntrance getCustomEntrance() { + return customEntrance; + } + + public void setCustomEntrance(ModifyCustomEntrance customEntrance) { + this.customEntrance = customEntrance; + } + + public String getStockName() { + return stockName; + } + + public void setStockName(String stockName) { + this.stockName = stockName; + } + + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName; + } + + public String getOutRequestNo() { + return outRequestNo; + } + + public void setOutRequestNo(String outRequestNo) { + this.outRequestNo = outRequestNo; + } + + public DisplayPatternInfo getDisplayPatternInfo() { + return displayPatternInfo; + } + + public void setDisplayPatternInfo(DisplayPatternInfo displayPatternInfo) { + this.displayPatternInfo = displayPatternInfo; + } + + public ModifyCouponUseRule getCouponUseRule() { + return couponUseRule; + } + + public void setCouponUseRule(ModifyCouponUseRule couponUseRule) { + this.couponUseRule = couponUseRule; + } + + public ModifyStockSendRule getStockSendRule() { + return stockSendRule; + } + + public void setStockSendRule(ModifyStockSendRule stockSendRule) { + this.stockSendRule = stockSendRule; + } + + public NotifyConfig getNotifyConfig() { + return notifyConfig; + } + + public void setNotifyConfig(NotifyConfig notifyConfig) { + this.notifyConfig = notifyConfig; + } + + public Boolean getSubsidy() { + return subsidy; + } + + public void setSubsidy(Boolean subsidy) { + this.subsidy = subsidy; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModifyStockInfoRequest {\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" customEntrance: ").append(toIndentedString(customEntrance)).append("\n"); + sb.append(" stockName: ").append(toIndentedString(stockName)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" goodsName: ").append(toIndentedString(goodsName)).append("\n"); + sb.append(" outRequestNo: ").append(toIndentedString(outRequestNo)).append("\n"); + sb.append(" displayPatternInfo: ").append(toIndentedString(displayPatternInfo)).append("\n"); + sb.append(" couponUseRule: ").append(toIndentedString(couponUseRule)).append("\n"); + sb.append(" stockSendRule: ").append(toIndentedString(stockSendRule)).append("\n"); + sb.append(" notifyConfig: ").append(toIndentedString(notifyConfig)).append("\n"); + sb.append(" subsidy: ").append(toIndentedString(subsidy)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockSendRule.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockSendRule.java new file mode 100644 index 00000000..02ddfc93 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockSendRule.java @@ -0,0 +1,53 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** ModifyStockSendRule */ +public class ModifyStockSendRule { + /** 是否开启自然人限领 说明:true-是;false-否,不填默认否 注:该字段暂不支持修改 */ + @SerializedName("natural_person_limit") + private Boolean naturalPersonLimit; + /** 可疑账号拦截 说明:true-是;false-否,不填默认否 */ + @SerializedName("prevent_api_abuse") + private Boolean preventApiAbuse; + + public Boolean getNaturalPersonLimit() { + return naturalPersonLimit; + } + + public void setNaturalPersonLimit(Boolean naturalPersonLimit) { + this.naturalPersonLimit = naturalPersonLimit; + } + + public Boolean getPreventApiAbuse() { + return preventApiAbuse; + } + + public void setPreventApiAbuse(Boolean preventApiAbuse) { + this.preventApiAbuse = preventApiAbuse; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModifyStockSendRule {\n"); + sb.append(" naturalPersonLimit: ").append(toIndentedString(naturalPersonLimit)).append("\n"); + sb.append(" preventApiAbuse: ").append(toIndentedString(preventApiAbuse)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/NotifyConfig.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/NotifyConfig.java new file mode 100644 index 00000000..e5b5b1b6 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/NotifyConfig.java @@ -0,0 +1,44 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** NotifyConfig */ +public class NotifyConfig { + /** + * 事件通知AppID + * 说明:用于回调通知时,计算返回操作用户的OpenID(诸如领券用户),支持小程序or公众号的AppID;如该字段不填写,则回调通知中涉及到用户身份信息的OpenID与UnionID都将为空。 + */ + @SerializedName("notify_appid") + private String notifyAppid; + + public String getNotifyAppid() { + return notifyAppid; + } + + public void setNotifyAppid(String notifyAppid) { + this.notifyAppid = notifyAppid; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotifyConfig {\n"); + sb.append(" notifyAppid: ").append(toIndentedString(notifyAppid)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/PayReceiptInfoRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/PayReceiptInfoRequest.java new file mode 100644 index 00000000..430cdc84 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/PayReceiptInfoRequest.java @@ -0,0 +1,43 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +/** PayReceiptInfoRequest */ +public class PayReceiptInfoRequest { + /** 补差付款单号 说明:补差付款唯一单号,由微信支付生成,仅在补差付款成功后有返回 */ + @SerializedName("subsidy_receipt_id") + @Expose(serialize = false) + private String subsidyReceiptId; + + public String getSubsidyReceiptId() { + return subsidyReceiptId; + } + + public void setSubsidyReceiptId(String subsidyReceiptId) { + this.subsidyReceiptId = subsidyReceiptId; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PayReceiptInfoRequest {\n"); + sb.append(" subsidyReceiptId: ").append(toIndentedString(subsidyReceiptId)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/PayReceiptListRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/PayReceiptListRequest.java new file mode 100644 index 00000000..6ddf931f --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/PayReceiptListRequest.java @@ -0,0 +1,72 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +/** PayReceiptListRequest */ +public class PayReceiptListRequest { + /** 商家券批次号 说明:由微信支付生成,调用创建商家券API成功时返回的唯一批次ID */ + @SerializedName("stock_id") + @Expose(serialize = false) + private String stockId; + /** + * 商家券code 说明:券的唯一标识。 在WECHATPAY\\_MODE的券code模式下,商家券code是由微信支付生成的唯一ID; + * 在MERCHANT\\_UPLOAD、MERCHANT\\_API的券code模式下,商家券code是由商户上传或指定,在批次下保证唯一; + */ + @SerializedName("coupon_code") + @Expose(serialize = false) + private String couponCode; + /** 补差付款请求单号 说明:商户调用补差付款API时填写的“业务请求唯一单号” */ + @SerializedName("out_subsidy_no") + @Expose(serialize = false) + private String outSubsidyNo; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getCouponCode() { + return couponCode; + } + + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + + public String getOutSubsidyNo() { + return outSubsidyNo; + } + + public void setOutSubsidyNo(String outSubsidyNo) { + this.outSubsidyNo = outSubsidyNo; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PayReceiptListRequest {\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" couponCode: ").append(toIndentedString(couponCode)).append("\n"); + sb.append(" outSubsidyNo: ").append(toIndentedString(outSubsidyNo)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryCouponCodeListRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryCouponCodeListRequest.java new file mode 100644 index 00000000..1f18dcc9 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryCouponCodeListRequest.java @@ -0,0 +1,95 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +/** QueryCouponCodeListRequest */ +public class QueryCouponCodeListRequest { + /** 批次号 说明:商家券批次号 */ + @SerializedName("stock_id") + @Expose(serialize = false) + private String stockId; + /** 分页最大size 说明:分页查询的最大size */ + @SerializedName("limit") + @Expose(serialize = false) + private Long limit; + /** 分页起始位置 说明:分页查询的起始位置 */ + @SerializedName("offset") + @Expose(serialize = false) + private Long offset; + /** 公众账号ID 说明:公众账号ID */ + @SerializedName("appid") + @Expose(serialize = false) + private String appid; + /** 券code状态 说明:券code状态,当不填写时为查询所有状态的code列表 */ + @SerializedName("status") + @Expose(serialize = false) + private CouponCodeStatus status; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public Long getLimit() { + return limit; + } + + public void setLimit(Long limit) { + this.limit = limit; + } + + public Long getOffset() { + return offset; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public String getAppid() { + return appid; + } + + public void setAppid(String appid) { + this.appid = appid; + } + + public CouponCodeStatus getStatus() { + return status; + } + + public void setStatus(CouponCodeStatus status) { + this.status = status; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryCouponCodeListRequest {\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); + sb.append(" appid: ").append(toIndentedString(appid)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryCouponRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryCouponRequest.java new file mode 100644 index 00000000..3cf107d6 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryCouponRequest.java @@ -0,0 +1,75 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +/** QueryCouponRequest */ +public class QueryCouponRequest { + /** 券code 说明:券的唯一标识 */ + @SerializedName("coupon_code") + @Expose(serialize = false) + private String couponCode; + /** + * 公众账号ID 说明:支持传入与当前调用接口商户号有绑定关系的AppID。支持小程序AppID与公众号AppID。 + * 校验规则:传入的AppID得是与调用方商户号(即请求头里面的商户号)有绑定关系的AppID或传入的AppID得是归属商户号有绑定关系的AppID + */ + @SerializedName("appid") + @Expose(serialize = false) + private String appid; + /** + * 用户OpenID 说明:OpenID信息,用户在AppID下的唯一标识。 + * 校验规则:传入的OpenID得是调用方商户号(即请求头里面的商户号)有绑定关系的AppID获取的OpenID或传入的OpenID得是归属商户号有绑定关系的AppID获取的OpenID。[获取OpenID文档](https://pay.weixin.qq.com/wiki/doc/apiv3/terms_definition/chapter1_1_3.shtml#part-3) + */ + @SerializedName("openid") + @Expose(serialize = false) + private String openid; + + public String getCouponCode() { + return couponCode; + } + + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + + public String getAppid() { + return appid; + } + + public void setAppid(String appid) { + this.appid = appid; + } + + public String getOpenid() { + return openid; + } + + public void setOpenid(String openid) { + this.openid = openid; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryCouponRequest {\n"); + sb.append(" couponCode: ").append(toIndentedString(couponCode)).append("\n"); + sb.append(" appid: ").append(toIndentedString(appid)).append("\n"); + sb.append(" openid: ").append(toIndentedString(openid)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryStockRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryStockRequest.java new file mode 100644 index 00000000..f0d2bf48 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryStockRequest.java @@ -0,0 +1,43 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +/** QueryStockRequest */ +public class QueryStockRequest { + /** 批次号 说明:微信为每个商家券批次分配的唯一ID */ + @SerializedName("stock_id") + @Expose(serialize = false) + private String stockId; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryStockRequest {\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ReturnCouponRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ReturnCouponRequest.java new file mode 100644 index 00000000..3d42ad78 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ReturnCouponRequest.java @@ -0,0 +1,65 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** ReturnCouponRequest */ +public class ReturnCouponRequest { + /** 券code 说明:券的唯一标识 */ + @SerializedName("coupon_code") + private String couponCode; + /** 批次号 说明:券的所属批次号 */ + @SerializedName("stock_id") + private String stockId; + /** 退券请求单据号 说明:每次退券请求的唯一标识,商户需保证唯一 */ + @SerializedName("return_request_no") + private String returnRequestNo; + + public String getCouponCode() { + return couponCode; + } + + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getReturnRequestNo() { + return returnRequestNo; + } + + public void setReturnRequestNo(String returnRequestNo) { + this.returnRequestNo = returnRequestNo; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnCouponRequest {\n"); + sb.append(" couponCode: ").append(toIndentedString(couponCode)).append("\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" returnRequestNo: ").append(toIndentedString(returnRequestNo)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ReturnCouponResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ReturnCouponResponse.java new file mode 100644 index 00000000..ecdf475e --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ReturnCouponResponse.java @@ -0,0 +1,47 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** ReturnCouponResponse */ +public class ReturnCouponResponse { + /** + * 系统退券成功的时间 + * 说明:微信退券成功的时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/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秒。 + */ + @SerializedName("wechatpay_return_time") + private String wechatpayReturnTime; + + public String getWechatpayReturnTime() { + return wechatpayReturnTime; + } + + public void setWechatpayReturnTime(String wechatpayReturnTime) { + this.wechatpayReturnTime = wechatpayReturnTime; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnCouponResponse {\n"); + sb.append(" wechatpayReturnTime: ") + .append(toIndentedString(wechatpayReturnTime)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ReturnReceiptInfoRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ReturnReceiptInfoRequest.java new file mode 100644 index 00000000..4f4389ed --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ReturnReceiptInfoRequest.java @@ -0,0 +1,45 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +/** ReturnReceiptInfoRequest */ +public class ReturnReceiptInfoRequest { + /** 补差回退单号 说明:补差回退唯一单号,由微信支付生成,仅在补差回退成功后有返回 */ + @SerializedName("subsidy_return_receipt_id") + @Expose(serialize = false) + private String subsidyReturnReceiptId; + + public String getSubsidyReturnReceiptId() { + return subsidyReturnReceiptId; + } + + public void setSubsidyReturnReceiptId(String subsidyReturnReceiptId) { + this.subsidyReturnReceiptId = subsidyReturnReceiptId; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReturnReceiptInfoRequest {\n"); + sb.append(" subsidyReturnReceiptId: ") + .append(toIndentedString(subsidyReturnReceiptId)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCount.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCount.java new file mode 100644 index 00000000..1dab11bb --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCount.java @@ -0,0 +1,77 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** SendCount */ +public class SendCount { + /** 已发放券张数 说明:批次已发放的券数量,满减、折扣、换购类型会返回该字段 */ + @SerializedName("total_send_num") + private Long totalSendNum; + /** 已发放券金额 说明:批次已发放的预算金额,满减券类型会返回该字段 */ + @SerializedName("total_send_amount") + private Long totalSendAmount; + /** 单天已发放券张数 说明:批次当天已发放的券数量,设置了单天发放上限的满减、折扣、换购类型返回该字段 */ + @SerializedName("today_send_num") + private Long todaySendNum; + /** 单天已发放券金额 说明:批次当天已发放的预算金额,设置了当天发放上限的满减券类型返回该字段 */ + @SerializedName("today_send_amount") + private Long todaySendAmount; + + public Long getTotalSendNum() { + return totalSendNum; + } + + public void setTotalSendNum(Long totalSendNum) { + this.totalSendNum = totalSendNum; + } + + public Long getTotalSendAmount() { + return totalSendAmount; + } + + public void setTotalSendAmount(Long totalSendAmount) { + this.totalSendAmount = totalSendAmount; + } + + public Long getTodaySendNum() { + return todaySendNum; + } + + public void setTodaySendNum(Long todaySendNum) { + this.todaySendNum = todaySendNum; + } + + public Long getTodaySendAmount() { + return todaySendAmount; + } + + public void setTodaySendAmount(Long todaySendAmount) { + this.todaySendAmount = todaySendAmount; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendCount {\n"); + sb.append(" totalSendNum: ").append(toIndentedString(totalSendNum)).append("\n"); + sb.append(" totalSendAmount: ").append(toIndentedString(totalSendAmount)).append("\n"); + sb.append(" todaySendNum: ").append(toIndentedString(todaySendNum)).append("\n"); + sb.append(" todaySendAmount: ").append(toIndentedString(todaySendAmount)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponRequest.java new file mode 100644 index 00000000..54e616bb --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponRequest.java @@ -0,0 +1,89 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** SendCouponRequest */ +public class SendCouponRequest { + /** 用户标识 说明:用户的唯一标识,必填 */ + @SerializedName("openid") + private String openid; + /** 公众账号ID 说明:发券方AppID */ + @SerializedName("appid") + private String appid; + /** 批次号 说明:批次号 */ + @SerializedName("stock_id") + private String stockId; + /** 发券凭证 说明:发券凭证,可包含英文字母,数字,|,_,*,-等内容,不允许出现其他不合法符号,需在单个批次单个用户下确保唯一性 */ + @SerializedName("out_request_no") + private String outRequestNo; + /** 券code 说明:要求接口指定code发券的批次必传 */ + @SerializedName("coupon_code") + private String couponCode; + + public String getOpenid() { + return openid; + } + + public void setOpenid(String openid) { + this.openid = openid; + } + + public String getAppid() { + return appid; + } + + public void setAppid(String appid) { + this.appid = appid; + } + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getOutRequestNo() { + return outRequestNo; + } + + public void setOutRequestNo(String outRequestNo) { + this.outRequestNo = outRequestNo; + } + + public String getCouponCode() { + return couponCode; + } + + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendCouponRequest {\n"); + sb.append(" openid: ").append(toIndentedString(openid)).append("\n"); + sb.append(" appid: ").append(toIndentedString(appid)).append("\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" outRequestNo: ").append(toIndentedString(outRequestNo)).append("\n"); + sb.append(" couponCode: ").append(toIndentedString(couponCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponResponse.java new file mode 100644 index 00000000..101392a9 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponResponse.java @@ -0,0 +1,41 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** SendCouponResponse */ +public class SendCouponResponse { + /** 发券结果 说明:发券结果 */ + @SerializedName("send_coupon_result") + private SendCouponResult sendCouponResult; + + public SendCouponResult getSendCouponResult() { + return sendCouponResult; + } + + public void setSendCouponResult(SendCouponResult sendCouponResult) { + this.sendCouponResult = sendCouponResult; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendCouponResponse {\n"); + sb.append(" sendCouponResult: ").append(toIndentedString(sendCouponResult)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponResult.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponResult.java new file mode 100644 index 00000000..482d30dc --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponResult.java @@ -0,0 +1,65 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** SendCouponResult */ +public class SendCouponResult { + /** 批次号 说明:微信支付券批次ID */ + @SerializedName("stock_id") + private String stockId; + /** 发券凭证 说明:发券凭证,可包含英文字母,数字,|,_,*,-等内容,不允许出现其他不合法符号,需在单个批次单个用户下确保唯一性 */ + @SerializedName("out_request_no") + private String outRequestNo; + /** 券code 说明:券的唯一标识 */ + @SerializedName("coupon_code") + private String couponCode; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getOutRequestNo() { + return outRequestNo; + } + + public void setOutRequestNo(String outRequestNo) { + this.outRequestNo = outRequestNo; + } + + public String getCouponCode() { + return couponCode; + } + + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendCouponResult {\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" outRequestNo: ").append(toIndentedString(outRequestNo)).append("\n"); + sb.append(" couponCode: ").append(toIndentedString(couponCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendGovCardRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendGovCardRequest.java new file mode 100644 index 00000000..35f449b8 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendGovCardRequest.java @@ -0,0 +1,94 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +/** SendGovCardRequest */ +public class SendGovCardRequest { + /** 消费卡card_id 说明:消费券通用卡卡包card_id */ + @SerializedName("card_id") + @Expose(serialize = false) + private String cardId; + /** 消费卡card_id创建方AppID 说明:消费卡cardi\\_d创建方的AppID,需与API调用方商户号有绑定关系,入参中的用户OpenID也需用此AppID生成 */ + @SerializedName("appid") + private String appid; + /** 用户OpenID 说明:待发券用户的OpenID,需为消费卡创建方AppID生成的OpenID */ + @SerializedName("openid") + private String openid; + /** 商户单据号 说明:商户此次发放凭据号。推荐使用大小写字母和数字,不同添加请求发放凭据号不同,商户侧需保证同一发券请求的out_request_no+send_time唯一性 */ + @SerializedName("out_request_no") + private String outRequestNo; + /** + * 请求发卡时间 + * 说明:单次请求发卡时间,消费卡在商户系统的实际发放时间,为东八区标准时间(UTC+8)。商户需保证同一次请求的out_request_no+send_time唯一。由于系统限制,暂不支持传入早于当前时间24小时以上的时间进行发券请求。 + */ + @SerializedName("send_time") + private String sendTime; + + public String getCardId() { + return cardId; + } + + public void setCardId(String cardId) { + this.cardId = cardId; + } + + public String getAppid() { + return appid; + } + + public void setAppid(String appid) { + this.appid = appid; + } + + public String getOpenid() { + return openid; + } + + public void setOpenid(String openid) { + this.openid = openid; + } + + public String getOutRequestNo() { + return outRequestNo; + } + + public void setOutRequestNo(String outRequestNo) { + this.outRequestNo = outRequestNo; + } + + public String getSendTime() { + return sendTime; + } + + public void setSendTime(String sendTime) { + this.sendTime = sendTime; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendGovCardRequest {\n"); + sb.append(" cardId: ").append(toIndentedString(cardId)).append("\n"); + sb.append(" appid: ").append(toIndentedString(appid)).append("\n"); + sb.append(" openid: ").append(toIndentedString(openid)).append("\n"); + sb.append(" outRequestNo: ").append(toIndentedString(outRequestNo)).append("\n"); + sb.append(" sendTime: ").append(toIndentedString(sendTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SetCouponNotifyRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SetCouponNotifyRequest.java new file mode 100644 index 00000000..fbf8102f --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SetCouponNotifyRequest.java @@ -0,0 +1,53 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** SetCouponNotifyRequest */ +public class SetCouponNotifyRequest { + /** 商户号 说明:商户号,不填默认查询调用方商户号 */ + @SerializedName("mchid") + private String mchid; + /** 通知URL地址 说明:商户提供的用于接收商家券事件通知的URL地址,必须支持HTTPS。 */ + @SerializedName("notify_url") + private String notifyUrl; + + public String getMchid() { + return mchid; + } + + public void setMchid(String mchid) { + this.mchid = mchid; + } + + public String getNotifyUrl() { + return notifyUrl; + } + + public void setNotifyUrl(String notifyUrl) { + this.notifyUrl = notifyUrl; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SetCouponNotifyRequest {\n"); + sb.append(" mchid: ").append(toIndentedString(mchid)).append("\n"); + sb.append(" notifyUrl: ").append(toIndentedString(notifyUrl)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SetCouponNotifyResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SetCouponNotifyResponse.java new file mode 100644 index 00000000..21bf1baa --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SetCouponNotifyResponse.java @@ -0,0 +1,69 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** SetCouponNotifyResponse */ +public class SetCouponNotifyResponse { + /** + * 修改时间 + * 说明:修改时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/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秒。 + */ + @SerializedName("update_time") + private String updateTime; + /** 通知URL地址 说明:商户提供的用于接收商家券事件通知的URL地址,必须支持HTTPS。 */ + @SerializedName("notify_url") + private String notifyUrl; + /** 商户号 说明:商户号 */ + @SerializedName("mchid") + private String mchid; + + public String getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(String updateTime) { + this.updateTime = updateTime; + } + + public String getNotifyUrl() { + return notifyUrl; + } + + public void setNotifyUrl(String notifyUrl) { + this.notifyUrl = notifyUrl; + } + + public String getMchid() { + return mchid; + } + + public void setMchid(String mchid) { + this.mchid = mchid; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SetCouponNotifyResponse {\n"); + sb.append(" updateTime: ").append(toIndentedString(updateTime)).append("\n"); + sb.append(" notifyUrl: ").append(toIndentedString(notifyUrl)).append("\n"); + sb.append(" mchid: ").append(toIndentedString(mchid)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockGetResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockGetResponse.java new file mode 100644 index 00000000..12ee90c8 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockGetResponse.java @@ -0,0 +1,226 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** StockGetResponse */ +public class StockGetResponse { + /** 商家券批次名称 说明:批次名称,字数上限为21个,一个中文汉字/英文字母/数字均占用一个字数。 */ + @SerializedName("stock_name") + private String stockName; + /** 批次归属商户号 说明:批次是归属于哪个商户 注: 普通直连模式,该参数为直连商户号; 服务商模式,该参数为子商户号; 间连模式,该参数为子商户号。 */ + @SerializedName("belong_merchant") + private String belongMerchant; + /** 批次备注 说明:仅配置商户可见,用于自定义信息。字数上限为20个,一个中文汉字/英文字母/数字均占用一个字数。 */ + @SerializedName("comment") + private String comment; + /** 适应商品范围 说明:用来描述批次在哪些商品可用,会显示在微信卡包中。字数上限为15个,一个中文汉字/英文字母/数字均占用一个字数。 */ + @SerializedName("goods_name") + private String goodsName; + /** 批次类型 说明:批次类型 */ + @SerializedName("stock_type") + private BusiFavorStockType stockType; + /** 核销规则 说明:核销规则 */ + @SerializedName("coupon_use_rule") + private CouponUseRule couponUseRule; + /** 发放规则 说明:发放规则 */ + @SerializedName("stock_send_rule") + private StockSendRule stockSendRule; + /** 自定义入口 说明:卡详情页面,可选择多种入口引导用户 */ + @SerializedName("custom_entrance") + private CustomEntrance customEntrance; + /** 样式信息 说明:创建批次时的样式信息 */ + @SerializedName("display_pattern_info") + private DisplayPatternInfo displayPatternInfo; + /** 批次状态 说明:批次状态 */ + @SerializedName("stock_state") + private StockStatus stockState; + /** 券code模式 说明:券code模式 */ + @SerializedName("coupon_code_mode") + private CouponCodeMode couponCodeMode; + /** 批次号 说明:批次唯一标识 */ + @SerializedName("stock_id") + private String stockId; + /** + * 券code数量 + * 说明:当且仅当coupon_code_mode(券code模式)为MERCHANT_UPLOAD(商户上传自定义code)模式时,返回该字段;返回内容为商户上传code的数量信息 + */ + @SerializedName("coupon_code_count") + private CouponCodeCount couponCodeCount; + /** 事件通知配置 说明:事件回调通知商户的配置 */ + @SerializedName("notify_config") + private NotifyConfig notifyConfig; + /** 批次发放情况 说明:批次发放情况 */ + @SerializedName("send_count_information") + private SendCount sendCountInformation; + /** 是否允许营销补差 说明:该批次发放的券是否允许进行补差 注:该字段暂未开放 */ + @SerializedName("subsidy") + private Boolean subsidy; + + public String getStockName() { + return stockName; + } + + public void setStockName(String stockName) { + this.stockName = stockName; + } + + public String getBelongMerchant() { + return belongMerchant; + } + + public void setBelongMerchant(String belongMerchant) { + this.belongMerchant = belongMerchant; + } + + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName; + } + + public BusiFavorStockType getStockType() { + return stockType; + } + + public void setStockType(BusiFavorStockType stockType) { + this.stockType = stockType; + } + + public CouponUseRule getCouponUseRule() { + return couponUseRule; + } + + public void setCouponUseRule(CouponUseRule couponUseRule) { + this.couponUseRule = couponUseRule; + } + + public StockSendRule getStockSendRule() { + return stockSendRule; + } + + public void setStockSendRule(StockSendRule stockSendRule) { + this.stockSendRule = stockSendRule; + } + + public CustomEntrance getCustomEntrance() { + return customEntrance; + } + + public void setCustomEntrance(CustomEntrance customEntrance) { + this.customEntrance = customEntrance; + } + + public DisplayPatternInfo getDisplayPatternInfo() { + return displayPatternInfo; + } + + public void setDisplayPatternInfo(DisplayPatternInfo displayPatternInfo) { + this.displayPatternInfo = displayPatternInfo; + } + + public StockStatus getStockState() { + return stockState; + } + + public void setStockState(StockStatus stockState) { + this.stockState = stockState; + } + + public CouponCodeMode getCouponCodeMode() { + return couponCodeMode; + } + + public void setCouponCodeMode(CouponCodeMode couponCodeMode) { + this.couponCodeMode = couponCodeMode; + } + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public CouponCodeCount getCouponCodeCount() { + return couponCodeCount; + } + + public void setCouponCodeCount(CouponCodeCount couponCodeCount) { + this.couponCodeCount = couponCodeCount; + } + + public NotifyConfig getNotifyConfig() { + return notifyConfig; + } + + public void setNotifyConfig(NotifyConfig notifyConfig) { + this.notifyConfig = notifyConfig; + } + + public SendCount getSendCountInformation() { + return sendCountInformation; + } + + public void setSendCountInformation(SendCount sendCountInformation) { + this.sendCountInformation = sendCountInformation; + } + + public Boolean getSubsidy() { + return subsidy; + } + + public void setSubsidy(Boolean subsidy) { + this.subsidy = subsidy; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StockGetResponse {\n"); + sb.append(" stockName: ").append(toIndentedString(stockName)).append("\n"); + sb.append(" belongMerchant: ").append(toIndentedString(belongMerchant)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" goodsName: ").append(toIndentedString(goodsName)).append("\n"); + sb.append(" stockType: ").append(toIndentedString(stockType)).append("\n"); + sb.append(" couponUseRule: ").append(toIndentedString(couponUseRule)).append("\n"); + sb.append(" stockSendRule: ").append(toIndentedString(stockSendRule)).append("\n"); + sb.append(" customEntrance: ").append(toIndentedString(customEntrance)).append("\n"); + sb.append(" displayPatternInfo: ").append(toIndentedString(displayPatternInfo)).append("\n"); + sb.append(" stockState: ").append(toIndentedString(stockState)).append("\n"); + sb.append(" couponCodeMode: ").append(toIndentedString(couponCodeMode)).append("\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" couponCodeCount: ").append(toIndentedString(couponCodeCount)).append("\n"); + sb.append(" notifyConfig: ").append(toIndentedString(notifyConfig)).append("\n"); + sb.append(" sendCountInformation: ") + .append(toIndentedString(sendCountInformation)) + .append("\n"); + sb.append(" subsidy: ").append(toIndentedString(subsidy)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockSendRule.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockSendRule.java new file mode 100644 index 00000000..6f6c838c --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockSendRule.java @@ -0,0 +1,142 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** StockSendRule */ +public class StockSendRule { + /** 批次总预算 说明:总预算金额,单位分 注:该字段暂未开放 */ + @SerializedName("max_amount") + private Long maxAmount; + /** 批次最大发放个数 说明:批次最大可发放个数限制 特殊规则:取值范围 1 ≤ value ≤ 1000000000 */ + @SerializedName("max_coupons") + private Long maxCoupons; + /** 用户最大可领个数 说明:用户可领个数,每个用户最多100张券。 */ + @SerializedName("max_coupons_per_user") + private Integer maxCouponsPerUser; + /** 单天发放上限金额 说明:单天发放上限金额 注:该字段暂未开放 */ + @SerializedName("max_amount_by_day") + private Long maxAmountByDay; + /** + * 单天发放上限个数 说明:单天发放上限个数(stock\\_type为DISCOUNT或EXCHANGE时可传入此字段控制单天发放上限)。 特殊规则:取值范围 1 ≤ value ≤ + * 1000000000 + */ + @SerializedName("max_coupons_by_day") + private Long maxCouponsByDay; + /** + * 是否开启自然人限领 说明:不填默认否,枚举值: true:是 false:否 注:自然人防刷即同证件号下的所有账户合并计算的限领次数(限领次数指的是参数字段“用户最大领取个数”填写的值) + */ + @SerializedName("natural_person_limit") + private Boolean naturalPersonLimit; + /** 可疑账号拦截 说明:true-是;false-否,不填默认否 */ + @SerializedName("prevent_api_abuse") + private Boolean preventApiAbuse; + /** 是否允许转赠,暂不开放 说明:不填默认否,枚举值: true:是 false:否 该字段暂未开放 */ + @SerializedName("transferable") + private Boolean transferable; + /** 是否允许分享链接,暂不开放 说明:不填默认否,枚举值: true:是 false:否 该字段暂未开放 */ + @SerializedName("shareable") + private Boolean shareable; + + public Long getMaxAmount() { + return maxAmount; + } + + public void setMaxAmount(Long maxAmount) { + this.maxAmount = maxAmount; + } + + public Long getMaxCoupons() { + return maxCoupons; + } + + public void setMaxCoupons(Long maxCoupons) { + this.maxCoupons = maxCoupons; + } + + public Integer getMaxCouponsPerUser() { + return maxCouponsPerUser; + } + + public void setMaxCouponsPerUser(Integer maxCouponsPerUser) { + this.maxCouponsPerUser = maxCouponsPerUser; + } + + public Long getMaxAmountByDay() { + return maxAmountByDay; + } + + public void setMaxAmountByDay(Long maxAmountByDay) { + this.maxAmountByDay = maxAmountByDay; + } + + public Long getMaxCouponsByDay() { + return maxCouponsByDay; + } + + public void setMaxCouponsByDay(Long maxCouponsByDay) { + this.maxCouponsByDay = maxCouponsByDay; + } + + public Boolean getNaturalPersonLimit() { + return naturalPersonLimit; + } + + public void setNaturalPersonLimit(Boolean naturalPersonLimit) { + this.naturalPersonLimit = naturalPersonLimit; + } + + public Boolean getPreventApiAbuse() { + return preventApiAbuse; + } + + public void setPreventApiAbuse(Boolean preventApiAbuse) { + this.preventApiAbuse = preventApiAbuse; + } + + public Boolean getTransferable() { + return transferable; + } + + public void setTransferable(Boolean transferable) { + this.transferable = transferable; + } + + public Boolean getShareable() { + return shareable; + } + + public void setShareable(Boolean shareable) { + this.shareable = shareable; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StockSendRule {\n"); + sb.append(" maxAmount: ").append(toIndentedString(maxAmount)).append("\n"); + sb.append(" maxCoupons: ").append(toIndentedString(maxCoupons)).append("\n"); + sb.append(" maxCouponsPerUser: ").append(toIndentedString(maxCouponsPerUser)).append("\n"); + sb.append(" maxAmountByDay: ").append(toIndentedString(maxAmountByDay)).append("\n"); + sb.append(" maxCouponsByDay: ").append(toIndentedString(maxCouponsByDay)).append("\n"); + sb.append(" naturalPersonLimit: ").append(toIndentedString(naturalPersonLimit)).append("\n"); + sb.append(" preventApiAbuse: ").append(toIndentedString(preventApiAbuse)).append("\n"); + sb.append(" transferable: ").append(toIndentedString(transferable)).append("\n"); + sb.append(" shareable: ").append(toIndentedString(shareable)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockStatus.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockStatus.java new file mode 100644 index 00000000..3fc183d5 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockStatus.java @@ -0,0 +1,30 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import com.google.gson.annotations.SerializedName; + +/** StockStatus */ +public enum StockStatus { + @SerializedName("UNAUDIT") + UNAUDIT, + + @SerializedName("RUNNING") + RUNNING, + + @SerializedName("STOPED") + STOPED, + + @SerializedName("PAUSED") + PAUSED +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceipt.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceipt.java new file mode 100644 index 00000000..31f7fc6e --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceipt.java @@ -0,0 +1,196 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** SubsidyPayReceipt */ +public class SubsidyPayReceipt { + /** 补差付款单号 说明:补差付款唯一单号,由微信支付生成,仅在补差付款成功后有返回 */ + @SerializedName("subsidy_receipt_id") + private String subsidyReceiptId; + /** 商家券批次号 说明:由微信支付生成,调用创建商家券API成功时返回的唯一批次ID */ + @SerializedName("stock_id") + private String stockId; + /** 商家券code 说明:券的唯一标识 */ + @SerializedName("coupon_code") + private String couponCode; + /** 微信支付订单号 说明:微信支付下单支付成功返回的订单号 */ + @SerializedName("transaction_id") + private String transactionId; + /** 营销补差扣款商户号 说明:营销补差扣款商户号 */ + @SerializedName("payer_merchant") + private String payerMerchant; + /** 营销补差入账商户号 说明:营销补差入账商户号 */ + @SerializedName("payee_merchant") + private String payeeMerchant; + /** + * 补差付款金额 说明:单位为分,单笔订单补差金额不得超过券的优惠金额,最高补差金额为5000元 > 券的优惠金额定义: 满减券:满减金额即为优惠金额 折扣券:优惠金额 = 微信支付订单金额 ÷ + * 折扣比例 × (1 - 折扣比例) 换购券:不支持 + */ + @SerializedName("amount") + private Long amount; + /** 补差付款描述 说明:付款备注描述,查询的时候原样带回 */ + @SerializedName("description") + private String description; + /** 补差付款单据状态 说明:补差付款单据状态 */ + @SerializedName("status") + private SubsidyPayReceiptStatus status; + /** 补差付款失败原因 说明:仅在补差付款失败时,返回告知对应失败的原因 */ + @SerializedName("fail_reason") + private SubsidyPayReceiptFailReason failReason; + /** + * 补差付款完成时间 + * 说明:仅在补差付款成功时,返回完成时间。遵循[rfc3339](https://datatracker.ietf.org/doc/html/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秒。 + */ + @SerializedName("success_time") + private String successTime; + /** 业务请求唯一单号 说明:商户侧需保证唯一性。可包含英文字母,数字,|,_,*,-等内容,不允许出现其他不合法符号 */ + @SerializedName("out_subsidy_no") + private String outSubsidyNo; + /** + * 补差付款发起时间 + * 说明:补差付款单据创建时间。遵循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秒。 + */ + @SerializedName("create_time") + private String createTime; + + public String getSubsidyReceiptId() { + return subsidyReceiptId; + } + + public void setSubsidyReceiptId(String subsidyReceiptId) { + this.subsidyReceiptId = subsidyReceiptId; + } + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getCouponCode() { + return couponCode; + } + + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + + public String getTransactionId() { + return transactionId; + } + + public void setTransactionId(String transactionId) { + this.transactionId = transactionId; + } + + public String getPayerMerchant() { + return payerMerchant; + } + + public void setPayerMerchant(String payerMerchant) { + this.payerMerchant = payerMerchant; + } + + public String getPayeeMerchant() { + return payeeMerchant; + } + + public void setPayeeMerchant(String payeeMerchant) { + this.payeeMerchant = payeeMerchant; + } + + public Long getAmount() { + return amount; + } + + public void setAmount(Long amount) { + this.amount = amount; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public SubsidyPayReceiptStatus getStatus() { + return status; + } + + public void setStatus(SubsidyPayReceiptStatus status) { + this.status = status; + } + + public SubsidyPayReceiptFailReason getFailReason() { + return failReason; + } + + public void setFailReason(SubsidyPayReceiptFailReason failReason) { + this.failReason = failReason; + } + + public String getSuccessTime() { + return successTime; + } + + public void setSuccessTime(String successTime) { + this.successTime = successTime; + } + + public String getOutSubsidyNo() { + return outSubsidyNo; + } + + public void setOutSubsidyNo(String outSubsidyNo) { + this.outSubsidyNo = outSubsidyNo; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SubsidyPayReceipt {\n"); + sb.append(" subsidyReceiptId: ").append(toIndentedString(subsidyReceiptId)).append("\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" couponCode: ").append(toIndentedString(couponCode)).append("\n"); + sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); + sb.append(" payerMerchant: ").append(toIndentedString(payerMerchant)).append("\n"); + sb.append(" payeeMerchant: ").append(toIndentedString(payeeMerchant)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" failReason: ").append(toIndentedString(failReason)).append("\n"); + sb.append(" successTime: ").append(toIndentedString(successTime)).append("\n"); + sb.append(" outSubsidyNo: ").append(toIndentedString(outSubsidyNo)).append("\n"); + sb.append(" createTime: ").append(toIndentedString(createTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceiptFailReason.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceiptFailReason.java new file mode 100644 index 00000000..b58d4a87 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceiptFailReason.java @@ -0,0 +1,33 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import com.google.gson.annotations.SerializedName; + +/** SubsidyPayReceiptFailReason */ +public enum SubsidyPayReceiptFailReason { + @SerializedName("PAY_RECEIPT_INSUFFICIENT_BALANCE") + PAY_RECEIPT_INSUFFICIENT_BALANCE, + + @SerializedName("PAY_RECEIPT_NOT_INCOMESPLIT_ORDER") + PAY_RECEIPT_NOT_INCOMESPLIT_ORDER, + + @SerializedName("PAY_RECEIPT_EXCEED_SUBSIDY_AMOUNT_QUOTA") + PAY_RECEIPT_EXCEED_SUBSIDY_AMOUNT_QUOTA, + + @SerializedName("PAY_RECEIPT_EXCEED_SUBSIDY_COUNT_QUOTA") + PAY_RECEIPT_EXCEED_SUBSIDY_COUNT_QUOTA, + + @SerializedName("PAY_RECEIPT_OTHER") + PAY_RECEIPT_OTHER +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceiptListResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceiptListResponse.java new file mode 100644 index 00000000..e7d2645a --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceiptListResponse.java @@ -0,0 +1,42 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; +import java.util.List; + +/** SubsidyPayReceiptListResponse */ +public class SubsidyPayReceiptListResponse { + /** 补差付款单据列表 说明:如果这张券发生过补差付款,会有补差单据信息返回 */ + @SerializedName("pay_receipt_list") + private List payReceiptList; + + public List getPayReceiptList() { + return payReceiptList; + } + + public void setPayReceiptList(List payReceiptList) { + this.payReceiptList = payReceiptList; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SubsidyPayReceiptListResponse {\n"); + sb.append(" payReceiptList: ").append(toIndentedString(payReceiptList)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceiptStatus.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceiptStatus.java new file mode 100644 index 00000000..481b2e2b --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceiptStatus.java @@ -0,0 +1,39 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import com.google.gson.annotations.SerializedName; + +/** SubsidyPayReceiptStatus */ +public enum SubsidyPayReceiptStatus { + @SerializedName("PAY_RECEIPT_UNKNOWN") + PAY_RECEIPT_UNKNOWN, + + @SerializedName("PAY_RECEIPT_ACCEPTED") + PAY_RECEIPT_ACCEPTED, + + @SerializedName("PAY_RECEIPT_SUCCESS") + PAY_RECEIPT_SUCCESS, + + @SerializedName("PAY_RECEIPT_FAIL") + PAY_RECEIPT_FAIL, + + @SerializedName("PAY_RECEIPT_RETURNING") + PAY_RECEIPT_RETURNING, + + @SerializedName("PAY_RECEIPT_PARTIAL_RETURN") + PAY_RECEIPT_PARTIAL_RETURN, + + @SerializedName("PAY_RECEIPT_FULL_RETURN") + PAY_RECEIPT_FULL_RETURN +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayRequest.java new file mode 100644 index 00000000..7bc4ce49 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayRequest.java @@ -0,0 +1,131 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** SubsidyPayRequest */ +public class SubsidyPayRequest { + /** 商家券批次号 说明:由微信支付生成,调用创建商家券API成功时返回的唯一批次ID 仅支持“满减券”和“折扣券”的批次,“换购券”批次不支持 */ + @SerializedName("stock_id") + private String stockId; + /** + * 商家券code 说明:券的唯一标识。 在WECHATPAY\\_MODE的券code模式下,商家券code是由微信支付生成的唯一ID; + * 在MERCHANT\\_UPLOAD、MERCHANT\\_API的券code模式下,商家券code是由商户上传或指定,在批次下保证唯一; + */ + @SerializedName("coupon_code") + private String couponCode; + /** 微信支付订单号 说明:微信支付下单支付成功返回的订单号 */ + @SerializedName("transaction_id") + private String transactionId; + /** 营销补差扣款商户号 说明:营销补差扣款商户号 注:补差扣款商户号 = 制券商户号 或 补差扣款商户号 = 归属商户号 */ + @SerializedName("payer_merchant") + private String payerMerchant; + /** 营销补差入账商户号 说明:营销补差入账商户号 注:补差入账商户号 = 券归属商户号 或者和 券归属商户号有连锁品牌关系 */ + @SerializedName("payee_merchant") + private String payeeMerchant; + /** + * 补差付款金额 说明:单位为分,单笔订单补差金额不得超过券的优惠金额,最高补差金额为5000元 > 券的优惠金额定义: 满减券:满减金额即为优惠金额 折扣券:优惠金额 = 微信支付订单金额 ÷ + * 折扣比例 × (1 - 折扣比例) 换购券:不支持 + */ + @SerializedName("amount") + private Long amount; + /** 补差付款描述 说明:付款备注描述,查询的时候原样带回 */ + @SerializedName("description") + private String description; + /** 业务请求唯一单号 说明:商户侧需保证唯一性,可包含英文字母,数字,|,_,*,-等内容,不允许出现其他不合法符号 */ + @SerializedName("out_subsidy_no") + private String outSubsidyNo; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getCouponCode() { + return couponCode; + } + + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + + public String getTransactionId() { + return transactionId; + } + + public void setTransactionId(String transactionId) { + this.transactionId = transactionId; + } + + public String getPayerMerchant() { + return payerMerchant; + } + + public void setPayerMerchant(String payerMerchant) { + this.payerMerchant = payerMerchant; + } + + public String getPayeeMerchant() { + return payeeMerchant; + } + + public void setPayeeMerchant(String payeeMerchant) { + this.payeeMerchant = payeeMerchant; + } + + public Long getAmount() { + return amount; + } + + public void setAmount(Long amount) { + this.amount = amount; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getOutSubsidyNo() { + return outSubsidyNo; + } + + public void setOutSubsidyNo(String outSubsidyNo) { + this.outSubsidyNo = outSubsidyNo; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SubsidyPayRequest {\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" couponCode: ").append(toIndentedString(couponCode)).append("\n"); + sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); + sb.append(" payerMerchant: ").append(toIndentedString(payerMerchant)).append("\n"); + sb.append(" payeeMerchant: ").append(toIndentedString(payeeMerchant)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" outSubsidyNo: ").append(toIndentedString(outSubsidyNo)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnReceipt.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnReceipt.java new file mode 100644 index 00000000..68570121 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnReceipt.java @@ -0,0 +1,211 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** SubsidyReturnReceipt */ +public class SubsidyReturnReceipt { + /** 补差回退单号 说明:补差回退唯一单号,由微信支付生成,仅在补差回退成功后有返回 */ + @SerializedName("subsidy_return_receipt_id") + private String subsidyReturnReceiptId; + /** 商家券批次号 说明:由微信支付生成,调用创建商家券API成功时返回的唯一批次ID */ + @SerializedName("stock_id") + private String stockId; + /** 商家券code 说明:券的唯一标识 */ + @SerializedName("coupon_code") + private String couponCode; + /** 微信支付订单号 说明:微信支付下单支付成功返回的订单号 */ + @SerializedName("transaction_id") + private String transactionId; + /** 微信支付退款单号 说明:微信支付退款单号 */ + @SerializedName("refund_id") + private String refundId; + /** 原营销补差扣款商户号 说明:原营销补差扣款商户号,即回退资金收款商户号 */ + @SerializedName("payer_merchant") + private String payerMerchant; + /** 原营销补差入账商户号 说明:原营销补差入账商户号,即回退资金扣款商户号 */ + @SerializedName("payee_merchant") + private String payeeMerchant; + /** 补差回退金额 说明:本次补差回退金额,单位为分。单个券code回退总金额不能超过补差金额 */ + @SerializedName("amount") + private Long amount; + /** 补差回退描述 说明:回退备注描述,查询的时候原样带回 */ + @SerializedName("description") + private String description; + /** 补差回退单据状态 说明:补差付款单据状态 */ + @SerializedName("status") + private SubsidyReturnReceiptStatus status; + /** 补差回退失败原因 说明:仅在补差回退失败时,返回告知对应失败的原因 */ + @SerializedName("fail_reason") + private SubsidyReturnReceiptFailReason failReason; + /** 补差回退完成时间 说明:仅在补差回退成功时,返回完成时间 */ + @SerializedName("return_done_time") + private String returnDoneTime; + /** 补差付款单号 说明:此次补差回退操作对应的补差付款单号 */ + @SerializedName("subsidy_receipt_id") + private String subsidyReceiptId; + /** 业务请求唯一单号 说明:商户侧需保证唯一性。可包含英文字母,数字,|,_,*,-等内容,不允许出现其他不合法符号 */ + @SerializedName("out_subsidy_return_no") + private String outSubsidyReturnNo; + /** 补差回退发起时间 说明:补差回退单据创建时间 */ + @SerializedName("return_create_time") + private String returnCreateTime; + + public String getSubsidyReturnReceiptId() { + return subsidyReturnReceiptId; + } + + public void setSubsidyReturnReceiptId(String subsidyReturnReceiptId) { + this.subsidyReturnReceiptId = subsidyReturnReceiptId; + } + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getCouponCode() { + return couponCode; + } + + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + + public String getTransactionId() { + return transactionId; + } + + public void setTransactionId(String transactionId) { + this.transactionId = transactionId; + } + + public String getRefundId() { + return refundId; + } + + public void setRefundId(String refundId) { + this.refundId = refundId; + } + + public String getPayerMerchant() { + return payerMerchant; + } + + public void setPayerMerchant(String payerMerchant) { + this.payerMerchant = payerMerchant; + } + + public String getPayeeMerchant() { + return payeeMerchant; + } + + public void setPayeeMerchant(String payeeMerchant) { + this.payeeMerchant = payeeMerchant; + } + + public Long getAmount() { + return amount; + } + + public void setAmount(Long amount) { + this.amount = amount; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public SubsidyReturnReceiptStatus getStatus() { + return status; + } + + public void setStatus(SubsidyReturnReceiptStatus status) { + this.status = status; + } + + public SubsidyReturnReceiptFailReason getFailReason() { + return failReason; + } + + public void setFailReason(SubsidyReturnReceiptFailReason failReason) { + this.failReason = failReason; + } + + public String getReturnDoneTime() { + return returnDoneTime; + } + + public void setReturnDoneTime(String returnDoneTime) { + this.returnDoneTime = returnDoneTime; + } + + public String getSubsidyReceiptId() { + return subsidyReceiptId; + } + + public void setSubsidyReceiptId(String subsidyReceiptId) { + this.subsidyReceiptId = subsidyReceiptId; + } + + public String getOutSubsidyReturnNo() { + return outSubsidyReturnNo; + } + + public void setOutSubsidyReturnNo(String outSubsidyReturnNo) { + this.outSubsidyReturnNo = outSubsidyReturnNo; + } + + public String getReturnCreateTime() { + return returnCreateTime; + } + + public void setReturnCreateTime(String returnCreateTime) { + this.returnCreateTime = returnCreateTime; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SubsidyReturnReceipt {\n"); + sb.append(" subsidyReturnReceiptId: ") + .append(toIndentedString(subsidyReturnReceiptId)) + .append("\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" couponCode: ").append(toIndentedString(couponCode)).append("\n"); + sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); + sb.append(" refundId: ").append(toIndentedString(refundId)).append("\n"); + sb.append(" payerMerchant: ").append(toIndentedString(payerMerchant)).append("\n"); + sb.append(" payeeMerchant: ").append(toIndentedString(payeeMerchant)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" failReason: ").append(toIndentedString(failReason)).append("\n"); + sb.append(" returnDoneTime: ").append(toIndentedString(returnDoneTime)).append("\n"); + sb.append(" subsidyReceiptId: ").append(toIndentedString(subsidyReceiptId)).append("\n"); + sb.append(" outSubsidyReturnNo: ").append(toIndentedString(outSubsidyReturnNo)).append("\n"); + sb.append(" returnCreateTime: ").append(toIndentedString(returnCreateTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnReceiptFailReason.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnReceiptFailReason.java new file mode 100644 index 00000000..c4fe5beb --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnReceiptFailReason.java @@ -0,0 +1,24 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import com.google.gson.annotations.SerializedName; + +/** SubsidyReturnReceiptFailReason */ +public enum SubsidyReturnReceiptFailReason { + @SerializedName("RETURN_RECEIPT_INSUFFICIENT_BALANCE") + RETURN_RECEIPT_INSUFFICIENT_BALANCE, + + @SerializedName("RETURN_RECEIPT_OTHER") + RETURN_RECEIPT_OTHER +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnReceiptStatus.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnReceiptStatus.java new file mode 100644 index 00000000..4cf39e3a --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnReceiptStatus.java @@ -0,0 +1,30 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import com.google.gson.annotations.SerializedName; + +/** SubsidyReturnReceiptStatus */ +public enum SubsidyReturnReceiptStatus { + @SerializedName("RETURN_RECEIPT_UNKNOWN") + RETURN_RECEIPT_UNKNOWN, + + @SerializedName("RETURN_RECEIPT_ACCEPTED") + RETURN_RECEIPT_ACCEPTED, + + @SerializedName("RETURN_RECEIPT_SUCCESS") + RETURN_RECEIPT_SUCCESS, + + @SerializedName("RETURN_RECEIPT_FAIL") + RETURN_RECEIPT_FAIL +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnRequest.java new file mode 100644 index 00000000..5717b164 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnRequest.java @@ -0,0 +1,140 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** SubsidyReturnRequest */ +public class SubsidyReturnRequest { + /** 商家券批次号 说明:由微信支付生成,调用创建商家券API成功时返回的唯一批次ID 仅支持“满减券”和“折扣券”的批次,“换购券”批次不支持 */ + @SerializedName("stock_id") + private String stockId; + /** + * 商家券code 说明:券的唯一标识。 在WECHATPAY\\_MODE的券code模式下,商家券code是由微信支付生成的唯一ID; + * 在MERCHANT\\_UPLOAD、MERCHANT\\_API的券code模式下,商家券code是由商户上传或指定,在批次下保证唯一; + */ + @SerializedName("coupon_code") + private String couponCode; + /** 微信支付订单号 说明:微信支付下单支付成功返回的订单号 */ + @SerializedName("transaction_id") + private String transactionId; + /** 微信支付退款单号 说明:微信支付退款单号 */ + @SerializedName("refund_id") + private String refundId; + /** 原营销补差扣款商户号 说明:原营销补差扣款商户号,即回退资金收款商户号 */ + @SerializedName("payer_merchant") + private String payerMerchant; + /** 原营销补差入账商户号 说明:原营销补差入账商户号,即回退资金扣款商户号 */ + @SerializedName("payee_merchant") + private String payeeMerchant; + /** 补差回退金额 说明:本次补差回退金额,单位为分。单个券Code回退总金额不能超过补差金额 */ + @SerializedName("amount") + private Long amount; + /** 补差回退描述 说明:回退备注描述,查询的时候原样带回 */ + @SerializedName("description") + private String description; + /** 业务请求唯一单号 说明:商户侧需保证唯一性,可包含英文字母,数字,|,_,*,-等内容,不允许出现其他不合法符号 */ + @SerializedName("out_subsidy_return_no") + private String outSubsidyReturnNo; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getCouponCode() { + return couponCode; + } + + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + + public String getTransactionId() { + return transactionId; + } + + public void setTransactionId(String transactionId) { + this.transactionId = transactionId; + } + + public String getRefundId() { + return refundId; + } + + public void setRefundId(String refundId) { + this.refundId = refundId; + } + + public String getPayerMerchant() { + return payerMerchant; + } + + public void setPayerMerchant(String payerMerchant) { + this.payerMerchant = payerMerchant; + } + + public String getPayeeMerchant() { + return payeeMerchant; + } + + public void setPayeeMerchant(String payeeMerchant) { + this.payeeMerchant = payeeMerchant; + } + + public Long getAmount() { + return amount; + } + + public void setAmount(Long amount) { + this.amount = amount; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getOutSubsidyReturnNo() { + return outSubsidyReturnNo; + } + + public void setOutSubsidyReturnNo(String outSubsidyReturnNo) { + this.outSubsidyReturnNo = outSubsidyReturnNo; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SubsidyReturnRequest {\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" couponCode: ").append(toIndentedString(couponCode)).append("\n"); + sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); + sb.append(" refundId: ").append(toIndentedString(refundId)).append("\n"); + sb.append(" payerMerchant: ").append(toIndentedString(payerMerchant)).append("\n"); + sb.append(" payeeMerchant: ").append(toIndentedString(payeeMerchant)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" outSubsidyReturnNo: ").append(toIndentedString(outSubsidyReturnNo)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeBody.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeBody.java new file mode 100644 index 00000000..7bf73359 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeBody.java @@ -0,0 +1,58 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; +import java.util.ArrayList; +import java.util.List; + +/** UploadCouponCodeBody */ +public class UploadCouponCodeBody { + /** + * 券code列表 说明:商户上传的券code列表;code允许包含的字符有 0-9 a-z A-Z 空格(仅含空格,不含制表符、换行符、换页符等) 中划线- 下划线_ 反斜线\\ 斜线/ + * 等号= 竖线| + */ + @SerializedName("coupon_code_list") + private List couponCodeList = new ArrayList(); + /** 请求业务单据号 说明:商户上传code的凭据号,商户侧需保持唯一性 */ + @SerializedName("upload_request_no") + private String uploadRequestNo; + + public List getCouponCodeList() { + return couponCodeList; + } + + public void setCouponCodeList(List couponCodeList) { + this.couponCodeList = couponCodeList; + } + + public String getUploadRequestNo() { + return uploadRequestNo; + } + + public void setUploadRequestNo(String uploadRequestNo) { + this.uploadRequestNo = uploadRequestNo; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UploadCouponCodeBody {\n"); + sb.append(" couponCodeList: ").append(toIndentedString(couponCodeList)).append("\n"); + sb.append(" uploadRequestNo: ").append(toIndentedString(uploadRequestNo)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeFailReason.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeFailReason.java new file mode 100644 index 00000000..8f6bdd30 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeFailReason.java @@ -0,0 +1,65 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** UploadCouponCodeFailReason */ +public class UploadCouponCodeFailReason { + /** 上传失败的券code 说明:商户通过API上传的券code */ + @SerializedName("coupon_code") + private String couponCode; + /** 上传失败错误码 说明:对应券code上传失败的错误码 */ + @SerializedName("code") + private String code; + /** 上传失败错误信息 说明:上传失败的错误信息描述 */ + @SerializedName("message") + private String message; + + public String getCouponCode() { + return couponCode; + } + + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UploadCouponCodeFailReason {\n"); + sb.append(" couponCode: ").append(toIndentedString(couponCode)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeRequest.java new file mode 100644 index 00000000..8fbdd262 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeRequest.java @@ -0,0 +1,72 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import java.util.ArrayList; +import java.util.List; + +/** UploadCouponCodeRequest */ +public class UploadCouponCodeRequest { + /** 批次号 说明:商家券批次号 */ + @SerializedName("stock_id") + @Expose(serialize = false) + private String stockId; + /** + * 券code列表 说明:商户上传的券code列表;code允许包含的字符有 0-9 a-z A-Z 空格(仅含空格,不含制表符、换行符、换页符等) 中划线- 下划线_ 反斜线\\ 斜线/ + * 等号= 竖线| + */ + @SerializedName("coupon_code_list") + private List couponCodeList = new ArrayList(); + /** 请求业务单据号 说明:商户上传code的凭据号,商户侧需保持唯一性 */ + @SerializedName("upload_request_no") + private String uploadRequestNo; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public List getCouponCodeList() { + return couponCodeList; + } + + public void setCouponCodeList(List couponCodeList) { + this.couponCodeList = couponCodeList; + } + + public String getUploadRequestNo() { + return uploadRequestNo; + } + + public void setUploadRequestNo(String uploadRequestNo) { + this.uploadRequestNo = uploadRequestNo; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UploadCouponCodeRequest {\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" couponCodeList: ").append(toIndentedString(couponCodeList)).append("\n"); + sb.append(" uploadRequestNo: ").append(toIndentedString(uploadRequestNo)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeResponse.java new file mode 100644 index 00000000..b5c4512b --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeResponse.java @@ -0,0 +1,145 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; +import java.util.List; + +/** UploadCouponCodeResponse */ +public class UploadCouponCodeResponse { + /** 批次号 说明:商家券批次号 */ + @SerializedName("stock_id") + private String stockId; + /** 去重后上传code总数 说明:本次上传操作,去重后实际上传的code数目 */ + @SerializedName("total_count") + private Long totalCount; + /** 上传成功code个数 说明:本次上传操作上传成功个数 */ + @SerializedName("success_count") + private Long successCount; + /** 上传成功的code列表 说明:本次新增上传成功的code信息。 特殊规则:单个券code长度为【1,32】,条目个数限制为【1,200】。 */ + @SerializedName("success_codes") + private List successCodes; + /** + * 上传成功时间 + * 说明:上传操作完成时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/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秒。 + */ + @SerializedName("success_time") + private String successTime; + /** 上传失败code个数 说明:本次上传操作上传失败的code数 */ + @SerializedName("fail_count") + private Long failCount; + /** 上传失败的code及原因 说明:本次导入失败的code信息,请参照错误信息,修改后重试 */ + @SerializedName("fail_codes") + private List failCodes; + /** 已存在的code列表 说明:历史已存在的code列表,本次不会重复导入。 特殊规则:单个券code长度为【1,32】,条目个数限制为【1,200】。 */ + @SerializedName("exist_codes") + private List existCodes; + /** + * 本次请求中重复的code列表 说明:本次重复导入的code会被自动过滤,仅保留一个做导入,如满足要求则成功;如不满足要求,则失败;请参照报错提示修改重试。 + * 特殊规则:单个券code长度为【1,32】,条目个数限制为【1,200】。 + */ + @SerializedName("duplicate_codes") + private List duplicateCodes; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public Long getTotalCount() { + return totalCount; + } + + public void setTotalCount(Long totalCount) { + this.totalCount = totalCount; + } + + public Long getSuccessCount() { + return successCount; + } + + public void setSuccessCount(Long successCount) { + this.successCount = successCount; + } + + public List getSuccessCodes() { + return successCodes; + } + + public void setSuccessCodes(List successCodes) { + this.successCodes = successCodes; + } + + public String getSuccessTime() { + return successTime; + } + + public void setSuccessTime(String successTime) { + this.successTime = successTime; + } + + public Long getFailCount() { + return failCount; + } + + public void setFailCount(Long failCount) { + this.failCount = failCount; + } + + public List getFailCodes() { + return failCodes; + } + + public void setFailCodes(List failCodes) { + this.failCodes = failCodes; + } + + public List getExistCodes() { + return existCodes; + } + + public void setExistCodes(List existCodes) { + this.existCodes = existCodes; + } + + public List getDuplicateCodes() { + return duplicateCodes; + } + + public void setDuplicateCodes(List duplicateCodes) { + this.duplicateCodes = duplicateCodes; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UploadCouponCodeResponse {\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append(" successCount: ").append(toIndentedString(successCount)).append("\n"); + sb.append(" successCodes: ").append(toIndentedString(successCodes)).append("\n"); + sb.append(" successTime: ").append(toIndentedString(successTime)).append("\n"); + sb.append(" failCount: ").append(toIndentedString(failCount)).append("\n"); + sb.append(" failCodes: ").append(toIndentedString(failCodes)).append("\n"); + sb.append(" existCodes: ").append(toIndentedString(existCodes)).append("\n"); + sb.append(" duplicateCodes: ").append(toIndentedString(duplicateCodes)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UseCouponRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UseCouponRequest.java new file mode 100644 index 00000000..76c0bcc5 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UseCouponRequest.java @@ -0,0 +1,114 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** UseCouponRequest */ +public class UseCouponRequest { + /** 券code 说明:券的唯一标识 */ + @SerializedName("coupon_code") + private String couponCode; + /** + * 批次号 + * 说明:微信为每个商家券批次分配的唯一ID,当你在创建商家券接口中的coupon\\_code\\_mode参数传值为MERCHANT\\_API或者MERCHANT\\_UPLOAD时,则核销接口中该字段必传,否则该字段可不传 + */ + @SerializedName("stock_id") + private String stockId; + /** + * 公众账号ID 说明:支持传入与当前调用接口商户号有绑定关系的AppID。支持小程序AppID与公众号AppID。核销接口返回的OpenID会在该传入AppID下进行计算获得。 + * 校验规则:传入的AppID得是与调用方商户号(即请求头里面的商户号)有绑定关系的AppID或传入的AppID得是归属商户号有绑定关系的AppID + */ + @SerializedName("appid") + private String appid; + /** + * 请求核销时间 说明:商户请求核销用户券的时间。 + * 遵循[rfc3339](https://datatracker.ietf.org/doc/html/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秒。 + */ + @SerializedName("use_time") + private String useTime; + /** 核销请求单据号 说明:每次核销请求的唯一标识,商户需保证唯一 */ + @SerializedName("use_request_no") + private String useRequestNo; + /** + * 用户标识 说明:用户的唯一标识,做安全校验使用,非必填。 + * 校验规则:传入的OpenID得是调用方商户号(即请求头里面的商户号)有绑定关系的AppID获取的OpenID或传入的OpenID得是归属商户号有绑定关系的AppID获取的OpenID。[获取OpenID文档](https://pay.weixin.qq.com/wiki/doc/apiv3/terms_definition/chapter1_1_3.shtml#part-3) + */ + @SerializedName("openid") + private String openid; + + public String getCouponCode() { + return couponCode; + } + + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getAppid() { + return appid; + } + + public void setAppid(String appid) { + this.appid = appid; + } + + public String getUseTime() { + return useTime; + } + + public void setUseTime(String useTime) { + this.useTime = useTime; + } + + public String getUseRequestNo() { + return useRequestNo; + } + + public void setUseRequestNo(String useRequestNo) { + this.useRequestNo = useRequestNo; + } + + public String getOpenid() { + return openid; + } + + public void setOpenid(String openid) { + this.openid = openid; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UseCouponRequest {\n"); + sb.append(" couponCode: ").append(toIndentedString(couponCode)).append("\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" appid: ").append(toIndentedString(appid)).append("\n"); + sb.append(" useTime: ").append(toIndentedString(useTime)).append("\n"); + sb.append(" useRequestNo: ").append(toIndentedString(useRequestNo)).append("\n"); + sb.append(" openid: ").append(toIndentedString(openid)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UseCouponResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UseCouponResponse.java new file mode 100644 index 00000000..f0998822 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UseCouponResponse.java @@ -0,0 +1,69 @@ +// Copyright 2021 Tencent Inc. All rights reserved. +// +// 营销商家券对外API +// +// No description provided (generated by Openapi Generator +// https://github.com/openapitools/openapi-generator) +// +// API version: 0.0.11 + +// Code generated by WechatPay APIv3 Generator based on [OpenAPI +// Generator](https://openapi-generator.tech); DO NOT EDIT. + +package com.wechat.pay.java.service.merchantexclusivecoupon.model; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +import com.google.gson.annotations.SerializedName; + +/** UseCouponResponse */ +public class UseCouponResponse { + /** 批次号 说明:批次ID */ + @SerializedName("stock_id") + private String stockId; + /** 用户标识 说明:用户在该公众号内的唯一身份标识。 */ + @SerializedName("openid") + private String openid; + /** + * 系统核销券成功的时间 + * 说明:系统成功核销券的时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/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秒。 + */ + @SerializedName("wechatpay_use_time") + private String wechatpayUseTime; + + public String getStockId() { + return stockId; + } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getOpenid() { + return openid; + } + + public void setOpenid(String openid) { + this.openid = openid; + } + + public String getWechatpayUseTime() { + return wechatpayUseTime; + } + + public void setWechatpayUseTime(String wechatpayUseTime) { + this.wechatpayUseTime = wechatpayUseTime; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UseCouponResponse {\n"); + sb.append(" stockId: ").append(toIndentedString(stockId)).append("\n"); + sb.append(" openid: ").append(toIndentedString(openid)).append("\n"); + sb.append(" wechatpayUseTime: ").append(toIndentedString(wechatpayUseTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/package-info.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/package-info.java new file mode 100644 index 00000000..c28f1332 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/package-info.java @@ -0,0 +1,2 @@ +/** 营销商家券对外API */ +package com.wechat.pay.java.service.merchantexclusivecoupon;