Example #1
0
 def new_month(self, month: int, year: int, bill: Bill) -> None:
     """ Advance to a new month in the contract, corresponding to <month> and
     <year>. This may be the first month of the contract.
     per minute and fixed cost.
     Store the <bill> argument in this contract and set the appropriate rate
     """
     if self.start.month == month and self.start.year == year:
         bill.add_fixed_cost(TERM_DEPOSIT)
     self._current = [month, year]
     bill.add_fixed_cost(TERM_MONTHLY_FEE)
     bill.set_rates("TERM", TERM_MINS_COST)
     bill.add_free_minutes(TERM_MINS)
     self.bill = bill
Example #2
0
 def new_month(self, month: int, year: int, bill: Bill) -> None:
     """
     Advance to a new month in the contract, corresponding to <month> and
     <year>. This may be the first month of the contract.
     Store the <bill> argument in this contract and set the appropriate rate
     per minute and fixed cost.
     """
     self.bill = bill
     bill.set_rates('TERM', TERM_MINS_COST)
     bill.add_free_minutes(TERM_MINS)
     bill.add_fixed_cost(TERM_MONTHLY_FEE)
     if month == self.start.month and year == self.start.year:
         bill.add_fixed_cost(TERM_DEPOSIT)
     if month == self.end.month and year == self.end.year:
         self.over = True