Skip to content

Latest commit

 

History

History
1003 lines (732 loc) · 26.8 KB

BillingForestVPNAPI.md

File metadata and controls

1003 lines (732 loc) · 26.8 KB

BillingForestVPNAPI

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

cancelSubscription(subscriptionID)

Cancel subscription

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
val subscriptionID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | 
try {
    apiInstance.cancelSubscription(subscriptionID)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#cancelSubscription")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#cancelSubscription")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
subscriptionID java.util.UUID

Return type

null (empty response body)

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

createPaymentMethodStripeSetupIntent

StripeSetupIntent createPaymentMethodStripeSetupIntent(createStripeSetupIntentRequest)

Create stripe's setup intent for add new payment method.

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
val createStripeSetupIntentRequest : CreateStripeSetupIntentRequest =  // CreateStripeSetupIntentRequest | 
try {
    val result : StripeSetupIntent = apiInstance.createPaymentMethodStripeSetupIntent(createStripeSetupIntentRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#createPaymentMethodStripeSetupIntent")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#createPaymentMethodStripeSetupIntent")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
createStripeSetupIntentRequest CreateStripeSetupIntentRequest [optional]

Return type

StripeSetupIntent

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

createSubscription

Subscription createSubscription(subscription)

Create subscription

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
val subscription : Subscription =  // Subscription | 
try {
    val result : Subscription = apiInstance.createSubscription(subscription)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#createSubscription")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#createSubscription")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
subscription Subscription [optional]

Return type

Subscription

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

deletePaymentMethod

deletePaymentMethod(paymentMethodID)

Delete payment method

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
val paymentMethodID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | 
try {
    apiInstance.deletePaymentMethod(paymentMethodID)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#deletePaymentMethod")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#deletePaymentMethod")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
paymentMethodID java.util.UUID

Return type

null (empty response body)

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

getBillingAccount

BillingAccount getBillingAccount()

Billing account info

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
try {
    val result : BillingAccount = apiInstance.getBillingAccount()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#getBillingAccount")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#getBillingAccount")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

BillingAccount

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

getBillingBundle

Bundle getBillingBundle(bundleID)

Bundle info

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
val bundleID : kotlin.String = bundleID_example // kotlin.String | 
try {
    val result : Bundle = apiInstance.getBillingBundle(bundleID)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#getBillingBundle")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#getBillingBundle")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
bundleID kotlin.String

Return type

Bundle

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

getBillingPaymentOption

PaymentOption getBillingPaymentOption(paymentOptionID)

Payment option info

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
val paymentOptionID : kotlin.String = paymentOptionID_example // kotlin.String | 
try {
    val result : PaymentOption = apiInstance.getBillingPaymentOption(paymentOptionID)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#getBillingPaymentOption")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#getBillingPaymentOption")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
paymentOptionID kotlin.String

Return type

PaymentOption

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

getBillingProduct

Product getBillingProduct(productID)

Product info

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
val productID : kotlin.String = productID_example // kotlin.String | 
try {
    val result : Product = apiInstance.getBillingProduct(productID)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#getBillingProduct")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#getBillingProduct")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
productID kotlin.String

Return type

Product

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

getPaymentMethod

PaymentMethod getPaymentMethod(paymentMethodID)

Payment method info

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
val paymentMethodID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | 
try {
    val result : PaymentMethod = apiInstance.getPaymentMethod(paymentMethodID)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#getPaymentMethod")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#getPaymentMethod")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
paymentMethodID java.util.UUID

Return type

PaymentMethod

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

getSubscription

Subscription getSubscription(subscriptionID)

Subscription info

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
val subscriptionID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | 
try {
    val result : Subscription = apiInstance.getSubscription(subscriptionID)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#getSubscription")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#getSubscription")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
subscriptionID java.util.UUID

Return type

Subscription

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

getSubscriptionItem

SubscriptionItem getSubscriptionItem(subscriptionItemID)

Subscription item info

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
val subscriptionItemID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | 
try {
    val result : SubscriptionItem = apiInstance.getSubscriptionItem(subscriptionItemID)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#getSubscriptionItem")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#getSubscriptionItem")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
subscriptionItemID java.util.UUID

Return type

SubscriptionItem

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

listBillingBundles

kotlin.collections.List<Bundle> listBillingBundles()

Billing bundles list

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
try {
    val result : kotlin.collections.List<Bundle> = apiInstance.listBillingBundles()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#listBillingBundles")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#listBillingBundles")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

kotlin.collections.List<Bundle>

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

listBillingFeatures

kotlin.collections.List<BillingFeature> listBillingFeatures()

Billing feature list

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
try {
    val result : kotlin.collections.List<BillingFeature> = apiInstance.listBillingFeatures()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#listBillingFeatures")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#listBillingFeatures")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

kotlin.collections.List<BillingFeature>

Authorization

Configure bearerAuth: ApiClient.accessToken = "" Configure wireguardAuth: ApiClient.apiKey["Authorization"] = "" ApiClient.apiKeyPrefix["Authorization"] = ""

HTTP request headers

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

listBillingPaymentOptions

kotlin.collections.List<PaymentOption> listBillingPaymentOptions()

Billing payment option list

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
try {
    val result : kotlin.collections.List<PaymentOption> = apiInstance.listBillingPaymentOptions()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#listBillingPaymentOptions")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#listBillingPaymentOptions")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

kotlin.collections.List<PaymentOption>

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

listBillingProducts

kotlin.collections.List<Product> listBillingProducts()

Billing products list

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
try {
    val result : kotlin.collections.List<Product> = apiInstance.listBillingProducts()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#listBillingProducts")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#listBillingProducts")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

kotlin.collections.List<Product>

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

listPaymentMethods

kotlin.collections.List<PaymentMethod> listPaymentMethods()

Payment method list

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
try {
    val result : kotlin.collections.List<PaymentMethod> = apiInstance.listPaymentMethods()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#listPaymentMethods")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#listPaymentMethods")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

kotlin.collections.List<PaymentMethod>

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

listSubscriptionItems

kotlin.collections.List<SubscriptionItem> listSubscriptionItems(subscription, perPage, page)

Subscription items list

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
val subscription : kotlin.String = subscription_example // kotlin.String | 
val perPage : kotlin.Int = 56 // kotlin.Int | 
val page : kotlin.Int = 56 // kotlin.Int | 
try {
    val result : kotlin.collections.List<SubscriptionItem> = apiInstance.listSubscriptionItems(subscription, perPage, page)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#listSubscriptionItems")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#listSubscriptionItems")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
subscription kotlin.String [optional]
perPage kotlin.Int [optional]
page kotlin.Int [optional]

Return type

kotlin.collections.List<SubscriptionItem>

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

listSubscriptions

kotlin.collections.List<Subscription> listSubscriptions(product, perPage, page)

Billing subscriptions list

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
val product : kotlin.String = product_example // kotlin.String | 
val perPage : kotlin.Int = 56 // kotlin.Int | 
val page : kotlin.Int = 56 // kotlin.Int | 
try {
    val result : kotlin.collections.List<Subscription> = apiInstance.listSubscriptions(product, perPage, page)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#listSubscriptions")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#listSubscriptions")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
product kotlin.String [optional]
perPage kotlin.Int [optional]
page kotlin.Int [optional]

Return type

kotlin.collections.List<Subscription>

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

reactivateSubscription

Subscription reactivateSubscription(subscriptionID)

Reactivate subscription

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
val subscriptionID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | 
try {
    val result : Subscription = apiInstance.reactivateSubscription(subscriptionID)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#reactivateSubscription")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#reactivateSubscription")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
subscriptionID java.util.UUID

Return type

Subscription

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

updateBillingAccount

BillingAccount updateBillingAccount(billingAccount)

Update billing account

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
val billingAccount : BillingAccount =  // BillingAccount | 
try {
    val result : BillingAccount = apiInstance.updateBillingAccount(billingAccount)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#updateBillingAccount")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#updateBillingAccount")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
billingAccount BillingAccount

Return type

BillingAccount

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

updateSubscriptionItem

SubscriptionItem updateSubscriptionItem(subscriptionItemID, subscriptionItem)

Update subscription item

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = BillingForestVPNAPI()
val subscriptionItemID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | 
val subscriptionItem : SubscriptionItem =  // SubscriptionItem | 
try {
    val result : SubscriptionItem = apiInstance.updateSubscriptionItem(subscriptionItemID, subscriptionItem)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling BillingForestVPNAPI#updateSubscriptionItem")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling BillingForestVPNAPI#updateSubscriptionItem")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
subscriptionItemID java.util.UUID
subscriptionItem SubscriptionItem

Return type

SubscriptionItem

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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