Skip to content
This repository was archived by the owner on Jul 16, 2021. It is now read-only.

Commit 33457ef

Browse files
committed
A better name for the method.
1 parent 97882a3 commit 33457ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bookshelf/entities/price.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ class Price(Validated):
1919
cost: Decimal
2020
period: int
2121

22-
def subscription_expiration(self, current_date: datetime) -> datetime:
22+
def subscription_will_expire(self, current_date: datetime) -> datetime:
2323
return current_date + timedelta(days=self.period)

bookshelf/usecases/buy_subscription.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def persist_payment(self, ctx):
6969

7070
def persist_subscription(self, ctx):
7171

72-
expires = ctx.price.subscription_expiration(self.current_date())
72+
expires = ctx.price.subscription_will_expire(self.current_date())
7373
subscription = self.create_subscription(ctx.profile, ctx.category, expires)
7474
return Success(subscription=subscription)
7575

0 commit comments

Comments
 (0)