forked from markciecior/ConnectPyse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopportunity_forecast_api.py
32 lines (23 loc) · 1.22 KB
/
opportunity_forecast_api.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from ..cw_controller import CWController
# Class for /sales/opportunities
from . import opportunity_forecast
class OpportunityForecastAPI(CWController):
def __init__(self, parent, **kwargs):
self.module_url = 'sales'
self.module = 'opportunities/{}/forecast'.format(parent)
self._class = opportunity_forecast.OpportunityForecast
super().__init__(**kwargs) # instance gets passed to parent object
def get_opportunity_forecasts(self):
return super()._get()
def create_opportunity_forecast(self, a_opportunity_forecast):
return super()._create(a_opportunity_forecast)
def get_opportunity_forecasts_count(self):
return super()._get_count()
def get_opportunity_forecast_by_id(self, opportunity_forecast_id):
return super()._get_by_id(opportunity_forecast_id)
def delete_opportunity_forecast_by_id(self, opportunity_forecast_id):
super()._delete_by_id(opportunity_forecast_id)
def replace_opportunity_forecast(self, opportunity_forecast_id):
return super()._replace(opportunity_forecast_id)
def update_opportunity_forecast(self, opportunity_forecast_id, key, value):
return super()._update(opportunity_forecast_id, key, value)