Get Transactions Data

@param array $arg_params
@return StdClass
@throws \Exception
519634
public static function all(array $arg_params)
    {
        //validate params
        $data = self::getParams($arg_params);
        $url = '/ecommerce/transactions';
        $filters = '';
        if(!empty($data['page'])&&ctype_digit($data['page'])){
            $filters .= 'page='.$data['page'];
        }
        if(!empty($filters))$filters='?'.$filters;

        //submit to api
        $transactions_data = APIRequests::request(
            $url.$filters,
            APIRequests::METHOD_GET
        );

        //return response
        return self::toListObj($transactions_data['body']);
    }
616087
public function fetchAll($str_query = null, $arr_params = null)
    {
        if(null !== $str_query) {
            $this->query($str_query, $arr_params);
        }
        $arr_results = $this->obj_gateway
            ->withSchema($this->obj_schema)
            ->withTransaction($this->str_transaction_id)
            ->gql($this->str_last_query, $this->arr_last_params);
        return $arr_results;
    }
361675
public function queryOrder(array $args = array()) {
        $args = $this->getQuery()->parameters($this->merge($args))->json();
        if (!array_key_exists('alipay_trade_query_response', $args)) {
            throw new \Exception('未知错误！');
        }
        $args = $args['alipay_trade_query_response'];
        if ($args['code'] != 10000) {
            throw new \Exception($args['msg']);
        }
        if (!$this->verify($args)) {
            throw new \Exception('数据验签失败！');
        }
        return $args;
    }
432765
public function _list($args=null) 
    {
      $data = Ensure::Input($args);
      $data = $data->get();
      if (isset($data[0])) {
        $data = $data[0];
      }
      if (!(isset($data["size"]))) {
        $data["size"] = DEFAULTS::SIZE;			
      }
      if (!(isset($data["page"]))) {
        $data["page"] = DEFAULTS::PAGE;
      }
      $url = URIResource::Make($this->path);
      $class = get_class($this) . "Collection";

      return new $class(new DataPacketCollection($this->client->get($url, $data)));
    }
537527
public function getUpdates(array $params = [])
    {
        return array_map(function (stdClass $update) {
            return Update::create($update);
        }, $this->request('getUpdates', $params)->getResult());
    }
1249497
public function getAll($sql, array $args = [])
    {
        $query = $this->query($sql, $args);
        if (!$query) {
            return [];
        }
        
        $rs = $query->fetchAll(\PDO::FETCH_ASSOC);
        return $rs;
    }
82972
public static function find($args = false)
    {
        /* @var ActiveRecord $model */

        $query = null;
        $model = new static();

        if ($args && $args instanceof Query) {
            $query = $args;
            $query->limit = 1;

            if (empty($query->from)) {
                $query->addFrom($model->getTableName().' T');
            }
        } elseif ($args && is_array($args)) {
            $args['limit'] = 1;
            if (!isset($args['from'])) {
                $args['from'] = $model->getTableName().' T';
            }
            $query = new Query($args);
        } elseif (!$args) {
            $query = new Query(
                [
                    'from' => $model->getTableName().' T',
                    'limit' => 1,
                ]
            );
        } else {
            throw new Exception(translate('Bad arguments'), 500, Exception::BADARGUMENTS);
        }

        $stmt = $model->getDB()->prepare($query->toSql());
        $stmt->execute($query->params);
        $record = $stmt->fetchObject(get_class($model), [false]);
        $stmt->closeCursor();

        return $record;
    }
1157065
public function getTransactionData($params)
    {
        $supportedParams = [
            'AllPayLogisticsID' => '',
            'PlatformID' => '',
        ];

        $this->sdk->Send = array_merge($this->sdk->Send, $supportedParams);

        $this->sdk->Send = array_replace(
            $this->sdk->Send,
            array_intersect_key($params, $this->sdk->Send)
        );

        return $this->sdk->QueryLogisticsInfo();
    }
