Operation list All

List StoreCreditPayments

@param  PageRequest $page_request  (optional)

@throws \\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \\Resources\page[StoreCreditPayment]
354352
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllStoreCreditPayments(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllStoreCreditPayments();
        }
    }
312732
public function store(PageRequest $request)
    {
        $page = Page::create($request->all());

        return (new PageResource($page));
    }
764096
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllStates(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllStates();
        }
    }
538084
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllStripeGateways(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllStripeGateways();
        }
    }
961219
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllVariants(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllVariants();
        }
    }
1366760
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllPayments(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllPayments();
        }
    }
905097
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllShippingMethods(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllShippingMethods();
        }
    }
1243380
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllGeoZones(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllGeoZones();
        }
    }
1169437
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllOrderLineItems(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllOrderLineItems();
        }
    }
1219212
public function listRecurringContractByType($shopperReference, $store, $recurringType)
    {
        // rest call to get list of recurring details
        $request = array(
            "action" => "Recurring.listRecurringDetails",
            "recurringDetailsRequest.merchantAccount" => $this->_helper()->getConfigData(
                'merchantAccount', null,
                $store
            ),
            "recurringDetailsRequest.shopperReference" => $shopperReference,
            "recurringDetailsRequest.recurring.contract" => $recurringType,
        );

        $result = $this->_doRequest($request, $store);

        // convert result to utf8 characters
        $result = utf8_encode(urldecode($result));

        // The $result contains a JSON array containing the available payment methods for the merchant account.
        parse_str($result, $resultArr);

        $recurringContracts = array();
        $recurringContractExtra = array();
        foreach ($resultArr as $key => $value) {
            // strip the key
            $key = str_replace("recurringDetailsResult_details_", "", $key);
            $key2 = strstr($key, '_');
            $keyNumber = str_replace($key2, "", $key);
            $keyAttribute = substr($key2, 1);

            // set ideal to sepadirectdebit because it is and we want to show sepadirectdebit logo
            if ($keyAttribute == "variant" && $value == "ideal") {
                $value = 'sepadirectdebit';
            }

            if ($keyAttribute == 'variant') {
                $recurringContracts[$keyNumber]['recurring_type'] = $recurringType;
                $recurringContracts[$keyNumber]['payment_method'] = $this->_mapToPaymentMethod($value);
            }

            $recurringContracts[$keyNumber][$keyAttribute] = $value;

            if ($keyNumber == 'recurringDetailsResult') {
                $recurringContractExtra[$keyAttribute] = $value;
            }
        }

        // unset the recurringDetailsResult because this is not a card
        unset($recurringContracts["recurringDetailsResult"]);

        foreach ($recurringContracts as $key => $recurringContract) {
            $recurringContracts[$key] = $recurringContracts[$key] + $recurringContractExtra;
        }

        return $recurringContracts;
    }
268226
public static function listAllPaymentCardsAsync(array $parameters = [])
    {
        return self::listAllPaymentCardsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
975725
private function loadCustomers(
        string $uri,
        CustomerRequest $customerRequest
    ): PagedCollection {
        /** @var HalPagedResources $customerResources */
        $customerResources = $this->restClient->getResources(
            Customer::class,
            'customers',
            $uri
        );
        $customers = $customerResources->map(
            function (HalResource $customerResource) use ($customerRequest) {
                return $this->hydrateCustomerWithSubEntities($customerResource, $customerRequest);
            }
        );

        return new PagedCollection(
            $customers,
            $customerResources->getPageMetadata(),
            $customerResources->getLinks(),
            function (string $uri) use ($customerRequest) {
                return $this->loadCustomers($uri, $customerRequest);
            }
        );
    }
716060
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllStoreCredits(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllStoreCredits();
        }
    }
826038
public function listAction(Request $request): Response
    {
        $page = $request->query->get('page') ?? 1;

        $pagerfanta = new Pagerfanta(
            new ArrayAdapter($this->roleService->loadRoles())
        );

        $pagerfanta->setMaxPerPage($this->defaultPaginationLimit);
        $pagerfanta->setCurrentPage(min($page, $pagerfanta->getNbPages()));

        /** @var \eZ\Publish\API\Repository\Values\User\Role[] $sectionList */
        $roles = $pagerfanta->getCurrentPageResults();

        $rolesNumbers = array_column($roles, 'id');

        $rolesDeleteData = new RolesDeleteData(
            array_combine($rolesNumbers, array_fill_keys($rolesNumbers, false))
        );

        $rolesDeleteForm = $this->formFactory->deleteRoles($rolesDeleteData);

        return $this->render('@ezdesign/admin/role/list.html.twig', [
            'form_roles_delete' => $rolesDeleteForm->createView(),
            'pager' => $pagerfanta,
            'can_create' => $this->isGranted(new Attribute('role', 'create')),
            'can_delete' => $this->isGranted(new Attribute('role', 'delete')),
            'can_update' => $this->isGranted(new Attribute('role', 'update')),
            'can_assign' => $this->isGranted(new Attribute('role', 'assign')),
        ]);
    }
959652
public function getApiApps($page = 1, $page_size = 20)
    {
        $response = $this->rest->get(static::APIAPP_LIST_PATH, array('page' => $page, 'page_size' => $page_size));

        $this->checkResponse($response);

        $list = new ApiAppList($response);

        if ($page > $list->getNumPages()) {
            throw new Error('page_not_found', 'Page not found');
        }

        return $list;
    }
856662
public function create(PageRequest $request)
    {

        $page = $this->repository->newInstance([]);
        return $this->response->setMetaTitle(trans('app.new') . ' ' . trans('page::page.name')) 
            ->view('page::page.create', true) 
            ->data(compact('page'))
            ->output();
    }
353559
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllCurrencies(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllCurrencies();
        }
    }