Skip to content

Commit

Permalink
Merge branch 'master' into add_pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
mkudlej authored May 11, 2023
2 parents 10a6c21 + 21a899f commit d1db4df
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions threescale_api/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -1235,6 +1235,18 @@ def trigger_billing_account(self, account: Union['Account', int], date: str) ->
"""
return self.threescale_client.tenants.trigger_billing_account(self, account, date)

def plan_upgrade(self, plan_id):
"""Upgrade plan to given plan_id"""
return self.client.rest.put(f"{self.url}/plan_upgrade", params={"plan_id": plan_id})

@property
def account(self):
"""Return account of this tenant"""
return Account(
client=self.threescale_client.accounts,
entity=self.entity["signup"]["account"]
)


class Application(DefaultResource):
def __init__(self, entity_name='name', **kwargs):
Expand Down

0 comments on commit d1db4df

Please sign in to comment.