870083
public function getEntities(array $args = [])
    {
        // @todo - use permission base to exclude secure if necessary.
        $replacementFilter = [
            'column' => 'f.object',
            'expr'   => 'neq',
            'value'  => ['company'],
        ];
        foreach ($args as $type => &$arg) {
            if ('filter' === $type) {
                foreach ($arg as $key => &$filter) {
                    if ('force' === $key) {
                        foreach ($filter as $forceKey => &$forceFilter) {
                            if (
                                !empty($forceFilter['column'])
                                && 'f.object' == $forceFilter['column']
                                && !empty($forceFilter['expr'])
                                && 'eq' == $forceFilter['expr']
                                && !empty($forceFilter['value'])
                                && 'lead' == $forceFilter['value']
                            ) {
                                $forceFilter = $replacementFilter;
                            }
                        }
                    } elseif ('object' === $key && 'lead' === $filter) {
                        // Move the filter to force mode in order to replace.
                        if (!isset($arg['force'])) {
                            $arg['force'] = [];
                        }
                        $arg['force'][] = $replacementFilter;
                        unset($arg[$key]);
                    }
                }
            }
        }

        return parent::getEntities($args);
    }
138983
function get($args)
    {
        // attempt to get file from local file system
        $args = parent::get($args);

        if ($args['path'] && ($args['status'] = file_exists($args['path'])))
          return $args;

        $this->_load_drivers();

        // fetch from database if not found on FS
        $data = $this->cache->read($args['id']);

        // fetch from memcache if not found on FS and DB
        if (($data === false || $data === null) && $this->mem_cache) {
            $data = $this->mem_cache->read($args['id']);
        }

        if ($data) {
            $args['data'] = base64_decode($data);
            $args['status'] = true;
        }

        return $args;
    }
1183152
public function get( $args, $assoc_args ) {
		list( $alias ) = $args;

		$aliases = WP_CLI::get_runner()->aliases;

		if ( empty( $aliases[ $alias ] ) ) {
			WP_CLI::error( "No alias found with key '{$alias}'." );
		}

		foreach ( $aliases[ $alias ] as $key => $value ) {
			WP_CLI::log( "{$key}: {$value}" );
		}
	}
890615
public function getEntities(array $args = [])
    {
        $alias = $this->getTableAlias();

        $q = $this->_em
            ->createQueryBuilder()
            ->select($alias)
            ->from('MauticContactClientBundle:ContactClient', $alias, $alias.'.id');

        if (empty($args['iterator_mode'])) {
            $q->leftJoin($alias.'.category', 'c');
        }

        $args['qb'] = $q;

        return parent::getEntities($args);
    }
159230
public function execute($params = array(), $requestParams = array()){
      
        $deleteParams = $params;
        if(count($requestParams) > 0) {
            $deleteParams = $requestParams;
        }
        $this->beginTransaction();
        $firstResult = null;
        try{
            //first delete the child tables
            $this->deleteI18nLocales($deleteParams); 
            $this->deleteOneToOneRows($deleteParams);

            //now delete the main tables
            $this->getQueryBuilder()->where($deleteParams);
            $query = $this->getQueryBuilder()->getQuery($this->entity, QueryBuilder::DELETE_QUERY);

            $firstResult = $this->query($query);

            $this->commitTransaction();
        }catch(Exception $e){
            $this->logger->addError($e->getMessage());
            $this->rollbackTransaction();
        }
        return $firstResult;

    }
418784
public function queryRow($params = array())
    {
        $this->mergeParams($params);
        $this->beginQuery();
        $rst = $this->statement->fetch(\PDO::FETCH_ASSOC);
        $this->statement->closeCursor();
        return $rst;
    }
839615
public function getTransaction() {
        if(!$this->isInTransaction()) {
            throw new \Exception('This transaction has already been rolled back, or committed, or has not began yet');
        }
        $transactions = $this->getTransactions();
        return $transactions[$this->getDbService()];
    }
1131291
public static function doTokenizeCard($arg_params)
    {
        //validate params
        $data = self::getParams($arg_params);
        $data['source_id'] = Due::getAppId();
        $data['rail_type'] = Due::getRailType();

        //submit to api
        $token_data = APIRequests::request(
            '/payments/tokenize',
            APIRequests::METHOD_POST,
            $data
        );

        //return response
        return self::toObj($token_data['body']);
    }
344658
public static function get(array $arg_params)
    {
        //validate params
        $data = self::getParams($arg_params);
        $url = '/ecommerce/customers';
        if(!empty($data['id'])){
            $url .= '/'.$data['id'];
        }else{
            return null;
        }

        //submit to api
        $customer_data = APIRequests::request(
            $url,
            APIRequests::METHOD_GET
        );

        //return response
        return self::toObj($customer_data['body']);
    }