本文整理匯總了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
}