更新卡券信息
@param $requestParams
@return array|bool
@throws HttpException
196670
public function updateCard($requestParams)
    {
        if (empty($requestParams)) {
            return false;
        }
        $result = $this->httpPost(static::WECHAT_UPDATE_CARD_URL . 'access_token=' . $this->getAccessToken(), $requestParams);
        return isset($result['errmsg']) && $result['errmsg'] === 'ok' ? $result : false;
    }
456435
public function setParams(array $params = array())
    {
        if (empty($params)) {
            throw new Exception('Unable to send exception. Invalid data provided.');
        }
        $this->description = isset($params['description']) ? $params['description'] : null;
        $this->url         = isset($params['url']) ? $params['url'] : null;
        $this->src         = isset($params['src']) ? $params['src'] : null;
        return $this;
    }
1066856
public function updateAction(Request $request): JsonResponse
    {
        $id   = $request->request->get('id');
        $data = $request->request->get('product');
        
        try {
            $this->quickUpdateProduct($id, $data);
            $result = ['success' => $this->trans('product.flash.success.saved')];
        } catch (\Exception $e) {
            $result = ['error' => $e->getMessage()];
        }
        
        return $this->jsonResponse($result);
    }
1324991
public function updateWebsite(...$params)
    {
        $name      = \array_shift($params);
        $ipAddress = \array_shift($params);
        $https     = \array_shift($params);
        $domains   = \array_shift($params);

        if ($this->version === 1)
        {
            $siteApps = $params;

            return $this->updateV1Website($name, $ipAddress, $https, $domains, $siteApps);
        }

        $certificate = \array_shift($params);
        $siteApps    = $params;

        return $this->updateV2Website($name, $ipAddress, $https, $domains, $certificate, $siteApps);
    }
957173
public function updateSubscription($params = null)
    {
        $url = $this->instanceUrl() . '/subscription';
        list($response, $opts) = $this->_request('post', $url, $params);
        $this->refreshFrom(['subscription' => $response], $opts, true);
        return $this->subscription;
    }
1023064
public function updateClient($params)
    {
        $clientId = $params['client_id'];
        $client = $this->getByID($clientId);
        $client->update($params);
        $client->save();
        return $client;
    }
174461
protected function updateRequest()
    {
        $headers = [];
        foreach ($this->all() as $key => $values) {
            foreach ($values as $value) {
                $headers[] = $key.': '.$value;
            }
        }

        $this->request->setOption(CURLOPT_HTTPHEADER, $headers);
    }
1000564
public function markAsPaid($requestParams)
    {
        $options["headers"] = self::retrieveContentTypeHeader(self::CONTENT_TYPE_FORM);
        $requiredParams = array("id");
        return $this->client->request($requestParams, $this->_mainTransactionEndpoint . "/" . self::MARK_PAID, "put", $requiredParams, $options);
    }
451325
protected function g_update($url, $params)
    {
        $result = $this->execute($url, self::REQUEST_PATCH, $this->getResourceKey(), $params);
        $this->refresh($result);
    }
1069697
public function execute($requestParams = array()){

        $this->getQueryBuilder()->setValues($requestParams);
        
        $query = $this->getQueryBuilder()->getQuery($this->entity, QueryBuilder::SAVE_QUERY, QueryBuilder::PARENT_ONLY);

        $this->beginTransaction();
        try{
            //first save into the parent table 
            $result = $this->query("$query", FALSE);
           
            if(intval($result) > 0) {
                 
                $requestParams['id'] = $result;               
                $this->saveI18nValues($result,  $requestParams, $requestParams['locale']);
                $this->saveChildTableParams($result, $requestParams);
                $this->saveOneToManyJoins($result, $requestParams);
            }elseif(array_key_exists('id', $requestParams) && intval($requestParams['id']) > 0){      
          
                if(array_key_exists('locale', $requestParams)) {
                    $this->saveI18nValues($requestParams['id'], $requestParams, $requestParams['locale']); 
                }
       
                $this->saveChildTableParams($requestParams['id'],  $requestParams);
                $this->saveOneToManyJoins($requestParams['id'],  $requestParams);
                
            }   
            $this->saveMultiRowValues($requestParams);
      
            $this->commitTransaction();
        }catch(Exception $e){
          
            error_log($e->getMessage());
            $this->rollbackTransaction();
        }
        if(array_key_exists('locale', $requestParams)) {
            $requestParams['locale'] = $this->parseJson($requestParams['locale']);
        }
      
        return array(get_class($this->entity) => $requestParams);
    }
79180
public function update(Request $request)
    {
        $action = $request->input('action');

        $thread = $this->api("thread.{$action}", $request->route('thread'))->parameters($request->all())->patch();

        Forum::alert('success', 'threads.updated', 1);

        return redirect(Forum::route('thread.show', $thread));
    }
264770
public function submit(RequestParameters $params)
    {
        $handle = $this->curl->init($this->siteVerifyUrl);

        $options = array(
            CURLOPT_POST => true,
            CURLOPT_POSTFIELDS => $params->toQueryString(),
            CURLOPT_HTTPHEADER => array(
                'Content-Type: application/x-www-form-urlencoded'
            ),
            CURLINFO_HEADER_OUT => false,
            CURLOPT_HEADER => false,
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_SSL_VERIFYPEER => true
        );
        $this->curl->setoptArray($handle, $options);

        $response = $this->curl->exec($handle);
        $this->curl->close($handle);

        if ($response !== false) {
            return $response;
        }

        return '{"success": false, "error-codes": ["'.ReCaptcha::E_CONNECTION_FAILED.'"]}';
    }
133610
public function update(Request $request)
    {
        $data = array_get($request->input(), '2fa', []);
        return $this->processor->update($this, $data);
    }
73541
public function update($params)
    {
        $query = $this->query->update($params);
        $prepare = $this->db->exec($query);
        if ($prepare) {
            return true;
        }

        return false;
    }
796344
public function update(Request $request)
    {
        $post = $this->api('post.fetch', $request->route('post'))->get();

        $this->authorize('edit', $post);

        $post = $this->api('post.update', $request->route('post'))->parameters($request->only('content'))->patch();

        Forum::alert('success', 'posts.updated');

        return redirect(Forum::route('thread.show', $post));
    }
549113
public function retrieveSmartFormHTML($requestParams)
    {
        $requiredParams = array("id");
        return $this->client->request($requestParams, $this->_mainFormEndpoint, "get", $requiredParams, $options = NULL);
    }
1103719
public function prepareRequest($params = 'default')
    {
        if (is_string($params)) {
            // 载入请求模板
            $params = RequestTemplate::loadTemplate($this->getModule(), $this->getAction(), $params);
        } elseif ( ! is_array($params)) {
            $params = array();
        }

        $params['apiKey'] = isset($params['apiKey']) ? $params['apiKey'] : Config::get('API_KEY');
        $params['apiUser'] = isset($params['apiUser']) ? $params['apiUser'] : Config::get('API_USER');
        $this->data = $params;

        return $this;
    }