(Transaction)
- CreateAccountingTransaction - Create a transaction
- GetAccountingTransaction - Retrieve a transaction
- ListAccountingTransactions - List all transactions
- PatchAccountingTransaction - Update a transaction
- RemoveAccountingTransaction - Remove a transaction
- UpdateAccountingTransaction - Update a transaction
Create a transaction
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"context"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"log"
)
func main() {
s := unifiedgosdk.New()
ctx := context.Background()
res, err := s.Transaction.CreateAccountingTransaction(ctx, operations.CreateAccountingTransactionRequest{
ConnectionID: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res.AccountingTransaction != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.CreateAccountingTransactionRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateAccountingTransactionResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |
Retrieve a transaction
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"context"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"log"
)
func main() {
s := unifiedgosdk.New()
ctx := context.Background()
res, err := s.Transaction.GetAccountingTransaction(ctx, operations.GetAccountingTransactionRequest{
ConnectionID: "<value>",
ID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.AccountingTransaction != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetAccountingTransactionRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetAccountingTransactionResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |
List all transactions
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"context"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"log"
)
func main() {
s := unifiedgosdk.New()
ctx := context.Background()
res, err := s.Transaction.ListAccountingTransactions(ctx, operations.ListAccountingTransactionsRequest{
ConnectionID: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res.AccountingTransactions != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ListAccountingTransactionsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListAccountingTransactionsResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |
Update a transaction
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"context"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"log"
)
func main() {
s := unifiedgosdk.New()
ctx := context.Background()
res, err := s.Transaction.PatchAccountingTransaction(ctx, operations.PatchAccountingTransactionRequest{
ConnectionID: "<value>",
ID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.AccountingTransaction != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.PatchAccountingTransactionRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.PatchAccountingTransactionResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |
Remove a transaction
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"context"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"log"
)
func main() {
s := unifiedgosdk.New()
ctx := context.Background()
res, err := s.Transaction.RemoveAccountingTransaction(ctx, operations.RemoveAccountingTransactionRequest{
ConnectionID: "<value>",
ID: "<id>",
})
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.RemoveAccountingTransactionRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.RemoveAccountingTransactionResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |
Update a transaction
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"context"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"log"
)
func main() {
s := unifiedgosdk.New()
ctx := context.Background()
res, err := s.Transaction.UpdateAccountingTransaction(ctx, operations.UpdateAccountingTransactionRequest{
ConnectionID: "<value>",
ID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.AccountingTransaction != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.UpdateAccountingTransactionRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateAccountingTransactionResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |