Authorizations
Body
Response
201 - application/vnd.api+json
Created
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.Create(ctx, operations.PostTeamTeamsRequestBody{
Data: operations.PostTeamTeamsData{
Type: operations.PostTeamTeamsTypeTeams,
Attributes: &operations.PostTeamTeamsAttributes{
Name: "Name",
Currency: operations.PostTeamCurrencyUsd,
Address: latitudeshgosdk.Pointer("Address"),
},
},
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}{
"data": {
"id": "team_zp6AZ91ZbLt8A7x47b6oI1510LV0",
"type": "teams",
"attributes": {
"name": "Name",
"slug": "name",
"address": "Address",
"currency": "USD",
"token": "token-for-team",
"enforce_mfa": false,
"customer_billing_id": "cus_w79w7tlr",
"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.Create(ctx, operations.PostTeamTeamsRequestBody{
Data: operations.PostTeamTeamsData{
Type: operations.PostTeamTeamsTypeTeams,
Attributes: &operations.PostTeamTeamsAttributes{
Name: "Name",
Currency: operations.PostTeamCurrencyUsd,
Address: latitudeshgosdk.Pointer("Address"),
},
},
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}{
"data": {
"id": "team_zp6AZ91ZbLt8A7x47b6oI1510LV0",
"type": "teams",
"attributes": {
"name": "Name",
"slug": "name",
"address": "Address",
"currency": "USD",
"token": "token-for-team",
"enforce_mfa": false,
"customer_billing_id": "cus_w79w7tlr",
"referred_code": null
}
},
"meta": {}
}Show child attributes
Created
Show child attributes
Was this page helpful?