Skip to content

Latest commit

 

History

History
137 lines (85 loc) · 3.5 KB

File metadata and controls

137 lines (85 loc) · 3.5 KB

\SubscriptionApi

All URIs are relative to http://localhost

Method HTTP request Description
GetSubscription Get /subscription Get subscription info
PostSubscription Post /subscription Submit a new license to update the subscription

GetSubscription

SubscriptionState GetSubscription(ctx).Execute()

Get subscription info

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SubscriptionApi.GetSubscription(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionApi.GetSubscription``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetSubscription`: SubscriptionState
    fmt.Fprintf(os.Stdout, "Response from `SubscriptionApi.GetSubscription`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetSubscriptionRequest struct via the builder pattern

Return type

SubscriptionState

Authorization

ApiToken, ServiceBearer, ServiceToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostSubscription

SubscriptionState PostSubscription(ctx).NewLicense(newLicense).Execute()

Submit a new license to update the subscription

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    newLicense := *openapiclient.NewNewLicense("Key_example") // NewLicense | The new license

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SubscriptionApi.PostSubscription(context.Background()).NewLicense(newLicense).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionApi.PostSubscription``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PostSubscription`: SubscriptionState
    fmt.Fprintf(os.Stdout, "Response from `SubscriptionApi.PostSubscription`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiPostSubscriptionRequest struct via the builder pattern

Name Type Description Notes
newLicense NewLicense The new license

Return type

SubscriptionState

Authorization

ApiToken, ServiceBearer, ServiceToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]