The rights and obligations under a contract are discharged in any of the following circumstances: (1) the obligations were performed in accordance with the contract; (2) the contract was terminated; (3) the obligations were set off against each other; (4) the obligor placed the subject matter in escrow in accordance with the law; (5) the creditor released the debtor from performance; (6) both the creditor’s rights and debtor’s obligations were assumed by one party; and (7) any other discharging circumstance provided by law or prescribed by the parties occurred.