Skip to content
Book a demoContact usGet started

Create Rate Catalog

client.RateCatalogs.New(ctx, body) (*RateCatalogNewResponse, error)
post/rate-catalogs

Create Rate Catalog

ParametersExpand Collapse
body RateCatalogNewParams
Description param.Field[string]

The description of the catalog.

Name param.Field[string]

The name of the catalog.

ReturnsExpand Collapse
type RateCatalogNewResponse struct{…}
ID string
Description string
Name string
RateCount int64
Create Rate Catalog
package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/lark-go"
  "github.com/stainless-sdks/lark-go/option"
)

func main() {
  client := lark.NewClient(
    option.WithAPIKey("My API Key"),
  )
  rateCatalog, err := client.RateCatalogs.New(context.TODO(), lark.RateCatalogNewParams{
    Description: "My Catalog Description",
    Name: "My Catalog",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", rateCatalog.ID)
}
{
  "id": "rate_catalog_AJWMxR81jxoRlli6p13uf3JB",
  "description": "Rates for EC2 usage",
  "name": "EC2 Rates",
  "rate_count": 5
}
Returns Examples
{
  "id": "rate_catalog_AJWMxR81jxoRlli6p13uf3JB",
  "description": "Rates for EC2 usage",
  "name": "EC2 Rates",
  "rate_count": 5
}