Hi
I have below object . How i can assign values and then serialize using restsharp
public class BuyerDtls { public string Gstin { get; set; } public string LglNm { get; set; } public string Pos { get; set; } public string Addr1 { get; set; } public string Loc { get; set; } public int Pin { get; set; } public string Stcd { get; set; } } public class DispDtls { public string Nm { get; set; } public string Addr1 { get; set; } public string Loc { get; set; } public int Pin { get; set; } public string Stcd { get; set; } } public class DocDtls { public string Typ { get; set; } public string No { get; set; } public string Dt { get; set; } } public class ItemList { public int ItemNo { get; set; } public string SlNo { get; set; } public string IsServc { get; set; } public string PrdDesc { get; set; } public string HsnCd { get; set; } public int Qty { get; set; } public int FreeQty { get; set; } public string Unit { get; set; } public int UnitPrice { get; set; } public int TotAmt { get; set; } public int Discount { get; set; } public int PreTaxVal { get; set; } public int AssAmt { get; set; } public int GstRt { get; set; } public int IgstAmt { get; set; } public int CgstAmt { get; set; } public int SgstAmt { get; set; } public int CesRt { get; set; } public int CesAmt { get; set; } public int CesNonAdvlAmt { get; set; } public int StateCesRt { get; set; } public int StateCesAmt { get; set; } public int StateCesNonAdvlAmt { get; set; } public int OthChrg { get; set; } public int TotItemVal { get; set; } } public class Root { public string Version { get; set; } public TranDtls TranDtls { get; set; } public DocDtls DocDtls { get; set; } public SellerDtls SellerDtls { get; set; } public BuyerDtls BuyerDtls { get; set; } public DispDtls DispDtls { get; set; } public ShipDtls ShipDtls { get; set; } public List<ItemList> ItemList { get; set; } public ValDtls ValDtls { get; set; } } public class SellerDtls { public string Gstin { get; set; } public string LglNm { get; set; } public string Addr1 { get; set; } public string Loc { get; set; } public int Pin { get; set; } public string Stcd { get; set; } } public class ShipDtls { public string Gstin { get; set; } public string LglNm { get; set; } public string Addr1 { get; set; } public string Loc { get; set; } public int Pin { get; set; } public string Stcd { get; set; } } public class TranDtls { public string TaxSch { get; set; } public string SupTyp { get; set; } public string RegRev { get; set; } public string IgstOnIntra { get; set; } } public class ValDtls { public int AssVal { get; set; } public int CgstVal { get; set; } public int SgstVal { get; set; } public int IgstVal { get; set; } public int CesVal { get; set; } public int StCesVal { get; set; } public int Discount { get; set; } public int OthChrg { get; set; } public int RndOffAmt { get; set; } public int TotInvVal { get; set; } }
Thanks