Business & farm

Your original question is not clear.  "Once I purchase..." suggests transactions between two people - a selling shareholder and a buyer of those shares.  That sort of transaction does not affect the balance sheet of the company.  The selling shareholder has capital gain or loss, appropriately.

I'm not sure what "contribute", (in quotation marks) means.  You can lend the company money and the company can create a note payable to shareholder.  You can purchase additional shares from the company, (if allowed), and the company records that as an increase in cash and an increase in capital stock and additional paid-in-capital.

If the COMPANY buys back its own shares that's recorded as a decrease in cash and a decrease in the entity's Capital Accounts, most typically with a new line item "Treasury stock", (which I assume "TS" is referring to); however there's a legal question involved here as not all states allow a company to hold treasury stock.  There can also be rules about the subsequent reselling of the stock.