There are many uses of figures of speech throughout O. Henry's short story "The Gift of the Magi." Let's take a look at a few examples:
Had the queen of Sheba lived in the flat across the airshaft, Della would have let her hair hang out the window some day to dry just to depreciate Her Majesty's jewels and gifts. Had King Solomon been the janitor, with his treasures piled up in the basement, Jim would have pulled out his watch every time he passed, just to see him pluck at his beard from envy.
O. Henry is making an allusion here, referencing two biblical figures: King Solomon, the King of Israel and son of David, and Queen Sheba, a royal foreigner who tested Solomon with a series of riddles. O. Henry is establishing the tremendous value of Jim's watch and Della's hair through this allusion to these wealthy people and their hypothetical responses to the couple's "treasures."
So now Della's beautiful hair fell about her rippling and shining like a cascade of brown waters.
O. Henry uses a simile here (a comparison using "like" or "as") to compare the fluid movement of Della's hair being let down and the movement of water.
Jim stopped inside the door, as immovable as a setter at the scent of quail.
This simile compares Jim's positioning and expression in the doorway to a type of dog used for hunting small game, suggesting that he is attentively looking at Della.
"Dell," said he, "let's put our Christmas presents away and keep 'em a while. They're too nice to use just at present."
I would argue that Jim is making a huge understatement here, one that glazes over the fact that it isn't that the gifts are too nice to use just at present--rather, they are utterly useless at present with Della's hair chopped off and Jim's watch sold!