• Hector Alanis
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
I want to to fill this class  but I can't reach wrapper attributes:
 
public class PricingMotor_cls {
	public Double cost;
	public OrderItems[] orderItems;

//Wrapper for OrderItem
	public class OrderItems {

		public Integer quantity;
		public CashAmounts creditAmounts;
	}

	//Wrapper CashAmounts 
	public class CashAmounts {
		public Double totalPrice;
		public OrderConditions[] orderConditions;
	}
        //Wrapper OrderConditions 
        public class OrderConditions {
		public String conditionType;
		public Decimal amount;
	}

}

I try 
List<ISSM_DeserializePricingMotor_cls.OrderItems> abc = new ISSM_DeserializePricingMotor_cls.OrderItems[1];
abc[0].quantity = 1;

but told me:  FATAL_ERROR System.ListException: List index out of bounds

what I'm doing wrong...
how I fill all object?