153 lines
4.9 KiB
Go
153 lines
4.9 KiB
Go
|
|
package pay
|
||
|
|
|
||
|
|
import (
|
||
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
||
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
||
|
|
)
|
||
|
|
|
||
|
|
// InvoiceRequestOrder 发票申请订单信息
|
||
|
|
type InvoiceRequestOrder struct {
|
||
|
|
Id string `json:"id"`
|
||
|
|
Company string `json:"company"`
|
||
|
|
TaxNo string `json:"tax_no"`
|
||
|
|
Drawer string `json:"drawer"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// InvoiceRequestParam 申请开发票参数
|
||
|
|
type InvoiceRequestParam struct {
|
||
|
|
UserName string `json:"user_name"`
|
||
|
|
BuyerName string `json:"buyer_name"`
|
||
|
|
Email string `json:"email"`
|
||
|
|
Phone string `json:"phone"`
|
||
|
|
RequestName string `json:"request_name"`
|
||
|
|
From string `json:"from"`
|
||
|
|
Orders []InvoiceRequestOrder `json:"orders"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// InvoiceRequestRequest 申请开发票请求
|
||
|
|
type InvoiceRequestRequest struct {
|
||
|
|
*requests.JsonRequest
|
||
|
|
UserName string `position:"Json" field:"user_name"`
|
||
|
|
BuyerName string `position:"Json" field:"buyer_name"`
|
||
|
|
Email string `position:"Json" field:"email"`
|
||
|
|
Phone string `position:"Json" field:"phone"`
|
||
|
|
RequestName string `position:"Json" field:"request_name"`
|
||
|
|
From string `position:"Json" field:"from"`
|
||
|
|
Orders []InvoiceRequestOrder `position:"Json" field:"orders"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// InvoiceRequestResponse 申请开发票响应
|
||
|
|
type InvoiceRequestResponse struct {
|
||
|
|
*responses.BaseResponse
|
||
|
|
Code int `json:"code"`
|
||
|
|
Msg string `json:"msg"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreateInvoiceRequestRequest 创建申请开发票请求
|
||
|
|
func CreateInvoiceRequestRequest(param InvoiceRequestParam) *InvoiceRequestRequest {
|
||
|
|
req := &InvoiceRequestRequest{
|
||
|
|
JsonRequest: &requests.JsonRequest{},
|
||
|
|
UserName: param.UserName,
|
||
|
|
BuyerName: param.BuyerName,
|
||
|
|
Email: param.Email,
|
||
|
|
Phone: param.Phone,
|
||
|
|
RequestName: param.RequestName,
|
||
|
|
From: param.From,
|
||
|
|
Orders: param.Orders,
|
||
|
|
}
|
||
|
|
req.InitWithApiInfo(HOST, VERSION, "/api/invoice/request")
|
||
|
|
req.Method = requests.POST
|
||
|
|
return req
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreateInvoiceRequestResponse 创建申请开发票响应
|
||
|
|
func CreateInvoiceRequestResponse() *InvoiceRequestResponse {
|
||
|
|
return &InvoiceRequestResponse{
|
||
|
|
BaseResponse: &responses.BaseResponse{},
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
// InvoicePassParam 允许申请发票参数
|
||
|
|
type InvoicePassParam struct {
|
||
|
|
InvoiceRequestId int64 `json:"invoice_request_id"`
|
||
|
|
ReviewUserName string `json:"review_user_name"`
|
||
|
|
ReviewRemark string `json:"review_remark"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// InvoicePassRequest 允许申请发票请求
|
||
|
|
type InvoicePassRequest struct {
|
||
|
|
*requests.JsonRequest
|
||
|
|
InvoiceRequestId int64 `position:"Json" field:"invoice_request_id"`
|
||
|
|
ReviewUserName string `position:"Json" field:"review_user_name"`
|
||
|
|
ReviewRemark string `position:"Json" field:"review_remark"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// InvoicePassResponse 允许申请发票响应
|
||
|
|
type InvoicePassResponse struct {
|
||
|
|
*responses.BaseResponse
|
||
|
|
Code int `json:"code"`
|
||
|
|
Msg string `json:"msg"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreateInvoicePassRequest 创建允许申请发票请求
|
||
|
|
func CreateInvoicePassRequest(param InvoicePassParam) *InvoicePassRequest {
|
||
|
|
req := &InvoicePassRequest{
|
||
|
|
JsonRequest: &requests.JsonRequest{},
|
||
|
|
InvoiceRequestId: param.InvoiceRequestId,
|
||
|
|
ReviewUserName: param.ReviewUserName,
|
||
|
|
ReviewRemark: param.ReviewRemark,
|
||
|
|
}
|
||
|
|
req.InitWithApiInfo(HOST, VERSION, "/api/invoice/pass")
|
||
|
|
req.Method = requests.POST
|
||
|
|
return req
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreateInvoicePassResponse 创建允许申请发票响应
|
||
|
|
func CreateInvoicePassResponse() *InvoicePassResponse {
|
||
|
|
return &InvoicePassResponse{
|
||
|
|
BaseResponse: &responses.BaseResponse{},
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
// InvoiceRefusParam 拒绝开发票参数
|
||
|
|
type InvoiceRefusParam struct {
|
||
|
|
InvoiceRequestId int64 `json:"invoice_request_id"`
|
||
|
|
ReviewUserName string `json:"review_user_name"`
|
||
|
|
RefusRemark string `json:"refus_remark"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// InvoiceRefusRequest 拒绝开发票请求
|
||
|
|
type InvoiceRefusRequest struct {
|
||
|
|
*requests.JsonRequest
|
||
|
|
InvoiceRequestId int64 `position:"Json" field:"invoice_request_id"`
|
||
|
|
ReviewUserName string `position:"Json" field:"review_user_name"`
|
||
|
|
RefusRemark string `position:"Json" field:"refus_remark"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// InvoiceRefusResponse 拒绝开发票响应
|
||
|
|
type InvoiceRefusResponse struct {
|
||
|
|
*responses.BaseResponse
|
||
|
|
Code int `json:"code"`
|
||
|
|
Msg string `json:"msg"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreateInvoiceRefusRequest 创建拒绝开发票请求
|
||
|
|
func CreateInvoiceRefusRequest(param InvoiceRefusParam) *InvoiceRefusRequest {
|
||
|
|
req := &InvoiceRefusRequest{
|
||
|
|
JsonRequest: &requests.JsonRequest{},
|
||
|
|
InvoiceRequestId: param.InvoiceRequestId,
|
||
|
|
ReviewUserName: param.ReviewUserName,
|
||
|
|
RefusRemark: param.RefusRemark,
|
||
|
|
}
|
||
|
|
req.InitWithApiInfo(HOST, VERSION, "/api/invoice/refus")
|
||
|
|
req.Method = requests.POST
|
||
|
|
return req
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreateInvoiceRefusResponse 创建拒绝开发票响应
|
||
|
|
func CreateInvoiceRefusResponse() *InvoiceRefusResponse {
|
||
|
|
return &InvoiceRefusResponse{
|
||
|
|
BaseResponse: &responses.BaseResponse{},
|
||
|
|
}
|
||
|
|
}
|