Set the client-configurable portions of an Account.

        Args:
            accountID:
                Account Identifier
            alias:
                Client-defined alias (name) for the Account
            marginRate:
                The string representation of a decimal number.

        Returns:
            v20.response.Response containing the results from submitting the
            request

def configure(
        self,
        accountID,
        **kwargs
    ):
        """
        Set the client-configurable portions of an Account.

        Args:
            accountID:
                Account Identifier
            alias:
                Client-defined alias (name) for the Account
            marginRate:
                The string representation of a decimal number.

        Returns:
            v20.response.Response containing the results from submitting the
            request
        """

        request = Request(
            'PATCH',
            '/v3/accounts/{accountID}/configuration'
        )

        request.set_path_param(
            'accountID',
            accountID
        )

        body = EntityDict()

        if 'alias' in kwargs:
            body.set('alias', kwargs['alias'])

        if 'marginRate' in kwargs:
            body.set('marginRate', kwargs['marginRate'])

        request.set_body_dict(body.dict)

        response = self.ctx.request(request)


        if response.content_type is None:
            return response

        if not response.content_type.startswith("application/json"):
            return response

        jbody = json.loads(response.raw_body)

        parsed_body = {}

        #
        # Parse responses as defined by the API specification
        #
        if str(response.status) == "200":
            if jbody.get('clientConfigureTransaction') is not None:
                parsed_body['clientConfigureTransaction'] = \
                    self.ctx.transaction.ClientConfigureTransaction.from_dict(
                        jbody['clientConfigureTransaction'],
                        self.ctx
                    )

            if jbody.get('lastTransactionID') is not None:
                parsed_body['lastTransactionID'] = \
                    jbody.get('lastTransactionID')

        elif str(response.status) == "400":
            if jbody.get('clientConfigureRejectTransaction') is not None:
                parsed_body['clientConfigureRejectTransaction'] = \
                    self.ctx.transaction.ClientConfigureRejectTransaction.from_dict(
                        jbody['clientConfigureRejectTransaction'],
                        self.ctx
                    )

            if jbody.get('lastTransactionID') is not None:
                parsed_body['lastTransactionID'] = \
                    jbody.get('lastTransactionID')

            if jbody.get('errorCode') is not None:
                parsed_body['errorCode'] = \
                    jbody.get('errorCode')

            if jbody.get('errorMessage') is not None:
                parsed_body['errorMessage'] = \
                    jbody.get('errorMessage')

        elif str(response.status) == "403":
            if jbody.get('clientConfigureRejectTransaction') is not None:
                parsed_body['clientConfigureRejectTransaction'] = \
                    self.ctx.transaction.ClientConfigureRejectTransaction.from_dict(
                        jbody['clientConfigureRejectTransaction'],
                        self.ctx
                    )

            if jbody.get('lastTransactionID') is not None:
                parsed_body['lastTransactionID'] = \
                    jbody.get('lastTransactionID')

            if jbody.get('errorCode') is not None:
                parsed_body['errorCode'] = \
                    jbody.get('errorCode')

            if jbody.get('errorMessage') is not None:
                parsed_body['errorMessage'] = \
                    jbody.get('errorMessage')

        elif str(response.status) == "401":
            if jbody.get('errorCode') is not None:
                parsed_body['errorCode'] = \
                    jbody.get('errorCode')

            if jbody.get('errorMessage') is not None:
                parsed_body['errorMessage'] = \
                    jbody.get('errorMessage')

        elif str(response.status) == "404":
            if jbody.get('errorCode') is not None:
                parsed_body['errorCode'] = \
                    jbody.get('errorCode')

            if jbody.get('errorMessage') is not None:
                parsed_body['errorMessage'] = \
                    jbody.get('errorMessage')

        elif str(response.status) == "405":
            if jbody.get('errorCode') is not None:
                parsed_body['errorCode'] = \
                    jbody.get('errorCode')

            if jbody.get('errorMessage') is not None:
                parsed_body['errorMessage'] = \
                    jbody.get('errorMessage')

        #
        # Unexpected response status
        #
        else:
            parsed_body = jbody

        response.body = parsed_body

        return response