You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-library/service/leshuazf/apiv2.merchant.updateAuthor...

36 lines
1.5 KiB

2 years ago
package leshuazf
import (
1 year ago
"context"
1 year ago
"github.com/dtapps/go-library/utils/gojson"
2 years ago
"github.com/dtapps/go-library/utils/gorequest"
2 years ago
"net/http"
)
type ApiV2MerchantUpdateAuthorityResponse struct {
}
type ApiV2MerchantUpdateAuthorityResult struct {
Result ApiV2MerchantUpdateAuthorityResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
2 years ago
Err error // 错误
}
func newApiV2MerchantUpdateAuthorityResult(result ApiV2MerchantUpdateAuthorityResponse, body []byte, http gorequest.Response, err error) *ApiV2MerchantUpdateAuthorityResult {
return &ApiV2MerchantUpdateAuthorityResult{Result: result, Body: body, Http: http, Err: err}
2 years ago
}
// ApiV2MerchantUpdateAuthority 给商户开通D0交易/结算权限接口。其中D0交易影响交易接口内t0字段能否标1D0结算影响商户该种支付方式的秒到
// https://www.yuque.com/leshuazf/doc/dbmxyi#Vw97n
1 year ago
func (c *Client) ApiV2MerchantUpdateAuthority(ctx context.Context, notMustParams ...gorequest.Params) *ApiV2MerchantUpdateAuthorityResult {
2 years ago
// 参数
params := gorequest.NewParamsWith(notMustParams...)
2 years ago
// 请求
1 year ago
request, err := c.request(ctx, "/apiv2/merchant/updateAuthority", params, http.MethodPost)
2 years ago
// 定义
var response ApiV2MerchantUpdateAuthorityResponse
1 year ago
err = gojson.Unmarshal(request.ResponseBody, &response)
return newApiV2MerchantUpdateAuthorityResult(response, request.ResponseBody, request, err)
2 years ago
}