Ayala, Ramon Perez de, Spanish diplomatist