Subscriptions

class smartcloudadmin.models.subscription.Subscription(environment: str, customer_id: int = 0, part_number='', id=0, part_quantity=0, state='', available_seats=0, modified='01/01/1970 00:00:00', created='01/01/1970 00:00:00', duration_length=0, duration_unit=0, entitlement_quantity_available=0, max_number_of_seats=0, is_automatically_renewed=False, purchase_date='01/01/1970 00:00:00', is_trial=False, deleted=False, is_beta=False, is_free=False, parent_subscription_id=0, billing_frequency='', effective_date='01/01/1970 00:00:00', expiration_date='01/01/1970 00:00:00')

Bases: object

Represents an `Subscription <https://www-10.lotus.com/ldd/appdevwiki.nsf/xpAPIViewer.xsp?lookupName=API+Reference#action=openDocument&res_title=Create_subscription_bss&content=apicontent>`_within IBM Social Cloud. Supported Operations:

Operation Description
x == y Test whether 2 Contact objects contain the same data
x != y Test whether 2 Contact objects do not contain the same data
str(x) Returns basic details about the Contact
environment : str
Datacenter where the Subscription resides
part_number : str
Subscription part_number, e.g. D0NPULL, D0NRILL
id : int
Subscription id
customer_id : id
Organization id
created : Datetime
Creation date for the Subscription.
modified : Datetime
Modification date for the Subscription.
part_quantity : int
Number of Seats to be created for the Subscription
available_numbers_of_seats : int
Unoccupied seats for Subscription
state : str
Current state of Subscription
deleted : bool
Whether the Subscription user still exists.
duration_length : int
Lifespan of Subscription in duration_units
duration_unit : str
Units of time duration_length is measured in. MONTHS/YEARS
entitlement_quantity_available : int
entitlement quantity
max_number_of_seats : int
Max seats on Subscription
is_automatically_renewed : bool
Weather the subscription will renew or expire at expiration date.
purchase_date : Datetime
Purchase date
is_trial : bool
Is Subscription trial
is_beta : bool
Is Subscription beta
is_free : bool
Is Subscription free
parent_subscription_id : str
-1 for standard Subscriptions. Child Subscriptions will have a parent id
billing_frequency : str
Frequency
effective_date : Datetime
Subscription start date
expiration_date : Datetime
Subscription end date
classmethod create(environment, customer_id, part_number, part_quantity, duration_units, duration_length, **kwargs) → smartcloudadmin.models.subscription.Subscription

Creates a new subscription

Parameters:
  • environment – Datacenter
  • customer_id – Organization_id
  • part_number – Part Number for Subscription
  • part_quantity – Number of Seats for Subscription
  • duration_units – Months/Years
  • duration_length – Duration length in Units
  • kwargs
Returns:

Newly created Subscription

Return type:

Subscription

created_epoch
Returns:created date in epoch format
delete() → None
classmethod from_json(environment, json_body) → smartcloudadmin.models.subscription.Subscription
classmethod get(environment, subscription_id) → smartcloudadmin.models.subscription.Subscription

Populates subscription with an existing subcription details using BSS API :param environment: Datacenter Subscription resides on :type: str :param subscription_id: subscription id to retrieve :type: int :returns: Subscription :rtype: Subscription

modified_epoch
Returns:modified date in epoch format
show_as_row() → str
show_as_summary() → str
suspend() → None
transfer_seat(seat_id, target_subscription) → None
unsuspend() → None