public function addProduct($id, $qty = 1, $spec = [])
    {
        $body = [
            'data' => [
                'type' => 'cart_item',
                'id' => $id,
                'quantity' => $qty
            ]
        ];
        return $this->call('POST', $body, $this->getReference() . '/items');
    }
public function addProduct($id, $qty = 1, $spec = [])
    {
        $body = [
            'data' => [
                'type' => 'cart_item',
                'id' => $id,
                'quantity' => $qty
            ]
        ];
        return $this->call('POST', $body, $this->getReference() . '/items');
    }
public function addProduct ( $ id , $ qty = 1 , $ spec = [ ] ) { $ body = [ 'data' => [ 'type' => 'cart_item' , 'id' => $ id , 'quantity' => $ qty ] ] ; return $ this -> call ( 'POST' , $ body , $ this -> getReference ( ) . '/items' ) ; }
Add a Product to the Cart

@param string $id the Product ID
@param int $qty the quantity to add to the cart
@param array $spec the product spec (variations, inputs, singles etc)
@return Moltin\Response
Add a Product to the Cart