package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"github.com/latitudesh/latitudesh-go-sdk/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Teams.Update(ctx, "team_bVJM4y6m4VCyy101JzA3szlVGRb", operations.PatchCurrentTeamTeamsRequestBody{
Data: operations.PatchCurrentTeamTeamsData{
ID: "team_bVJM4y6m4VCyy101JzA3szlVGRb",
Type: operations.PatchCurrentTeamTeamsTypeTeams,
Attributes: &operations.PatchCurrentTeamTeamsAttributes{
Address: latitudeshgosdk.Pointer("Address"),
Name: latitudeshgosdk.Pointer("Name"),
},
},
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}{
"data": {
"id": "team_bVJM4y6m4VCyy101JzA3szlVGRb",
"type": "teams",
"attributes": {
"name": "Langworth-Langosh",
"slug": "langworth-langosh",
"address": "2746 Joe Stream",
"currency": "WST",
"enforce_mfa": false,
"referred_code": null
}
},
"meta": {}
}package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"github.com/latitudesh/latitudesh-go-sdk/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Teams.Update(ctx, "team_bVJM4y6m4VCyy101JzA3szlVGRb", operations.PatchCurrentTeamTeamsRequestBody{
Data: operations.PatchCurrentTeamTeamsData{
ID: "team_bVJM4y6m4VCyy101JzA3szlVGRb",
Type: operations.PatchCurrentTeamTeamsTypeTeams,
Attributes: &operations.PatchCurrentTeamTeamsAttributes{
Address: latitudeshgosdk.Pointer("Address"),
Name: latitudeshgosdk.Pointer("Name"),
},
},
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}{
"data": {
"id": "team_bVJM4y6m4VCyy101JzA3szlVGRb",
"type": "teams",
"attributes": {
"name": "Langworth-Langosh",
"slug": "langworth-langosh",
"address": "2746 Joe Stream",
"currency": "WST",
"enforce_mfa": false,
"referred_code": null
}
},
"meta": {}
}Was this page helpful?