
631 F.3d 42 (2011)
DIESEL PROPS S.R.L., Diesel Kid S.r.l., Plaintiffs-Counterclaim-Defendants-Appellants,
v.
GREYSTONE BUSINESS CREDIT II LLC, Global Brand Marketing Inc., Defendants-Counterclaimants-Appellees.
Docket Nos. 09-3899-cv, 09-3900-cv.
United States Court of Appeals, Second Circuit.
Argued: April 14, 2010.
Decided: January 6, 2011.
*45 Ira S. Sacks, New York, N.Y. (Jennifer Daddio, Law Offices of Ira S. Sacks, New York, NY, Mark S. Lafayette, Melanie Sacks, Olshan Grundman Frome Rosenzweig & Wolosky, New York, NY, on the brief), for Plaintiffs-Counterclaim-Defendants-Appellants.
Oliver J. Armas, New York, N.Y. (Chadbourne & Parke, New York, NY, on the brief), for Defendant-Counterclaimant-Appellee Greystone Business Credit II LLC.
Michael J. Tiffany, New York, N.Y. (Leader & Berkon, New York, NY), submitted a letter in support of affirmance on behalf of Defendant-Counterclaimant-Appellee Global Brand Marketing Inc.
Before: KEARSE, SACK, and LIVINGSTON, Circuit Judges.
KEARSE, Circuit Judge:
Plaintiffs Diesel Props S.r.l. ("Props") and Diesel Kid S.r.l. ("Kid") (collectively "Diesel") appeal from a judgment entered in the United States District Court for the Southern District of New York following a bench trial before Harold Baer, Jr., Judge, (a) dismissing their claims against defendants Greystone Business Credit II LLC ("Greystone") and Global Brand Marketing Inc. ("GBMI"), and (b) ordering Props to pay Greystone $677,381.93 in damages, including interest, on its counterclaim for unjust enrichment. On appeal, Diesel contends principally that the district court abused its discretion in rejecting, after trial, Diesel's claims against Greystone for breach of contract, unjust enrichment, and account stated, and in holding Props liable to Greystone for unjust enrichment. For the reasons that follow, we reverse the judgment against Props for unjust enrichment, and we affirm the judgment in all other respects.

I. BACKGROUND
Most of the background facts of this controversy are undisputed and were stipulated by the parties prior to trial.


*46 A. The Relationships Among the Parties

