internal static ApiCallResponse ObjectCreateUpdate(ParaCredentials paracredentials, string entityType, XmlDocument fileToPost, Int64 objectid, ArrayList arguments) { if (arguments == null) { arguments = new ArrayList(); } switch (entityType) { case "Ticket": case "Account": case "Customer": case "Product": case "Asset": if (paracredentials.EnforceRequiredFields == false) { arguments.Add("_enforceRequiredFields_=" + paracredentials.EnforceRequiredFields.ToString().ToLower()); } break; } // Getting the standard API URL to call. var apiCallUrl = ApiUrlBuilder.ApiObjectUrl(paracredentials, entityType, objectid, arguments); // To set up the call method, we check if this is a create (the objectid=0 in that case) // or an update (when we received an objectid>0) var apicallhttpmethod = (objectid == 0) ? ParaEnums.ApiCallHttpMethod.Post : ParaEnums.ApiCallHttpMethod.Update; // Calling the next method that manages the call. return(ApiMakeTheCall(apiCallUrl, apicallhttpmethod, fileToPost)); }
/// <summary> /// Use this method to get the Schema XML of an object. /// </summary> public static ApiCallResponse ObjectGetSchema <T>(ParaCredentials paracredentials) { var entityType = typeof(T).Name; var apiCallUrl = ApiUrlBuilder.ApiObjectUrl(paracredentials, entityType, 0, true); return(ApiMakeTheCall(apiCallUrl, ParaEnums.ApiCallHttpMethod.Get)); }
/// <summary> /// Use this method to get the details of an object that you plan to fill. /// </summary> /// <param name="paracredentials"> /// The credentials to be used for making the API call. /// Value Type: <see cref="ParaCredentials" /> (ParaConnect.ParaCredentials) /// </param> /// <param name="objectid"> /// The id of the object to create or update. /// Value Type: <see cref="Int64" /> (System.int64) /// </param> public static ApiCallResponse ObjectGetDetail <T>(ParaCredentials paracredentials, Int64 objectid, ArrayList arguments) where T : ParaEntityBaseProperties { var entityName = typeof(T).Name; var apiCallUrl = ApiUrlBuilder.ApiObjectUrl(paracredentials, entityName, objectid, arguments); return(ApiMakeTheCall(apiCallUrl, ParaEnums.ApiCallHttpMethod.Get)); }
public static ApiCallResponse ObjectSecondLevelGetList <TModule, TEntity>(ParaCredentials paracredentials, ArrayList arguments) where TModule : ParaEntity where TEntity : ParaEntityBaseProperties { var apiCallUrl = ApiUrlBuilder.ApiObjectCustomUrl <TModule, TEntity>(paracredentials, arguments); return(ApiMakeTheCall(apiCallUrl, ParaEnums.ApiCallHttpMethod.Get)); }
internal static ApiCallResponse ObjectDelete(ParaCredentials paracredentials, string entityType, Int64 objectid, bool purge) { string apiCallUrl; if (purge) { var arguments = new ArrayList { "_purge_=true" }; apiCallUrl = ApiUrlBuilder.ApiObjectUrl(paracredentials, entityType, objectid, arguments); } else { apiCallUrl = ApiUrlBuilder.ApiObjectUrl(paracredentials, entityType, objectid, false); } return(ApiMakeTheCall(apiCallUrl, ParaEnums.ApiCallHttpMethod.Delete)); }
public static ApiCallResponse FileUploadGetUrl <TEntity>(ParaCredentials paracredentials) where TEntity : ParaEntity { var resp = ApiMakeTheCall(ApiUrlBuilder.ApiObjectCustomUrl <TEntity>(paracredentials, "upload"), ParaEnums.ApiCallHttpMethod.Get); return(resp); }
/// <summary> /// Use this method to get the details of an Entity that you plan to fill. /// </summary> /// <param name="paracredentials"> /// The credentials to be used for making the API call. /// Value Type: <see cref="ParaCredentials" /> (ParaConnect.ParaCredentials) /// </param> /// <param name="objectid"> /// The id of the object to create or update. /// Value Type: <see cref="Int64" /> (System.int64) /// </param> public static ApiCallResponse ChatTranscriptGetDetail(ParaCredentials paracredentials, Int64 objectid) { var apiCallUrl = ApiUrlBuilder.ApiChatTranscriptUrl(paracredentials, objectid); return(ApiMakeTheCall(apiCallUrl, ParaEnums.ApiCallHttpMethod.Get)); }