The defendant in an action for the recovery of money may offer in court to confess judgment for part of the amount claimed, or part of the causes involved in the action. If the plaintiff, being present, refuses to accept such confession of judgment in full satisfaction of his demands in the action, or having had such notice as the court deems reasonable that the offer would be made, its amount, and the time of making it, fails to attend, and, on the trial, does not recover more than was offered to be confessed, with interest from the date of the offer, the plaintiff shall pay all costs of the defendant incurred after the offer was made.
W.S. 1-10-104