lib/LineItemsService.php
public function create($order_id, array $lineItem, array $options = array())
  {
    $attributes = array_intersect_key($lineItem, array_flip(self::$keysToPersist));

    list($code, $createdLineItem) = $this->httpClient->post("/orders/{$order_id}/line_items", $attributes, $options);
    return $createdLineItem;
  }
public function create($order_id, array $lineItem, array $options = array())
  {
    $attributes = array_intersect_key($lineItem, array_flip(self::$keysToPersist));

    list($code, $createdLineItem) = $this->httpClient->post("/orders/{$order_id}/line_items", $attributes, $options);
    return $createdLineItem;
  }
public function create ( $ order_id , array $ lineItem , array $ options = array ( ) ) { $ attributes = array_intersect_key ( $ lineItem , array_flip ( self :: $ keysToPersist ) ) ; list ( $ code , $ createdLineItem ) = $ this -> httpClient -> post ( "/orders/{$order_id}/line_items" , $ attributes , $ options ) ; return $ createdLineItem ; }
Create a line item

post '/orders/{order_id}/line_items'

Adds a new line item to an existing order
Line items correspond to products in the catalog, so first you must create products
Because products allow defining different prices in different currencies, when creating a line item, the parameter currency is required

@param integer $order_id Unique identifier of a Order
@param array $lineItem This array's attributes describe the object to be created.
@param array $options Additional request's options.

@return array The resulting object representing created resource.
Create a line item