forked from markciecior/ConnectPyse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mark Ciecior
committed
Dec 30, 2020
1 parent
747110f
commit 6961181
Showing
3 changed files
with
59 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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) |