New Zealand paceman Chris Martin has announced his retirement from all first-class cricket with immediate effect.