All URIs are relative to https://api.forestvpn.com/v2
Method | HTTP request | Description |
---|---|---|
CancelSubscription | Delete /billing/subscriptions/{subscriptionID}/ | Cancel subscription |
CreatePaymentMethodStripeSetupIntent | Post /billing/payment-methods/stripe/setup-intents/ | Create stripe's setup intent for add new payment method. |
CreateSubscription | Post /billing/subscriptions/ | Create subscription |
DeletePaymentMethod | Delete /billing/payment-methods/{paymentMethodID}/ | Delete payment method |
GetBillingAccount | Get /billing/account/ | Billing account info |
GetBillingBundle | Get /billing/bundles/{bundleID}/ | Bundle info |
GetBillingPaymentOption | Get /billing/payment-options/{paymentOptionID}/ | Payment option info |
GetBillingProduct | Get /billing/products/{productID}/ | Product info |
GetPaymentMethod | Get /billing/payment-methods/{paymentMethodID}/ | Payment method info |
GetSubscription | Get /billing/subscriptions/{subscriptionID}/ | Subscription info |
GetSubscriptionItem | Get /billing/subscription-items/{subscriptionItemID}/ | Subscription item info |
ListBillingBundles | Get /billing/bundles/ | Billing bundles list |
ListBillingFeatures | Get /billing/features/ | Billing feature list |
ListBillingPaymentOptions | Get /billing/payment-options/ | Billing payment option list |
ListBillingProducts | Get /billing/products/ | Billing products list |
ListPaymentMethods | Get /billing/payment-methods/ | Payment method list |
ListSubscriptionItems | Get /billing/subscription-items/ | Subscription items list |
ListSubscriptions | Get /billing/subscriptions/ | Billing subscriptions list |
ReactivateSubscription | Post /billing/subscriptions/{subscriptionID}/reactivate/ | Reactivate subscription |
UpdateBillingAccount | Patch /billing/account/ | Update billing account |
UpdateSubscriptionItem | Patch /billing/subscription-items/{subscriptionItemID}/ | Update subscription item |
CancelSubscription(ctx, subscriptionID).Execute()
Cancel subscription
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
subscriptionID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.CancelSubscription(context.Background(), subscriptionID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.CancelSubscription``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
subscriptionID | string |
Other parameters are passed through a pointer to a apiCancelSubscriptionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StripeSetupIntent CreatePaymentMethodStripeSetupIntent(ctx).CreateStripeSetupIntentRequest(createStripeSetupIntentRequest).Execute()
Create stripe's setup intent for add new payment method.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
createStripeSetupIntentRequest := *openapiclient.NewCreateStripeSetupIntentRequest() // CreateStripeSetupIntentRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.CreatePaymentMethodStripeSetupIntent(context.Background()).CreateStripeSetupIntentRequest(createStripeSetupIntentRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.CreatePaymentMethodStripeSetupIntent``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreatePaymentMethodStripeSetupIntent`: StripeSetupIntent
fmt.Fprintf(os.Stdout, "Response from `BillingApi.CreatePaymentMethodStripeSetupIntent`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreatePaymentMethodStripeSetupIntentRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createStripeSetupIntentRequest | CreateStripeSetupIntentRequest |
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Subscription CreateSubscription(ctx).Subscription(subscription).Execute()
Create subscription
package main
import (
"context"
"fmt"
"os"
"time"
openapiclient "./openapi"
)
func main() {
subscription := *openapiclient.NewSubscription("Id_example", time.Now(), time.Now(), time.Now(), openapiclient.SubscriptionStatus("unknown")) // Subscription | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.CreateSubscription(context.Background()).Subscription(subscription).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.CreateSubscription``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateSubscription`: Subscription
fmt.Fprintf(os.Stdout, "Response from `BillingApi.CreateSubscription`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateSubscriptionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
subscription | Subscription |
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeletePaymentMethod(ctx, paymentMethodID).Execute()
Delete payment method
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
paymentMethodID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.DeletePaymentMethod(context.Background(), paymentMethodID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.DeletePaymentMethod``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
paymentMethodID | string |
Other parameters are passed through a pointer to a apiDeletePaymentMethodRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BillingAccount GetBillingAccount(ctx).Execute()
Billing account info
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.GetBillingAccount(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.GetBillingAccount``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetBillingAccount`: BillingAccount
fmt.Fprintf(os.Stdout, "Response from `BillingApi.GetBillingAccount`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetBillingAccountRequest 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]
Bundle GetBillingBundle(ctx, bundleID).Execute()
Bundle info
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
bundleID := "bundleID_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.GetBillingBundle(context.Background(), bundleID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.GetBillingBundle``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetBillingBundle`: Bundle
fmt.Fprintf(os.Stdout, "Response from `BillingApi.GetBillingBundle`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
bundleID | string |
Other parameters are passed through a pointer to a apiGetBillingBundleRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaymentOption GetBillingPaymentOption(ctx, paymentOptionID).Execute()
Payment option info
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
paymentOptionID := "paymentOptionID_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.GetBillingPaymentOption(context.Background(), paymentOptionID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.GetBillingPaymentOption``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetBillingPaymentOption`: PaymentOption
fmt.Fprintf(os.Stdout, "Response from `BillingApi.GetBillingPaymentOption`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
paymentOptionID | string |
Other parameters are passed through a pointer to a apiGetBillingPaymentOptionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Product GetBillingProduct(ctx, productID).Execute()
Product info
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
productID := "productID_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.GetBillingProduct(context.Background(), productID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.GetBillingProduct``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetBillingProduct`: Product
fmt.Fprintf(os.Stdout, "Response from `BillingApi.GetBillingProduct`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
productID | string |
Other parameters are passed through a pointer to a apiGetBillingProductRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaymentMethod GetPaymentMethod(ctx, paymentMethodID).Execute()
Payment method info
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
paymentMethodID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.GetPaymentMethod(context.Background(), paymentMethodID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.GetPaymentMethod``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetPaymentMethod`: PaymentMethod
fmt.Fprintf(os.Stdout, "Response from `BillingApi.GetPaymentMethod`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
paymentMethodID | string |
Other parameters are passed through a pointer to a apiGetPaymentMethodRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Subscription GetSubscription(ctx, subscriptionID).Execute()
Subscription info
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
subscriptionID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.GetSubscription(context.Background(), subscriptionID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.GetSubscription``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSubscription`: Subscription
fmt.Fprintf(os.Stdout, "Response from `BillingApi.GetSubscription`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
subscriptionID | string |
Other parameters are passed through a pointer to a apiGetSubscriptionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SubscriptionItem GetSubscriptionItem(ctx, subscriptionItemID).Execute()
Subscription item info
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
subscriptionItemID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.GetSubscriptionItem(context.Background(), subscriptionItemID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.GetSubscriptionItem``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSubscriptionItem`: SubscriptionItem
fmt.Fprintf(os.Stdout, "Response from `BillingApi.GetSubscriptionItem`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
subscriptionItemID | string |
Other parameters are passed through a pointer to a apiGetSubscriptionItemRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Bundle ListBillingBundles(ctx).Execute()
Billing bundles list
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.ListBillingBundles(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.ListBillingBundles``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListBillingBundles`: []Bundle
fmt.Fprintf(os.Stdout, "Response from `BillingApi.ListBillingBundles`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListBillingBundlesRequest 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]
[]BillingFeature ListBillingFeatures(ctx).Execute()
Billing feature list
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.ListBillingFeatures(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.ListBillingFeatures``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListBillingFeatures`: []BillingFeature
fmt.Fprintf(os.Stdout, "Response from `BillingApi.ListBillingFeatures`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListBillingFeaturesRequest 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]
[]PaymentOption ListBillingPaymentOptions(ctx).Execute()
Billing payment option list
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.ListBillingPaymentOptions(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.ListBillingPaymentOptions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListBillingPaymentOptions`: []PaymentOption
fmt.Fprintf(os.Stdout, "Response from `BillingApi.ListBillingPaymentOptions`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListBillingPaymentOptionsRequest 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]
[]Product ListBillingProducts(ctx).Execute()
Billing products list
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.ListBillingProducts(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.ListBillingProducts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListBillingProducts`: []Product
fmt.Fprintf(os.Stdout, "Response from `BillingApi.ListBillingProducts`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListBillingProductsRequest 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]
[]PaymentMethod ListPaymentMethods(ctx).Execute()
Payment method list
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.ListPaymentMethods(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.ListPaymentMethods``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListPaymentMethods`: []PaymentMethod
fmt.Fprintf(os.Stdout, "Response from `BillingApi.ListPaymentMethods`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListPaymentMethodsRequest 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]
[]SubscriptionItem ListSubscriptionItems(ctx).Subscription(subscription).PerPage(perPage).Page(page).Execute()
Subscription items list
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
subscription := "subscription_example" // string | (optional)
perPage := int32(56) // int32 | (optional)
page := int32(56) // int32 | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.ListSubscriptionItems(context.Background()).Subscription(subscription).PerPage(perPage).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.ListSubscriptionItems``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListSubscriptionItems`: []SubscriptionItem
fmt.Fprintf(os.Stdout, "Response from `BillingApi.ListSubscriptionItems`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListSubscriptionItemsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
subscription | string | ||
perPage | int32 | ||
page | int32 |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Subscription ListSubscriptions(ctx).Product(product).PerPage(perPage).Page(page).Execute()
Billing subscriptions list
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
product := "product_example" // string | (optional)
perPage := int32(56) // int32 | (optional)
page := int32(56) // int32 | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.ListSubscriptions(context.Background()).Product(product).PerPage(perPage).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.ListSubscriptions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListSubscriptions`: []Subscription
fmt.Fprintf(os.Stdout, "Response from `BillingApi.ListSubscriptions`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListSubscriptionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
product | string | ||
perPage | int32 | ||
page | int32 |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Subscription ReactivateSubscription(ctx, subscriptionID).Execute()
Reactivate subscription
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
subscriptionID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.ReactivateSubscription(context.Background(), subscriptionID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.ReactivateSubscription``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ReactivateSubscription`: Subscription
fmt.Fprintf(os.Stdout, "Response from `BillingApi.ReactivateSubscription`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
subscriptionID | string |
Other parameters are passed through a pointer to a apiReactivateSubscriptionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BillingAccount UpdateBillingAccount(ctx).BillingAccount(billingAccount).Execute()
Update billing account
package main
import (
"context"
"fmt"
"os"
"time"
openapiclient "./openapi"
)
func main() {
billingAccount := *openapiclient.NewBillingAccount("Id_example", *openapiclient.NewPaymentMethod("Id_example", openapiclient.PaymentMethodType("card"), time.Now()), "DefaultPaymentMethodId_example") // BillingAccount |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.UpdateBillingAccount(context.Background()).BillingAccount(billingAccount).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.UpdateBillingAccount``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateBillingAccount`: BillingAccount
fmt.Fprintf(os.Stdout, "Response from `BillingApi.UpdateBillingAccount`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiUpdateBillingAccountRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
billingAccount | BillingAccount |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SubscriptionItem UpdateSubscriptionItem(ctx, subscriptionItemID).SubscriptionItem(subscriptionItem).Execute()
Update subscription item
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
subscriptionItemID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
subscriptionItem := *openapiclient.NewSubscriptionItem("Id_example", *openapiclient.NewPrice("Id_example", "Currency_example", float64(123)), "PriceId_example", int32(123)) // SubscriptionItem |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BillingApi.UpdateSubscriptionItem(context.Background(), subscriptionItemID).SubscriptionItem(subscriptionItem).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BillingApi.UpdateSubscriptionItem``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateSubscriptionItem`: SubscriptionItem
fmt.Fprintf(os.Stdout, "Response from `BillingApi.UpdateSubscriptionItem`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
subscriptionItemID | string |
Other parameters are passed through a pointer to a apiUpdateSubscriptionItemRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
subscriptionItem | SubscriptionItem | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]