Method | HTTP request | Description |
---|---|---|
CleanseAndCategorizeTransactions | Post /transactions/cleanse_and_categorize | Categorize transactions |
ListUserTransactions | Get /users/{user_guid}/transactions | List transactions for a user |
ReadTransaction | Get /users/{user_guid}/transactions/{transaction_guid} | Read a transaction |
TransactionsCleanseAndCategorizeResponseBody CleanseAndCategorizeTransactions(ctx, body) Categorize transactions
Use this endpoint to categorize, cleanse, and classify transactions. These transactions are not persisted or stored on the MX platform.
package main
import (
"context"
"fmt"
"github.com/mxenabled/atrium-go"
)
func main() {
client := atrium.AtriumClient("YOUR_API_KEY", "YOUR_CLIENT_ID")
ctx := context.Background()
body := atrium.TransactionsCleanseAndCategorizeRequestBody{} // TransactionsCleanseAndCategorizeRequestBody | User object to be created with optional parameters (amount, type) amd required parameters (description, identifier)
response, _, err := client.Transactions.CleanseAndCategorizeTransactions(ctx, body)
if err != nil {
fmt.Printf("Error: %v\n", err)
} else {
fmt.Printf("Response: %s\n", response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
body | TransactionsCleanseAndCategorizeRequestBody | User object to be created with optional parameters (amount, type) amd required parameters (description, identifier) |
TransactionsCleanseAndCategorizeResponseBody
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TransactionsResponseBody ListUserTransactions(ctx, userGUID, optional) List transactions for a user
Use this endpoint to get all transactions that belong to a specific user, across all the user's members and accounts.
This endpoint accepts optional query parameters, from_date and to_date, which filter transactions according to the date they were posted. If no values are given, from_date will default to 90 days prior to the request, and to_date will default to 5 days from the time of the request.
package main
import (
"context"
"fmt"
"github.com/mxenabled/atrium-go"
"github.com/antihax/optional"
)
func main() {
client := atrium.AtriumClient("YOUR_API_KEY", "YOUR_CLIENT_ID")
ctx := context.Background()
userGUID := "USR-123" // string | The unique identifier for a `user`.
opts := &atrium.ListUserTransactionsOpts{
Page: optional.NewInt32(1), // int32 | Specify current page.
FromDate: optional.NewString("2016-09-20"), // string | Filter transactions from this date.
RecordsPerPage: optional.NewInt32(12), // int32 | Specify records per page.
ToDate: optional.NewString("2016-10-20"), // string | Filter transactions to this date.
}
response, _, err := client.Transactions.ListUserTransactions(ctx, userGUID, , opts)
if err != nil {
fmt.Printf("Error: %v\n", err)
} else {
fmt.Printf("Response: %s\n", response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userGUID | string | The unique identifier for a `user`. | |
optional | *ListUserTransactionsOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a ListUserTransactionsOpts struct
Name | Type | Description | Notes |
---|
page | optional.Int32| Specify current page. | fromDate | optional.String| Filter transactions from this date. | recordsPerPage | optional.Int32| Specify records per page. | toDate | optional.String| Filter transactions to this date. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TransactionResponseBody ReadTransaction(ctx, transactionGUID, userGUID) Read a transaction
This endpoint allows you to view information about a specific transaction that belongs to a user.
package main
import (
"context"
"fmt"
"github.com/mxenabled/atrium-go"
)
func main() {
client := atrium.AtriumClient("YOUR_API_KEY", "YOUR_CLIENT_ID")
ctx := context.Background()
transactionGUID := "TRN-123" // string | The unique identifier for a `transaction`.
userGUID := "USR-123" // string | The unique identifier for a `user`.
response, _, err := client.Transactions.ReadTransaction(ctx, transactionGUID, userGUID, )
if err != nil {
fmt.Printf("Error: %v\n", err)
} else {
fmt.Printf("Response: %s\n", response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
transactionGUID | string | The unique identifier for a `transaction`. | |
userGUID | string | The unique identifier for a `user`. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]