Service Models

Subscription

class yolapy.models.Subscription(**fields)[source]

Construct a Subscription.

Parameters:
  • id – Str, 32 char ID
  • created_at – Str, creation time
  • updated_at – Str, last update time
  • partner_id – Str, ID of the partner
  • user_id – Str, 32 character ID of the owner
  • status – Str
  • term – Str
  • sku – Str, SKU of the related product
  • type – Str,
  • start_date – Str
  • expiry_date – Str
  • billing_date – Str
  • deprovision_date – Str
  • auto_renew – Bool
  • properties – Dict
Returns:

Subscription

Return type:

yolapy.models.Subscription

classmethod list(**kwargs)[source]

Return a filtered list of Subscriptions.

Usage:

>>> from yolapy.models import Subscription
>>> user_id = 'abcdef1234567890abcdef1234567890'
>>> user_subs = Subscription.list(user_id=user_id)
>>> print user_subs[0]
<yolapy.models.subscription.Subscription object>
>>> print user_subs[0].user_id
u'abcdef1234567890abcdef1234567890'