本文整理匯總了Golang中github.com/stripe/stripe-go.DisputeParams類的典型用法代碼示例。如果您正苦於以下問題:Golang DisputeParams類的具體用法?Golang DisputeParams怎麽用?Golang DisputeParams使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了DisputeParams類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Get
func (c Client) Get(id string, params *stripe.DisputeParams) (*stripe.Dispute, error) {
var body *stripe.RequestValues
var commonParams *stripe.Params
if params != nil {
commonParams = ¶ms.Params
body = &stripe.RequestValues{}
params.AppendTo(body)
}
dispute := &stripe.Dispute{}
err := c.B.Call("GET", "/disputes/"+id, c.Key, body, commonParams, dispute)
return dispute, err
}
示例2: Update
func (c Client) Update(id string, params *stripe.DisputeParams) (*stripe.Dispute, error) {
var body *stripe.RequestValues
var commonParams *stripe.Params
if params != nil {
commonParams = ¶ms.Params
body = &stripe.RequestValues{}
if params.Evidence != nil {
params.Evidence.AppendDetails(body)
}
params.AppendTo(body)
}
dispute := &stripe.Dispute{}
err := c.B.Call("POST", fmt.Sprintf("/disputes/%v", id), c.Key, body, commonParams, dispute)
return dispute, err
}