Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yola.activate_trial_subscription deprovisions instead of activates #24

Closed
blaix opened this issue Nov 3, 2015 · 2 comments
Closed

Yola.activate_trial_subscription deprovisions instead of activates #24

blaix opened this issue Nov 3, 2015 · 2 comments

Comments

@blaix
Copy link
Contributor

blaix commented Nov 3, 2015

>>> partner = yola.create_partner(
...   id='WL_TEST_BOOGIE_WOOGIE',
...   name='TEST',
...   parent_partner_id='WL_YOLA',
...   properties={
...     'website': 'example.com',
...     'available_subscription_types': ['wl_basic']
...   })
>>> user = yola.create_user(
...   email='[email protected]',
...   name='Justin',
...   surname='Time',
...   partner_id=partner['id'],
...   preferences={})
>>> sub = yola.create_subscription('wl_basic', user['id'], {'trial': True})
>>> sub['status']
u'active'
>>> sub['properties']['trial']
u'True'
>>> yola.activate_trial_subscription(sub['id'])
>>> activated_sub = yola.get_subscription(sub['id'])
>>> activated_sub['status']
u'deprovisioned'
>>> activated_sub['properties']['trial']
u'True'

I don't know if the problem is in yolapy or one of the services. When we dig into this, if it's not a yolapy problem, create an issue in the appropriate project.

@RayeN
Copy link
Member

RayeN commented Nov 4, 2015

Works as expected. We changed remove trial functionality not so long ago to perform subscription upgrade instead of just removing trial flag (we did that because of partner's expectation that activated subscription should start on the date of activation).

So, right now your activate_trial_subscription should create new non-trial sub (and return it) and the old sub should be deprovisioned.

Let me know if have any questions.

@blaix
Copy link
Contributor Author

blaix commented Nov 4, 2015

Thanks. Closing in favor of #25

@blaix blaix closed this as completed Nov 4, 2015
blaix added a commit that referenced this issue Nov 9, 2015
Will restore after #24 is resolved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants