Get transaction resource.

@param  string|null  $version

@return \Billplz\Contracts\Bill\Transaction
332026
final public function transaction(?string $version = null): Contracts\Bill\Transaction
    {
        return $this->uses('Bill.Transaction', $version);
    }
194994
public function fetchTransactionInfo($reference)
    {

        //Request Data
        $requestData = $this->dataObjectFactory->create();
        $requestData->setDynamicApiUrl(ApiHelper::API_FETCH_TRANSACTION . "/" . $reference);
        $requestData->setApiKey($this->configHelper->getApiKey());
        $requestData->setRequestMethod('GET');
        //Build Request
        $request = $this->apiHelper->buildRequest($requestData);

        $result = $this->apiHelper->sendRequest($request);
        $response = $result->getResponse();

        return $response;
    }
858294
protected function getPackageKeyFromMigrationVersion(Version $version)
    {
        $sortedAvailablePackages = $this->packageManager->getAvailablePackages();
        usort($sortedAvailablePackages, function (PackageInterface $packageOne, PackageInterface $packageTwo) {
            return strlen($packageTwo->getPackagePath()) - strlen($packageOne->getPackagePath());
        });

        $reflectedClass = new \ReflectionClass($version->getMigration());
        $classPathAndFilename = Files::getUnixStylePath($reflectedClass->getFileName());

        /** @var $package PackageInterface */
        foreach ($sortedAvailablePackages as $package) {
            $packagePath = Files::getUnixStylePath($package->getPackagePath());
            if (strpos($classPathAndFilename, $packagePath) === 0) {
                return $package->getPackageKey();
            }
        }

        return '';
    }
1244706
public function getDelivery(Transaction $transaction = null)
    {
        if ($this->session->has('delivery-id')) {
            $delivery = $this->manager->getRepository('EcommerceBundle:Delivery')->find($this->session->get('delivery-id'));

            return $delivery;
        }

        $delivery = new Delivery();

        /** @var Address $billingAddress */
        $billingAddress = $this->manager->getRepository('EcommerceBundle:Address')->findOneBy(array(
            'actor' => $this->securityContext->getToken()->getUser(),
            'forBilling' => true
        ));

        if (false === is_null($billingAddress)) {
            $delivery->setFullName($this->securityContext->getToken()->getUser()->getFullName());
            $delivery->setContactPerson($billingAddress->getContactPerson());
            $delivery->setDni($billingAddress->getDni());
            $delivery->setAddressInfo($billingAddress->getAddressInfo());
            $delivery->setPhone($billingAddress->getPhone());
            $delivery->setPhone2($billingAddress->getPhone2());
            $delivery->setPreferredSchedule($billingAddress->getPreferredSchedule());
        }

        $country = $this->manager->getRepository('CoreBundle:Country')->find('es');
        $delivery->setCountry($country);

        if (false === is_null($transaction)) {
            $delivery->setTransaction($transaction);
        }

        return $delivery;
    }
1301005
public static function getByVersionNumber($version)
    {
        $updates = id(new Update())->getLocalAvailableUpdates();
        foreach ($updates as $up) {
            if ($up->getUpdateVersion() == $version) {
                return $up;
            }
        }
    }
1359027
protected function getCompareVersion(Version $version)
    {
        if ($version->isDev()) {
            return substr(
                $version->getFullPretty(),
                strlen($version->getPretty()) + 1
            );
        }

        return $version->getPretty();
    }
87204
public function getLoginUrl($scope = array(), $version = null)
        {
            $scope = $this->getScope($scope);

            return $this->getFacebookHelper()->getLoginUrl($scope, $version);
        }
821474
public function getDocumentation($version = null)
    {
        return $this->routesMethodService->getDocumentation(
            $this->context->getRouteId(),
            $version,
            $this->context->getPath()
        );
    }
1257545
private static function fetchProtocolVersion(string $version): string
    {
        $v = substr($version, 5);

        if ($v === '2.0') {
            return '2';
        }

        // Fallback for values outside of valid protocol versions
        if (!in_array($v, static::$allowedVersions, true)) {
            return '1.1';
        }

        return $v;
    }
749986
public function getRoutes($version = null)
    {
        $routes = $this->adapter->getIterableRoutes($version);

        if (! is_null($version)) {
            $routes = [$version => $routes];
        }

        $collections = [];

        foreach ($routes as $key => $value) {
            $collections[$key] = new RouteCollection($this->container['request']);

            foreach ($value as $route) {
                $route = $this->createRoute($route);

                $collections[$key]->add($route);
            }
        }

        return is_null($version) ? $collections : $collections[$version];
    }
1247438
public function getVersionedContent($version)
    {
        if (!in_array($version, $this->getVersions(), true)) {
            throw new \UnexpectedValueException("Invalid log entry $version for {$this->path}.");
        }

        if (($content = \Arbit\VCSWrapper\Cache\Manager::get($this->path, $version, 'content')) === false) {
            // Refetch the basic content information, and cache it.
            $process = new \Arbit\VCSWrapper\SvnCli\Process('svn', $this->username, $this->password);
            $process->argument('-r' . $version);

            // Execute command
            $return = $process->argument('cat')->argument(new \SystemProcess\Argument\PathArgument($this->root . $this->path))->execute();
            \Arbit\VCSWrapper\Cache\Manager::cache($this->path, $version, 'content', $content = $process->stdoutOutput);
        }

        return $content;
    }
247977
public function asset($asset, $version = null)
    {
        $host = $this->request->getHost();
        $port = $this->request->getPort();
        $path = $this->request->getBasePath();

        if ('/' !== substr($asset, 1)) {
            $asset = '/'.$asset;
        }

        if (80 === $port) {
            $port = '';
        } else {
            $port = ':'.$port;
        }

        return '//'.$host.$port.$path.$asset;
    }
45848
public function getOneVersion($versionNumber, $con = null)
    {
        return ChildDealerProductVersionQuery::create()
            ->filterByDealerProduct($this)
            ->filterByVersion($versionNumber)
            ->findOne($con);
    }
1055830
protected function legacyVersion($version)
    {
        $legacy = file_get_contents(__DIR__.'/../resources/legacy.json');

        $legacy = json_decode($legacy, true);

        return $legacy[$version];
    }
332679
protected static function getSplittedVersion($version)
    {
        $version = static::cleanExtraVersion($version);
        $version = str_replace(array('*', 'x', 'X'), '9999999', $version);
        $exp = explode('.', $version);

        return $exp;
    }
495370
public function getOneVersion($versionNumber, $con = null)
    {
        return ChildDealerVersionQuery::create()
            ->filterByDealer($this)
            ->filterByVersion($versionNumber)
            ->findOne($con);
    }
1334563
protected function getExplicitStability($version)
    {
        $found   = null;
        $pattern = $this->getPattern();

        foreach (static::splitConstraints($version) as $constraint) {
            if ( ! preg_match($pattern, $constraint, $match)) {
                continue;
            }

            $stability = $this->getStabilityInteger($match[1]);
            $found     = max($stability, $found);
        }

        return $found;
    }