Here is the model class
public class SingleOrder
{
[JsonProperty("order")]
public OneOrder? OneOrder { get; set; }
}
public class OneOrder
{
[JsonProperty("id")]
public double? Id { get; set; }
public string? email { get; set; }
public string? tags { get; set; }
public List<OneLineItem>? line_items { get; set; }
}
Here in controller I am trying to initialize it and use it:
public IActionResult Cancel(double? id)
{
id = 5768551825658;
SingleOrder EmptyObject = new SingleOrder();
EmptyObject.OneOrder.Id = id; //Neither initializing with constructor not this way
}