feat: migrate all remaining modules from rainyun-go-sdk
- domain(24), product(8), rbm(10), rca(21), rgs(38), ros(19), ssl(5), user(10), workorder(11), public remaining 5 - split nested response structs into reusable named types - rgs reuses rcs request/response types - fix source bugs: malformed paths, resp vs &resp, missing bodies - register all 11 services in sdk.New
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package product
|
||||
|
||||
import (
|
||||
"github.com/XingfenD/rainyun_api_go_sdk/apis/common"
|
||||
"github.com/XingfenD/rainyun_api_go_sdk/constant"
|
||||
)
|
||||
|
||||
// 积分续费请求
|
||||
type PointRenewalRequest struct {
|
||||
DurationDay int `json:"duration_day"` // 续费天数
|
||||
ProductID int `json:"product_id"` // 产品ID
|
||||
ProductType string `json:"product_type"` // 产品类型: rcs/rgs/ros/rvh/rcdn
|
||||
}
|
||||
|
||||
// 积分续费
|
||||
func (s *ProductService) PointRenewal(req *PointRenewalRequest) (*common.BasicOperationResponse, error) {
|
||||
path := "/product/point_renew"
|
||||
|
||||
var resp common.BasicOperationResponse
|
||||
err := s.client.Do(constant.HTTPMethod_POST, path, nil, req, &resp)
|
||||
return &resp, err
|
||||
}
|
||||
Reference in New Issue
Block a user