O C Driver has good advice. If your unit is reverse cycle (heating and cooling) invoke the heat. If the unit produces heat but does not cool, your reversing valve is stuck. If it is, you will have to replace the unit. Sometimes a stuck valve can be dislodged with light tapping on the tubing but most often that does not work. Repair is not worth it.
If you recharge the unit and it cools and then stops cooling later, you have a leak somewhere. If that leak is in an inaccessible place then you are in for some ripping and tearing. That happened to us for our v-berth unit. Fortunately we rarely used it and don't need it so I elected to remove the compressor from the engine room.