package main
import (
"context"
sdkgo "github.com/apideck-libraries/sdk-go"
"github.com/apideck-libraries/sdk-go/models/components"
"github.com/apideck-libraries/sdk-go/models/operations"
"log"
"os"
)
func main() {
s := sdkgo.New(
sdkgo.WithSecurity(os.Getenv("<insert-api-key-here>")),
sdkgo.WithConsumerID("<insert-consumer-id-here>"),
sdkgo.WithAppID("<insert-application-id-here>"),
)
ctx := context.Background()
res, err := s.Accounting.TaxRates.List(ctx, operations.AccountingTaxRatesAllRequest{
ServiceID: sdkgo.String("salesforce"),
Filter: &components.TaxRatesFilter{
Assets: sdkgo.Bool(true),
Equity: sdkgo.Bool(true),
Expenses: sdkgo.Bool(true),
Liabilities: sdkgo.Bool(true),
Revenue: sdkgo.Bool(true),
},
PassThrough: map[string]any{
"search": "San Francisco",
},
Fields: sdkgo.String("id,updated_at"),
})
if err != nil {
log.Fatal(err)
}
if res.GetTaxRatesResponse != nil {
// handle response
}
}