Skip to content

Latest commit

 

History

History
1254 lines (898 loc) · 40.2 KB

File metadata and controls

1254 lines (898 loc) · 40.2 KB

liveagent_api.SubscriptionsApi

All URIs are relative to http://localhost/api/v3

Method HTTP request Description
change_addons PUT /subscriptions/{subscriptionId}/addons/ Addon change
change_plan POST /subscriptions/{subscriptionId}/_upgrade Change plan
get_active_addons GET /subscriptions/{subscriptionId}/addons/ Addon list
get_billing_info GET /subscriptions/{subscriptionId}/billingInfo Billing info
get_billing_metrics GET /subscriptions/{subscriptionId}/billingMetrics Billing metrics
get_billing_status GET /subscriptions/{subscriptionId}/billingStatus Billing status
get_domain_info GET /subscriptions/{subscriptionId}/domain Domain info
get_payment_method GET /subscriptions/{subscriptionId}/paymentMethod Payment method
get_payment_processor GET /subscriptions/{subscriptionId}/paymentProcessor Payment processor
get_subscription GET /subscriptions/{subscriptionId} Subscription
get_subscription_attributes GET /subscriptions/{subscriptionId}/attributes/ Subscription attribute list
get_subscription_discounts GET /subscriptions/{subscriptionId}/discounts Subscription discounts
get_subscription_invoices GET /subscriptions/{subscriptionId}/invoices/ Subscription invoice list
get_upgrade_variations GET /subscriptions/{subscriptionId}/upgradeVariations Upgrade variation list
resume_billing POST /subscriptions/{subscriptionId}/_cancelStop Restart billing
set_billing_info PUT /subscriptions/{subscriptionId}/billingInfo Billing info
set_custom_domain PUT /subscriptions/{subscriptionId}/domain Custom domain
set_payment_method PUT /subscriptions/{subscriptionId}/paymentMethod Payment method
set_subscription_usage PUT /subscriptions/{subscriptionId}/usage Subscription usage
stop_billing POST /subscriptions/{subscriptionId}/_stop Stop billing
update_application POST /subscriptions/{subscriptionId}/_update Update subscription
validate_billing_info POST /subscriptions/{subscriptionId}/_validateBillingInfo Test Billing info

change_addons

list[Addon] change_addons(subscription_id, body=body)

Addon change

Change active subscription addons

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 
body = liveagent_api.AddonList() # AddonList |  (optional)

try: 
    # Addon change
    api_response = api_instance.change_addons(subscription_id, body=body)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->change_addons: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str
body AddonList [optional]

Return type

list[Addon]

Authorization

privileges, apikey

HTTP request headers

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

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

change_plan

OkResponse change_plan(subscription_id, body=body)

Change plan

Upgrade subscription to another variation. In case of upgrade from paid to paid, it's possible to change country without changing payment method. If change is between EU and not EU, different payment rules might apply.

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 
body = liveagent_api.Upgrade() # Upgrade |  (optional)

try: 
    # Change plan
    api_response = api_instance.change_plan(subscription_id, body=body)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->change_plan: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str
body Upgrade [optional]

Return type

OkResponse

Authorization

privileges, apikey

HTTP request headers

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

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

get_active_addons

list[Addon] get_active_addons(subscription_id)

Addon list

Active subscription addons

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 

