Execute a call to the WePay API.
777257
def call(call, access_token = false, params = {}, risk_token = false, client_ip = false)
      path = call.start_with?('/') ? call : call.prepend('/')
      url  = URI.parse(api_endpoint + path)

      call = Net::HTTP::Post.new(url.path, {
        'Content-Type' => 'application/json',
        'User-Agent'   => 'WePay Ruby SDK'
      })

      unless params.empty?
        call.body = params.to_json
      end

      if access_token then call.add_field('Authorization', "Bearer #{access_token}"); end
      if @api_version then call.add_field('Api-Version', @api_version); end
      if risk_token then call.add_field('WePay-Risk-Token', risk_token); end
      if client_ip then call.add_field('Client-IP', client_ip); end

      make_request(call, url)
    end
809303
def process(self, request, item):
        """"""
        warn_untested()
        from paypal.pro.helpers import PayPalWPP

        wpp = PayPalWPP(request)

        # Change the model information into a dict that PayPal can understand.
        params = model_to_dict(self, exclude=self.ADMIN_FIELDS)
        params['acct'] = self.acct
        params['creditcardtype'] = self.creditcardtype
        params['expdate'] = self.expdate
        params['cvv2'] = self.cvv2
        params.update(item)

        # Create recurring payment:
        if 'billingperiod' in params:
            return wpp.createRecurringPaymentsProfile(params, direct=True)
        # Create single payment:
        else:
            return wpp.doDirectPayment(params)
222260
public <T> ApiResponse<T> execute(Call call) throws ApiException {
        return execute(call, null);
    }
1363578
public function executeAction()
    {
        /**
         * The execute action will generate the Paypal web
         * checkout form before redirecting.
         */
        $formView = $this
            ->paypalWebCheckoutManager
            ->generatePaypalForm();

        $data = $this
            ->engine
            ->render('PaypalWebCheckoutBundle:Payment:process.html.twig', [
                'form' => $formView,
            ]);

        return new Response($data);
    }
202357
def execute(self, method, path, **kwargs):
        

        url = "{}{}".format(self.host, path)
        kwargs.update(self._client_kwargs)
        response = requests.request(
            method,
            url,
            headers={"Authorization": "Bearer {}".format(self.api_key)},
            **kwargs)
        return response
1087082
public function execute() {
        // Get the card token from request
        $ckoCardToken = $this->getCardToken();

        // Get the customer id from request
        $customerId = $this->getCustomerId();

        try {
            $this->storeCardService
                 ->setCardToken($ckoCardToken)
                 ->setCustomerId($customerId)
                 ->setCustomerEmail()
                 ->test()
                 ->setCardData()
                 ->save();

            $this->messageManager->addSuccessMessage( __('The payment card has been stored successfully.'));
        }
        catch(\Exception $e) {
            $this->messageManager->addErrorMessage($e->getMessage());
        }
        
        return $this->_redirect('vault/cards/listAction');
    }
180681
def _make_the_call(self, method, url, body=None):
        """"""
        self.log.debug("%s call to %s with body = %s" % (method, url, body))
        params = {"url": url, "headers": self.headers, "verify": self.verify}
        if body is not None:
            params["data"] = body
        func = getattr(requests, method.lower())
        try:
            resp = func(**params)
        except Exception as e:
            self.log.error("Call to %s failed with %s, %s" % (url, repr(e),
                                                              e.message))
            return None, e
        else:
            self.log.debug("Call to %s returned with status %s and body "
                           "%s" % (url, resp.status, resp.text))
        return resp.status_code, resp.json()
88683
def execute(options):
    """"""
    # Load the key in PKCS 12 format that you downloaded from the Google APIs
    # Console when you created your Service account.
    package_name = options['<package>']
    source_directory = options['<output_dir>']

    if options['upload'] is True:
        upstream = True
    else:
        upstream = False

    sub_tasks = {'images': options['--images'], 'listings': options['--listings'], 'inapp': options['--inapp']}
    if sub_tasks == {'images': False, 'listings': False, 'inapp': False}:
        sub_tasks = {'images': True, 'listings': True, 'inapp': True}

    credentials = create_credentials(credentials_file=options['--credentials'],
                                     service_email=options['--service-email'],
                                     service_key=options['--key'])

    command = SyncCommand(
        package_name, source_directory, upstream, credentials, **sub_tasks)
    command.execute()
