Completes an confirmation

        :param complete_dict: the complete dict with the template id
        :param confirmation_id: the confirmation id
        :return: Response
772101
def complete_confirmation(self, confirmation_id, complete_dict):
        
        return self._create_put_request(
            resource=CONFIRMATIONS,
            billomat_id=confirmation_id,
            command=COMPLETE,
            send_data=complete_dict
        )
971212
def is_complete(self):
        
        self._update_questions()  # Make sure questions list is current
        for question_map in self._my_map['questions']:
            if 'missingResponse' in question_map['responses'][0]:
                return False
        return True
469990
def approve(self, request, *args, **kwargs):
        
        self.object = self.get_object()
        success_url = self.get_success_url()
        self.object.approved = True
        self.object.save()
        messages.success(self.request, self.success_message)
        return HttpResponseRedirect(success_url)
1017877
def complete_credit_note(self, credit_note_it, complete_dict):
        
        return self._create_put_request(
            resource=CREDIT_NOTES,
            billomat_id=credit_note_it,
            command=COMPLETE,
            send_data=complete_dict
        )
483977
def update_confirmation_comment(self, confirmation_comment_id, confirmation_comment_dict):
        
        return self._create_put_request(
            resource=CONFIRMATION_COMMENTS,
            billomat_id=confirmation_comment_id,
            send_data=confirmation_comment_dict
        )
894291
def complete(self):
        """"""
        response = self.api_client._post(self.resource_path, 'complete')
        return self.api_client._make_api_object(response, APIObject)
1249784
def approve_task(self, task_id):
        
        uri = 'tasks/%s' % task_id

        data = {"approved": True}

        resp, body = self.post(uri, json.dumps(data))
        self.expected_success(200, resp.status)
        body = json.loads(body)
        return rest_client.ResponseBody(resp, body)
880182
def finishOpenID(request):
    
    result = {}

    # Because the object containing the query parameters is a
    # MultiValueDict and the OpenID library doesn't allow that, we'll
    # convert it to a normal dict.

    # OpenID 2 can send arguments as either POST body or GET query
    # parameters.
    request_args = util.normalDict(request.GET)
    if request.method == 'POST':
        request_args.update(util.normalDict(request.POST))

    if request_args:
        c = getConsumer(request)

        # Get a response object indicating the result of the OpenID
        # protocol.
        return_to = util.getViewURL(request, finishOpenID)
        response = c.complete(request_args, return_to)

        # Get a Simple Registration response object if response
        # information was included in the OpenID response.
        sreg_response = {}
        ax_items = {}
        if response.status == consumer.SUCCESS:
            sreg_response = sreg.SRegResponse.fromSuccessResponse(response)

            ax_response = ax.FetchResponse.fromSuccessResponse(response)
            if ax_response:
                ax_items = ax_response.data

        # Get a PAPE response object if response information was
        # included in the OpenID response.
        pape_response = None
        if response.status == consumer.SUCCESS:
            pape_response = pape.Response.fromSuccessResponse(response)

            if not pape_response.auth_policies:
                pape_response = None

        # Map different consumer status codes to template contexts.
        results = {
            consumer.CANCEL:
            {'message': 'OpenID authentication cancelled.'},

            consumer.FAILURE:
            {'error': 'OpenID authentication failed.'},

            consumer.SUCCESS:
            {'url': response.getDisplayIdentifier(),
             'sreg_response': sreg_response and sreg_response.iteritems(),
             'ax_response': ax_items.items(),
             'pape': pape_response}
        }

        result = results[response.status]

        print result
        if not result.has_key("error"):
            data_array = [it[1][0] for it in result["ax_response"]]
            data = {
                "login": None,
                "openid": result["url"],
                "first_name": data_array[0],
                "last_name": data_array[1],
                "email": data_array[2],
            }
            return create_profil_from_ipenid(request, data)

        if isinstance(response, consumer.FailureResponse):
            # In a real application, this information should be
            # written to a log for debugging/tracking OpenID
            # authentication failures. In general, the messages are
            # not user-friendly, but intended for developers.
            result['failure_reason'] = response.message

    return renderIndexPage(request, **result)
