def withdraw(self, account_id, **params):
        """https://developers.coinbase.com/api/v2#withdraw-funds"""
        for required in ['payment_method', 'amount', 'currency']:
            if required not in params:
                raise ValueError("Missing required parameter: %s" % required)
        response = self._post('v2', 'accounts', account_id, 'withdrawals', data=params)
        return self._make_api_object(response, Withdrawal)