Operation listAllStoreCreditsAsync

List StoreCredits


@throws \InvalidArgumentException
@return \GuzzleHttp\Promise\PromiseInterface
333977
public static function listAllStoreCreditsAsync(array $parameters = [])
    {
        return self::listAllStoreCreditsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
1204144
public function getCreditNotes()
    {
        $result = null;
        if ($this->getType() === static::Order) {
            $result = array();
            $shopCreditNotes = $this->getShopCreditNotesOrIds();
            foreach ($shopCreditNotes as $shopCreditNote) {
                $result[] = new static(static::CreditNote, $shopCreditNote);
            }
        }
        return $result;
    }
667480
public static function listAllRefundOperationsAsync(array $parameters = [])
    {
        return self::listAllRefundOperationsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
802739
public static function listAllCurrenciesAsync(array $parameters = [])
    {
        return self::listAllCurrenciesAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
397578
public function list()
    {
        $response = $this->client->fetch(
            $this->uri,
            []
        );

        return json_encode($response->getContent(), JSON_FORCE_OBJECT);
    }
933364
public function getExistsRelations($storeKey)
    {
        if (!isset($this->relations[$storeKey])) {
            throw new \InvalidArgumentException(sprintf(
                'Invalid relation store key "%s"; must be loaded',
                $storeKey
            ));
        }
        return $this->relations[$storeKey];
    }
66474
public static function get_store_instance_summaries() {
        $return = array();
        $default = array();
        $instance = cache_config::instance();
        $stores = $instance->get_all_stores();
        $locks = $instance->get_locks();
        foreach ($stores as $name => $details) {
            $class = $details['class'];
            $store = false;
            if ($class::are_requirements_met()) {
                $store = new $class($details['name'], $details['configuration']);
            }
            $lock = (isset($details['lock'])) ? $locks[$details['lock']] : $instance->get_default_lock();
            $record = array(
                'name' => $name,
                'plugin' => $details['plugin'],
                'default' => $details['default'],
                'isready' => $store ? $store->is_ready() : false,
                'requirementsmet' => $class::are_requirements_met(),
                'mappings' => 0,
                'lock' => $lock,
                'modes' => array(
                    cache_store::MODE_APPLICATION =>
                        ($class::get_supported_modes($return) & cache_store::MODE_APPLICATION) == cache_store::MODE_APPLICATION,
                    cache_store::MODE_SESSION =>
                        ($class::get_supported_modes($return) & cache_store::MODE_SESSION) == cache_store::MODE_SESSION,
                    cache_store::MODE_REQUEST =>
                        ($class::get_supported_modes($return) & cache_store::MODE_REQUEST) == cache_store::MODE_REQUEST,
                ),
                'supports' => array(
                    'multipleidentifiers' => $store ? $store->supports_multiple_identifiers() : false,
                    'dataguarantee' => $store ? $store->supports_data_guarantee() : false,
                    'nativettl' => $store ? $store->supports_native_ttl() : false,
                    'nativelocking' => ($store instanceof cache_is_lockable),
                    'keyawareness' => ($store instanceof cache_is_key_aware),
                    'searchable' => ($store instanceof cache_is_searchable)
                ),
                'warnings' => $store ? $store->get_warnings() : array()
            );
            if (empty($details['default'])) {
                $return[$name] = $record;
            } else {
                $default[$name] = $record;
            }
        }

        ksort($return);
        ksort($default);
        $return = $return + $default;

        foreach ($instance->get_definition_mappings() as $mapping) {
            if (!array_key_exists($mapping['store'], $return)) {
                continue;
            }
            $return[$mapping['store']]['mappings']++;
        }

        return $return;
    }
1273165
protected function getApiBody(): array
    {
        $clientId = $this->client->getClientId();
        $clientSecret = $this->client->getClientSecret();

        if (empty($clientId) || empty($clientSecret)) {
            throw new InvalidArgumentException('Missing client_id and client_secret information!');
        }

        return [
            'scope' => '*',
            'grant_type' => 'password',
            'client_id' => $clientId,
            'client_secret' => $clientSecret,
        ];
    }
302345
private function tResponses() {return dfc($this, function() {return
		!($p = $this->tReq(false)) ? [] : df_sort($p->getChildTransactions())
	;});}
523563
public function getAllTxrefs()
    {
        $allTxrefs = array();
        if (is_array($this->txrefs)) {
            $allTxrefs = array_merge($allTxrefs, $this->txrefs);
        }
        if (is_array($this->unconfirmed_txrefs)) {
            $allTxrefs = array_merge($allTxrefs, $this->unconfirmed_txrefs);
        }

        if (count($allTxrefs) == 0)
            return null;
        else
            return $allTxrefs;
    }
1278433
public function getList(): ListInterface
    {
        $repository = $this->getRepository();

        if (!$repository instanceof AbstractRepository) {
            throw new InvalidRepositoryException(sprintf(
                'Repository must be instance of `%s` instance of `%s` given.',
                AbstractRepository::class, null === $repository ? 'NULL' : get_class($repository)
            ));
        }

        if ('' !== $this->getPageParam()) {
            $this->setPage($this->listRequest->getPage($this->getPageParam(), $this->getPage()));
        }

        if ('' !== $this->getLimitParam()) {
            $this->setLimit($this->listRequest->getLimit($this->getLimitParam(), $this->getLimit()));
        }

        $this->mergeOptions();

        $list = $this->createList();
        $list->load();

        return $list;
    }
27719
static function fetchList()
    {
        $list =& $GLOBALS['eZCollaborationList'];
        if ( isset( $list ) )
            return $list;
        $list = array();
        $activeHandlers = eZCollaborationItemHandler::activeHandlers();
        $repositories = eZCollaborationItemHandler::handlerRepositories();
        foreach ( $activeHandlers as $handler )
        {
            $handlerInstance = eZCollaborationItemHandler::instantiate( $handler, $repositories );
            if ( $handlerInstance !== null )
                $list[] = $handlerInstance;
        }
        return $list;
    }
227216
public function getStoresForFrontend()
    {
        $collection = $this->stockistsCollectionFactory->create()
            ->addFieldToSelect('*')
            ->addFieldToFilter('store_id', $this->getStoreId())
            ->addFieldToFilter('status', Stores::STATUS_ENABLED)
            ->setOrder('name', 'ASC');
        return $collection;
    }
1028354
function fetchAll()
    {
        if ( $this->items !== null )
            return $this->items;

        if ( $this->query === null )
        {
            $this->query = $this->generateSQL();
        }
        if ( $this->query === false )
            return array();
        $query = "SELECT * {$this->query} ORDER BY {$this->order}";
        $params = array( 'offset' => $this->offset,
                         'limit'  => $this->limit );
        $db = eZDB::instance();
        $rows = $db->arrayQuery( $query, $params );
        if ( count( $rows ) == 0 )
            $this->items = array();
        else
            $this->items = eZURLAliasQuery::makeList( $rows );
        return $this->items;
    }
304166
static function fetchList( $conditions = null, $asObjects = true, $offset = false, $limit = false, $asHash = true )
    {
        $currencyList = array();
        $sort = null;
        $limitation = null;
        if ( $offset !== false or $limit !== false )
            $limitation = array( 'offset' => $offset, 'length' => $limit );

        $rows = eZPersistentObject::fetchObjectList( eZCurrencyData::definition(),
                                                     null,
                                                     $conditions,
                                                     $sort,
                                                     $limitation,
                                                     $asObjects );

        if ( count( $rows ) > 0 )
        {
            if ( $asHash )
            {
                $keys = array_keys( $rows );
                foreach ( $keys as $key )
                {
                    if ( $asObjects )
                        $currencyList[$rows[$key]->attribute( 'code' )] = $rows[$key];
                    else
                        $currencyList[$rows[$key]['code']] = $rows[$key];
                }
            }
            else
            {
                $currencyList = $rows;
            }
        }

        return $currencyList;
    }
742947
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllStoreCreditTransactions(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllStoreCreditTransactions();
        }
    }
569877
public function getList()
    {
        $request = new ListDirtyWordRequest();
        $response = new BaseResponse();
        return $this->client->sendRequest($request, $response);
    }