Props and Kid are Italian companies, subsidiaries of nonparty Diesel S.p.A. ("SpA"), which owns the trademarks on Diesel-brand merchandise. Props and Kid are licensed by SpA to produce adult shoes and children's shoes, respectively, bearing Diesel trademarks. In 2005, Props and Kid entered into distribution agreements with GBMI, a California corporation (the "Distribution Agreements"), pursuant to which GBMI would purchase Diesel-brand shoes designed and manufactured by Diesel and sell them to retailers in the United States. In the summer of 2006, GBMI was experiencing severe financial difficulties and owed SpA and Kid more than $7 million in back royalties and advertising commitments. By December 31, 2006, those amounts had increased to more than $11.5 million.
Greystone is a Delaware company that makes loans to financially distressed companies and takes security interests in their assets. In December 2006, Greystone, GBMI, and Diesel entered into agreements pursuant to which Greystone would make funds available to GBMI and would make payments from those funds directly to Diesel. On December 2, SpA and Kid sent a letter to GBMI, with a copy to Greystone, stating that Props and Kid were each willing to sign a three-way agreement with Greystone and GBMI with respect to such financing. On December 4, Greystone and GBMI executed a loan and security agreement ("LSA"), pursuant to which Greystone established a $25 million revolving credit account for GBMI (the "revolver") in exchange for a security interest in substantially all of GBMI's present and after-acquired assets, including "all of [GBMI's] books and records relating . . . to [GBMI's] business." On the same day, two letter agreements, identical in substance, were executedone by GBMI, Greystone, and Props, the other by GBMI, Greystone, and Kid (the "tripartite agreements" or "TPAs")with reference to the LSA and the Distribution Agreements. The TPAs contained payment provisions requiring, inter alia, that GBMI not place an order under the Distribution Agreements unless it had received a bona fide purchase order for Diesel products from a retailer (a "Customer Purchase Order") and that GBMI provide copies of such customer orders to Diesel and Greystone; that Diesel, before delivering such products to GBMI, send Greystone copies of Diesel invoices for those products ("Diesel Invoices"); and that GBMI supply Diesel and Greystone with copies of invoices that GBMI sent to its customers ("Customer Invoices"). In those circumstances, GBMI's delivery of such Customer Invoices to Greystone would constitute an irrevocable request that Greystone automatically pay Diesel, from GBMI's revolving credit account, the amounts shown on the corresponding Diesel Invoices. With respect to GBMI debts on orders not placed according to the terms of the TPAsincluding debts to its suppliers other than DieselGreystone was not authorized to make payments from GBMI's credit account except as expressly instructed by GBMI. Diesel was aware that the credit account could be used to pay other GBMI creditors. The TPAs provided that Diesel had the right, at any time before shipping shoes to GBMI, to request and receive information from Greystone as to, inter alia, whether GBMI was in noncompliance or default with respect to any requirements imposed by the LSA (the "notice provisions"),
Despite the December 2006 arrangements, GBMI's financial difficulties continued. At various timesbeginning in December 2006 and January 2007GBMI was in default of revenue covenants and other terms of the LSA. In addition, during the next eight months, Diesel shipped *47 to GBMI several lots of shoes for which Diesel was never paid. On September 4, 2007, Diesel notified Greystone that Greystone was in default of the TPAs for, inter alia, failing to make payments, and notified GBMI that GBMI was in default of the Distribution Agreements; Diesel informed each that unless its defaults were cured within 30 days, Diesel would consider its agreements terminated (the "conditional termination letters"). On October 17, 2007, after neither Greystone nor GBMI had cured its defaults, Diesel notified them that their respective contracts were terminated as of October 4. Diesel shortly thereafter commenced the present action.
At the time of termination, GBMI had received orders from retailers for 520,202 pairs of Diesel shoes for the 2008 spring-summer season ("SS08") and had incurred significant expenses associated with collecting those orders. After terminating the Distribution Agreements with GBMI, Diesel designated Diesel USA ("D-USA"), a wholly owned subsidiary of SpA, as its United States distributor. D-USA had operated Diesel-brand retail stores but had no experience in selling shoes to retailers, and it had little information about other retailers' orders for the SS08 season. In November, D-USA hired a former GBMI employee, who gave D-USA a complete list of GBMI's open orders (the "Order Book"). Props personnel referred to the Order Book as the GBMI employee's "dowry" and wrote "[i]t looks like Christmas came early this year." D-USA had net sales for the SS08 season of more than $14 million, selling 369,266 pairs of Diesel-brand shoes to retailers who included those identified from the GBMI Order Book.

B. The District Court's Rulings After Trial

In the present action, Diesel asserted numerous claims, several of which were dismissed prior to trial. To the extent pertinent to this appeal, Diesel's third amended complaint alleged principally that Greystone had failed to give Diesel notice of many defaults by GBMI under the LSA and had thereby breached the TPA notice provisions; that the failures of GBMI and Greystone to pay Diesel for shoes shipped to GBMI breached the Distribution Agreements and the TPA payment provisions; and that Diesel was entitled to recover from each defendant for breach of contract, unjust enrichment, or account stated. Diesel sought approximately $20 million in damages, plus interest. Greystone, in connection with Props's acquisition of the GBMI Order Book, in which Greystone claimed a security interest, asserted a counterclaim seeking more than $30 million for unjust enrichment.
The district court held a three-day bench trial on the above claims. In a posttrial Opinion and Order reported at 2009 WL 2514033, No. 07 Civ. 9580 (S.D.N.Y. Aug. 18, 2009) ("Diesel"), annotated with citations to pertinent documents and to testimony and other sworn statements by officials of Greystone, GBMI, SpA, Kid, and Props, the district court ruled against Diesel on all of its claims and ruled in favor of Greystone on its unjust enrichment counterclaim against Props. The court dismissed Diesel's claims against GBMI on the ground that GBMI's obligations to make payments to Diesel arose only under the Distribution Agreements, and those agreements contained forum-selection clauses requiring all claims thereunder to be litigated in Milan, Italy. See Diesel, 2009 WL 2514033, at *6, *11.
As to Diesel's claim against Greystone for breach of the payment provisions of the TPAs, the court concluded that Diesel was not entitled to recover, principally because *48 it had not shown that a condition precedent to Greystone's obligation to make payments had been performed. The court found that the TPAs and the LSA, executed "on the same day," "made express reference to one another," and that "the terms of each w[ere] conditioned on the performance and fulfillment of conditions of the other." Id. at *2.
[T]he LSA authorized Greystone to wire GBMI's funds directly to Diesel "pursuant to the terms of the [TPAs].". . . . Likewise, Greystone's payment obligations under the TPA w[ere] expressly "[s]ubject to the terms and conditions of the [LSA].". . . . Thus, the standing instructions from GBMI to Greystone to advance revolver proceeds directly to Diesel applied only if the TPA applied to the particular orders for which payment was requested and all conditions under the TPA were met. . . . That is, if the terms of the TPA did not apply to a particular order for which payment was requested (i.e., the order was "outside" the structure set forth in the TPA), Greystone had no authority under the LSA to wire GBMI's revolver proceeds directly to Diesel; rather, GBMI, as the borrower under the LSA, would be required to send Greystone a separate instruction to disburse loan proceeds to Diesel as a third-party. . . .
The TPA contained three primary independent provisions. First, GBMI was required to obtain a purchase order from a bona fide customer ("Customer Purchase Order") before placing an order for shoes with Diesel. . . . A copy of the Customer Purchase Order was to be delivered to both Diesel and Greystone. . . . Second, the TPA provided that at any time before shipping the shoes, Diesel had the right to request written notice from Greystone as to whether at the time of such request there were (a) sufficient funds to permit payment in the amount requested in the Diesel Invoice, (b) if not, GBMI would be prevented from requesting a loan under the LSA, or (c) if GBMI was not in compliance with any of the covenants and/or warranties under the LSA, or is in default under the LSA, irrespective of whether that non-compliance or default has been waived by Greystone[ ] . . . (the "Notice Provision"). Third, pursuant to the TPA, GBMI was required to deliver to Diesel and Greystone a copy of any invoices to customers ("Customer Invoice"), which were deemed an irrevocable request for disbursement of a revolving loan in the amount of the corresponding Diesel Invoice[ ] . . . (the "Payment Provision"). In accordance with the terms and conditions of the LSA, within two days of its receipt of a Customer Invoice, Greystone was required to wire the proceeds of the new loan in the amount of the corresponding Diesel Invoice. . . . The only express conditions prior to payment w[ere] a receipt of a Customer Invoice and availability of funds under the LSA. . . .
Diesel, 2009 WL 2514033, at *2 (citations to the record omitted; emphases added). The court noted that Diesel's
December 2 Letter expressly stated that "the [TPA] should only be applied to orders placed by GBMI upon receipt of a purchase order for product from a bona fide customer of Diesel Products.". . . . Although Greystone did not sign the December 2 Letter, it is undisputed that it would not have closed on the LSA if Diesel had not signed the December 2 Letter, and that Greystone agreed to the terms of the December 2 Letter by accepting the TPA and closing on the LSA. [Joint Pretrial Order] ¶ 16.
Diesel, 2009 WL 2514033, at *3 (other citations to the record omitted; emphasis ours). Although noting that rejection of a *49 contract claim on the basis of nonperformance of a condition precedent "is generally disfavored," the district court found that
in this case the words and actions of the parties demonstrate that all interested parties intended that the December 2 Letter make the Customer Purchase Order requirement a condition precedent to the operation of the TPA.
Diesel, 2009 WL 2514033, at *13. It found that when Diesel shipped shoes to GBMI that were not supported by Customer Purchase Orders "the TPA simply did not apply to these shipments," id. at *7:
The effective date of the TPA was December 4, 2006. . . . At that time, there were 110,000 pairs of shoes being held at SNATT, Diesel's consolidator warehouse in Hong Kong, waiting to be shipped to the United States. . . . Although the procedure set forth under TPA was supposed to cover all orders after its execution, GBMI paid for these shoes by letter of credit because it wanted fast delivery, and the formalities required to implement the TPA were not yet in place on GBMI's end. . . . While Diesel contends "all parties" understood the rest of the shipments for the SS07 season would be paid for under the TPA, that does not appear to be what happened. Beginning in January 2007, Diesel began accepting orders from GBMI that were not supported by Customer Purchase Orders, understanding that the terms of the TPA would not apply to those shipments. . . . Diesel opted to take the risk of accepting those orders because it was anxious to have its shoes distributed into the United States in time for the Fall/Winter 2007 ("FW07") season. . . . Diesel continued to ship to GBMI without requiring Customer Purchase Orders throughout the life of the TPA knowing full well that, based on the structure of the TPA and as made explicit in the December 2 Letter, those orders were not covered by the TPA. . . .

Because the TPA simply did not apply to these shipments, Greystone lacked any authority to lend funds to a third-party (such as Diesel) without the direct authorization of GBMI as its borrower under the LSA. . . . GBMI and Greystone's actions under the LSA were consistent with this understandingon 18 occasions, GBMI requested that Greystone wire revolver funds directly to Diesel in specified amounts; Greystone honored each instruction.
Diesel, 2009 WL 2514033, at *6-*7 (footnote and citations to the record omitted; emphases added); see also id. at *13.
As to Diesel's claim against Greystone for breach of the TPA notice provisions, the district court found that there were indeed numerous occasions on which Greystone failed to give notice of GBMI's noncompliance with the LSA. But it found that Diesel had failed to carry its burden of showing that losses it suffered from nonpayment for shoes it shipped to GBMI were caused by those failures. GBMI's Greystone credit account was available for payments not only to Diesel but to other GBMI creditors as well, and the court found that Diesel, with awareness of GBMI's financial problems, shipped shoes to GBMI even when it had received notice of GBMI defaults or of the current lack of funds in the credit account sufficient to pay for shoes being shipped by Diesel. See, e.g., id. at *5-*7, *12.
There is no dispute that Diesel was well aware of GBMI's dire financial situation, and that it chose to take the business risk associated with continuing to ship shoes to GBMI, because it wanted to ensure a market for its footwear in the United States. . . . One example is the occasion on January 16, 2007, when Diesel *50 sent a Notice Letter requesting a response under the Notice Provision of the TPA, but failed to wait the requisite two business days for a response from Greystone, and shipped over three-quarters of a million dollars worth of shoes that same day. To make the cheese more binding, the testimony revealed that on the two occasions when Diesel was notified of GBMI's defaults under the LSA, rather than discontinue its relationship with GBMI, it continued to ship goods. In February, over the four days following the first default notice, Diesel shipped $1.7 million worth of shoes. Thereafter, even though it knew GBMI was in financial difficulty and in default under the LSA, and that it had not been paid for its shipments, in the three months following the first notice of default, Diesel proceeded to ship over $13 million dollars worth of shoes to GBMI, After it received the second notice of GBMI's default on July 18, 2007, undeterred by GBMI's financial state, Diesel continued to ship shoes, shipping over $1 million worth of shoes in the ensuing two weeks. Diesel continued to ship shoes up until the day before it sent its notices to Greystone and GBMI of its intent to terminate the TPA and Distribution Agreements, almost two months after it received the second notice of default.
Id. at *12. The court noted testimony by Diesel witnesses who testified that "had they received notice of any of the additional instances of covenant breaches of availability (in addition to the two notices of default actually received), they would not have continued to ship shoes to GBMI." Id.; see also id. at *5. But the court found that "this testimony [wa]s belied by the events as they actually unfolded," id. at *5, and that Diesel's "own actions and business decisions to continue to ship shoes irrespective of GBMI's financial condition" constituted "an intervening cause of [Diesel']s losses," id. at *12.
Addressing Diesel's alternative claims against Greystone, the district court dismissed the claim for account stated, finding that the e-mails on which Diesel relied for that claim were statements of accounts owed not by Greystone, but by GBMI. See id. at *15. As to the claim for unjust enrichment, which was premised on Greystone's receipt from GBMI of proceeds of sales of shoes for which payment was not made to Diesel, the court found that Greystone had not been enriched unjustly:
The evidence in this case reveals the only benefit Greystone retained was to the extent it was, or could have been, repaid for loan funds disbursed to GBMI under the LSA. However, GBMI was obligated to repay Greystone for those loans. Equity and good conscience do not require a party to give up what it rightfully obtained, or is entitled to, under a contract. . . . ([B]argained-for benefits cannot be deemed to unjustly enrich a contracting party.)
Diesel, 2009 WL 2514033, at *14 (internal quotation marks omitted).
The district court found merit, however, in Greystone's counterclaim for unjust enrichment against Props for "the value that Props unjustly obtained by purloining Greystone's collateral," i.e., GBMI's SS08 Order Book. Id. at *16. The court rejected Props's contention that the Distribution Agreements entitled Props to the Order Book at the end of the SS08 sales campaign. Having found that the SS08 sales campaign "had ended as of the termination of the Distribution Agreement[s]," id. at *9, the court found that
the facts show that Props purposely timed its notice of default so that the end of the 30-day cure period would coincide with the end of the sales campaign. . . . *51 The Distribution Agreement nowhere states that Props is entitled to the Order Book if the Agreement is terminated; Props timed its notice of default and termination to correspond exactly with the end of the sales period. The Court is not persuaded by Props's arguments that GBMI was required to provide it with the Order Book,
id. at *16. The court ordered Props to pay Greystone unjust enrichment damages in the amount of $572,616.75 plus $104,765.18 in interest, for a total of $677,381.93.
This appeal followed.

II. DISCUSSION
On appeal, Diesel contends that the judgment dismissing its claims against Greystone and holding it liable to Greystone for unjust enrichment should be reversedand that judgment should be entered in its favor for some $17.3 to $19.3 millionon the grounds that the district court "abuse[d] its discretion" in, inter alia, finding that there was an unperformed condition precedent to Greystone's obligation to make payments, finding that Greystone's failures to give Diesel notice of many of GBMI's defaults were not the proximate cause of Diesel's losses, finding that Props benefited from D-USA's use of GBMI's Order Book, and failing to find that Props was contractually entitled to the Order Book. (E.g., Diesel brief on appeal at 2-3.) Applying the normal standard of review, we conclude that the judgment should be affirmed insofar as it dismissed the claims of Diesel but reversed insofar as it held Props liable to Greystone for unjust enrichment.

A. Standard of Review

On an appeal from a judgment entered after a bench trial, we review the district court's conclusions of law de novo. See, e.g., Giordano v. Thomson, 564 F.3d 163, 168 (2d Cir.2009); Henry v. Champlain Enterprises, Inc., 445 F.3d 610, 617-18, 623 (2d Cir.2006); FDIC v. Providence College, 115 F.3d 136, 140 (2d Cir.1997). Under New York law, which the TPAs provided would be applicable, the initial matter of whether a written contract is ambiguous is a question of law. See, e.g., Law Debenture Trust Co. of New York v. Maverick Tube Corp., 595 F.3d 458, 465 (2d Cir.2010); JA Apparel Corp. v. Abboud, 568 F.3d 390, 396 (2d Cir.2009); International Multifoods Corp. v. Commercial Union Insurance Co., 309 F.3d 76, 83 (2d Cir.2002). The meaning of an unambiguous contract is likewise a matter of law. See, e.g., Revson v. Cinque & Cinque, P.C., 221 F.3d 59, 66 (2d Cir.2000); K. Bell & Associates, Inc. v. Lloyd's Underwriters, 97 F.3d 632, 637 (2d Cir.1996); Seiden Associates, Inc. v. ANC Holdings, Inc., 959 F.2d 425, 429 (2d Cir.1992).
When the district court as factfinder is confronted with a contract provision that is not unambiguous, it may properly consider evidence extrinsic to the contract, including testimony offered by the parties. See, e.g., id.; Amusement Business Underwriters v. American International Group, Inc., 66 N.Y.2d 878, 880-81, 498 N.Y.S.2d 760, 763, 489 N.E.2d 729 (1985); 67 Wall Street Co. v. Franklin National Bank, 37 N.Y.2d 245, 248, 371 N.Y.S.2d 915, 918, 333 N.E.2d 184 (1975) (evidence of "surrounding facts and circumstances" to show the parties' intent). The meaning of an ambiguous provision, in light of such evidence, is a question of fact for the factfinder. See, e.g., Revson v. Cinque & Cinque, P.C., 221 F.3d at 66; In Time Products, Ltd. v. Toy Biz, Inc., 38 F.3d 660, 665 (2d Cir.1994); Consarc Corp. v. Marine Midland Bank, N.A., 996 F.2d 568, 573 (2d Cir.1993).
*52 After a bench trial, the court's "[f]indings of fact, whether based on oral or other evidence, must not be set aside unless [they are] clearly erroneous." Fed. R.Civ.P. 52(a)(6); see, e.g., Anderson v. Bessemer City, 470 U.S. 564, 573-74, 105 S.Ct. 1504, 84 L.Ed.2d 518 (1985); Banker v. Nighswander, Martin & Mitchell, 37 F.3d 866, 870 (2d Cir.1994). The "clearly erroneous" standard applies whether the findings are based on witness testimony, or on documentary evidence, or on inferences from other facts. See, e.g., Anderson, 470 U.S. at 574, 105 S.Ct. 1504; Petereit v. S.B. Thomas, Inc., 63 F.3d 1169, 1176 (2d Cir.1995).
In deciding whether factual findings are clearly erroneous, we are required to "give due regard to the trial court's opportunity to judge the witnesses' credibility." Fed.R.Civ.P. 52(a)(6). It is within the province of the district court as the trier of fact to decide whose testimony should be credited. See, e.g., Anderson, 470 U.S. at 574, 105 S.Ct. 1504. The court is also entitled, just as a jury would be, see, e.g., Robinson v. Cattaraugus County, 147 F.3d 153, 160 (2d Cir.1998); Fiacco v. City of Rensselaer, 783 F.2d 319, 325 (2d Cir.1986), cert. denied, 480 U.S. 922, 107 S.Ct. 1384, 94 L.Ed.2d 698 (1987), to believe some parts and disbelieve other parts of the testimony of any given witness. We are not allowed to second-guess the court's credibility assessments. See, e.g., Anderson, 470 U.S. at 573-74, 105 S.Ct. 1504.
Further, "[w]here there are two permissible views of the evidence, the factfinder's choice between them cannot be clearly erroneous." Id. at 574, 105 S.Ct. 1504; see United States v. Yellow Cab Co., 338 U.S. 338, 342, 70 S.Ct. 177, 94 L.Ed. 150 (1949). The fact that there may have been evidence to support an inference contrary to that drawn by the trial court does not mean that the findings made are clearly erroneous. See, e.g., Palazzo v. Corio, 232 F.3d 38, 44 (2d Cir.2000); Healey v. Chelsea Resources, Ltd., 947 F.2d 611, 618-19 (2d Cir.1991).
[W]hen the district court is sitting as trier of fact, it has no obligation to draw a given inference merely because it is supportable; nor has it any obligation, in its capacity as trier of fact, to view the evidence in the light most favorable to [a particular party]. The obligations of the court as the trier of fact are to determine which of the witnesses it finds credible, which of the permissible competing inferences it will draw, and whether the party having the burden of proof has persuaded it as factfinder that the requisite facts are proven.
Cifra v. General Electric Co., 252 F.3d 205, 215 (2d Cir.2001).
Given the standards governing our review of the district court's rulings after the bench trial, we have little difficulty in concluding that the rejection of Diesel's claims should be affirmed. We reach the opposite conclusion with respect to the ruling that Greystone was entitled to unjust enrichment damages from Props.

B. The Dismissal of Diesel's Contract Claims against Greystone

In order to recover from a defendant for breach of contract, a plaintiff must prove, by a preponderance of the evidence, (1) the existence of a contract between itself and that defendant; (2) performance of the plaintiff's obligations under the contract; (3) breach of the contract by that defendant; and (4) damages to the plaintiff caused by that defendant's breach. See, e.g., Eternity Global Master Fund Ltd. v. Morgan Guaranty Trust Co. of New York, 375 F.3d 168, 177 (2d Cir.2004); Harsco Corp. v. Segui, 91 F.3d 337, 348 (2d Cir.1996). "Causation is an essential *53 element of damages in a breach of contract action; and, as in tort, a plaintiff must prove that a defendant's breach directly and proximately caused his or her damages." National Market Share v. Sterling National Bank, 392 F.3d 520, 525 (2d Cir. 2004) (emphasis in original); see, e.g., Wakeman v. Wheeler & Wilson Manufacturing Co., 101 N.Y. 205, 209, 4 N.E. 264, 266 (1886). Recovery is not allowed if the claimed losses are "the result of other intervening causes." Id.; see, e.g., National Market Share v. Sterling National Bank, 392 F.3d at 526; Kenford Co. v. County of Erie, 67 N.Y.2d 257, 261, 502 N.Y.S.2d 131, 132, 493 N.E.2d 234 (1986).
The district court concluded that Diesel's claim against Greystone for breach of the TPA notice provisions should be dismissed for lack of sufficient proof that the failures to give Diesel notice of many of GBMI's defaults caused Diesel's losses. Although Diesel argues that this was error because its witnesses testified that Diesel would have ceased shipping shoes to GBMI if Greystone had notified Diesel of each of GBMI's defaults, the court's refusal to credit that testimony was entirely permissible. The court found, inter alia, that in January 2007, Diesel faxed a request to Greystone for GBMI default information within two business days but did not bother to await a response, instead shipping more than three-quarters of a million dollars worth of shoes to GBMI on the day of the inquiry; that in February 2007, in the four days following its receipt of a notice from Greystone that GBMI was in default, Diesel shipped to GBMI $1.7 million worth of shoes; that in the three months following that first notice of default, Diesel sent GBMI more than $13 million dollars worth of shoes; that in July 2007, in the two weeks after it received notice of another GBMI default, Diesel shipped GBMI more than $1 million worth of shoes; and that Diesel was still shipping shoes to GBMI on September 3, 2007, one day before sending GBMI the conditional notice of termination. These findings are supported by documentary evidence, and the court as factfinder was entitled to find that the testimony of Diesel's witnessesthat Diesel would have stopped shipping had it received any additional notices of defaultwas not credible, as that testimony "[wa]s belied by the events as they actually unfolded," Diesel, 2009 WL 2514033, at *5. The court correctly applied the legal principles as to causation, and its findings of fact are not clearly erroneous. There is thus no basis for overturning its ruling that Diesel failed to prove the causation element of its claim against Greystone for breach of the TPA notice provisions.
The district court concluded that Diesel failed to establish its claim that Greystone breached the TPA payment provisions because, inter alia, Greystone had not received the relevant copies of Customer Purchase Orders, receipt of which the court found was a condition precedent to Greystone's duty to pay. A contract imposes a condition precedent when it provides that "an act or event, other than a lapse of time," unless excused, "must occur before a duty to perform a promise in the agreement arises." Oppenheimer & Co. v. Oppenheim, Appel, Dixon & Co., 86 N.Y.2d 685, 690, 636 N.Y.S.2d 734, 737, 660 N.E.2d 415 (1995) (internal quotation marks omitted). "`Since an express condition [precedent]. . . depends for its validity on the manifested intention of the parties, it has the same sanctity as the promise itself.'" Id. at 690-91, 636 N.Y.S.2d 734, 660 N.E.2d 415 (quoting 5 Williston, Contracts § 669, at 154 (3d ed.1961)). In this case, the December 2 Letter provided that the TPA would "only be applied to orders placed by *54 GBMI upon receipt of a purchase order for product from a bona fide customer of Diesel Products." And in the TPAs, GBMI agreed that it would not order shoes from Diesel before receiving such a Customer Purchase Order and agreed to provide copies of such purchase orders to both Diesel and Greystone; Diesel "agree[d] to provide [Greystone] with a copy of any invoice for its products delivered to [GBMI] (a `Diesel Invoice')" and "agree[d] that each Diesel Invoice shall be delivered prior to the delivery of the products ordered by the applicable Diesel Customer to [GBMI]" (emphasis in original). The TPAs provided that Greystone would be obligated to make payment to Diesel after GBMI furnished Greystone with a copy of a GBMI invoice to a Diesel customer "in the amount of the corresponding Diesel Invoice."
The district court, having determined that the contract documents were somewhat ambiguous as to whether the Customer Purchase Order requirement was a condition precedent to Greystone's duty to pay Diesel, admitted extrinsic evidence as to the parties' intent. The court found that the parties intended the Customer Purchase Order requirement to be a condition precedent, based on, inter alia, a March 2007 e-mail sent by Diesel to GBMI stating that "under the current agreements," any "GBMI orders to Diesel submitted prior to confirmation of GBMI customers orders . . . are not subject to the tripartite and should be assisted by a letter of credit" (first emphasis in original; second emphasis added), and evidence that in fact when Diesel was paid for shoes it shipped pursuant to a GBMI order that was not preceded by a Customer Purchase Order, Diesel was paid through a different mechanism, not through the TPAs.
We see no error in the district court's determination that the contract documents were ambiguous in this regard; and, in light of the evidence, we see no clear error in its finding that the parties intended that satisfaction of the Customer Purchase Order requirement be a condition precedent to Greystone's duty to make payments from GBMI's credit account to Diesel. As there is no dispute that that condition was not fulfilled, Diesel's claim against Greystone for failure to make payments to Diesel with respect to those shipments was properly dismissed.

C. The Dismissal of Diesel's Other Claims

Diesel's challenges to the district court's posttrial dismissal of its other claims do not require extended discussion. In light of the agreements among the parties, the district court properly dismissed Diesel's claims that it was entitled to recover from Greystone for unjust enrichment as a result of GBMI's receiving Diesel shoes for which Diesel was not paid. "The theory of unjust enrichment lies as a quasi-contract claim. It is an obligation the law creates in the absence of any agreement." Goldman v. Metropolitan Life Insurance Co., 5 N.Y.3d 561, 572, 807 N.Y.S.2d 583, 587, 841 N.E.2d 742 (2005); see, e.g., In re First Central Financial Corp., 377 F.3d 209, 213 (2d Cir.2004); Clark-Fitzpatrick, Inc. v. Long Island R.R. Co., 70 N.Y.2d 382, 388, 521 N.Y.S.2d 653, 656, 516 N.E.2d 190 (1987) ("The existence of a valid and enforceable written contract governing a particular subject matter ordinarily precludes recovery in quasi contract for events arising out of the same subject matter.").
The court also properly dismissed Diesel's claims against Greystone for account stated. The viability of such a claim depends on "the existence of some indebtedness between the parties, or an express agreement to treat the statement as an *55 account stated. It cannot be used to create liability where none otherwise exists." M. Paladino, Inc. v. J. Lucchese & Son Contracting Corp., 247 A.D.2d 515, 516, 669 N.Y.S.2d 318, 319 (2d Dep't 1998). The district court found that the e-mails on which Diesel relied for this claim were statements of amounts owed to Diesel by GBMI, not by Greystone, a finding that is not clearly erroneous. Further, given that Diesel has failed to establish Greystone's liability under the TPAs for the unpaid amounts, an account-stated claim against Greystone is untenable.
Finally, we note Diesel's contention that if the dismissal of its claims against Greystone is upheld on the basis that GBMI failed to perform a condition precedent to Greystone's duty to pay, GBMI should be held liable for breach of the TPAs. Diesel's one-paragraph presentation of this argument contains neither a citation to the record nor a citation of law and provides us with no basis for reversal. In any event, the district court found that although GBMI's delivery of Customer Purchase Orders to Diesel and Greystone was a condition precedent to Greystone's obligation to pay, GBMI's failure to provide such purchase orders did not constitute a material breach. See Diesel, 2009 WL 2514033, at *14 n. 13. The finding of lack of materiality insofar as Diesel is concerned is supported by the very fact that, despite GBMI's failure to supply those documents, Diesel persisted in making many millions of dollars worth of shipments to GBMI.

D. The Award of Unjust Enrichment Damages to Greystone

In order to succeed on a claim for unjust enrichment under New York law, a plaintiff must prove that "(1) defendant was enriched, (2) at plaintiff's expense, and (3) equity and good conscience militate against permitting defendant to retain what plaintiff is seeking to recover," Briarpatch Ltd. v. Phoenix Pictures, Inc., 373 F.3d 296, 306 (2d Cir.2004), cert. denied, 544 U.S. 949, 125 S.Ct. 1704, 161 L.Ed.2d 525 (2005); see, e.g., Nordwind v. Rowland, 584 F.3d 420, 434 (2d Cir.2009); Kaye v. Grossman, 202 F.3d 611, 616 (2d Cir.2000). In the present case, the district court ruled that Props was unjustly enriched by its receipt of the GBMI Order Book for SS08 upon the termination of the agreements with Greystone and GBMI, reasoning that Greystone had taken a security interest in all of GBMI's assets, including the Order Book, and stating that the Distribution Agreement did not give Props the right to receive the GBMI Order Book upon the Distribution Agreement's termination, see Diesel, 2009 WL 2514033, at *16. We disagree because Diesel had a contractual right to receive the SS08 Order Book at the relevant time, and that right was superior to Greystone's security interest.
In general, when the question is the "priority between a secured creditor and [a person] whose interests in the collateral preceded it, a first in time, first in right rule applies." Septembertide Publishing, B.V. v. Stein & Day, Inc., 884 F.2d 675, 682 (2d Cir. 1989) ("Septembertide"); Fallon v. Wall Street Clearing Co., 182 A.D.2d 245, 249, 586 N.Y.S.2d 953, 956 (1st Dep't 1992) ("Fallon"). "It has always been the law in New York that an assignee stands in the shoes of its assignor and takes subject to those liabilities of its assignor that were in existence prior to the assignment"; and, thus, "in taking a security interest in its assignor's property, [the assignee] cannot claim rights in the property that were not the assignor's to give." Septembertide, 884 F.2d at 682.
A later-in-time assignee can have priority over a claimant whose right *56 was created earlier only if the later assignee was a "bona fide purchaser." Fallon, 182 A.D.2d at 249, 586 N.Y.S.2d at 956. But "that status cannot be attained where the transferee takes with knowledge of an adverse claim"; and "[a]n `adverse claim' is not limited strictly to an adverse ownership interest, but rather could include, in this context, any transfer with knowledge of violation of an agreement." Id. Thus, when a creditor takes a security interest in collateral to which it knows a third party has even an unperfected contract right, it takes that security interest "subject to [those] pre-existing liabilities," and the "acquired interest [i]s secured only to the extent that [the assignor] had an unencumbered, transferable interest." Id.; see, e.g., Septembertide, 884 F.2d at 677, 681-82 (creditor who acquired a security interest in "all" of the debtor's "contract rights and accounts" was not entitled to proceeds that an earlier contract had assigned to a third party).
In the present case, the pertinent Distribution Agreement was entered into in 2005. Defining Props as the "Company" and GBMI as the "Distributor," that agreement provided that "within 15 (fifteen) days from the end of each Sales campaign the Distributor shall communicate to the Company the list of the Sales Outlets and the relevant orders collected," i.e., the GBMI Order Book for that selling season. The district court found that the SS08 "sales campaign had ended as of the termination of the Distribution Agreement[s]." Diesel, 2009 WL 2514033, at *9. Greystone acquired its security interest in GBMI's assets when it entered into the LSA in 2006, and it is undisputed that Greystone had knowledge of the Distribution Agreements at that time. The LSA made express reference to the TPA among Greystone, GBMI, and Props; and the TPA made express reference to the 2005 Distribution Agreement. As the preexisting Props Distribution Agreement entitled Props to receive GBMI's records of customers and orders for Props products at the end of each sales campaign, Greystone's later-acquired security interest in GBMI's assets was subordinate to Diesel's right to receive the Order Book at the close of each such campaign.
The district court instead described Props as having "purloin[ed]" Greystone's collateral, id. at *16, noting the apparent glee reflected by Props e-mails referring to Props's receipt of the Order Book as "`Christmas'" coming "`early,'" and noting testimonial and documentary evidence that Props made efforts to conceal its possession of the Order Book. Id. at *10. The court suggested that Props had no right to the SS08 Order Book because it had timed its termination of the Distribution Agreement to coincide with the end of the sales campaign, see id. at *16. But the district court did not findnor does Greystone contend, and nothing in the record suggeststhat Props did not have the right to terminate the Distribution Agreement when it did. And as the provision in that agreement giving Props the right to receive GBMI's customer and order records at the end of each sales campaign was unambiguous, extrinsic evidence, such as Props's reaction to receiving the Order Book following the Distribution Agreement's termination, was inadmissible to vary the plain meaning of the contract provision.
In sum, because (a) the Distribution Agreement gave Props the right, at the end of the SS08 sales campaign, to receive GBMI's list of sales outlets and orders for Props shoes, (b) termination of the Distribution Agreement coincided with the end of that sales campaign, (c) Diesel's contract right existed prior to the creation of Greystone's security interest in GBMI assets, and (d) Greystone was aware of the *57 existence of the Distribution Agreement when it entered into the LSA, Props did not receive the Order Book at Greystone's expense, and equity and good conscience did not militate against allowing Props to enjoy the benefit of its bargained-for contract right. The district court should have dismissed Greystone's counterclaim.

CONCLUSION
We have considered all of the parties' contentions on this appeal and, for the reasons stated above, have found merit only in Greystone's arguments supporting the dismissal of Diesel's claims and in Props's challenge to the award of unjust enrichment damages to Greystone. We reverse so much of the judgment of the district court as awarded damages to Greystone. In all other respects, the judgment is affirmed.
Each side shall bear its own costs of this appeal.
