@param CartId $cartId
@return Checkout

@throws CheckoutNotFoundException
427757
public function getForCart(CartId $cartId) : Checkout
    {
        if (!$this->existsForCart($cartId)) {
            throw new CheckoutNotFoundException;
        }

        return $this->checkouts[(string) $cartId];
    }
1336768
public function getCard($cardId)
    {
        if (!$this->stripe_id) {
            return null;
        }

        $customer = $this->asStripeCustomer();

        foreach ($customer->sources->data as $card) {
            if ($card->id === $cardId) {
                return $card;
            }
        }

        return null;
    }
128664
protected function getBasket(int $id)
    {
        /** @var Order $order */
        $order = $this->client->basketResource($this->version)
                              ->get($id, ['recalculate' => true]);
        if (is_null($order)) {
            throw new EntityNotFoundException("Can not found basket with id: $id");
        }
        $this->id = (int)$order->id;
        $this->setProperties($order);
    }
70935
public function toWishlist($cart_id)
    {
        $result = null;
        $this->hook->attach('cart.move.wishlist.before', $cart_id, $result, $this);

        if (isset($result)) {
            return (array) $result;
        }

        $cart = $this->cart->get($cart_id);

        if (empty($cart) || !$this->cart->delete($cart_id)) {
            return $this->getResultError();
        }

        $result = $this->addToWishlist($cart);

        gplcart_static_clear();

        $this->hook->attach('cart.move.wishlist.after', $data, $result, $this);
        return (array) $result;
    }
1371700
public function addCartLine(CartLineInterface $cartLine)
    {
        if (!$this->cartLines->contains($cartLine)) {
            $this->cartLines->add($cartLine);
        }

        return $this;
    }
253292
public function getById(PaymentId $paymentId) : Payment
    {
        if (!array_key_exists((string)$paymentId, $this->payments)) {
            throw PaymentNotFoundException::byId($paymentId);
        }

        return $this->payments[(string)$paymentId];
    }
477135
public function dispatchCartInconsistentEvent(
        CartInterface $cart,
        CartLineInterface $cartLine
    ) {
        $this->eventDispatcher->dispatch(
            ElcodiCartEvents::CART_INCONSISTENT,
            new CartInconsistentEvent(
                $cart,
                $cartLine
            )
        );

        return $this;
    }
286764
private function getBundleById($id)
    {
        if (null === $bundle = $this->getApplication()->getBundle($id)) {
            throw new NotFoundHttpException("No bundle exists with id `$id`");
        }

        return $bundle;
    }
148547
public function create($data, $cardId = null)
    {
        if (isset($cardId)) {
            return $this->client()->put($data, 'payment-cards/{cardId}', ['cardId' => $cardId]);
        }

        return $this->client()->post($data, 'payment-cards');
    }
355169
public function update($rowId, $qty)
    {
        $cartItem = $this->get($rowId);

        if ($qty instanceof Buyable) {
            $cartItem->updateFromBuyable($qty);
        } elseif (is_array($qty)) {
            $cartItem->updateFromArray($qty);
        } else {
            $cartItem->qty = $qty;
        }

        $content = $this->getContent();

        if ($rowId !== $cartItem->rowId) {
            $content->pull($rowId);

            if ($content->has($cartItem->rowId)) {
                $existingCartItem = $this->get($cartItem->rowId);
                $cartItem->setQuantity($existingCartItem->qty + $cartItem->qty);
            }
        }

        if ($cartItem->qty <= 0) {
            $this->remove($cartItem->rowId);
            return;
        } else {
            $content->put($cartItem->rowId, $cartItem);
        }

        $this->events->fire('cart.updated', $cartItem);

        $this->session->put($this->instance, $content);

        return $cartItem;
    }
428593
public function createPaymentByTransactionIdQuery($transactionId)
    {
        $query = $this->getFactory()->createPaymentPayoneQuery();
        $query->filterByTransactionId($transactionId);

        return $query;
    }
812595
protected function getCart(ShopInterface $shop, ClientInterface $client = null, $sessionId, $currency)
    {
        $cart = $this->repository->findCart($client, $sessionId, $shop);

        if (null === $cart) {
            $cart = $this->createCart($shop, $client);
        } else {
            $this->updateCart($cart, $client, $currency);
        }

        return $cart;
    }
475903
public ArrayList<OvhConfigurationRequirements> cart_cartId_item_itemId_requiredConfiguration_GET(String cartId, Long itemId) throws IOException {
		String qPath = "/order/cart/{cartId}/item/{itemId}/requiredConfiguration";
		StringBuilder sb = path(qPath, cartId, itemId);
		String resp = execN(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t6);
	}
121647
public function getById(OrderId $orderId) : Order
    {
        if (!array_key_exists((string)$orderId, $this->orders)) {
            throw OrderNotFoundException::byId($orderId);
        }

        return $this->orders[(string)$orderId];
    }
1013358
public function loadById($productId)
    {
        return $this->productRepository->getById($productId, false, $this->storeManager->getStore()->getId(), true);
    }
1340139
public function getOnCheckoutStart($storeId = null)
    {
        return $this->getScopeConfig()->getValue(
            self::XML_PATH_TRACK_CHECKOUT_START,
            ScopeInterface::SCOPE_STORE,
            $storeId
        );
    }
152714
public function execute($paymentId)
    {
        $url = $this->environment->getApiQueryURL() . '1/sales/' . $paymentId;

        return $this->sendRequest('GET', $url);
    }