本文整理汇总了Golang中github.com/stripe/stripe-go.FeeRefundParams.AppendTo方法的典型用法代码示例。如果您正苦于以下问题:Golang FeeRefundParams.AppendTo方法的具体用法?Golang FeeRefundParams.AppendTo怎么用?Golang FeeRefundParams.AppendTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/stripe/stripe-go.FeeRefundParams
的用法示例。
在下文中一共展示了FeeRefundParams.AppendTo方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: Update
func (c Client) Update(id string, params *stripe.FeeRefundParams) (*stripe.FeeRefund, error) {
body := &url.Values{}
params.AppendTo(body)
refund := &stripe.FeeRefund{}
err := c.B.Call("POST", fmt.Sprintf("/application_fees/%v/refunds/%v", params.Fee, id), c.Key, body, ¶ms.Params, refund)
return refund, err
}
示例2: Get
func (c Client) Get(id string, params *stripe.FeeRefundParams) (*stripe.FeeRefund, error) {
if params == nil {
return nil, fmt.Errorf("params cannot be nil, and params.Fee must be set")
}
body := &url.Values{}
params.AppendTo(body)
refund := &stripe.FeeRefund{}
err := c.B.Call("GET", fmt.Sprintf("/application_fees/%v/refunds/%v", params.Fee, id), c.Key, body, ¶ms.Params, refund)
return refund, err
}
示例3: New
func (c Client) New(params *stripe.FeeRefundParams) (*stripe.FeeRefund, error) {
body := &url.Values{}
if params.Amount > 0 {
body.Add("amount", strconv.FormatUint(params.Amount, 10))
}
params.AppendTo(body)
refund := &stripe.FeeRefund{}
err := c.B.Call("POST", fmt.Sprintf("application_fees/%v/refunds", params.Fee), c.Key, body, ¶ms.Params, refund)
return refund, err
}