I am implementing a feature which allows users to change their subscription plans. When users upgrade their plan, a refund is created for what's left of this cycle and a new order is automatically created.
I want to display how much the user will pay today (new plan price - refund amount). However, the method protected function reimbursableAmount() on subscription is protected, so I can't use that in combination with getCycleLeftAttribute().
I propose making reimbursableAmount() public so it can't be accessed or adding a getter method which calculates the value for the unused time.
I am implementing a feature which allows users to change their subscription plans. When users upgrade their plan, a refund is created for what's left of this cycle and a new order is automatically created.
I want to display how much the user will pay today (new plan price - refund amount). However, the method
protected function reimbursableAmount()
on subscription is protected, so I can't use that in combination withgetCycleLeftAttribute()
.I propose making
reimbursableAmount()
public so it can't be accessed or adding a getter method which calculates the value for the unused time.