module Billing
  module Stripe
    ChangePlanResult = Struct.new(
      :kind,
      :plan_slug,
      :interval,
      :effective_at,
      :amount_cents,
      :currency,
      :invoice_id,
      keyword_init: true
    ) do
      def upgrade?
        kind == :upgrade
      end

      def downgrade?
        kind == :downgrade
      end
    end
  end
end
