(Invoices)
- Regenerate - Regenerate an invoice
Regenerate a voided contract invoice
package main
import(
metronomegosdk "github.com/speakeasy-sdks/metronome-go-sdk"
"github.com/speakeasy-sdks/metronome-go-sdk/models/operations"
"context"
"log"
)
func main() {
s := metronomegosdk.New(
metronomegosdk.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
var request *operations.RegenerateInvoiceRequestBody = &operations.RegenerateInvoiceRequestBody{
ID: "6a37bb88-8538-48c5-b37b-a41c836328bd",
}
ctx := context.Background()
res, err := s.Invoices.Regenerate(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.RegenerateInvoiceRequestBody | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.RegenerateInvoiceResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |