annual_spend property for requests model

This commit is contained in:
dandds
2018-08-20 10:25:06 -04:00
parent 260560699e
commit c88c763da2
2 changed files with 10 additions and 0 deletions

View File

@@ -27,3 +27,8 @@ class Request(Base):
@property
def status_displayname(self):
return self.status_events[-1].displayname
@property
def annual_spend(self):
monthly = self.body.get("details_of_use", {}).get("estimated_monthly_spend", 0)
return monthly * 12