Refactor RepackagingOrder class to avoid duplication and make flat_markup calculation private. Modify tests accordingly to reflect changes to class