Google Content API for Shopping: Error Creating Shipment

I'm looking to mark an order in Google Shopping as shipped but getting hung up with how to format the lineItems. I'm following the official docs for shipping line items:

https://developers.google.com/shopping-content/v2/reference/v2.1/orders/shiplineitems

And here is my code:

$client = new Google_Client();
$service = new Google_Service_ShoppingContent($client);

// Get Order and Line Items
$order = $service->orders->get('MERCHANT-ID', 'ORDER-ID', array());
$lineItems = $order->getLineItems();

// Prepare Item Info
foreach($lineItems as $item) {
  $items = array('lineItemId' => $item->getId(),'productId' => $item->getProduct()->getId(), 'quantity' => $item->quantityPending);
}

// Prepare Shipment Info
$shipment = array('shipmentId' => 'xxx', 'carrier' => 'ups', 'trackingId' => '1234567890');

// Prepare PostBody
$postBody = new Google_Service_ShoppingContent_OrdersShipLineItemsRequest();
$postBody->operationId = rand();
$postBody->lineItems = $items;
$postBody->shipmentInfos = $shipment;

// Mark Google Order as Shipped
$service->orders->shiplineitems('MERCHANT-ID', 'ORDER-ID', $postBody, array());

This produces the following error, but I haven't been able to figured out exactly what is wrong:

Google_Service_Exception: { "error": { "errors": [ { "domain": "global", "reason": "invalid", "message": "Invalid value for lineItems: {lineItemId=HI2PTRMVLNCZEXP, productId=online:en:US:d3k3245, quantity=2}", "locationType": "other", "location": "" } ], "code": 400, "message": "Invalid value for lineItems: {lineItemId=HI2PTRMVLNCZEXP, productId=online:en:US:d3k3245, quantity=2}" } }

Any ideas what I'm doing wrong?