(Subscriptions)
REST APIs for managing subscriptions
- ActivateSubscriptionNamespace - Activate an ignored namespace for a subscription
- IgnoreSubscriptionNamespace - Ignored a namespace for a subscription
Activate an ignored namespace for a subscription
package main
import(
"context"
speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := speakeasyclientsdkgo.New(
speakeasyclientsdkgo.WithSecurity(shared.Security{
APIKey: speakeasyclientsdkgo.String("<YOUR_API_KEY_HERE>"),
}),
)
res, err := s.Subscriptions.ActivateSubscriptionNamespace(ctx, operations.ActivateSubscriptionNamespaceRequest{
NamespaceName: "<value>",
SubscriptionID: "<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.ActivateSubscriptionNamespaceRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ActivateSubscriptionNamespaceResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.Error | 4XX | application/json |
sdkerrors.SDKError | 5XX | */* |
Ignored a namespace for a subscription
package main
import(
"context"
speakeasyclientsdkgo "github.com/speakeasy-api/speakeasy-client-sdk-go/v3"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared"
"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := speakeasyclientsdkgo.New(
speakeasyclientsdkgo.WithSecurity(shared.Security{
APIKey: speakeasyclientsdkgo.String("<YOUR_API_KEY_HERE>"),
}),
)
res, err := s.Subscriptions.IgnoreSubscriptionNamespace(ctx, operations.IgnoreSubscriptionNamespaceRequest{
NamespaceName: "<value>",
SubscriptionID: "<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.IgnoreSubscriptionNamespaceRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.IgnoreSubscriptionNamespaceResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.Error | 4XX | application/json |
sdkerrors.SDKError | 5XX | */* |