All URIs are relative to https://api.dev.cobo.com/v2
Method | HTTP request | Description |
---|---|---|
GetApiKeyInfo | Get /developers/api_key_info | Get API key information |
ListCallbackMessages | Get /developers/callback_messages | List all callback messages |
RetryCallbackMessage | Post /developers/callback_messages/{message_id}/retry | Retry callback message |
GetApiKeyInfo200Response GetApiKeyInfo(ctx).Execute()
Get API key information
package main
import (
"context"
"fmt"
"os"
coboWaas2 "github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2"
"github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2/crypto"
)
func main() {
configuration := coboWaas2.NewConfiguration()
// Initialize the API client
apiClient := coboWaas2.NewAPIClient(configuration)
ctx := context.Background()
// Select the development environment. To use the production environment, replace coboWaas2.DevEnv with coboWaas2.ProdEnv
ctx = context.WithValue(ctx, coboWaas2.ContextEnv, coboWaas2.DevEnv)
// Replace `<YOUR_PRIVATE_KEY>` with your private key
ctx = context.WithValue(ctx, coboWaas2.ContextPortalSigner, crypto.Ed25519Signer{
Secret: "<YOUR_PRIVATE_KEY>",
})
resp, r, err := apiClient.DevelopersAPI.GetApiKeyInfo(ctx).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DevelopersAPI.GetApiKeyInfo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetApiKeyInfo`: GetApiKeyInfo200Response
fmt.Fprintf(os.Stdout, "Response from `DevelopersAPI.GetApiKeyInfo`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetApiKeyInfoRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListCallbackMessages200Response ListCallbackMessages(ctx).CallbackMessageIds(callbackMessageIds).RequestIds(requestIds).TransactionIds(transactionIds).WalletIds(walletIds).Status(status).Limit(limit).Before(before).After(after).Execute()
List all callback messages
package main
import (
"context"
"fmt"
"os"
coboWaas2 "github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2"
"github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2/crypto"
)
func main() {
callbackMessageIds := "f47ac10b-58cc-4372-a567-0e02b2c3d479,f47ac10b-58cc-4372-a567-0e02b2c3d479"
requestIds := "f47ac10b-58cc-4372-a567-0e02b2c3d479,f47ac10b-58cc-4372-a567-0e02b2c3d479"
transactionIds := "f47ac10b-58cc-4372-a567-0e02b2c3d479,f47ac10b-58cc-4372-a567-0e02b2c3d479"
walletIds := "f47ac10b-58cc-4372-a567-0e02b2c3d479,f47ac10b-58cc-4372-a567-0e02b2c3d479"
status := "Approved"
limit := int32(10)
before := "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1"
after := "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
configuration := coboWaas2.NewConfiguration()
// Initialize the API client
apiClient := coboWaas2.NewAPIClient(configuration)
ctx := context.Background()
// Select the development environment. To use the production environment, replace coboWaas2.DevEnv with coboWaas2.ProdEnv
ctx = context.WithValue(ctx, coboWaas2.ContextEnv, coboWaas2.DevEnv)
// Replace `<YOUR_PRIVATE_KEY>` with your private key
ctx = context.WithValue(ctx, coboWaas2.ContextPortalSigner, crypto.Ed25519Signer{
Secret: "<YOUR_PRIVATE_KEY>",
})
resp, r, err := apiClient.DevelopersAPI.ListCallbackMessages(ctx).CallbackMessageIds(callbackMessageIds).RequestIds(requestIds).TransactionIds(transactionIds).WalletIds(walletIds).Status(status).Limit(limit).Before(before).After(after).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DevelopersAPI.ListCallbackMessages``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListCallbackMessages`: ListCallbackMessages200Response
fmt.Fprintf(os.Stdout, "Response from `DevelopersAPI.ListCallbackMessages`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListCallbackMessagesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
callbackMessageIds | string | A list of callback message IDs, separated by commas. | |
requestIds | string | A list of request IDs, separated by commas. The request ID is provided by you and must be unique within your organization. | |
transactionIds | string | A list of transaction IDs, separated by commas. | |
walletIds | string | A list of wallet IDs, separated by commas. | |
status | string | The callback message status. Possible values include `Approved`, `Denied`, and `Failed`. | |
limit | int32 | The maximum number of objects to return. For most operations, the value range is [1, 50]. | [default to 10] |
before | string | This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned. | |
after | string | This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. Notes: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. |
ListCallbackMessages200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RetryCallbackMessage201Response RetryCallbackMessage(ctx, messageId).Execute()
Retry callback message
package main
import (
"context"
"fmt"
"os"
coboWaas2 "github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2"
"github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2/crypto"
)
func main() {
messageId := "f47ac10b-58cc-4372-a567-0e02b2c3d479"
configuration := coboWaas2.NewConfiguration()
// Initialize the API client
apiClient := coboWaas2.NewAPIClient(configuration)
ctx := context.Background()
// Select the development environment. To use the production environment, replace coboWaas2.DevEnv with coboWaas2.ProdEnv
ctx = context.WithValue(ctx, coboWaas2.ContextEnv, coboWaas2.DevEnv)
// Replace `<YOUR_PRIVATE_KEY>` with your private key
ctx = context.WithValue(ctx, coboWaas2.ContextPortalSigner, crypto.Ed25519Signer{
Secret: "<YOUR_PRIVATE_KEY>",
})
resp, r, err := apiClient.DevelopersAPI.RetryCallbackMessage(ctx, messageId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DevelopersAPI.RetryCallbackMessage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RetryCallbackMessage`: RetryCallbackMessage201Response
fmt.Fprintf(os.Stdout, "Response from `DevelopersAPI.RetryCallbackMessage`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for ServerHost/Env, Signer, etc. | |
messageId | string | The callback message ID. |
Other parameters are passed through a pointer to a apiRetryCallbackMessageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
RetryCallbackMessage201Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]