public static OtherPaymentDetailsType CreateInstance(Dictionary<string, string> map, string prefix, int index)
{
OtherPaymentDetailsType otherPaymentDetailsType = null;
string key;
int i = 0;
if(index != -1)
{
if (prefix.Length > 0 && !prefix.EndsWith("."))
{
prefix = prefix + "(" + index + ").";
}
}
else
{
if (prefix.Length > 0 && !prefix.EndsWith("."))
{
prefix = prefix + ".";
}
}
key = prefix + "method";
if (map.ContainsKey(key))
{
otherPaymentDetailsType = (otherPaymentDetailsType == null) ? new OtherPaymentDetailsType() : otherPaymentDetailsType;
otherPaymentDetailsType.method = (PaymentMethodsType)EnumUtils.GetValue(map[key],typeof(PaymentMethodsType));
}
key = prefix + "note";
if (map.ContainsKey(key))
{
otherPaymentDetailsType = (otherPaymentDetailsType == null) ? new OtherPaymentDetailsType() : otherPaymentDetailsType;
otherPaymentDetailsType.note = map[key];
}
key = prefix + "date";
if (map.ContainsKey(key))
{
otherPaymentDetailsType = (otherPaymentDetailsType == null) ? new OtherPaymentDetailsType() : otherPaymentDetailsType;
otherPaymentDetailsType.date = map[key];
}
key = prefix + "amount";
if (map.ContainsKey(key))
{
otherPaymentDetailsType = (otherPaymentDetailsType == null) ? new OtherPaymentDetailsType() : otherPaymentDetailsType;
otherPaymentDetailsType.amount = System.Convert.ToDecimal(map[key], DefaultCulture);
}
return otherPaymentDetailsType;
}