本文整理汇总了Golang中github.com/stripe/stripe-go.FeeRefundParams类的典型用法代码示例。如果您正苦于以下问题:Golang FeeRefundParams类的具体用法?Golang FeeRefundParams怎么用?Golang FeeRefundParams使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FeeRefundParams类的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
}