forked from binarywang/WxJava
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPartnerInvoiceService.java
More file actions
126 lines (107 loc) · 5.28 KB
/
Copy pathPartnerInvoiceService.java
File metadata and controls
126 lines (107 loc) · 5.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
package com.github.binarywang.wxpay.service;
import com.github.binarywang.wxpay.bean.invoice.InviteUrlResult;
import com.github.binarywang.wxpay.bean.invoice.InviteUrlRequest;
import com.github.binarywang.wxpay.bean.invoice.GeneralInvoiceRequest;
import com.github.binarywang.wxpay.bean.invoice.PassengerTransportInvoiceRequest;
import com.github.binarywang.wxpay.bean.invoice.InvoiceResult;
import com.github.binarywang.wxpay.bean.invoice.InvoiceFileResult;
import com.github.binarywang.wxpay.bean.invoice.ReverseInvoiceRequest;
import com.github.binarywang.wxpay.bean.invoice.SubMerchantInvoiceStatus;
import com.github.binarywang.wxpay.bean.invoice.CardTemplateRequest;
import com.github.binarywang.wxpay.bean.invoice.CardTemplateResult;
import com.github.binarywang.wxpay.bean.invoice.DevelopmentConfigRequest;
import com.github.binarywang.wxpay.bean.invoice.DevelopmentConfigResult;
import com.github.binarywang.wxpay.bean.invoice.TitleUrlRequest;
import com.github.binarywang.wxpay.bean.invoice.TitleUrlResult;
import com.github.binarywang.wxpay.bean.invoice.BuyerInformation;
import com.github.binarywang.wxpay.bean.invoice.IndustryInvoiceRequest;
import com.github.binarywang.wxpay.bean.invoice.InsertCardRequest;
import com.github.binarywang.wxpay.bean.invoice.InviteMerchantQuery;
import com.github.binarywang.wxpay.bean.invoice.InviteMerchantResult;
import com.github.binarywang.wxpay.bean.invoice.InvoiceFileUploadRequest;
import com.github.binarywang.wxpay.bean.invoice.InvoiceFileUploadResult;
import java.io.IOException;
import com.github.binarywang.wxpay.exception.WxPayException;
/**
* 微信支付服务商电子发票 API。
*
* @author binarywang
*/
public interface PartnerInvoiceService {
/**
* 获取开通服务商电子发票能力邀请链接。
*
* @param subMchId 可选,指定要邀请开通能力的子商户号
* @return 邀请链接
* @throws WxPayException 微信支付异常
* @see <a href="https://pay.weixin.qq.com/doc/v3/partner/4015941495">官方文档</a>
*/
InviteUrlResult getInviteUrl(String subMchId) throws WxPayException;
InviteUrlResult getInviteUrl(InviteUrlRequest request) throws WxPayException;
/**
* 开具通用行业电子发票。接口受理成功后,请通过查询电子发票接口获取处理结果。
*
* @param request 开票申请
* @throws WxPayException 微信支付异常
* @see <a href="https://pay.weixin.qq.com/doc/v3/partner/4015792574">官方文档</a>
*/
void issueGeneralInvoice(GeneralInvoiceRequest request) throws WxPayException;
/**
* 开具旅客运输行业电子发票。
*
* <p>接口受理成功时返回 HTTP 202 Accepted,无应答包体。受理成功不代表开票完成,
* 请通过开票结果回调或查询电子发票接口获取处理结果。</p>
*
* @param request 开票申请
* @throws WxPayException 微信支付异常
* @throws UnsupportedOperationException 当前实现不支持开具旅客运输行业电子发票
* @see <a href="https://pay.weixin.qq.com/doc/v3/partner/4025863376">官方文档</a>
*/
default void issuePassengerTransportInvoice(PassengerTransportInvoiceRequest request) throws WxPayException {
throw new UnsupportedOperationException("当前实现不支持开具旅客运输行业电子发票");
}
/**
* 查询电子发票。
*
* @param fapiaoApplyId 开票申请单号
* @param subMchId 子商户号
* @param fapiaoId 可选,商户发票单号
* @return 发票信息
* @throws WxPayException 微信支付异常
*/
InvoiceResult getInvoice(String fapiaoApplyId, String subMchId, String fapiaoId) throws WxPayException;
/**
* 冲红电子发票。
*
* @param request 冲红申请
* @throws WxPayException 微信支付异常
*/
void reverseInvoice(ReverseInvoiceRequest request) throws WxPayException;
/**
* 获取发票文件下载信息。
*
* @param fapiaoApplyId 开票申请单号
* @param subMchId 子商户号
* @param fapiaoId 可选,商户发票单号
* @return 发票文件下载信息
* @throws WxPayException 微信支付异常
*/
InvoiceFileResult getInvoiceFileDownloadInfo(String fapiaoApplyId, String subMchId, String fapiaoId) throws WxPayException;
/**
* 检查子商户开票功能状态。
*
* @param subMchId 子商户号
* @return 子商户电子发票能力状态
* @throws WxPayException 微信支付异常
*/
SubMerchantInvoiceStatus getSubMerchantInvoiceStatus(String subMchId) throws WxPayException;
CardTemplateResult createCardTemplate(CardTemplateRequest request) throws WxPayException;
DevelopmentConfigResult updateDevelopmentConfig(DevelopmentConfigRequest request) throws WxPayException;
TitleUrlResult getUserTitleUrl(TitleUrlRequest request) throws WxPayException;
BuyerInformation getUserTitle(String subMchId, String scene, String fapiaoApplyId) throws WxPayException;
void issueRealEstateLeasingInvoice(IndustryInvoiceRequest request) throws WxPayException;
void issueRefinedOilInvoice(IndustryInvoiceRequest request) throws WxPayException;
void insertCards(InsertCardRequest request) throws WxPayException;
InviteMerchantResult listInviteMerchants(InviteMerchantQuery query) throws WxPayException;
InvoiceFileUploadResult uploadInvoiceFile(InvoiceFileUploadRequest request) throws WxPayException, IOException;
}