486593
def _execute(self, api_command, *, timeout=None):
        """"""

        if api_command.observe:
            self._observe(api_command)
            return

        method = api_command.method
        path = api_command.path
        data = api_command.data
        parse_json = api_command.parse_json
        url = api_command.url(self._host)

        proc_timeout = self._timeout
        if timeout is not None:
            proc_timeout = timeout

        command = self._base_command(method)

        kwargs = {
            'stderr': subprocess.DEVNULL,
            'timeout': proc_timeout,
            'universal_newlines': True,
        }

        if data is not None:
            kwargs['input'] = json.dumps(data)
            command.append('-f')
            command.append('-')
            _LOGGER.debug('Executing %s %s %s: %s', self._host, method, path,
                          data)
        else:
            _LOGGER.debug('Executing %s %s %s', self._host, method, path)

        command.append(url)

        try:
            return_value = subprocess.check_output(command, **kwargs)
        except subprocess.TimeoutExpired:
            raise RequestTimeout() from None
        except subprocess.CalledProcessError as err:
            raise RequestError(
                'Error executing request: {}'.format(err)) from None

        api_command.result = _process_output(return_value, parse_json)
        return api_command.result
315585
async def call(self, action, **kwargs):
        """"""
        act = self.service.action(action)
        _LOGGER.info("Calling %s with %s", action, kwargs)
        res = await act.async_call(**kwargs)

        _LOGGER.info("  Result: %s" % res)

        return res
164763
def call(self, callname, arguments=None):
        """"""
        # See if a method override exists
        action = getattr(self.api, callname, None)
        if action is None:
            try:
                action = self.api.ENDPOINT_OVERRIDES.get(callname, None)
            except AttributeError:
                action = callname

        if not callable(action):
            request = self._generate_request(action, arguments)
            if action is None:
                return self._generate_result(
                    callname, self.api.call(*call_args(callname, arguments)))
            return self._generate_result(
                callname, self.api.call(*call_args(action, arguments)))

        request = self._generate_request(callname, arguments)
        return self._generate_result(callname, action(request))
776875
def execute(self, conn, app, release_version, pset_hash, output_label, global_tag, transaction = False):
        
        binds = {}
        binds["app_name"]=app
        binds["release_version"]=release_version
        binds["pset_hash"]=pset_hash
        binds["output_module_label"]=output_label
        binds["global_tag"]=global_tag

        result = self.dbi.processData(self.sql, binds, conn, transaction)

        plist = self.formatDict(result)

	if len(plist) < 1: return -1
        return plist[0]["output_mod_config_id"]
900581
private <T> T executeHttpCallWithRetry(HttpCall<T> call, int runCount) {
    try {
      return call.execute();
    }
    catch (PackageManagerHttpActionException ex) {
      // retry again if configured so...
      if (runCount < props.getRetryCount()) {
        log.info("ERROR: " + ex.getMessage());
        log.debug("HTTP call failed.", ex);
        log.info("---------------");

        StringBuilder msg = new StringBuilder();
        msg.append("HTTP call failed, try again (" + (runCount + 1) + "/" + props.getRetryCount() + ")");
        if (props.getRetryDelaySec() > 0) {
          msg.append(" after " + props.getRetryDelaySec() + " second(s)");
        }
        msg.append("...");
        log.info(msg);
        if (props.getRetryDelaySec() > 0) {
          try {
            Thread.sleep(props.getRetryDelaySec() * DateUtils.MILLIS_PER_SECOND);
          }
          catch (InterruptedException ex1) {
            // ignore
          }
        }
        return executeHttpCallWithRetry(call, runCount + 1);
      }
      else {
        throw ex;
      }
    }
  }
1171048
def _start(self):
        '''

        '''
        if self.whoami is None:
            me = self.get_me()
            if me.get('ok', False):
                self.whoami = me['result']
            else:
                raise ValueError('Bot Cannot request information, check '
                                 'api_key')
697321
async def do_api_call(self):
        """"""
        self.pyvlx.connection.register_frame_received_cb(
            self.response_rec_callback)
        await self.send_frame()
        await self.start_timeout()
        await self.response_received_or_timeout.wait()
        await self.stop_timeout()
        self.pyvlx.connection.unregister_frame_received_cb(self.response_rec_callback)
104015
def _make_api_call(self, api_method, **kwargs):
        '''
        '''
        api_url = '/'.join((self.api_base_url, api_method))
        parameters = dict()
        parameters.update(self.default_parameters)
        parameters.update(kwargs)
        post_params = urlencode(parameters).encode('utf-8')
        response = self.opener.open(api_url, post_params)
        return json.loads(response.read().decode('utf-8'))
759760
protected static function executeCall(
        $method,
        $payLoad,
        $headers = array(),
        $apiContext = null,
        $soapCall = null,
        $handlers = array('PayU\Handler\BasicAuthHandler'),
        $path = ''
    )
    {
        //Initialize the context and rest call object if not provided explicitly
        $apiContext = $apiContext ? $apiContext : new ApiContext(self::$credential);
        self::$apiContext = $apiContext;
        $soapCall = $soapCall ? $soapCall : new SoapCall($apiContext);

        //Make the execution call
        $json = $soapCall->execute($method, $payLoad, $handlers, $headers, $path);
        return $json;
    }