lib/Model/Charge.php
public function setState($state)
    {
        $allowed_values = array('authorised', 'captured', 'cancelled', 'refunded', 'declined');
        if ((!in_array($state, $allowed_values))) {
            throw new \InvalidArgumentException("Invalid value for 'state', must be one of 'authorised', 'captured', 'cancelled', 'refunded', 'declined'");
        }
        $this->container['state'] = $state;

        return $this;
    }
public function setState($state)
    {
        $allowed_values = array('authorised', 'captured', 'cancelled', 'refunded', 'declined');
        if ((!in_array($state, $allowed_values))) {
            throw new \InvalidArgumentException("Invalid value for 'state', must be one of 'authorised', 'captured', 'cancelled', 'refunded', 'declined'");
        }
        $this->container['state'] = $state;

        return $this;
    }
Sets state
@param string $state
@return $this