github.com/stripe/stripe-go/v76@v76.25.0/testhelpers/refund/client.go (about) 1 // 2 // 3 // File generated from our OpenAPI spec 4 // 5 // 6 7 // Package refund provides the /refunds APIs 8 package refund 9 10 import ( 11 "net/http" 12 13 stripe "github.com/stripe/stripe-go/v76" 14 ) 15 16 // Client is used to invoke /refunds APIs. 17 type Client struct { 18 B stripe.Backend 19 Key string 20 } 21 22 // Expire is the method for the `POST /v1/test_helpers/refunds/{refund}/expire` API. 23 func Expire(id string, params *stripe.TestHelpersRefundExpireParams) (*stripe.Refund, error) { 24 return getC().Expire(id, params) 25 } 26 27 // Expire is the method for the `POST /v1/test_helpers/refunds/{refund}/expire` API. 28 func (c Client) Expire(id string, params *stripe.TestHelpersRefundExpireParams) (*stripe.Refund, error) { 29 path := stripe.FormatURLPath("/v1/test_helpers/refunds/%s/expire", id) 30 refund := &stripe.Refund{} 31 err := c.B.Call(http.MethodPost, path, c.Key, params, refund) 32 return refund, err 33 } 34 35 func getC() Client { 36 return Client{stripe.GetBackend(stripe.APIBackend), stripe.Key} 37 }