Skip to content

Latest commit

 

History

History
58 lines (43 loc) · 3.11 KB

README.md

File metadata and controls

58 lines (43 loc) · 3.11 KB

Invoices

(Invoices)

Available Operations

Regenerate

Regenerate a voided contract invoice

Example Usage

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
    }
}

Parameters

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.

Response

*operations.RegenerateInvoiceResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /