Skip to content
  • Auto
  • Light
  • Dark
Talk to an expert

List

List pricing units
client.V1.PricingUnits.List(ctx, query) (*CursorPage[IDstringIsCurrencyboolNamestringV1PricingUnitListResponse], error)
get/v1/credit-types/list

List all pricing units (known in the API by the legacy term "credit types").

Parameters
queryLimitfieldNextPagefieldV1PricingUnitListParams
Hide ParametersShow Parameters
Limitfield
optional
param.Field[int64]

Max number of results that should be returned

minimum1
maximum100
NextPagefield
optional
param.Field[string]

Cursor that indicates where the next page of results should start.

Returns
V1PricingUnitListResponsestruct
Hide ParametersShow Parameters
IDstring
optional
formatuuid
IsCurrencybool
optional
Namestring
optional
package main

import (
  "context"
  "fmt"

  "github.com/Metronome-Industries/metronome-go"
  "github.com/Metronome-Industries/metronome-go/option"
)

func main() {
  client := metronome.NewClient(
    option.WithBearerToken("My Bearer Token"),
  )
  page, err := client.V1.PricingUnits.List(context.TODO(), metronome.V1PricingUnitListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
200 Example
{
  "data": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "is_currency": true,
      "name": "name"
    }
  ],
  "next_page": "next_page"
}