How to Import Static Variable as BigDecimal

BigDecimal.valueOf(value) and new BigDecimal(value) gives "Unexpected type: java.math.BigDecimal" exception. You have to use this instead:

Basic principle
def price = api.global.price as BigDecimal 
// local variable price is now BigDecimal

Found an issue in documentation? Write to us.