(Taxrate)
- CreateAccountingTaxrate - Create a taxrate
- GetAccountingTaxrate - Retrieve a taxrate
- ListAccountingTaxrates - List all taxrates
- PatchAccountingTaxrate - Update a taxrate
- RemoveAccountingTaxrate - Remove a taxrate
- UpdateAccountingTaxrate - Update a taxrate
Create a taxrate
package main
import(
"os"
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"context"
"log"
)
func main() {
s := unifiedgosdk.New(
unifiedgosdk.WithSecurity(os.Getenv("JWT")),
)
request := operations.CreateAccountingTaxrateRequest{
ConnectionID: "<value>",
}
ctx := context.Background()
res, err := s.Taxrate.CreateAccountingTaxrate(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.AccountingTaxrate != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.CreateAccountingTaxrateRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateAccountingTaxrateResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Retrieve a taxrate
package main
import(
"os"
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"context"
"log"
)
func main() {
s := unifiedgosdk.New(
unifiedgosdk.WithSecurity(os.Getenv("JWT")),
)
request := operations.GetAccountingTaxrateRequest{
ConnectionID: "<value>",
ID: "<id>",
}
ctx := context.Background()
res, err := s.Taxrate.GetAccountingTaxrate(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.AccountingTaxrate != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetAccountingTaxrateRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetAccountingTaxrateResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
List all taxrates
package main
import(
"os"
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"context"
"log"
)
func main() {
s := unifiedgosdk.New(
unifiedgosdk.WithSecurity(os.Getenv("JWT")),
)
request := operations.ListAccountingTaxratesRequest{
ConnectionID: "<value>",
}
ctx := context.Background()
res, err := s.Taxrate.ListAccountingTaxrates(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.AccountingTaxrates != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ListAccountingTaxratesRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListAccountingTaxratesResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Update a taxrate
package main
import(
"os"
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"context"
"log"
)
func main() {
s := unifiedgosdk.New(
unifiedgosdk.WithSecurity(os.Getenv("JWT")),
)
request := operations.PatchAccountingTaxrateRequest{
ConnectionID: "<value>",
ID: "<id>",
}
ctx := context.Background()
res, err := s.Taxrate.PatchAccountingTaxrate(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.AccountingTaxrate != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.PatchAccountingTaxrateRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.PatchAccountingTaxrateResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Remove a taxrate
package main
import(
"os"
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"context"
"log"
)
func main() {
s := unifiedgosdk.New(
unifiedgosdk.WithSecurity(os.Getenv("JWT")),
)
request := operations.RemoveAccountingTaxrateRequest{
ConnectionID: "<value>",
ID: "<id>",
}
ctx := context.Background()
res, err := s.Taxrate.RemoveAccountingTaxrate(ctx, request)
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.RemoveAccountingTaxrateRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.RemoveAccountingTaxrateResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Update a taxrate
package main
import(
"os"
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"context"
"log"
)
func main() {
s := unifiedgosdk.New(
unifiedgosdk.WithSecurity(os.Getenv("JWT")),
)
request := operations.UpdateAccountingTaxrateRequest{
ConnectionID: "<value>",
ID: "<id>",
}
ctx := context.Background()
res, err := s.Taxrate.UpdateAccountingTaxrate(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.AccountingTaxrate != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.UpdateAccountingTaxrateRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateAccountingTaxrateResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |