Welcome. My name is ***** ***** would be glad to assist.
I noticed the question still on the board. Most likely there was not an expert on line at the time of your question request.
I did want to respond in case it is still needed.
1. what is the code for the wire size and types, i.e. from the circuit breaker to knock-out box, knock-out box to compressor,
Your minimum is 26.4 and maximum is 45 amps for the protection of the unit.
So, use a 40 amp double pole breaker at the main panel.
Run a 3/4" conduit from the panel to the disconnect outside at the unit. 1/2" would suffice but the 3/4" makes for an easier installation of the wiring
Install #8 THHN wire in the conduit for power and a #10 THHN wire for the ground
Wire that to the disconnect switch outside which is required for maintenance and emergency shutoff
The disconnect does not need to have a breaker, only an on and off switch is required. They are sold as AC Disconnect at the supply houses.
Use a flexible conduit with the same wires from the disconnect to the condensing unit
2. the circuit breaker amp rating (45 amp? by the way I noticed my apartment has a 15 amp breaker for a 20 amp max overcurrent protection),
Covered in #1, only 40 amp needed because it is higher than the minimum and lower than the maximum.
3. and does it need a knock-out and if so, what amp rating?
Not sure what you mean on this, but assume this is the disconnect and it needs to be 40 amp rated, and we usually use a 60 amp rated disconnect. They cost no more than the 40 amp rating if you can even find a 40 amp.
Let me know anything further needed,