Thank you for your response, I have been struggling with that library since couple of days.
The problem here is that, my DDNS provider is not part of the supported DDNS providers in the library.
I have also tried to add my DDNS provider in the library but apparently I am doing something wrong in the code since the DDNS does not update.
The procedure I follow when I check if DDNS updating works is changing the IP in the A record to some random numbers. Then I wait 10 seconds according to the time setting and the IP in the A record still remains the random one.
If I copy and paste the update link in the browser and visit it, the IP in the A record is successfully updated to my WAN IP Address.
By the way my DDNS provider is called ClouDNS.