public CreatePromotionResponse createPromotion(CreatePromotionRequest createPromotionRequest) {
LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();
params.put("order_id", createPromotionRequest.getOrderId());
params.put("discount_amount", Double.valueOf(createPromotionRequest.getDiscountAmount()).toString());
for(int i=0; i < createPromotionRequest.getPromotionConditions().size(); i++) {
PromotionCondition condition = createPromotionRequest.getPromotionConditions().get(i);
params.put("dimensions[" + i + "]", condition.getDimension());
params.put("values[" + i + "]", condition.getValue());
}
String serializedParams = serializeParams(params);
String url = baseUrl + "/promotions";
String response = makeServiceCall(url, serializedParams);