try: 
    # Addon list
    api_response = api_instance.get_active_addons(subscription_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->get_active_addons: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str

Return type

list[Addon]

Authorization

privileges, apikey

HTTP request headers

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

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

get_billing_info

Customer get_billing_info(subscription_id)

Billing info

Get billing info

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 

try: 
    # Billing info
    api_response = api_instance.get_billing_info(subscription_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->get_billing_info: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str

Return type

Customer

Authorization

privileges, apikey

HTTP request headers

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

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

get_billing_metrics

list[BillingMetric] get_billing_metrics(subscription_id)

Billing metrics

Get billing metrics

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 

try: 
    # Billing metrics
    api_response = api_instance.get_billing_metrics(subscription_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->get_billing_metrics: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str

Return type

list[BillingMetric]

Authorization

privileges, apikey

HTTP request headers

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

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

get_billing_status

BillingStatus get_billing_status(subscription_id)

Billing status

Get billing status

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 

try: 
    # Billing status
    api_response = api_instance.get_billing_status(subscription_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->get_billing_status: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str

Return type

BillingStatus

Authorization

privileges, apikey

HTTP request headers

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

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

get_domain_info

Domain get_domain_info(subscription_id)

Domain info

Get domain info

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 

try: 
    # Domain info
    api_response = api_instance.get_domain_info(subscription_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->get_domain_info: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str

Return type

Domain

Authorization

privileges, apikey

HTTP request headers

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

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

get_payment_method

PaymentInfo get_payment_method(subscription_id)

Payment method

Get payment method

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 

try: 
    # Payment method
    api_response = api_instance.get_payment_method(subscription_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->get_payment_method: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str

Return type

PaymentInfo

Authorization

privileges, apikey

HTTP request headers

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

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

get_payment_processor

PaymentProcessorType get_payment_processor(subscription_id, payment_type, country=country)

Payment processor

Get payment processor to generate token for when updating payment method

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 
payment_type = 'payment_type_example' # str | 
country = 'country_example' # str |  (optional)

try: 
    # Payment processor
    api_response = api_instance.get_payment_processor(subscription_id, payment_type, country=country)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->get_payment_processor: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str
payment_type str
country str [optional]

Return type

PaymentProcessorType

Authorization

privileges, apikey

HTTP request headers

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

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

get_subscription

Subscription get_subscription(subscription_id)

Subscription

Get subscription

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 

try: 
    # Subscription
    api_response = api_instance.get_subscription(subscription_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->get_subscription: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str

Return type

Subscription

Authorization

privileges, apikey

HTTP request headers

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

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

get_subscription_attributes

list[AttributeSimple] get_subscription_attributes(subscription_id)

Subscription attribute list

Subscription attributes list

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 

try: 
    # Subscription attribute list
    api_response = api_instance.get_subscription_attributes(subscription_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->get_subscription_attributes: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str

Return type

list[AttributeSimple]

Authorization

privileges, apikey

HTTP request headers

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

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

get_subscription_discounts

list[DiscountValue] get_subscription_discounts(subscription_id)

Subscription discounts

Returns all active discounts for specified subscription

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 

try: 
    # Subscription discounts
    api_response = api_instance.get_subscription_discounts(subscription_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->get_subscription_discounts: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str

Return type

list[DiscountValue]

Authorization

privileges, apikey

HTTP request headers

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

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

get_subscription_invoices

InvoiceList get_subscription_invoices(subscription_id, page=page, per_page=per_page, sort_dir=sort_dir, sort_field=sort_field, filters=filters, _from=_from, to=to)

Subscription invoice list

Subscription invoices list

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 
page = 1 # int | Page to display. Not used if _from is defined. (optional) (default to 1)
per_page = 10 # int | Results per page. Used only if _page is used. (optional) (default to 10)
sort_dir = 'ASC' # str | Sorting direction ASC or DESC (optional) (default to ASC)
sort_field = 'sort_field_example' # str | Sorting field (optional)
filters = 'filters_example' # str | Filters (json object {column:value, ...}) (optional)
_from = 0 # int | Result set start. Takes precedence over _page. (optional) (default to 0)
to = 0 # int | Result set end. Used only if _from is used. (optional) (default to 0)

try: 
    # Subscription invoice list
    api_response = api_instance.get_subscription_invoices(subscription_id, page=page, per_page=per_page, sort_dir=sort_dir, sort_field=sort_field, filters=filters, _from=_from, to=to)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->get_subscription_invoices: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str
page int Page to display. Not used if _from is defined. [optional] [default to 1]
per_page int Results per page. Used only if _page is used. [optional] [default to 10]
sort_dir str Sorting direction ASC or DESC [optional] [default to ASC]
sort_field str Sorting field [optional]
filters str Filters (json object {column:value, ...}) [optional]
_from int Result set start. Takes precedence over _page. [optional] [default to 0]
to int Result set end. Used only if _from is used. [optional] [default to 0]

Return type

InvoiceList

Authorization

privileges, apikey

HTTP request headers

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

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

get_upgrade_variations

VariationUpgrades get_upgrade_variations(subscription_id, country=country, vat_id=vat_id)

Upgrade variation list

List of variations user can upgrade to and their current variation.

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 
country = 'country_example' # str |  (optional)
vat_id = 'vat_id_example' # str |  (optional)

try: 
    # Upgrade variation list
    api_response = api_instance.get_upgrade_variations(subscription_id, country=country, vat_id=vat_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->get_upgrade_variations: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str
country str [optional]
vat_id str [optional]

Return type

VariationUpgrades

Authorization

privileges, apikey

HTTP request headers

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

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

resume_billing

OkResponse resume_billing(subscription_id)

Restart billing

If account billing is stopped, restart it.

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 

try: 
    # Restart billing
    api_response = api_instance.resume_billing(subscription_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->resume_billing: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str

Return type

OkResponse

Authorization

privileges, apikey

HTTP request headers

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

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

set_billing_info

OkResponse set_billing_info(subscription_id, body=body)

Billing info

Update billing info

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 
body = liveagent_api.BillingInfo() # BillingInfo |  (optional)

try: 
    # Billing info
    api_response = api_instance.set_billing_info(subscription_id, body=body)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->set_billing_info: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str
body BillingInfo [optional]

Return type

OkResponse

Authorization

privileges, apikey

HTTP request headers

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

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

set_custom_domain

OkResponse set_custom_domain(subscription_id, body=body)

Custom domain

Park custom domain on an account

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 
body = liveagent_api.Domain() # Domain | Domain can be sent anytime. Custom domain can be sent by itself or along with both certificate and key. (optional)

try: 
    # Custom domain
    api_response = api_instance.set_custom_domain(subscription_id, body=body)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->set_custom_domain: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str
body Domain Domain can be sent anytime. Custom domain can be sent by itself or along with both certificate and key. [optional]

Return type

OkResponse

Authorization

privileges, apikey

HTTP request headers

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

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

set_payment_method

PaymentInfo set_payment_method(subscription_id, body=body)

Payment method

Update payment method

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 
body = liveagent_api.PaymentMethod() # PaymentMethod |  (optional)

try: 
    # Payment method
    api_response = api_instance.set_payment_method(subscription_id, body=body)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->set_payment_method: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str
body PaymentMethod [optional]

Return type

PaymentInfo

Authorization

privileges, apikey

HTTP request headers

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

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

set_subscription_usage

OkResponse set_subscription_usage(subscription_id, body=body)

Subscription usage

Get subscription invoices

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 
body = liveagent_api.UsageData() # UsageData |  (optional)

try: 
    # Subscription usage
    api_response = api_instance.set_subscription_usage(subscription_id, body=body)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->set_subscription_usage: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str
body UsageData [optional]

Return type

OkResponse

Authorization

privileges, apikey

HTTP request headers

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

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

stop_billing

OkResponse stop_billing(subscription_id)

Stop billing

Stop account. Account won't be billed anymore and will continue to work till next billing date.

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 

try: 
    # Stop billing
    api_response = api_instance.stop_billing(subscription_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->stop_billing: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str

Return type

OkResponse

Authorization

privileges, apikey

HTTP request headers

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

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

update_application

OkResponse update_application(subscription_id)

Update subscription

Update subscription to latest version

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 

try: 
    # Update subscription
    api_response = api_instance.update_application(subscription_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->update_application: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str

Return type

OkResponse

Authorization

privileges, apikey

HTTP request headers

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

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

validate_billing_info

OkResponse validate_billing_info(subscription_id, body=body)

Test Billing info

Checks if billing info can be updated without issues. Field 'force' in BillingInfo is ignored in this call.

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.SubscriptionsApi()
subscription_id = 'subscription_id_example' # str | 
body = liveagent_api.BillingInfo() # BillingInfo |  (optional)

try: 
    # Test Billing info
    api_response = api_instance.validate_billing_info(subscription_id, body=body)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling SubscriptionsApi->validate_billing_info: %s\n" % e

Parameters

Name Type Description Notes
subscription_id str
body BillingInfo [optional]

Return type

OkResponse

Authorization

privileges, apikey

HTTP request headers

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

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