It looks like to me that you had muscle spasm and blood get accumulated under your rib cage
which get dissolved slowly over the period of time. I would suggest you to do hot water fomentaiton and Diclofenac
gel application. You can take Brufen
tablet if your pain is not relieved.