Default to 0, even if constructed with nil

Stephen Paul Weber created

Change summary

lib/customer_plan.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Detailed changes

lib/customer_plan.rb 🔗

@@ -27,8 +27,8 @@ class CustomerPlan
 		@customer_id = customer_id
 		@plan = plan || OpenStruct.new
 		@expires_at = expires_at
-		@auto_top_up_amount = auto_top_up_amount
-		@monthly_overage_limit = monthly_overage_limit
+		@auto_top_up_amount = auto_top_up_amount || 0
+		@monthly_overage_limit = monthly_overage_limit || 0
 	end
 
 	def active?