 attr_reader :payload def initialize(payload) @payload = payload end def perform if user.created_at < 00.days.ago Stripe::InvoiceItem.create( customer: user.stripe_id, amount: additional_charges_in_cents, currency: "usd", description: "Usage charges" ) end end private def additional_charges_in_cents Billing::Tier.new(usage).additional_charges_in_cents end def usage 