Create Quote using Custom Functions

Create Quote using Custom Functions

I want to create a Quote when Lead gets converted. 
I am doing this using custom functions. I can create a record in Quote but unable to insert Products (Line Items) to that Quote.
Here is the code which I have tried.
  1. pr=map();
  2. pr.put("Product Id","1392132000000082009");
  3. pr.put("Product Name","testProduct");
  4. pr.put("Quantity","1");
  5. pr.put("List Price","1.00");
  6. pr.put(("Discount"),"0");
  7. pr.put("Total","1.00");
  8. pr.put(("Total After Discount"),"1.00");
  9. pr.put("Net Total","1.00");
  10. resp = zoho.crm.create("Quotes",{ "Subject" : "testSubject", ("Account Name") : ("testAccount"), "Product" : pr },2);

By using this, Quote is created but it doesn't add product to this Quote.

I have also tried creating Quote using CURL (using PHP) and it works fine. 

Is there any thing which I am missing. I need some help regarding how to Create Quote with Products.