Skip to content

Commit

Permalink
feat: get single billing plan
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaOloton committed Aug 8, 2024
1 parent a887a6a commit a5bf264
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions api/v1/routes/billing_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ async def retrieve_single_billing_plans(
current_user: User = Depends(user_service.get_current_user)
):
"""
Endpoint to get single billing plans by id
Endpoint to get single billing plan by id
"""

billing_plan = billing_plan_service.fetch(db=db, billing_plan_id=billing_plan_id)
billing_plan = billing_plan_service.fetch(db, billing_plan_id)

return success_response(
status_code=status.HTTP_200_OK,
message="Plans fetched successfully",
message="Plan fetched successfully",
data=jsonable_encoder(billing_plan)
)
2 changes: 1 addition & 1 deletion api/v1/services/billing_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def delete(self, db: Session, id: str):
db.delete(plan)
db.commit()

def fetch(db: Session, billing_plan_id: str):
def fetch(self, db: Session, billing_plan_id: str):
billing_plan = db.query(BillingPlan).get(billing_plan_id)

if billing_plan is None:
Expand Down

0 comments on commit a5bf264

Please sign in to comment.