1221037
def get_all_confirmations(self, params=None):
        
        if not params:
            params = {}
        return self._iterate_through_pages(
            self.get_confirmations_per_page,
            resource=CONFIRMATIONS,
            **{'params': params}
        )
409769
def propose_template(self, template_id, from_account):
        
        tx_hash = self.send_transaction(
            'proposeTemplate',
            (template_id,),
            transact={'from': from_account.address,
                      'passphrase': from_account.password})
        return self.get_tx_receipt(tx_hash).status == 1
587826
def on_completions_request(self, py_db, request):
        '''
        
        '''
        arguments = request.arguments  # : :type arguments: CompletionsArguments
        seq = request.seq
        text = arguments.text
        frame_id = arguments.frameId
        thread_id = py_db.suspended_frames_manager.get_thread_id_for_variable_reference(
            frame_id)

        if thread_id is None:
            body = CompletionsResponseBody([])
            variables_response = pydevd_base_schema.build_response(
                request,
                kwargs={
                    'body': body,
                    'success': False,
                    'message': 'Thread to get completions seems to have resumed already.'
            })
            return NetCommand(CMD_RETURN, 0, variables_response, is_json=True)

        # Note: line and column are 1-based (convert to 0-based for pydevd).
        column = arguments.column - 1

        if arguments.line is None:
            # line is optional
            line = -1
        else:
            line = arguments.line - 1

        self.api.request_completions(py_db, seq, thread_id, frame_id, text, line=line, column=column)
34862
def notify_complete(self, result_code, error_info):
        
        if not isinstance(result_code, baseinteger):
            raise TypeError("result_code can only be an instance of type baseinteger")
        if not isinstance(error_info, IVirtualBoxErrorInfo):
            raise TypeError("error_info can only be an instance of type IVirtualBoxErrorInfo")
        self._call("notifyComplete",
                     in_p=[result_code, error_info])
1086760
def complete(self, request, response):
        
        extra = self.get_extra_data(response)
        data = {}
        for form_field, backend_field in self.PROFILE_MAPPING.items():
            data[form_field] = self.extract_data(extra, backend_field)
        request.session['extra'] = data

        if settings.ACCEPT_EXTRA_FORM:
            self.fill_extra_fields(request, data)

        request.session['identity'] = self.identity
        return redirect('netauth-extra', self.provider)
938601
def send_confirmation_email(self):
        
        form = self._get_form('SECURITY_SEND_CONFIRMATION_FORM')
        if form.validate_on_submit():
            self.security_service.send_email_confirmation_instructions(form.user)
            self.flash(_('flask_unchained.bundles.security:flash.confirmation_request',
                         email=form.user.email), category='info')
            if request.is_json:
                return '', HTTPStatus.NO_CONTENT

        elif form.errors and request.is_json:
            return self.errors(form.errors)

        return self.render('send_confirmation_email',
                           send_confirmation_form=form,
                           **self.security.run_ctx_processor('send_confirmation_email'))
78904
public synchronized boolean complete(Response result) {
        if (completed) {
            return false;
        }
        completed = true;
        this.result = result;
        notifyAll();
        return true;
    }
807985
def resend_approver_email(self, order_id):
        """"""

        response = self.request(E.resendApproverEmailSslCertRequest(
            E.id(order_id)
        ))

        return int(response.data.id)
270160
def connect_success(self, connection_id):
        
        endpoint = self._network.connection_id_to_endpoint(connection_id)
        endpoint_info = self._temp_endpoints.get(endpoint)

        LOGGER.debug("Endpoint has completed authorization: %s (id: %s)",
                     endpoint,
                     connection_id)
        if endpoint_info is None:
            LOGGER.debug("Received unknown endpoint: %s", endpoint)

        elif endpoint_info.status == EndpointStatus.PEERING:
            self._connect_success_peering(connection_id, endpoint)

        elif endpoint_info.status == EndpointStatus.TOPOLOGY:
            self._connect_success_topology(connection_id)

        else:
            LOGGER.debug("Endpoint has unknown status: %s", endpoint)

        with self._lock:
            if endpoint in self._temp_endpoints:
                del self._temp_endpoints[endpoint]