If in a proceeding brought by or on behalf of a plaintiff who is under a disability or is a minor—
(a) an offer of compromise is made by a defendant; and
(b) the court refuses to approve the acceptance of the offer; and
(c) the plaintiff obtains a judgment on the claim to which the offer relates that is not more favourable to him or her than the terms of the offer; and
(d) the plaintiff is ordered by the court to pay the whole or part of the defendant's costs of the proceeding—
the plaintiff may apply to the court for, and the court may grant, an indemnity certificate in respect of costs.