def create(order_id, line_item)
      validate_type!(line_item)

      attributes = sanitize(line_item)
      _, _, root = @client.post("/orders/#{order_id}/line_items", attributes)

      LineItem.new(root[:data])
    end
def create(order_id, line_item)
      validate_type!(line_item)

      attributes = sanitize(line_item)
      _, _, root = @client.post("/orders/#{order_id}/line_items", attributes)

      LineItem.new(root[:data])
    end
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 order_id [Integer] Unique identifier of a Order
 @param line_item [LineItem, Hash] Either object of the LineItem type or Hash. This object's attributes describe the object to be created.
 @return [LineItem] The resulting object represting created resource.