Skip to content

Latest commit

 

History

History
204 lines (130 loc) · 5.34 KB

File metadata and controls

204 lines (130 loc) · 5.34 KB

HyperstackApi.UserApi

All URIs are relative to https://infrahub-api.nexgencloud.com/v1

Method HTTP request Description
addUserBillingInfo POST /billing/user/info POST: Insert billing info
getAllowedCountryCodes GET /billing/user/countries GET: Retrieve allowed country codes
getUserBillingInfo GET /billing/user/info GET: Retrieve billing info
updateUserBillingInfo PUT /billing/user/info PUT: Update billing info

addUserBillingInfo

AddUserInfoSuccessResponseModel addUserBillingInfo(payload)

POST: Insert billing info

Add billing details associated with your user in the request body.

Example

import HyperstackApi from '@nexgencloud/hyperstack-sdk-javascript';
let defaultClient = HyperstackApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

let apiInstance = new HyperstackApi.UserApi();
let payload = new HyperstackApi.UserInfoPostPayload(); // UserInfoPostPayload | 
apiInstance.addUserBillingInfo(payload).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
payload UserInfoPostPayload

Return type

AddUserInfoSuccessResponseModel

Authorization

apiKey

HTTP request headers

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

getAllowedCountryCodes

AllowedCountriesResponse getAllowedCountryCodes()

GET: Retrieve allowed country codes

Retrieve the list of allowed ISO 3166-1 alpha-2 country codes that can be used for billing information.

Example

import HyperstackApi from '@nexgencloud/hyperstack-sdk-javascript';
let defaultClient = HyperstackApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

let apiInstance = new HyperstackApi.UserApi();
apiInstance.getAllowedCountryCodes().then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

This endpoint does not need any parameter.

Return type

AllowedCountriesResponse

Authorization

apiKey

HTTP request headers

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

getUserBillingInfo

UsersInfoListResponse getUserBillingInfo()

GET: Retrieve billing info

Retrieve the billing details associated with your user.

Example

import HyperstackApi from '@nexgencloud/hyperstack-sdk-javascript';
let defaultClient = HyperstackApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

let apiInstance = new HyperstackApi.UserApi();
apiInstance.getUserBillingInfo().then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

This endpoint does not need any parameter.

Return type

UsersInfoListResponse

Authorization

apiKey

HTTP request headers

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

updateUserBillingInfo

AddUserInfoSuccessResponseModel updateUserBillingInfo(payload)

PUT: Update billing info

Update the billing information for your user in the request body.

Example

import HyperstackApi from '@nexgencloud/hyperstack-sdk-javascript';
let defaultClient = HyperstackApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

let apiInstance = new HyperstackApi.UserApi();
let payload = new HyperstackApi.UserInfoPostPayload(); // UserInfoPostPayload | 
apiInstance.updateUserBillingInfo(payload).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
payload UserInfoPostPayload

Return type

AddUserInfoSuccessResponseModel

Authorization

apiKey

HTTP request headers

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