Components/Bundle/PlentymarketsAdapter/ResponseParser/BundleResponseParser.php
private function getBundleProducts(array $variation)
    {
        $url = 'items/' . $variation['itemId'] . '/variations/' . $variation['id'] . '/variation_bundles';
        $elements = $this->client->request('GET', $url);

        $this->addProductNumberToResponse($elements);

        $result = [];
        foreach ($elements as $element) {
            $bundleProduct = new BundleProduct();
            $bundleProduct->setAmount((float) $element['componentQuantity']);
            $bundleProduct->setNumber($element['number']);

            $result[] = $bundleProduct;
        }

        return $result;
    }
private function getBundleProducts(array $variation)
    {
        $url = 'items/' . $variation['itemId'] . '/variations/' . $variation['id'] . '/variation_bundles';
        $elements = $this->client->request('GET', $url);

        $this->addProductNumberToResponse($elements);

        $result = [];
        foreach ($elements as $element) {
            $bundleProduct = new BundleProduct();
            $bundleProduct->setAmount((float) $element['componentQuantity']);
            $bundleProduct->setNumber($element['number']);

            $result[] = $bundleProduct;
        }

        return $result;
    }
private function getBundleProducts ( array $ variation ) { $ url = 'items/' . $ variation [ 'itemId' ] . '/variations/' . $ variation [ 'id' ] . '/variation_bundles' ; $ elements = $ this -> client -> request ( 'GET' , $ url ) ; $ this -> addProductNumberToResponse ( $ elements ) ; $ result = [ ] ; foreach ( $ elements as $ element ) { $ bundleProduct = new BundleProduct ( ) ; $ bundleProduct -> setAmount ( ( float ) $ element [ 'componentQuantity' ] ) ; $ bundleProduct -> setNumber ( $ element [ 'number' ] ) ; $ result [ ] = $ bundleProduct ; } return $ result ; }
@param array $variation

@return BundleProduct[]
@param array $variation